Convolve an image with a byte-mask in the frequency domain.
convol_fft__ convolves two (Fourier-transformed) images in the frequency domain, i.e., the pixels of the complex image ImageFFT are multiplied by the corresponding pixels of the filter ImageFilter. This image is a byte-image in which 0 corresponds to complete suppression of a frequency, and 255 corresponds to no suppression. The result image is of type 'complex'.
The filtering is always done on the entire image, i.e., the region of the image is ignored.
|
ImageFFT (input_object) |
image(-array) -> object : complex |
| Complex input image. | |
|
ImageFilter (input_object) |
image -> object : byte |
| Filter in frequency domain. | |
|
ImageConvol (output_object) |
image(-array) -> object : complex |
| Result of applying the filter. | |
my_highpass(ObjType Image, ObjType *Result, int frequency, int size)
{
ObjType FFT, Highpass, FFTConvol;
fft__(Image,&FFT);
gen_highpass(&Highpass,frequency,size);
convol_fft__(FFT,Highpass,&FFTConvol);
clear(Highpass); clear(FFT);
fft_inv__(FFTConvol,Result);
clear(FFTConvol);
}
convol_fft__ returns TRUE if all parameters are correct. If the input is empty the behaviour can be set via set_system(::'no_object_result',<Result>:). If necessary, an exception is raised.
fft__, fft_generic, gen_highpass, gen_lowpass, gen_bandpass, gen_bandfilter
power_byte, power_real, power_ln, fft_inv__, fft_generic
gen_gabor, gen_highpass, gen_lowpass, gen_bandpass, convol_gabor__, fft_inv__