Unsharp mask amplification - limiting local contrast
I have a script that produces unsharp masks from an input image (in this example, a solar eclipse image):
im = im2double(imread("image.tif")); imb = imgaussfilt(im, 8); hp = im - imb;
To amplify the effects of this high pass filter, I multiply it by a constant:
amp = 100; hpamp = amp * hp; subplot(2,1,1), imshow(hp+0.5,[0,1]) subplot(2,1,2), imshow(hpamp+0.5,[0,1])
As expected, the dark areas got darker and the bright areas got brighter, but at a certain amplification value, this will over darken and brighten the sharpened image (as indicated in the attached image). I've tried a few ways (masking, etc) of limiting the amplification locally, but with no success (that looks acceptable). I'd like the amplification to be applied non-linearly throughout the image.
Does anyone know of a method that I could use to amplify the effects of the unsharp mask while correcting for the local contrast (if it's even possible)? If I'm going about this all wrong, please feel free to provide other feedback as well.
0 commentaires
Réponses (1)
0 commentaires
Voir également
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!