Skip to content

convol_fftConvolFftConvolFftconvol_fftconvol_fft🔗

Short description🔗

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

Signature🔗

convol_fft( image ImageFFT, image ImageFilter, out image ImageConvol )void ConvolFft( const HObject& ImageFFT, const HObject& ImageFilter, HObject* ImageConvol )static void HOperatorSet.ConvolFft( HObject imageFFT, HObject imageFilter, out HObject imageConvol )def convol_fft( image_fft: HObject, image_filter: HObject ) -> HObject

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

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

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

HImage HImage.ConvolFft( HImage imageFilter )

Description🔗

As part of calculating the convolution of an image with a filter image, convol_fftConvolFft multiplies the Fourier transform of an image ImageFFTimageFFTimage_fft with the Fourier transform of a second image ImageFilterimageFilterimage_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_genericFftGeneric).

  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_genericFftGeneric).

The operator convol_fftConvolFft is used to perform the second step, i.e., ImageFFTimageFFTimage_fft is pixel-wise multiplied with ImageFilterimageFilterimage_filter.

Attention🔗

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

Execution information🔗

Execution information
  • Multithreading type: reentrant (runs in parallel with non-exclusive operators).

  • Multithreading scope: global (may be called from any thread).

Parameters🔗

ImageFFTimageFFTimage_fft (input_object) (multichannel-)image(-array) → object (complex)HObject (complex)HImage (complex)HObject (complex)Hobject (complex)

Complex input image.

ImageFilterimageFilterimage_filter (input_object) (multichannel-)image → object (real / complex)HObject (real / complex)HImage (real / complex)HObject (real / complex)Hobject (real / complex)

Filter in frequency domain.

ImageConvolimageConvolimage_convol (output_object) image(-array) → object (complex)HObject (complex)HImage (complex)HObject (complex)Hobject * (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_fftConvolFft 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>:). If necessary, an exception is raised.

Combinations with other operators🔗

Combinations

Possible predecessors

fft_imageFftImage, fft_genericFftGeneric, rft_genericRftGeneric, gen_highpassGenHighpass, gen_lowpassGenLowpass, gen_bandpassGenBandpass, gen_bandfilterGenBandfilter

Possible successors

power_bytePowerByte, power_realPowerReal, power_lnPowerLn, fft_image_invFftImageInv, fft_genericFftGeneric, rft_genericRftGeneric

Alternatives

convol_gaborConvolGabor

See also

gen_gaborGenGabor, gen_highpassGenHighpass, gen_lowpassGenLowpass, gen_bandpassGenBandpass, convol_gaborConvolGabor, fft_image_invFftImageInv

Module🔗

Foundation