Logo Search packages:      
Sourcecode: jmagick version File versions  Download package

native MagickImage magick::MagickImage::unsharpMaskImage ( double  raduis,
double  sigma,
double  amount,
double  threshold 
) throws MagickException

Creates a new image that is a copy of an existing one with the pixels sharpened using an "unsharp" masking technique.

This process starts by building a temporary, blurred, copy of the image. Then each pixel in this "unsharp" image is compared against its corresponding pixel in the original image. If their difference is above a threshold, a percentage of the difference is added back into the original pixel.

The first two arguments, radius and sigma, specify the blurring used to create the "unsharp" image. See gaussianBlurImage for a detail explanation. It will suffice to say that the larger the radius and sigma the more this blurred image will diverge from the original.

The last two arguments, threshold and amount, specify the difference threshold required to apply an adjustment to each pixel and, once the threshold is reached, the amount of the difference to be added back into the original pixels. A high threshold will cause the algorithm to only adjust edge pixels. Specifying a threshold will adjust every pixel.

raduis The radius of the gaussian, in pixels, not counting the center pixel
sigma The standard deviation of the gaussian, in pixels
amount The percentage of the difference between the original and the blur image that is added back into the original.
threshold The threshold in pixels needed to apply the diffence amount.
A sharpened image.
MagickException on error

Generated by  Doxygen 1.6.0   Back to index