Vista     Main Page   Class List   Function List   File List   Examples  


CMotion2DWarping Class Reference

The CMotion2DWarping class provides motion-compensation. More...

List of all members.

Public Methods

 CMotion2DWarping ()
 ~CMotion2DWarping ()
bool initBackWarp (int dst_nrows, int dst_ncols, int dst_row_offset, int dst_col_offset)
bool backWarp (unsigned char *src, int src_nrows, int src_ncols, unsigned char *dst, CMotion2DModel model)
bool backWarp (short *src, int src_nrows, int src_ncols, short *dst, CMotion2DModel model)
void getBackWarpPosition (int row, int col, float &d_row, float &d_col)
bool warp (unsigned char *src, unsigned char *dst, int nrows, int ncols, CMotion2DModel model)


Detailed Description

The CMotion2DWarping class provides motion-compensation.
Examples:

Motion2D.cpp, and Warping.cpp.


Constructor & Destructor Documentation

CMotion2DWarping::CMotion2DWarping  
 

Constructor.

CMotion2DWarping::~CMotion2DWarping  
 

Destructor. Frees the allocated memory.

See also:
initBackWarp()


Member Function Documentation

bool CMotion2DWarping::backWarp short *    src,
int    src_nrows,
int    src_ncols,
short *    dst,
CMotion2DModel    model
 

Generate a backwarped image in dst from the original image src, using the motion model model.

The size of the images to backwarped is given by [src_nrows, src_ncols ].

The size of the backwarped image is to set by calling initBackWarp().

The 2D parametric motion model to use to backwarp the image src is specified by model.

Warning:
Before using this function, the warping must be initialized by a call to initBackWarp().
Warning:
The table containing the compensated image dst must be allocated before a call to this function.
Return true if success, false otherwise.

See also:
initBackWarp()

bool CMotion2DWarping::backWarp unsigned char *    src,
int    src_nrows,
int    src_ncols,
unsigned char *    dst,
CMotion2DModel    model
 

Generate a backwarped image in dst from the original image src, using the motion model model.

The size of the images to backwarped is given by [src_nrows, src_ncols ].

The size of the backwarped image is to set by calling initBackWarp().

The 2D parametric motion model to use to backwarp the image src is specified by model.

Warning:
Before using this function, the warping must be initialized by a call to initBackWarp().
Warning:
The table containing the compensated image dst must be allocated before a call to this function.
Return true if success, false otherwise.

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

void CMotion2DWarping::getBackWarpPosition int    row,
int    col,
float &    d_row,
float &    d_col
 

Gives the cumulated displacements of a pixel which position is defined by row, col, with respect to the reference image specified by initBackWarp().

The cumulated displacement along the row axis is stored in d_row, along the column axis in d_cols.

See also:
initBackWarp(), backWarp()

bool CMotion2DWarping::initBackWarp int    dst_nrows,
int    dst_ncols,
int    dst_row_offset,
int    dst_col_offset
 

This function allocates the memory necessary to store the combination of the instantaneous motion displacements between two successive images and defines the reference image which respect to the motion compensation is performed.

The size of the images to compensate is given by [src_nrows, src_ncols].

The size of the motion compensated image computed by warp() or backWarp() is given by [dst_nrows, dst_ncols]. His size can be greater than the image size.

The parameters dst_row_offset and dst_col_offset, specify the position of the reference image in the motion compensated image. The considered origin is the upper-left corner of the source image.

return true if the warping initialization succeed, false otherwise.

See also:
warp(), backWarp()
Examples:
Motion2D.cpp.

bool CMotion2DWarping::warp unsigned char *    src,
unsigned char *    dst,
int    nrows,
int    ncols,
CMotion2DModel    model
 

Warp the image src into dst using the motion model model. The parameter nrows refers to the number of lines in the images. ncols indicates the number of columns.

Warning:
The table containing the warped image dst must be allocated before a call to this function.
Return true if success, false otherwise.

See also:
CMotion2DModel
Examples:
Warping.cpp.


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