FourierFiltering

Support

Required licenses

EasyImage

Recommended images

Samples Images/EasyImage/dirty_switch.tif
Samples Images/EasyImage/mask.tif

Location

[…]C:\Users\Public\Documents\Euresys\Open eVision 24.02\Sample Programs
\[LANGUAGE] samples
\Image Processing\FourierFiltering

Purpose

This sample program demonstrates how to:

Compute the direct Fourier transform.
Compute the inverse Fourier transform.

The process steps are:

Load a grayscale image and a mask.
Compute the direct Fourier transform on the grayscale image.
Apply the mask on the frequency domain of the image (as an element-wise multiplication where the mask is a binary image).
Compute the inverse Fourier transform of this masked frequency image.

Code highlights

NOTE: This sample program focuses on the computation of the direct and inverse Fourier transforms more than on the filtering by masking.
1. Compute the direct Fourier transform.
EImageBW8 grayscale; // should be already loaded

EImageBW32f frequency(grayscale.GetWidth * 2, grayscale.GetHeight);

EFourierTransformer fourier;
fourier.SetFrequentialDomainFormat(EFrequentialDomainFormat_ComplexExtended);
fourier.DirectTransform(grayscale, frequency);
2. Compute the inverse Fourier transform.
EImageBW32f frequency; // should be already computed

EImageBW8 grayscale(frequency.GetWidth / 2, frequency.GetHeight);

EFourierTransformer fourier;
fourier.SetFrequentialDomainFormat(EFrequentialDomainFormat_ComplexExtended);
fourier.InverseTransform (frequency, grayscale);