Generate an ideal band filter.
gen_bandfilter generates an ideal band 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 0, and the value 255 outside of this annulus.
ImageFilter (output_object) |
image -> object : byte |
Band 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 | |
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 | |
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_bandfilter(&Bandpass,20,40,512); convol_fft__(FFT,Bandpass,&FFTConvol); clear(Bandpass); clear(FFT); fft_inv__(FFTConvol,Result); clear(FFTConvol); }
gen_bandfilter returns TRUE if all parameters are correct. If necessary, an exception is raised.
gen_highpass, gen_lowpass, gen_bandpass