LTI-Lib latest version v1.9 - last update 10 Apr 2010

lti::laplacianPyramid< T > Class Template Reference

LaplacianPyramid class. More...

#include <ltiLaplacianPyramid.h>

Inheritance diagram for lti::laplacianPyramid< T >:
Inheritance graph
[legend]
Collaboration diagram for lti::laplacianPyramid< T >:
Collaboration graph
[legend]

List of all members.

Public Member Functions

 laplacianPyramid (const int &resolutions=0, const int &gaussianSize=3, const double &variance=-1)
 laplacianPyramid (const laplacianPyramid &other)
virtual ~laplacianPyramid ()
void getKernelParameters (int &size, double &variance) const
void setKernelParameters (const int &size, const double &variance=-1)
const char * getTypeName () const
laplacianPyramid< T > & copy (const laplacianPyramid< T > &other)
virtual mathObjectclone () const
void generate (const T &src)
void generate (const T &src, const int &theResolutions)
void generate (const T &src, const lti::point &limit)
void generate (const gaussianPyramid< T > &src)
T & reconstruct (const int &i, T &result) const
pyramid< T > & reconstruct (const int &i, pyramid< T > &result) const

Protected Member Functions

void subtract (const T &a, const T &b, T &c) const
void add (const T &a, const T &b, T &c) const

Protected Attributes

int kernelSize
double kernelVariance

Detailed Description

template<class T>
class lti::laplacianPyramid< T >

LaplacianPyramid class.

This class implements the Laplacian pyramids as described in Greenspan et.at. "Overcomplete Steerable Pyramid Filters and Rotation Invariance", Proc. of the IEEE Conf. on Computer Vision and Pattern Recognition, Seattle, 1994

Each level corresponds to a difference of Gaussians, where the level distance is always one octave.

It allows an easy manipulation of the different resolutions.

See method generate() to an detailed explanation


Constructor & Destructor Documentation

template<class T>
lti::laplacianPyramid< T >::laplacianPyramid ( const int &  resolutions = 0,
const int &  gaussianSize = 3,
const double &  variance = -1 
)

create a laplacian pyramid with the given number of resolutions

Parameters:
resolutions the number of resolutions that the pyramid can hold (default 0: an empty pyramid will be created)
gaussianSize the size of the laplacian kernel (default 3)
variance the variance of the laplacian kernel (default -1, meaning that the variance should be calculated as described in the lti::gaussKernel1D<T>)
template<class T>
lti::laplacianPyramid< T >::laplacianPyramid ( const laplacianPyramid< T > &  other  ) 

create this laplacianPyramid as a copy of another laplacianPyramid

Parameters:
other the laplacianPyramid to be copied.
template<class T>
virtual lti::laplacianPyramid< T >::~laplacianPyramid (  )  [virtual]

destructor


Member Function Documentation

template<class T>
void lti::laplacianPyramid< T >::add ( const T &  a,
const T &  b,
T &  c 
) const [protected]

add a and b, and leave the result in c, which will have the size of a, even if the sizes of a and b differ.

template<class T>
virtual mathObject* lti::laplacianPyramid< T >::clone (  )  const [virtual]

create a clone of this laplacianPyramid

Returns:
a pointer to a copy of this laplacianPyramid

Reimplemented from lti::pyramid< T >.

template<class T>
laplacianPyramid<T>& lti::laplacianPyramid< T >::copy ( const laplacianPyramid< T > &  other  ) 

assigment operator.

copy the contents of other in this object.

Parameters:
other the source laplacianPyramid to be copied.
Returns:
a reference to this object

Reimplemented from lti::pyramid< T >.

template<class T>
void lti::laplacianPyramid< T >::generate ( const gaussianPyramid< T > &  src  ) 

generate the laplacian pyramid using the given gaussian pyramid

template<class T>
void lti::laplacianPyramid< T >::generate ( const T &  src,
const lti::point limit 
)

generate the laplacian pyramid of the given object.

Proceed, until given limit.x or limit.y is reached. smallest resolution will be > limit.

The resolution "0" corresponds to the original channel, and the resolution i+1 is always a factor 2 smaller than the resolution i.

template<class T>
void lti::laplacianPyramid< T >::generate ( const T &  src,
const int &  theResolutions 
)

generate the laplacian pyramid of the given object.

The pyramid will contain the number of resolutions specified by theResolutions. The resolution "0" will correspond the the original channel, and the resolution i+1 is always a factor 2 smaller than the resolution i.

template<class T>
void lti::laplacianPyramid< T >::generate ( const T &  src  ) 

generate the laplacian pyramid of the given object.

The pyramid will contain the number of resolutions specified in the construction or in the resize() method. The resolution "0" will correspond the the original channel, and the resolution i+1 is always a factor 2 smaller than the resolution i.

template<class T>
void lti::laplacianPyramid< T >::getKernelParameters ( int &  size,
double &  variance 
) const

return the size and variance of the used gaussian kernel

template<class T>
const char* lti::laplacianPyramid< T >::getTypeName ( void   )  const [inline, virtual]

returns the name of this class: "laplacianPyramid"

Reimplemented from lti::pyramid< T >.

template<class T>
pyramid<T>& lti::laplacianPyramid< T >::reconstruct ( const int &  i,
pyramid< T > &  result 
) const

reconstructs the resolution with index i.

All partial reconstructions will be stored at the given gaussian pyramid.

Parameters:
i the resolution to be reconstructed
result the resulting pyramid.
Returns:
a reference to the result pyramid
template<class T>
T& lti::laplacianPyramid< T >::reconstruct ( const int &  i,
T &  result 
) const

reconstructs the resolution with index i.

Parameters:
i the resolution to be reconstructed
result the resulting object
Returns:
a reference to the result object.
template<class T>
void lti::laplacianPyramid< T >::setKernelParameters ( const int &  size,
const double &  variance = -1 
)

set the kernel parameters

Parameters:
size the size of the kernel
variance the variance for the laplacian kernel. A negative value will force the default variance of a laplacian kernel with size size.
template<class T>
void lti::laplacianPyramid< T >::subtract ( const T &  a,
const T &  b,
T &  c 
) const [protected]

subtract b from a, and leave the result in c, which will have the size of a, even if the sizes of a and b differ.


Member Data Documentation

template<class T>
int lti::laplacianPyramid< T >::kernelSize [protected]

kernel size

template<class T>
double lti::laplacianPyramid< T >::kernelVariance [protected]

kernel variance


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

Generated on Sat Apr 10 15:27:29 2010 for LTI-Lib by Doxygen 1.6.1