Created
January 19, 2012 16:52
-
-
Save mlashcorp/1641134 to your computer and use it in GitHub Desktop.
opencv documentation description of unsharp mask algorithm
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
// sharpen image using "unsharp mask" algorithm | |
Mat blurred; double sigma = 1, threshold = 5, amount = 1; | |
GaussianBlur(img, blurred, Size(), sigma, sigma); | |
Mat lowConstrastMask = abs(img - blurred) < threshold; | |
Mat sharpened = img*(1+amount) + blurred*(-amount); | |
img.copyTo(sharpened, lowContrastMask); |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
@mlashcorp How can I use this file in android project? Any links or resources, please?