gen_bandfilter ( : ImageFilter : MinFrequency, MaxFrequency, Size : )

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.


Parameters

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
Typical 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
Typical 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


Example
my_lowpass(Hobject Image, Hobject *Result)
{
  Hobject  FFT, Bandpass, FFTConvol;
  fft_image(Image,&FFT);
  gen_bandfilter(&Bandpass,20,40,512);
  convol_fft(FFT,Bandpass,&FFTConvol); 
  clear_obj(Bandpass); clear_obj(FFT);
  fft_image_inv(FFTConvol,Result);
  clear_obj(FFTConvol);
}

Result

gen_bandfilter returns 2 (H_MSG_TRUE) if all parameters are correct. If necessary, an exception handling is raised.


Parallelization Information

gen_bandfilter is reentrant and processed without parallelization.


Possible Successors

convol_fft


Alternatives

gen_circle, paint_region


See also

gen_highpass, gen_lowpass, gen_bandpass


Module

Image filters



Copyright © 1996-2005 MVTec Software GmbH