Public Types | |
enum | { MDL_NMAX_COEF = 12 } |
Public Methods | |
CMotion2DModel () | |
CMotion2DModel (const CMotion2DModel &model) | |
~CMotion2DModel () | |
void | setOrigin (double row, double col) |
void | setIdModel (EIdModel id) |
void | setIdModel (string id) |
void | setVarLight (bool state, double parameter=0.0) |
void | setParameters (const double parameters[MDL_NMAX_COEF]) |
bool | compose (CMotion2DModel model) |
int | getNParameters () |
int | getDegre () |
void | getParameters (double parameters[MDL_NMAX_COEF]) |
void | reset () |
bool | invert (CMotion2DModel &inv) |
string | idToString () |
bool | changeRepere (double row, double col) |
bool | getDisplacement (double row, double col, double &d_row, double &d_col) |
EIdModel | getIdModel () |
bool | getVarLight () |
bool | getVarLight (double ¶meter) |
CMotion2DModel | getModelLevel (int delta_level) |
void | getOrigin (double &row, double &col) |
double | operator[] (int n) |
void | operator= (const CMotion2DModel &model) |
Using matrix notation, these models can always be written as:
which is linear with respect to the n motion parameters
, and where
denotes the spatial position of a point in
,
the flow vector given by the estimated motion model at point
;
is a matrix, the form of which depends on the chosen model, but the coefficients of which depend only on the point coordinates.
The complete list of the 2D polynomial motion models available is given by the EIdModel() enum. It involves constant, affine, quadratic (complete or not), motion models.
Moreover, to take into account global illumination changes between two successive images, we have introduced the parameter
.
Finally, the resulting implemented motion models are specified by parameters
.
To initialize a motion model, use setOrigin() to define the reference point
of the model, setIdModel() to specify the 2D polynomial model
to use, eventually setParameters() to initialize the parameters
of the model and setVarLight() to initialize
.
Motion2D.cpp, and Warping.cpp.
|
Maximal number of parameters for a 2D polynomial motion model. |
|
Default constructor for 2D polynomial motion models. |
|
Copy constructor for 2D polynomial motion models. |
|
Destructor. |
|
Transforms all the parameters
|
|
Computes the motion composition between the current motion model and another motion model passed as parameter to the function.
![]()
where The motion composition is only performed if the degree of the 2D polynomial motion models to manipulate are 0 or 1. Returns true if success, false otherwise.
|
|
Returns the degree of the 2D polynomial motion model, either :
|
|
For a given motion model, supplies the displacement in pixels ![]()
for the specified point
|
|
Return the id of the 2D polynomial motion model. The complete list of the 2D polynomial motion models available is given by the EIdModel() enum |
|
Returns a motion model where the 2D parametric motion model parameters and the model origin are transformed considering a relative pyramid level given as input by delta_level. For example,
|
|
Returns the number of parameters describing the 2D polynomial motion model.
|
|
Returns the origin coordinates:
|
|
Returns all the CMotion2DModel::MDL_NMAX_COEF parameter values
![]()
![]()
The table below gives the correspondence between the value of n and the corresponding parameter of the model.
![]()
|
|
Indicates if the global illumination variation parameter
|
|
Indicates if the global illumination variation parameter
|
|
Returns a string describing the id motion model.
|
|
Computes the inverse motion model. This transformation is only available for constant or affine motion models.
|
|
Assigns a copy of model to this motion model and returns a reference to this motion model. |
|
Returns the parameter n of the 2D polynomial motion model. The number of parameters associated to a given 2D motion model is accessible with getNParameters().
![]()
![]()
The table below gives the correspondence between the value of n and the corresponding parameter of the model.
![]()
|
|
Sets all the 2D polynomial motion model parameters and the global illumination variation parameter to zero.
|
|
A model is defined for a given coordinated system origin The relation between the string id and the polynomial motion model id is given below:
|
|
A model is defined for a given coordinated system origin
|
|
A model is defined for a given coordinated system origin
|
|
Sets the 2D parametric motion model parameters. The number of parameters can be known by using getNParameters(). The general form of the model is given by: ![]()
![]()
The table below gives the correspondence between the index of the table parameters[index] and the corresponding parameter of the model.
![]()
|
|
A model is defined for a given coordinated system origin
|