Generate an ideal bandpass filter.
gen_bandpass generates an ideal bandpass filter in the frequency domain. The DC term is assumed to lie in the center of the image. The parameters MinFrequency and MaxFrequency determine the cutoff frequencies of the filter (in pixels). The resulting image contains an annulus with the value 255, and the value 0 outside of this annulus.
ImageBandpass (output_object) |
image -> object : byte |
Bandpass filter in the frequency domain. |
MinFrequency (input_control) |
real -> real |
Minimum frequency. | |
Default value: 20 | |
Suggested values: 10, 20, 30, 40, 50, 60, 70, 100 | |
Range of values: 1 <= MinFrequency <= 200 | |
Minimum increment: 1 | |
Recommended increment: 1 | |
Restriction: MinFrequency > 0 |
MaxFrequency (input_control) |
real -> real |
Maximum frequency. | |
Default value: 40 | |
Suggested values: 10, 20, 30, 40, 50, 60, 70, 100 | |
Range of values: 1 <= MaxFrequency <= 200 | |
Minimum increment: 1 | |
Recommended increment: 1 | |
Restriction: MaxFrequency > 0 |
Size (input_control) |
integer -> integer |
Size (dimension) of the image (filter). | |
Default value: 512 | |
List of values: 8, 16, 32, 64, 128, 256, 512, 1024, 2048, 4096, 8192 |
my_lowpass(ObjType Image, ObjType *Result) { ObjType FFT, Bandpass, FFTConvol; fft__(Image,&FFT); gen_bandpass(&Bandpass,20,40,512); convol_fft__(FFT,Bandpass,&FFTConvol); clear(Bandpass); clear(FFT); fft_inv__(FFTConvol,Result); clear(FFTConvol); }
gen_bandpass returns TRUE if all parameters are correct. If necessary, an exception is raised.
gen_highpass, gen_lowpass, gen_bandfilter