Main Page   Modules   Class Hierarchy   Compound List   File List   Compound Members   Related Pages   Examples  

FourierTransform Class Reference

#include <FourierTransform.h>

List of all members.

Public Methods

 FourierTransform (FloatImage &input)
 FourierTransform (FloatImage &input_real, FloatImage &input_imag)
void fft ()
void ifft ()
void showMagnitude (int log_values)
void showPhase (int log_values)
void closeWindows ()
FloatImage getReal ()
FloatImage getImag ()


Detailed Description

Implements the Fast Fourier Transform (FFT) of an image. The way in which the FFT is performed depends on the presence of FFTW package (see instalation notes of TiP). If FFTW package is not installed, the class FourierTransform allows FFT only for images having both dimensions equal to powers of two. If one or both dimensions of the input image are not equal to powers of two, then the input image is padded with zeros until both dimensions become equal to powers of two and the FFT is performed on the padded image.

However, if the FFTW package is installed, the FFT can be applied on images with arbitrary dimensions. In this case padding to even width and height is performed for speeding-up the transform. Another reason for padding is that TiP uses the FFT to perform convolution with floating point convolution kernels which have to be aligned before the Fourier transformation takes place. For more information about "FFTW" library (The Fastest Fourier Transform in the West), please consult http://www.fftw.org.

Examples:

test_fft.cpp, and test_timer.cpp.

Definition at line 28 of file FourierTransform.h.


Constructor & Destructor Documentation

FourierTransform::FourierTransform ( FloatImage & input )
 

Constructor that takes as argument the representation of an image in space domain.

Definition at line 61 of file FourierTransform.cpp.

FourierTransform::FourierTransform ( FloatImage & input_real,
FloatImage & input_imag )
 

Constructor which takes as argument the representation of an image in Fourier domain; the first argument represents the real part, while the second argument is the imaginary part.

Definition at line 89 of file FourierTransform.cpp.


Member Function Documentation

void FourierTransform::closeWindows ( )
 

Closes the magnitude and the phase windows.

Examples:
test_fft.cpp.

Definition at line 265 of file FourierTransform.cpp.

void FourierTransform::fft ( void )
 

Performs Direct Fast Fourier Transform.

Examples:
test_fft.cpp, and test_timer.cpp.

Definition at line 131 of file FourierTransform.cpp.

Referenced by fft().

FloatImage FourierTransform::getImag ( ) [inline]
 

Gets the imaginary part of the values.

Examples:
test_fft.cpp.

Definition at line 68 of file FourierTransform.h.

Referenced by fft().

FloatImage FourierTransform::getReal ( ) [inline]
 

Gets the real part of the values.

Examples:
test_fft.cpp.

Definition at line 65 of file FourierTransform.h.

Referenced by fft(), and ifft().

void FourierTransform::ifft ( void )
 

Performs Inverse Fast Fourier Transform.

Examples:
test_fft.cpp, and test_timer.cpp.

Definition at line 180 of file FourierTransform.cpp.

Referenced by ifft().

void FourierTransform::showMagnitude ( int log_values )
 

Displays:

  • the magnitude of the Fourier coefficients, if "log_values" = 0;
  • the logarithm of the magnitude of the Fourier coefficients, if "log_values" differs from 0.
Examples:
test_fft.cpp.

Definition at line 223 of file FourierTransform.cpp.

void FourierTransform::showPhase ( int log_values )
 

Displays:

  • the phase of the Fourier coefficients, if "log_values" = 0;
  • the logarithm of the phase of the Fourier coefficients, if "log_values" differs from 0.
Examples:
test_fft.cpp.

Definition at line 245 of file FourierTransform.cpp.


The documentation for this class was generated from the following files: