Vista     Main Page   Class List   Function List   File List   Examples  


CMotion2DPyramid Class Reference

The CMotion2DPyramid class provides image pyramids. More...

List of all members.

Public Types

enum  { NLEVELS_MAX = 10 }

Public Methods

 CMotion2DPyramid ()
 CMotion2DPyramid (const CMotion2DPyramid &pyramid)
 ~CMotion2DPyramid ()
TPyramidError allocate (int nrows, int ncols, int nlevels)
TPyramidError build (const unsigned char *image)
TPyramidError build (const unsigned char *image, int nrows, int ncols, int nlevels)
TPyramidError build (const short *image)
TPyramidError build (const short *image, int nrows, int ncols, int nlevels)
void destroy ()
int getNumberOfLevels () const
TPyramidError getNumberOfRows (int &rows, int level=0) const
TPyramidError getNumberOfCols (int &ncols, int level=0) const
float * getRowsSpatialGradientDataAddress (TPyramidError &error, int level=0)
float * getColsSpatialGradientDataAddress (TPyramidError &error, int level=0)
short * getGaussianImageDataAddress (TPyramidError &error, int level=0)
CMotion2DPyramid & exchange (CMotion2DPyramid &pyramid)


Detailed Description

The CMotion2DPyramid class provides image pyramids.

The CMotion2DPyramid class provides the Gaussian pyramid and spatial gradient pyramids for an image .

Examples:

Motion2D.cpp.


Member Enumeration Documentation

anonymous enum
 

Enumeration values:
NLEVELS_MAX  Maximal number of levels in a pyramid.


Constructor & Destructor Documentation

CMotion2DPyramid::CMotion2DPyramid  
 

Constructor.

CMotion2DPyramid::CMotion2DPyramid const CMotion2DPyramid &    pyramid
 

Copy Constructor.

CMotion2DPyramid::~CMotion2DPyramid  
 

Destructor.


Member Function Documentation

TPyramidError CMotion2DPyramid::allocate int    nrows,
int    ncols,
int    nlevels
 

Allocate memory to construct a low-pass Gaussian pyramid and spatial gradient pyramids of an image . The number of levels to built in a pyramid is given by nlevels. The coarsest pyramid level is . The finest level is 0. At this level, images has a size of [nrows, ncols]. From level to the number of rows and columns are divided by 2.

To construct the pyramids you have to use build(const unsigned char *)

Return an error if the memory allocation can not be done.

See also:
build(const unsigned char *)
Examples:
Motion2D.cpp.

TPyramidError CMotion2DPyramid::build const short *    image,
int    nrows,
int    ncols,
int    nlevels
 

Allocate the memory by calling allocate() and build a low-pass Gaussian image pyramid and spatial image gradient pyramids based on image which dimension is given by nrows and ncols. The number of levels to construct is given by nlevels.

Return an error if the pyramid construction can not be done.

See also:
allocate()

TPyramidError CMotion2DPyramid::build const short *    image
 

Build a low-pass Gaussian image pyramid and spatial image gradient pyramids based on image .

Warning:
The allocation is assumed to be done by allocate(). The size of the image must be conform to the number of rows and columns passed to allocate().
Return an error if the pyramid construction can not be done.

See also:
allocate()

TPyramidError CMotion2DPyramid::build const unsigned char *    image,
int    nrows,
int    ncols,
int    nlevels
 

Allocate the memory by calling allocate() and build a low-pass Gaussian image pyramid and spatial image gradient pyramids based on image which dimension is given by nrows and ncols. The number of levels to construct is given by nlevels.

Return an error if the pyramid construction can not be done.

See also:
allocate()

TPyramidError CMotion2DPyramid::build const unsigned char *    image
 

Build a low-pass Gaussian image pyramid and spatial image gradient pyramids based on image .

Warning:
The allocation is assumed to be done by allocate(). The size of the image must be conform to the number of rows and columns passed to allocate().
Return an error if the pyramid construction can not be done.

See also:
allocate()
Examples:
Motion2D.cpp.

void CMotion2DPyramid::destroy  
 

Delete the space memory associate to the image pyramids.

Examples:
Motion2D.cpp.

CMotion2DPyramid & CMotion2DPyramid::exchange CMotion2DPyramid &    pyramid
 

Reaffect the pointer of the pyramids in order that the content of the pyramids are exchanged.

See also:
destroy(), allocate(), build()
Examples:
Motion2D.cpp.

float * CMotion2DPyramid::getColsSpatialGradientDataAddress TPyramidError   error,
int    level = 0
 

Return the address of the table containing the spatial gradient under the column axes for the specified pyramid level . The size of the table containing these data is given by the product getNumberOfRows(level) * getNumberOfCols(level).

Different error messages could be returned.

See also:
getNumberOfRows(), getNumberOfCols(), getRowsSpatialGradientDataAddress(), getGaussianImageDataAddress()

short * CMotion2DPyramid::getGaussianImageDataAddress TPyramidError   error,
int    level = 0
 

Return the address of the table containing the low-pass Gaussian image for the specified pyramid level . The size of the table containing these data is given by the product getNumberOfRows(level) * getNumberOfCols(level).

Different error messages could be returned.

See also:
getNumberOfRows(), getNumberOfCols(), getColsSpatialGradientDataAddress(), getRowsSpatialGradientDataAddress()

TPyramidError CMotion2DPyramid::getNumberOfCols int &    ncols,
int    level = 0
const
 

Get the number of columns for the specified level in the pyramid. The floor level is referenced by the number zero.

Different error messages could be returned.

See also:
getNumberOfRows()

int CMotion2DPyramid::getNumberOfLevels   const
 

Return the number of levels in a pyramid.

TPyramidError CMotion2DPyramid::getNumberOfRows int &    nrows,
int    level = 0
const
 

Get the number of rows for the specified level in the pyramid. The floor level is referenced by the number zero.

Different error messages could be returned.

See also:
getNumberOfCols()

float * CMotion2DPyramid::getRowsSpatialGradientDataAddress TPyramidError   error,
int    level = 0
 

Return the address of the table containing the spatial gradient under the row axes for the specified pyramid level . The size of the table containing these data is given by the product getNumberOfRows(level) * getNumberOfCols(level).

Different error messages could be returned.

See also:
getNumberOfRows(), getNumberOfCols(), getColsSpatialGradientDataAddress(), getGaussianImageDataAddress()


The documentation for this class was generated from the following files:
Motion2D is Copyright © 1995-2005 by Inria
This documentation was generated on 31 Jan 2005 by Fabien Spindler for Motion2D 1.3.11 using doxygen1.2.18 written by Dimitri van Heesch, © 1997-2005