User Documentation
RAVL, Recognition And Vision Library
DEVELOP HOME PAGE CLASS LIST CONTENTS
Ravl - API - Math - Signals - 2D - FFT2dC
 

  PUBLIC
FFT2dC::FFT2dC(void)
FFT2dC::FFT2dC(Index2dC,bool)
FFT2dC::FFT2dC(SizeT,SizeT,bool)
FFT2dC::Init(Index2dC,bool)
FFT2dC::Apply(const SArray2dC &) const
FFT2dC::Apply(const SArray2dC &) const
FFT2dC::Apply(const Array2dC &) const
FFT2dC::Apply(const Array2dC &) const
FFT2dC::Size(void) const
FFT2dC::RotateFreq(const Array2dC &) const
FFT2dC::FFTShift(const SArray2dC &)
FFT2dC::FFTShift(const SArray2dC &)
FFT2dC::FFTShift(const Array2dC &)
FFT2dC::FFTShift(const Array2dC &)
FFT2dC::Real(const SArray2dC &)
FFT2dC::Imag(const SArray2dC &)
FFT2dC::Mag(const SArray2dC &)
FFT2dC::Real(const Array2dC &)
FFT2dC::Imag(const Array2dC &)
FFT2dC::Mag(const Array2dC &)
RCHandleC::Save(ostream &) const
RCHandleC::operator=(const RCHandleC &)
RCHandleC::DeepCopy(UIntT) const
RCHandleC::operator==(const RCHandleC &) const
RCHandleC::operator!=(const RCHandleC &) const
RCHandleC::Hash(void) const
RCHandleC::IsValid(void) const
RCHandleC::Invalidate(void)
RCHandleC::IsHandleType(const DT &) const
RCHandleC::CheckHandleType(const DT &) const
RCHandleC::VoidPtr(void) const
RCHandleC::References(void) const

   FFT2dC   
 
2d FFT.
 
#include "Ravl/FFT2d.hh"
User Level:Normal
Library:RavlMath
In Scope: RavlN

Comments:
Will assert if FFT row or column size has a prime factor > 101. This appears to be a limitation of the CCMath prime factor function but not the CCMath general radix FFT functions.

Parent Classes: Methods:
FFT2dC()
Default constructor.

FFT2dC(Index2dC size,bool iinv = false)
Create a fft class.
If iinv is true do an inverse transform

FFT2dC(SizeT height,SizeT width,bool iinv = false)
Create a fft class.
If iinv is true do an inverse transform

bool Init(Index2dC size,bool iinv = false)
Create a plan with the given setup.

SArray2dC<ComplexC> Apply(const SArray2dC<ComplexC> & dat) const
Apply transform to array.
Note, only the first 'n' byte of dat are proccessed. if the array is shorter than the given length, an exception 'ErrorOutOfRangeC' will be thrown.

SArray2dC<ComplexC> Apply(const SArray2dC<RealT> & dat) const
Apply transform to real array
Note, only the first 'n' byte of dat are proccessed. if the array is shorter than the given length, an exception 'ErrorOutOfRangeC' will be thrown.

Array2dC<ComplexC> Apply(const Array2dC<ComplexC> & dat) const
Apply transform to array.
Note, only the first 'n' byte of dat are proccessed. if the array is shorter than the given length, an exception 'ErrorOutOfRangeC' will be thrown.

Note: The output will always have an origin of 0,0.


Array2dC<ComplexC> Apply(const Array2dC<RealT> & dat) const
Apply transform to real array
Note, only the first 'n' byte of dat are proccessed. if the array is shorter than the given length, an exception 'ErrorOutOfRangeC' will be thrown.

Note: The output will always have an origin of 0,0.


Index2dC Size() const
The size of the transform.

Array2dC<DataT> RotateFreq(const Array2dC<DataT> & dat) const
Returns array in which elements of the array dat are rotated to move top left to centre and vice versa
Used for 2D spectra to shift zero frequency component to centre etc.
Coordinate system is also moved appropriately (regardless of coords of "dat"):
  • for forward FFT, origin is moved to centre;
  • for inverse FFT, origin is moved to top l.h.
Forward rotate followed by inverse works correctly even with odd-sized arrays.

static SArray2dC<ComplexC> FFTShift(const SArray2dC<ComplexC> & dat)
FFTShift image.
DC moved from top left to centre or centre to top left. FFTShift(FFTShift(a)) == a for even sized a, not quite for odd sized a.
DEPRECATED: use non-static RotateFreq() instead (works correctly for odd-sized images)

static SArray2dC<RealT> FFTShift(const SArray2dC<RealT> & dat)
FFTShift image.
DC moved from top left to centre or centre to top left. FFTShift(FFTShift(a)) == a for even sized a, not quite for odd sized a.
DEPRECATED: use non-static RotateFreq() instead (works correctly for odd-sized images)

static Array2dC<ComplexC> FFTShift(const Array2dC<ComplexC> & dat)
FFTShift image.
DC moved from top left to centre or centre to top left. FFTShift(FFTShift(a)) == a for even sized a, not quite for odd sized a.
DEPRECATED: use non-static RotateFreq() instead (works correctly for odd-sized images)

static Array2dC<RealT> FFTShift(const Array2dC<RealT> & dat)
FFTShift image.
DC moved from top left to centre or centre to top left. FFTShift(FFTShift(a)) == a for even sized a, not quite for odd sized a.
DEPRECATED: use non-static RotateFreq() instead (works correctly for odd-sized images)

static SArray2dC<RealT> Real(const SArray2dC<ComplexC> & dat)
Returns real part of complex image

static SArray2dC<RealT> Imag(const SArray2dC<ComplexC> & dat)
Returns imaginary part of complex image

static SArray2dC<RealT> Mag(const SArray2dC<ComplexC> & dat)
Returns magnitude of complex image

static Array2dC<RealT> Real(const Array2dC<ComplexC> & dat)
Returns real part of complex image

static Array2dC<RealT> Imag(const Array2dC<ComplexC> & dat)
Returns imaginary part of complex image

static Array2dC<RealT> Mag(const Array2dC<ComplexC> & dat)
Returns magnitude part of complex image

#include "Ravl/RefCounter.hh"
bool Save(ostream & out) const
Save body to stream.

const RCHandleC<FFT2dBodyC> & operator=(const RCHandleC<FFT2dBodyC> & oth)
Assign handle.

RCHandleC<FFT2dBodyC> DeepCopy(UIntT levels = ((UIntT))) const
Do a deep copy of the object.

bool operator==(const RCHandleC<FFT2dBodyC> & oth) const
Are handles to the same object ?

bool operator!=(const RCHandleC<FFT2dBodyC> & oth) const
Are handles to different objects ?

size_t Hash() const
Default hash function.
This hashes on the address of the body.

bool IsValid() const
Test if this is a valid handle.

void Invalidate()
Invalidate this handle.
Unattaches the body from the handle.

bool IsHandleType(const DT &) const
Is handle of given type ?

void CheckHandleType(const DT & dummy) const
Check handle type. Throw an exception if not.

const void * VoidPtr() const
Access unique address for this object.
Used in PointerManagerC. Not for general use this interface may changed in future releases.

UIntT References() const
Find the number of references to the body of this object.


Documentation by CxxDoc: Mon May 14 23:37:28 2012