ImageGear Professional for Windows ActiveX
FilterWithUnsharpMask Method

Description:

Sharpens an image and enhances its edges. The algorithm works by subtracting a smoothed version of the image ("unsharp") from the original image.

Parameter dblRadius can range from 0.1 to 500. Typical values for high-resolution images range from 1.0 to 2.0. Use larger values of dblRadius for thicker edges. The smaller dblRadius value is, the faster is this processing .

Parameter Amount can range from 1 to 500. Typical values for photographic images range from 100 to 200. Use bigger values for greater edge contrast.

Parameter Threshold can range from 1 to 500. Typical values for photographic images are between 0 and 20. Use Threshold to apply sharpening only to those areas where contrast changes significantly. Flat areas will remain unchanged. A proper selection of Threshold allows to enhance edges on the image while leaving insufficient details, such as noise or grain of the photographic film, unchanged.

Parameter colorChannel specifies the channel to which the transform shall be applied. The default value is IG_COLOR_COMP_ALL: apply transform to all color channels of the image. To run UnsharpMask process on the Intensity channel of the image, convert the image to YUV color space, run UnsharpMask filter with colorChannel = IG_COLOR_COMP_YUV_Y, and convert back to original color space.

This method takes into account the ROI settings of pPage object, that are accessible via the IGPage Object.ROI Property. By default ROI is set to the entire image.

Syntax:

      FilterWithUnsharpMask (ByVal pPage As IGPage, ByVal dblRadius As
Double, ByVal Amount As Long, ByVal Threshold As Long, ByVal
colorChannel As enumColorComp)

Parameters:

Name Description
pPage Reference to IGPage Object to which an unsharp masking filter is applied.
dblRadius Defines the neighborhood to be considered for each pixel.
Amount Amount of sharpening, in percents.
Threshold Minimal difference between a pixel and its neighbors at which the pixel will be modified.
colorChannel Color channel to which the transform shall be applied.

Return Value:

N/A

Bits Per Pixel:

All except indexed with >1bpp

Sample:

Image Processing and Effects

 

 


©2016. Accusoft Corporation. All Rights Reserved.

Send Feedback