Basic Image AlgorithmS Library  2.8.0
 All Classes Namespaces Functions Variables Typedefs Enumerations Enumerator Friends Groups Pages
Public Member Functions | Protected Member Functions | Protected Attributes | List of all members
BIAS::FFT2D< InputStorageType, OutputStorageType > Class Template Reference

Wrapper to the fftw3 library adapted for 2D image filtering. More...

#include <Image/FFT2D.hh>

+ Inheritance diagram for BIAS::FFT2D< InputStorageType, OutputStorageType >:

Public Member Functions

virtual int CrossPowerSpectrum (const Image< InputStorageType > &src1, const Image< InputStorageType > &src2, Image< OutputStorageType > &dst1)
 
 FFT2D ()
 
virtual int Filter (const Image< InputStorageType > &src, Image< OutputStorageType > &dst)
 
dst.GetChannelCount()==2*src.GetCHannelCount() 

The result is not normalized! More...

 
virtual int Filter (const Image< InputStorageType > &src, Image< OutputStorageType > &dst1, Image< OutputStorageType > &dst2)
 
dstX.GetChannelCount()==src.GetCHannelCount() 

The result is not normalized! More...

 
void Init (int width, int height)
 initializes for forward transformation on complete image. More...
 
virtual int Normalize (Image< OutputStorageType > &dst)
 Normalize output after transformation. More...
 
void Release ()
 call this before a second call to Init() More...
 
virtual int TransformAbs (const Image< InputStorageType > &src, Image< OutputStorageType > &dst)
 
Transform forward and get absolute value from complex result

The result is not normalized! More...

 
virtual int TransformLogAbs (const Image< InputStorageType > &src, Image< OutputStorageType > &dst)
 dstX.GetChannelCount()==src.GetCHannelCount() More...
 
virtual int TransformPhase (const Image< InputStorageType > &src, Image< OutputStorageType > &dst)
 dstX.GetChannelCount()==src.GetCHannelCount() More...
 
virtual int TransformReverse (const Image< OutputStorageType > &src, Image< InputStorageType > &dst)
 Transform reverse, src must be of _SizeX,_OutSizeY,2. More...
 
virtual ~FFT2D ()
 

Protected Member Functions

virtual int Forward_ (const Image< InputStorageType > &src)
 
virtual void GetBordersValid_ (int &border_x, int &border_y) const
 
virtual int Reverse_ (const Image< OutputStorageType > &src)
 

Protected Attributes

double * _in
 
fftw_complex * _out
 
int _OutNum
 
int _OutSizeY
 
fftw_plan _p_forward
 
fftw_plan _p_reverse
 
int _Size
 
int _SizeX
 
int _SizeY
 

Detailed Description

template<class InputStorageType, class OutputStorageType>
class BIAS::FFT2D< InputStorageType, OutputStorageType >

Wrapper to the fftw3 library adapted for 2D image filtering.

Note
Use fast as follows:
Author
evers and koeser, jw, oniemann
Date
2004/01, 2006
Examples:
ExampleFFT2D.cpp, and ExampleFMT2D.cpp.

Definition at line 50 of file FFT2D.hh.

Constructor & Destructor Documentation

template<class InputStorageType , class OutputStorageType >
FFT2D::FFT2D ( )

Definition at line 38 of file FFT2D.cpp.

template<class InputStorageType , class OutputStorageType >
FFT2D::~FFT2D ( )
virtual

Definition at line 49 of file FFT2D.cpp.

Member Function Documentation

template<class InputStorageType , class OutputStorageType >
int FFT2D::CrossPowerSpectrum ( const Image< InputStorageType > &  src1,
const Image< InputStorageType > &  src2,
Image< OutputStorageType > &  dst1 
)
virtual
template<class InputStorageType , class OutputStorageType >
int FFT2D::Filter ( const Image< InputStorageType > &  src,
Image< OutputStorageType > &  dst 
)
virtual

dst.GetChannelCount()==2*src.GetCHannelCount() 

The result is not normalized!

dst.GetChannelCount()==2*src.GetCHannelCount()

Reimplemented in BIAS::FFT2D_Tiles< InputStorageType, OutputStorageType >.

Definition at line 156 of file FFT2D.cpp.

References BIAS::Image< StorageType >::GetImageData(), BIAS::Image< StorageType >::Init(), BIAS::ImageBase::IsEmpty(), and BIAS::Image< StorageType >::Release().

template<class InputStorageType , class OutputStorageType >
int FFT2D::Filter ( const Image< InputStorageType > &  src,
Image< OutputStorageType > &  dst1,
Image< OutputStorageType > &  dst2 
)
virtual

dstX.GetChannelCount()==src.GetCHannelCount() 

The result is not normalized!

dstX.GetChannelCount()==src.GetCHannelCount()

Reimplemented in BIAS::FFT2D_Tiles< InputStorageType, OutputStorageType >.

Definition at line 177 of file FFT2D.cpp.

References BIAS::Image< StorageType >::GetImageData(), BIAS::Image< StorageType >::Init(), BIAS::ImageBase::IsEmpty(), and BIAS::Image< StorageType >::Release().

template<class InputStorageType , class OutputStorageType >
int FFT2D::Forward_ ( const Image< InputStorageType > &  src)
protectedvirtual
template<class InputStorageType , class OutputStorageType >
void FFT2D::GetBordersValid_ ( int &  border_x,
int &  border_y 
) const
protectedvirtual

Definition at line 328 of file FFT2D.cpp.

template<class InputStorageType , class OutputStorageType >
void FFT2D::Init ( int  width,
int  height 
)

initializes for forward transformation on complete image.

This may take some time (i.e. several seconds) since some measurements are done.

Definition at line 57 of file FFT2D.cpp.

template<class InputStorageType , class OutputStorageType >
int FFT2D::Normalize ( Image< OutputStorageType > &  dst)
virtual

Normalize output after transformation.

Todo:
fix the cast by explicit template JW

Definition at line 258 of file FFT2D.cpp.

References BIAS::ImageBase::GetChannelCount(), BIAS::ImageBase::GetHeight(), BIAS::Image< StorageType >::GetImageData(), and BIAS::ImageBase::GetWidth().

template<class InputStorageType , class OutputStorageType >
void FFT2D::Release ( )

call this before a second call to Init()

Definition at line 84 of file FFT2D.cpp.

template<class InputStorageType , class OutputStorageType >
int FFT2D::Reverse_ ( const Image< OutputStorageType > &  src)
protectedvirtual
template<class InputStorageType , class OutputStorageType >
int FFT2D::TransformAbs ( const Image< InputStorageType > &  src,
Image< OutputStorageType > &  dst 
)
virtual

Transform forward and get absolute value from complex result

The result is not normalized!

dstX.GetChannelCount()==src.GetCHannelCount()

Reimplemented in BIAS::FFT2D_Tiles< InputStorageType, OutputStorageType >.

Definition at line 202 of file FFT2D.cpp.

References BIAS::Image< StorageType >::GetImageData(), BIAS::Image< StorageType >::Init(), BIAS::ImageBase::IsEmpty(), and BIAS::Image< StorageType >::Release().

template<class InputStorageType , class OutputStorageType >
int FFT2D::TransformLogAbs ( const Image< InputStorageType > &  src,
Image< OutputStorageType > &  dst 
)
virtual
template<class InputStorageType , class OutputStorageType >
int FFT2D::TransformPhase ( const Image< InputStorageType > &  src,
Image< OutputStorageType > &  dst 
)
virtual
template<class InputStorageType , class OutputStorageType >
int FFT2D::TransformReverse ( const Image< OutputStorageType > &  src,
Image< InputStorageType > &  dst 
)
virtual

Member Data Documentation

template<class InputStorageType, class OutputStorageType>
double* BIAS::FFT2D< InputStorageType, OutputStorageType >::_in
protected

Definition at line 107 of file FFT2D.hh.

template<class InputStorageType, class OutputStorageType>
fftw_complex* BIAS::FFT2D< InputStorageType, OutputStorageType >::_out
protected

Definition at line 106 of file FFT2D.hh.

template<class InputStorageType, class OutputStorageType>
int BIAS::FFT2D< InputStorageType, OutputStorageType >::_OutNum
protected

Definition at line 113 of file FFT2D.hh.

template<class InputStorageType, class OutputStorageType>
int BIAS::FFT2D< InputStorageType, OutputStorageType >::_OutSizeY
protected

Definition at line 112 of file FFT2D.hh.

template<class InputStorageType, class OutputStorageType>
fftw_plan BIAS::FFT2D< InputStorageType, OutputStorageType >::_p_forward
protected

Definition at line 108 of file FFT2D.hh.

template<class InputStorageType, class OutputStorageType>
fftw_plan BIAS::FFT2D< InputStorageType, OutputStorageType >::_p_reverse
protected

Definition at line 108 of file FFT2D.hh.

template<class InputStorageType, class OutputStorageType>
int BIAS::FFT2D< InputStorageType, OutputStorageType >::_Size
protected

Definition at line 111 of file FFT2D.hh.

template<class InputStorageType, class OutputStorageType>
int BIAS::FFT2D< InputStorageType, OutputStorageType >::_SizeX
protected

Definition at line 111 of file FFT2D.hh.

template<class InputStorageType, class OutputStorageType>
int BIAS::FFT2D< InputStorageType, OutputStorageType >::_SizeY
protected

Definition at line 111 of file FFT2D.hh.


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