Uh oh!
There was an error while loading.Please reload this page.
- Notifications
You must be signed in to change notification settings - Fork56.4k
Create multiscale_sharpen#17274
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to ourterms of service andprivacy statement. We’ll occasionally send you account related emails.
Already on GitHub?Sign in to your account
Uh oh!
There was an error while loading.Please reload this page.
Conversation
asmorkalov left a comment
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others.Learn more.
@jsxyhelu Thanks for the sample. Please format the code with OpenCV coding style:https://github.com/opencv/opencv/wiki/Coding_Style_Guide
Uh oh!
There was an error while loading.Please reload this page.
Uh oh!
There was an error while loading.Please reload this page.
Uh oh!
There was an error while loading.Please reload this page.
Uh oh!
There was an error while loading.Please reload this page.
| @@ -0,0 +1,82 @@ | |||
| #include "opencv2/core/utility.hpp" | |||
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others.Learn more.
Please add license header at the beginning of the file:https://github.com/opencv/opencv/wiki/Coding_Style_Guide#file-structure
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others.Learn more.
@asmorkalov Thank you , This pullrequest has benn changed.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others.Learn more.
actually we don't using license headers in sample files.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others.Learn more.
my mistake, this pullrequest has benn changed.
Adjust code format to conform to Coding_Style_Guide,also add license header ,and modifying unintuitive variable naming。
alalek commentedMay 14, 2020
File must have .cpp extension. |
also remove license
asmorkalov commentedMay 15, 2020
@jsxyhelu Please take a look on CI bot status. It reports build warnings on most of platforms:https://pullrequest.opencv.org/buildbot/builders/precommit_linux64/builds/26054/steps/compile%20release/logs/warnings%20%284%29 |
jsxyhelu commentedMay 15, 2020 • edited
Loading Uh oh!
There was an error while loading.Please reload this page.
edited
Uh oh!
There was an error while loading.Please reload this page.
Thank you! Have Modified the code ,It is "ALL GREEN" now ^v^ |
asmorkalov left a comment
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others.Learn more.
The code looks good enough for me in general, but I have not found any image insamples/data suitable for the example. It does not bring visible improvement for images, including Lena.
jsxyhelu commentedMay 20, 2020
Here I provide "multiScaleSharpen " image processing effects on "lena.jpg" and "building.jpg". As "building.jpg" is bigger, I chose radius 17 and 33 respectively. Overall, the algorithm can play a role in processing landscape pictures. However, I am not sure whether this algorithm is duplicated with the existing algorithm. If it is indeed the case, please help to point out, thank you very much! |
sturkmen72 commentedMay 21, 2020
there ishttps://github.com/opencv/opencv/blob/master/samples/cpp/tutorial_code/core/mat_mask_operations/mat_mask_operations.cpp in the samples. is this code really better? |
jsxyhelu commentedMay 21, 2020
function "Sharpen" is great! |
samples/cpp/multiscale_sharpen.cpp Outdated
| // Create a window | ||
| namedWindow(window_name1, 1); | ||
| // create a toolbar | ||
| createTrackbar("Canny threshold default", window_name1, &sharpenRadius, 7, onTrackbar); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others.Learn more.
Canny threshold default ??
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others.Learn more.
My mistake.Legacy problems caused by reference code.Have fixed it.Thank you.
samples/cpp/multiscale_sharpen.cpp Outdated
| } | ||
| static void help(const char** argv) | ||
| { | ||
| printf("\nThis sample demonstrates multiScaleSharpen detection\n" |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others.Learn more.
detection ??
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others.Learn more.
yes,"image processing" is better.
jsxyhelu commentedMay 26, 2020
it may not be suiltable to pr here. |
Uh oh!
There was an error while loading.Please reload this page.
This pullrequest changes 0516
This enhanced algorithm comes from paper

Dark image enhancement based on binocular target contrast and multi-scale detail enhancement
https://ieeexplore.ieee.org/abstract/document/7351031/
Section 2.3,there is Screenshot
The core idea of the paper is similar to Retinex, which uses Gaussian blur at three scales, and then subtracts from the original image to obtain different levels of detail information, and then merges these details into the original image through a certain combination, which is strengthened The ability of original image information.
It is worth mentioning that the coefficients of D1 have been specially processed. The algorithm has simple coding and obvious effects.
Core function:
Results show:

CPP Shampe was PR to illustrate the algorithm。
Pull Request Readiness Checklist
See details athttps://github.com/opencv/opencv/wiki/How_to_contribute#making-a-good-pull-request
Patch to opencv_extra has the same branch name.