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) -> Hobject: HImage(Array) ( complex ) |
| Complex input image. | |
|
ImageFilter (input_object) |
image -> Hobject: HImage ( byte ) |
| Filter in frequency domain. | |
|
ImageConvol (output_object) |
image(-array) -> Hobject * : HImage(Array) ( complex ) |
| Result of applying the filter. | |
my_highpass(Hobject Image, Hobject *Result, int frequency, int size)
{
Hobject FFT, Highpass, FFTConvol;
fft_image(Image,&FFT);
gen_highpass(&Highpass,frequency,size);
convol_fft(FFT,Highpass,&FFTConvol);
clear_obj(Highpass); clear_obj(FFT);
fft_image_inv(FFTConvol,Result);
clear_obj(FFTConvol);
}
::convol_fft returns H_MSG_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 handling is raised.
::fft_image, ::fft_generic, ::gen_highpass, ::gen_lowpass, ::gen_bandpass, ::gen_bandfilter
::power_byte, ::power_real, ::power_ln, ::fft_image_inv, ::fft_generic
::gen_gabor, ::gen_highpass, ::gen_lowpass, ::gen_bandpass, ::convol_gabor, ::fft_image_inv
Image filters