Sharpen image using unsharp masking.
im must be a grayscale or RGB image. The unsharp masking can be controlled with option-value pairs.
The unsharp masking technique is equivalent to:
im + k * (im - smooth (im))
where im is a grayscale image and smooth
performs
gaussian smoothing. RGB images are transformed to Lab colorspace,
the L channel is sharpen to L’, and L’ab is transformed back to RGB.
See "Unsharp masking" in Wikipedia
The following options control the unsharp masking:
"Radius"
Sigma of Gaussian Filter for the smoothing stage. Must be a positive number. Defaults to 1.
"Amount"
Magnitude of the overshoot k. Must be a non-negative number. Defaults to 0.8.
"Threshold"
Minimum brightness change that will be sharpened. Must be in the range [0 1]. Defaults to 0.
Examples:
out = imsharpen (im); # Using imsharpen with default values out = imsharpen (im, "Radius", 1.5); out = imsharpen (im, "Amount", 1.2); out = imsharpen (im, "Threshold", 0.5); out = imsharpen (im, "Radius", 1.5, "Amount", 1.2, "Threshold", 0.5);
See also: imfilter, fspecial.
Package: image