UnsharpMask method (ILEADRasterProcess)
short UnsharpMask(ILEADRaster *pRaster, short iAmount, short iRadius, short iThreshold, short ColorType); | |
Overview |
Refer to Detecting and Enhancing Edges and Lines. |
Remarks
This method is actually considered a sharpening method. It is used to sharpen the image with a minimum of noise by applying the unsharp mask. To reduce the noise, it starts by blurring a copy of the original image. The amount of blur depends on iRadius. The method then determines the difference between each pixel's value of the original image and the corresponding pixel's value in the blurred image. If the difference is greater than the iThreshold value, then the difference between the pixel values is multiplied by the value in the iAmount parameter and added to the original pixel value.
To increase the thickness of the sharpened edges, increase the value of iRadius.
To increase the amount of sharpness, increase the value of iAmount.
To reduce the noise and eliminate the small edges or individual pixels that will produce noise in image, increase the value of iThreshold.
Using the YUV color space decreases the processing time.
This method supports 12 and 16-bit grayscale images and 48 and 64-bit color images. Support for 12 and 16-bit grayscale images and 48 and 64-bit color images is available only in the Document/Medical toolkits.
This method does not support signed data images. It returns the error code ERROR_SIGNED_DATA_NOT_SUPPORTED if a signed data image is passed to this method.
See Also