Herror ::convol_fft (
    Hobject ImageFFT,
    Hobject ImageFilter,
    Hobject *ImageConvol
)
HImage HImage::ConvolFft (
    const HImage &ImageFilter
) const
HImageArray HImageArray::ConvolFft (
    const HImage &ImageFilter
) const

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'.


Attention

The filtering is always done on the entire image, i.e., the region of the image is ignored.


Parameters

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.


Example
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);
}

Result

::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.


Possible Predecessors

::fft_image, ::fft_generic, ::gen_highpass, ::gen_lowpass, ::gen_bandpass, ::gen_bandfilter


Possible Successors

::power_byte, ::power_real, ::power_ln, ::fft_image_inv, ::fft_generic


Alternatives

::convol_gabor


See also

::gen_gabor, ::gen_highpass, ::gen_lowpass, ::gen_bandpass, ::convol_gabor, ::fft_image_inv


Module

Image filters



Copyright © 1996-2002 MVTec Software GmbH