Operator Reference

convol_fftconvol_fftConvolFftConvolFftconvol_fft (Operator)

convol_fftconvol_fftConvolFftConvolFftconvol_fft — Multiply an image with a filter image in the frequency domain.

Signature

convol_fft(ImageFFT, ImageFilter : ImageConvol : : )

Herror convol_fft(const Hobject ImageFFT, const Hobject ImageFilter, Hobject* ImageConvol)

Herror T_convol_fft(const Hobject ImageFFT, const Hobject ImageFilter, Hobject* ImageConvol)

void ConvolFft(const HObject& ImageFFT, const HObject& ImageFilter, HObject* ImageConvol)

HImage HImage::ConvolFft(const HImage& ImageFilter) const

def convol_fft(image_fft: HObject, image_filter: HObject) -> HObject

Description

As part of calculating the convolution of an image with a filter image, convol_fftconvol_fftConvolFftConvolFftconvol_fft multiplies the Fourier transform of an image ImageFFTImageFFTImageFFTimageFFTimage_fft with the Fourier transform of a second image ImageFilterImageFilterImageFilterimageFilterimage_filter, which serves as the filter.

According to the convolution theorem, the non-normalized convolution of two images in pixel space can be obtained in three steps:

  1. Transforming the images into frequency space using a Fourier transform (see, e.g., fft_genericfft_genericFftGenericFftGenericfft_generic).

  2. Multiplying one transformed image with the transformed filter image (pixel-wise).

  3. Transforming the result back into pixel space using an inverse Fourier transform (see, e.g., fft_genericfft_genericFftGenericFftGenericfft_generic).

The operator convol_fftconvol_fftConvolFftConvolFftconvol_fft is used to perform the second step, i.e., ImageFFTImageFFTImageFFTimageFFTimage_fft is pixel-wise multiplied with ImageFilterImageFilterImageFilterimageFilterimage_filter.

Attention

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

Execution Information

  • Multithreading type: reentrant (runs in parallel with non-exclusive operators).
  • Multithreading scope: global (may be called from any thread).
  • Automatically parallelized on tuple level.
  • Automatically parallelized on channel level.

Parameters

ImageFFTImageFFTImageFFTimageFFTimage_fft (input_object)  (multichannel-)image(-array) objectHImageHObjectHObjectHobject (complex)

Complex input image.

ImageFilterImageFilterImageFilterimageFilterimage_filter (input_object)  (multichannel-)image objectHImageHObjectHObjectHobject (real / complex)

Filter in frequency domain.

ImageConvolImageConvolImageConvolimageConvolimage_convol (output_object)  image(-array) objectHImageHObjectHObjectHobject * (complex)

Result in the frequency domain.

Example (HDevelop)

gen_highpass(Highpass,0.2,'n','dc_edge',Width,Height)
fft_generic(Image,ImageFFT,'to_freq',-1,'none','dc_edge','complex')
convol_fft(ImageFFT,Highpass,ImageConvol)
fft_generic(ImageConvol,ImageResult,'from_freq',1,'none','dc_edge','byte')

Result

convol_fftconvol_fftConvolFftConvolFftconvol_fft returns 2 ( H_MSG_TRUE) if all parameters are correct. If the input is empty the behavior can be set via set_system(::'no_object_result',<Result>:)set_system("no_object_result",<Result>)SetSystem("no_object_result",<Result>)SetSystem("no_object_result",<Result>)set_system("no_object_result",<Result>). If necessary, an exception is raised.

Possible Predecessors

fft_imagefft_imageFftImageFftImagefft_image, fft_genericfft_genericFftGenericFftGenericfft_generic, rft_genericrft_genericRftGenericRftGenericrft_generic, gen_highpassgen_highpassGenHighpassGenHighpassgen_highpass, gen_lowpassgen_lowpassGenLowpassGenLowpassgen_lowpass, gen_bandpassgen_bandpassGenBandpassGenBandpassgen_bandpass, gen_bandfiltergen_bandfilterGenBandfilterGenBandfiltergen_bandfilter

Possible Successors

power_bytepower_bytePowerBytePowerBytepower_byte, power_realpower_realPowerRealPowerRealpower_real, power_lnpower_lnPowerLnPowerLnpower_ln, fft_image_invfft_image_invFftImageInvFftImageInvfft_image_inv, fft_genericfft_genericFftGenericFftGenericfft_generic, rft_genericrft_genericRftGenericRftGenericrft_generic

Alternatives

convol_gaborconvol_gaborConvolGaborConvolGaborconvol_gabor

See also

gen_gaborgen_gaborGenGaborGenGaborgen_gabor, gen_highpassgen_highpassGenHighpassGenHighpassgen_highpass, gen_lowpassgen_lowpassGenLowpassGenLowpassgen_lowpass, gen_bandpassgen_bandpassGenBandpassGenBandpassgen_bandpass, convol_gaborconvol_gaborConvolGaborConvolGaborconvol_gabor, fft_image_invfft_image_invFftImageInvFftImageInvfft_image_inv

Module

Foundation