convol_fftconvol_fftConvolFftConvolFftconvol_fft (Operator)

Name

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

static void HOperatorSet.ConvolFft(HObject imageFFT, HObject imageFilter, out HObject imageConvol)

HImage HImage.ConvolFft(HImage imageFilter)

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_fftConvolFftConvolFftConvolFftconvol_fft multiplies the Fourier transform of an image ImageFFTImageFFTImageFFTImageFFTimageFFTimage_fft with the Fourier transform of a second image ImageFilterImageFilterImageFilterImageFilterimageFilterimage_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_genericFftGenericFftGenericFftGenericfft_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_genericFftGenericFftGenericFftGenericfft_generic).

The operator convol_fftconvol_fftConvolFftConvolFftConvolFftconvol_fft is used to perform the second step, i.e., ImageFFTImageFFTImageFFTImageFFTimageFFTimage_fft is pixel-wise multiplied with ImageFilterImageFilterImageFilterImageFilterimageFilterimage_filter.

Attention

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

Execution Information

Parameters

ImageFFTImageFFTImageFFTImageFFTimageFFTimage_fft (input_object)  (multichannel-)image(-array) objectHImageHObjectHImageHobject (complex)

Complex input image.

ImageFilterImageFilterImageFilterImageFilterimageFilterimage_filter (input_object)  (multichannel-)image objectHImageHObjectHImageHobject (real / complex)

Filter in frequency domain.

ImageConvolImageConvolImageConvolImageConvolimageConvolimage_convol (output_object)  image(-array) objectHImageHObjectHImageHobject * (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_fftConvolFftConvolFftConvolFftconvol_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>)SetSystem("no_object_result",<Result>)set_system("no_object_result",<Result>). If necessary, an exception is raised.

Possible Predecessors

fft_imagefft_imageFftImageFftImageFftImagefft_image, fft_genericfft_genericFftGenericFftGenericFftGenericfft_generic, rft_genericrft_genericRftGenericRftGenericRftGenericrft_generic, gen_highpassgen_highpassGenHighpassGenHighpassGenHighpassgen_highpass, gen_lowpassgen_lowpassGenLowpassGenLowpassGenLowpassgen_lowpass, gen_bandpassgen_bandpassGenBandpassGenBandpassGenBandpassgen_bandpass, gen_bandfiltergen_bandfilterGenBandfilterGenBandfilterGenBandfiltergen_bandfilter

Possible Successors

power_bytepower_bytePowerBytePowerBytePowerBytepower_byte, power_realpower_realPowerRealPowerRealPowerRealpower_real, power_lnpower_lnPowerLnPowerLnPowerLnpower_ln, fft_image_invfft_image_invFftImageInvFftImageInvFftImageInvfft_image_inv, fft_genericfft_genericFftGenericFftGenericFftGenericfft_generic, rft_genericrft_genericRftGenericRftGenericRftGenericrft_generic

Alternatives

convol_gaborconvol_gaborConvolGaborConvolGaborConvolGaborconvol_gabor

See also

gen_gaborgen_gaborGenGaborGenGaborGenGaborgen_gabor, gen_highpassgen_highpassGenHighpassGenHighpassGenHighpassgen_highpass, gen_lowpassgen_lowpassGenLowpassGenLowpassGenLowpassgen_lowpass, gen_bandpassgen_bandpassGenBandpassGenBandpassGenBandpassgen_bandpass, convol_gaborconvol_gaborConvolGaborConvolGaborConvolGaborconvol_gabor, fft_image_invfft_image_invFftImageInvFftImageInvFftImageInvfft_image_inv

Module

Foundation