This function filters the input image using a band-pass filter, with the specified parameters.
Declaration:
|
Copy Code
|
AT_ERRCOUNT ACCUAPI IG_FIP_filter_bandpass(
HIGEAR hIGear,
const LPAT_RECT lpRect,
const AT_MODE nFilterBrand,
const AT_DOUBLE dCutoffFreqLow,
const AT_DOUBLE dCutoffFreqHigh,
const AT_INT nFilterOrder,
const AT_DOUBLE dRippleFactor
);
|
Arguments:
Name |
Type |
Description |
hIGear |
HIGEAR |
Handle of the input image, also pass out filtered image. |
lpRect |
const LPAT_RECT |
Far pointer to an AT_RECT structure specifying the rectangular portion of the image on which to operate. If NULL, this operation will be performed on the entire image. |
nFilterBrand |
const AT_MODE |
Brand of the filter to use. Constants IG_FREQIP_FILTER_BRAND_* are listed in file i_FreqIP.h. |
dCutoffFreqLow |
const AT_DOUBLE |
Lower cutoff frequency for the band-pass filter. |
dCutoffFreqHigh |
const AT_DOUBLE |
Higher cutoff frequency for the band-pass filter. |
nFilterOrder |
const AT_INT |
Filter order to use, applicable to all except Ideal filter. |
dRippleFactor |
const AT_DOUBLE |
A factor which determines the pass-band ripple for Chebyshev filters, with value between [0, 1]. |
Return Value:
Returns the number of ImageGear errors that occurred during this function call.
Supported Raster Image Formats:
Grayscale - 8 bpp.
Sample:
FreqIP
Example:
|
Copy Code
|
HIGEAR hIGear; /* Handle of the input image */
...
IG_FIP_filter_bandpass(hIGear, NULL, IG_FREQIP_FILTER_BRAND_CHEBYSHEV_I , 0.3, 1, 0.5);
...
|
Remarks:
Parameter nFilterBrand specifies the brand of filter to use, with available brands being Ideal, Butterworth, Gaussian, Chebyshev I, and Chebyshev II.
Parameters dCutoffFreqLowand dCutoffFreqHigh specify the lower and upper cutoff frequencies for the band-pass filter. The parameters should have values within the range of [0, 1], where 0 is DC and 1 is the Nyquist frequency.