ImageGear Professional for Linux
IG_IP_gaussian_blur

This function smoothes the images using Gaussian transform.

Declaration:

 
Copy Code
AT_ERRCOUNT ACCUAPI IG_IP_gaussian_blur (
        HIGEAR hIGear, 
        const LPAT_RECT lpRect, 
        const double dblRadius 
);

Arguments:

Name Type Description
hIGear HIGEAR HIGEAR handle of image.
lpRect const LPAT_RECT Far pointer to AT_RECT struct specifying a portion of the image to be affected. NULL means entire image. Before ImageGear performs this operation, it will check to see if an internal flag has been set to TRUE to make a mask active for this HIGEAR image. If a mask is active, and a valid pointer to a mask can be found, ImageGear will override the settings passed to this structure in favor of the non-rectangular ROI defined by the mask.
dblRadius const double Defines the neighborhood to be considered for each pixel.

Return Value:

Returns the number of ImageGear errors that occurred during this function call.

Supported Raster Image Formats:

All pixel formats supported by ImageGear Professional, except:
Indexed RGB with non-grayscale palette.

Example:

 
Copy Code
HIGEAR hIGear; 
/* Blur whole image, radius = 2.0 */
nErrCount =IG_IP_gaussian_blur ( hIGear, NULL, 2.0 ); 

Remarks:

This function makes images look softer and slightly out of focus. A specific feature of Gaussian Blur is that it removes the high-frequency component from the image, which is not the case for the IG_IP_smooth().

Parameter dblRadius corresponds to the Standard Deviation (Sigma) in Gaussian transform. It can range from 0.1 to 500. Typical values for high-resolution images range from 1.0 to 2.0. Larger values will cause greater softening. On the other hand, smaller values are faster. The width of the area considered for each pixel is approximately 6 * dblRadius.

This function, like other ImageGear Image Processing and Clipboard API calls, takes an AT_RECT structure as an argument, so that you can process a rectangular sub-region of an image. However, before ImageGear performs the operation specified by this function, it will check to see if an internal flag has been set to TRUE, indicating that a mask HIGEAR should be used with the image. If the flag is set to TRUE, and a valid pointer to a mask image has been assigned, ImageGear will override the settings passed to the AT_RECT structure and use the non-rectangular ROI defined by the mask HIGEAR. To create a non-rectangular region of interest, call IG_IP_NR_ROI_to_HIGEAR_mask().

 

 


©2016. Accusoft Corporation. All Rights Reserved.

Send Feedback