STIRA  0.1
Public Member Functions | Static Public Member Functions | List of all members
stira::fouriertools::TransferFunctionGenerator Class Reference

Generate transfer functions to be applied in the fourier domain. More...

#include <TransferFunctionGenerator.h>

Public Member Functions

 TransferFunctionGenerator ()
 Constructor.
 
 ~TransferFunctionGenerator ()
 Destructor.
 

Static Public Member Functions

static int GetScaleFactors (int width, int height, double &xFactor, double &yFactor)
 gets factors for scaling coordinates in Fourier domain More...
 
static ArrayGrid< double > * GenerateHighPassTransferFunction (int width, int height, double x1, double x2)
 Generates a highpass transfer function as an ArrayGrid object. More...
 
static ArrayGrid< double > * GenerateLowPassTransferFunction (int width, int height, double x1, double x2)
 Generates a lowpass transfer function as an ArrayGrid object. More...
 
static FFTBandGenerateOrientedTransferFunction (int width, int height, int orientationIndex, int maxNrOfOrientations, bool isForward, common::NumberMode mode=common::MODE_REAL)
 Generates a oriented transfer function as an ArrayGrid object. More...
 
static void HighFrequencyCrossMask (FFTBand *inoutGrid, int nrBands)
 Trick to distribute highest frequencies over set of bands. More...
 
static ArrayGrid< double > * GenerateLogRadiusBand (int width, int height, double centerFrequency, double bandWidth)
 Generates a LogGaussian axially symmetric transfer function Help function for GenerateLogGaborBandTransferFunction. More...
 
static ArrayGrid< double > * GenerateGaussianAngularBand (int width, int height, double centerAngle, double angleSpread)
 Generates a angular Gaussian transfer function Help function for GenerateLogGaborBandTransferFunction. More...
 
static ArrayGrid< double > * GenerateLogGaborBandTransferFunction (int width, int height, double centerFrequency, double radialWidth, double centerAngle, double angleSpread)
 Generates a LogGabor transfer function Source: Peter Kovesi: http://www.csse.uwa.edu.au/~pk/Research/MatlabFns/PhaseCongruency/Docs/convexpl.html. More...
 
static ArrayGrid< double > * GenerateAxisSuppressTransferFunction (int width, int height, int axisWidth, double x1, double x2)
 Generates a transfer function to suppress frequencies on the axes. More...
 
static ArrayGrid< double > * GenerateAxisExtractTransferFunction (int width, int height, int axisWidth)
 
static ArrayGrid< double > * ConvertTransferFunctionToFilterKernel (FFTBand *pTransferFunction, common::NumberMode mode=common::MODE_REAL)
 Converts a Fourier domain transfer function to a filter kernel. More...
 
static ArrayGrid< double > * ConvertTransferFunctionToFilterKernel (ArrayGrid< double > *pTransferFunction, common::NumberMode mode=common::MODE_REAL)
 Converts a Fourier domain transfer function to a filter kernel. More...
 

Detailed Description

Generate transfer functions to be applied in the fourier domain.

Member Function Documentation

static ArrayGrid<double>* stira::fouriertools::TransferFunctionGenerator::ConvertTransferFunctionToFilterKernel ( FFTBand pTransferFunction,
common::NumberMode  mode = common::MODE_REAL 
)
static

Converts a Fourier domain transfer function to a filter kernel.

Warning
the inverse Fourier Transform is applied to pTransferFunction, so take that into account when using this data after applying this function
Parameters
pTransferFunctionthe transfer function to be converted
modetells if the real or the imaginary values are taken after the Inverse Fourier Transform is applied to the transfer function
static ArrayGrid<double>* stira::fouriertools::TransferFunctionGenerator::ConvertTransferFunctionToFilterKernel ( ArrayGrid< double > *  pTransferFunction,
common::NumberMode  mode = common::MODE_REAL 
)
static

Converts a Fourier domain transfer function to a filter kernel.

Parameters
pTransferFunctionthe transfer function to be converted
modetells if the real or the imaginary values are taken after the Inverse Fourier Transform is applied to the transfer function
ArrayGrid< double > * stira::fouriertools::TransferFunctionGenerator::GenerateAxisSuppressTransferFunction ( int  width,
int  height,
int  axisWidth,
double  x1,
double  x2 
)
static

Generates a transfer function to suppress frequencies on the axes.

Parameters
widthwidth of the grid with the transfer function
heightheight of the grid with the transfer function
axisWidthwidth around the axis to suppress
x1distance from DC up to which the axis frequencies are not suppressed
x2distance from DC beyond which all frequencies are suppressed
Returns
grid with transfer function

References stira::imagedata::ArrayGrid< T >::SetValue().

ArrayGrid< double > * stira::fouriertools::TransferFunctionGenerator::GenerateGaussianAngularBand ( int  width,
int  height,
double  centerAngle,
double  angleSpread 
)
static

Generates a angular Gaussian transfer function Help function for GenerateLogGaborBandTransferFunction.

Parameters
widthwidth of the grid with the transfer function
heightheight of the grid with the transfer function
centerAngleangle on which the maximum transfer occurs
angleSpreadangular width of the transfer band
Returns
grid with transfer function

References stira::imagedata::ArrayGrid< T >::SetValue().

ArrayGrid< double > * stira::fouriertools::TransferFunctionGenerator::GenerateHighPassTransferFunction ( int  width,
int  height,
double  x1,
double  x2 
)
static

Generates a highpass transfer function as an ArrayGrid object.

Parameters
widthwidth of grid to be generated
heightheight of grid to be generated
x1lowpass frequency (from here to DC, all frequencies are 0)
x2highpass frequency (from here to the edges, all frequencies are 1)
Returns
grid with transfer function

References stira::imagedata::ArrayGrid< T >::SetValue().

Referenced by stira::steerable::PyramidComplex::Decompose(), stira::steerable::PyramidReal::Decompose(), stira::steerable::PyramidReal::Reconstruct(), and stira::steerable::PyramidComplex::Reconstruct().

ArrayGrid< double > * stira::fouriertools::TransferFunctionGenerator::GenerateLogGaborBandTransferFunction ( int  width,
int  height,
double  centerFrequency,
double  radialWidth,
double  centerAngle,
double  angleSpread 
)
static

Generates a LogGabor transfer function Source: Peter Kovesi: http://www.csse.uwa.edu.au/~pk/Research/MatlabFns/PhaseCongruency/Docs/convexpl.html.

Parameters
widthwidth of the grid with the transfer function
heightheight of the grid with the transfer function
centerFrequencydistance from DC at which the maximum transfer occurs
radialWidthradial width of the transfer band
centerAngleangle on which the maximum transfer occurs
angleSpreadangular width of the transfer band
Returns
grid with transfer function

References stira::fouriertools::FFTBand::ApplyInverseTransform(), stira::fouriertools::FFTBand::ConvertToImaginaryGrid(), stira::fouriertools::FFTBand::ConvertToRealGrid(), and stira::imagedata::ArrayGrid< T >::MultiplyWith().

Referenced by stira::filter::LogGabor::Run().

ArrayGrid< double > * stira::fouriertools::TransferFunctionGenerator::GenerateLogRadiusBand ( int  width,
int  height,
double  centerFrequency,
double  bandWidth 
)
static

Generates a LogGaussian axially symmetric transfer function Help function for GenerateLogGaborBandTransferFunction.

Parameters
widthwidth of the grid with the transfer function
heightheight of the grid with the transfer function
centerFrequencydistance from DC at which the maximum transfer occurs
bandWidthwidth of the transfer band
Returns
grid with transfer function

References stira::imagedata::ArrayGrid< T >::SetValue().

ArrayGrid< double > * stira::fouriertools::TransferFunctionGenerator::GenerateLowPassTransferFunction ( int  width,
int  height,
double  x1,
double  x2 
)
static

Generates a lowpass transfer function as an ArrayGrid object.

Parameters
widthwidth of grid to be generated
heightheight of grid to be generated
x1lowpass frequency (from here to DC, all frequencies are 1)
x2highpass frequency (from here to the edges, all frequencies are 0)
Returns
grid with transfer function

References stira::imagedata::ArrayGrid< T >::SetValue().

Referenced by stira::steerable::PyramidMaster< T >::ExtractL(), stira::steerable::PyramidMaster< T >::ExtractL0(), stira::steerable::PyramidMaster< T >::ReconstructL(), stira::steerable::PyramidMaster< T >::ReconstructL0(), and stira::fouriertools::FFT::SuppressOuterFrequencies().

FFTBand * stira::fouriertools::TransferFunctionGenerator::GenerateOrientedTransferFunction ( int  width,
int  height,
int  orientationIndex,
int  maxNrOfOrientations,
bool  isForward,
common::NumberMode  mode = common::MODE_REAL 
)
static

Generates a oriented transfer function as an ArrayGrid object.

Parameters
widthwidth of grid to be generated
heightheight of grid to be generated
orientationIndexnumber of the orientation to consider now
maxNrOfOrientationsmaximum number of orientations in this decomposition
isForwardflag whether this transform is forward transform (if false; is backward transform)
modeenum whether the transfer function needs to produce a real or complex valued response
Returns
grid with transfer function

References stira::common::MathUtils::Factorial(), and stira::fouriertools::FFTBand::SetValue().

Referenced by stira::steerable::PyramidMaster< T >::ExtractB(), stira::steerable::PyramidMaster< T >::ExtractB0(), stira::steerable::PyramidMaster< T >::ReconstructB(), and stira::steerable::PyramidMaster< T >::ReconstructB0().

int stira::fouriertools::TransferFunctionGenerator::GetScaleFactors ( int  width,
int  height,
double &  xFactor,
double &  yFactor 
)
static

gets factors for scaling coordinates in Fourier domain

Parameters
widthin: width of the grid
heightin: height of the grid
xFactorout: scaling factor in x direction
yFactorout: scaling factor in y direction
void stira::fouriertools::TransferFunctionGenerator::HighFrequencyCrossMask ( FFTBand inoutGrid,
int  nrBands 
)
static

Trick to distribute highest frequencies over set of bands.

Parameters
inoutGridtransfer function to be masked (is input as well as output)
nrBandsnr of bands over wich to distribute the energy of this frequencies
Returns
grid with transfer function

References stira::fouriertools::FFTBand::GetHeight(), stira::fouriertools::FFTBand::GetWidth(), and stira::fouriertools::FFTBand::SetValue().

Referenced by stira::steerable::PyramidMaster< T >::ExtractB0(), and stira::steerable::PyramidMaster< T >::ReconstructB0().


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