ImageGear for C and C++ on Windows v20.0 - Updated
IG_FIP_filter_bandstop
API Reference Guide > FreqIP Component API Reference > FreqIP Component Functions Reference > Filter Functions > IG_FIP_filter_bandstop

This function filters the input image using a band-stop filter, with the specified parameters.

Declaration:

 
Copy Code
AT_ERRCOUNT ACCUAPI IG_FIP_filter_bandstop(
        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-stop filter.
dCutoffFreqHigh const AT_DOUBLE Higher cutoff frequency for the band-stop 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 image to check*/
...
IG_FIP_filter_bandstop(hIGear, NULL, IG_FREQIP_FILTER_BRAND_BUTTERWORTH , 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-stop filter. The parameters should have values within the range of [0, 1], where 0 is DC and 1 is the Nyquist frequency.

Is this page helpful?
Yes No
Thanks for your feedback.