![]() |
Visual Servoing Platform version 3.7.0
|
#include <vpTemplateTrackerWarpHomographySL3.h>
Public Member Functions | |
| vpTemplateTrackerWarpHomographySL3 () | |
| void | computeCoeff (const vpColVector &p) |
| void | computeDenom (vpColVector &X, const vpColVector &) |
| void | dWarp (const vpColVector &X1, const vpColVector &X2, const vpColVector &, vpMatrix &dW) |
| void | dWarpCompo (const vpColVector &, const vpColVector &X, const vpColVector &, const double *dwdp0, vpMatrix &dW) |
| void | findWarp (const double *ut0, const double *vt0, const double *u, const double *v, int nb_pt, vpColVector &p) |
| void | getdW0 (const int &v, const int &u, const double &dv, const double &du, double *dIdW) |
| void | getdWdp0 (const int &v, const int &u, double *dIdW) |
| void | getdWdp0 (const double &v, const double &u, double *dIdW) |
| vpHomography | getHomography () const |
| void | getParamInverse (const vpColVector &p, vpColVector &p_inv) const |
| void | getParamPyramidDown (const vpColVector &p, vpColVector &p_down) |
| void | getParamPyramidUp (const vpColVector &p, vpColVector &p_up) |
| bool | isESMcompatible () const |
| void | pRondp (const vpColVector &p1, const vpColVector &p2, vpColVector &p12) const |
| void | warpX (const vpColVector &X1, vpColVector &X2, const vpColVector &) |
| void | warpX (const int &v1, const int &u1, double &v2, double &u2, const vpColVector &) |
| virtual void | warpXInv (const vpColVector &X1, vpColVector &X2, const vpColVector &p)=0 |
Inherited functionalities from vpTemplateTrackerWarp | |
| double | getDistanceBetweenZoneAndWarpedZone (const vpTemplateTrackerZone &Z, const vpColVector &p) |
| unsigned int | getNbParam () const |
| void | setNbParam (unsigned int nb) |
| void | warp (const double *ut0, const double *vt0, int nb_pt, const vpColVector &p, double *u, double *v) |
| void | warpTriangle (const vpTemplateTrackerTriangle &in, const vpColVector &p, vpTemplateTrackerTriangle &out) |
| void | warpZone (const vpTemplateTrackerZone &in, const vpColVector &p, vpTemplateTrackerZone &out) |
Protected Attributes | |
| vpMatrix | G |
| vpMatrix | dGx |
| std::vector< vpMatrix > | A |
| double | denom |
| unsigned int | nbParam |
Tutorials
If you are interested in the Template Tracker (TT), you may have a look at:
Definition at line 61 of file vpTemplateTrackerWarpHomographySL3.h.
| vpTemplateTrackerWarpHomographySL3::vpTemplateTrackerWarpHomographySL3 | ( | ) |
Construct an homography SL3 model with 8 parameters initialized to zero.
Definition at line 130 of file vpTemplateTrackerWarpHomographySL3.cpp.
References A, dGx, G, and vpTemplateTrackerWarp::nbParam.
| void vpTemplateTrackerWarpHomographySL3::computeCoeff | ( | const vpColVector & | p | ) |
Compute the exponential of the homography matrix defined by the given parameters.
| p | : Parameters of the SL3 homography warping function. |
Definition at line 266 of file vpTemplateTrackerWarpHomographySL3.cpp.
References vpMatrix::expm(), and G.
Referenced by findWarp().
| void vpTemplateTrackerWarpHomographySL3::computeDenom | ( | vpColVector & | X, |
| const vpColVector & | ) |
Compute the projection denominator (Z) used in x = X/Z and y = Y/Z.
| X | : Point with coordinates (u, v) to consider. |
Definition at line 256 of file vpTemplateTrackerWarpHomographySL3.cpp.
References vpTemplateTrackerWarp::denom, and G.
Referenced by findWarp().
|
virtual |
Compute the derivative matrix of the warping function at point
according to the model parameters:
| X1 | : 2-dim vector corresponding to the coordinates |
| X2 | : 2-dim vector corresponding to the coordinates |
| dM | : Resulting warping model derivative returned as a 2-by-8 matrix. |
Implements vpTemplateTrackerWarp.
Definition at line 342 of file vpTemplateTrackerWarpHomographySL3.cpp.
References vpTemplateTrackerWarp::denom, dGx, and G.
|
virtual |
Compute the compositionnal derivative matrix of the warping function according to the model parameters.
| X | : 2-dim vector corresponding to the coordinates |
| dwdp0 | : 2-by-8 derivative matrix of the warping function according to the initial warping function parameters (p=0). |
| dM | : Resulting warping model compositionnal derivative returned as a 2-by-8 matrix. |
Implements vpTemplateTrackerWarp.
Definition at line 495 of file vpTemplateTrackerWarpHomographySL3.cpp.
References vpTemplateTrackerWarp::denom, G, and vpTemplateTrackerWarp::nbParam.
| BEGIN_VISP_NAMESPACE void vpTemplateTrackerWarpHomographySL3::findWarp | ( | const double * | ut0, |
| const double * | vt0, | ||
| const double * | u, | ||
| const double * | v, | ||
| int | nb_pt, | ||
| vpColVector & | p ) |
Find the displacement/warping function parameters from a list of points.
| ut0 | : Original u coordinates. |
| vt0 | : Original v coordinates. |
| u | : Warped u coordinates. |
| v | : Warped v coordinates. |
| nb_pt | : Number of points. |
| p | : Resulting warping function parameters. |
Definition at line 50 of file vpTemplateTrackerWarpHomographySL3.cpp.
References vpMatrix::AtA(), computeCoeff(), computeDenom(), vpMatrix::computeHLM(), getdWdp0(), vpMatrix::inverseByLU(), vpTemplateTrackerWarp::nbParam, pRondp(), vpMatrix::t(), and warpX().
Referenced by getParamPyramidDown(), and getParamPyramidUp().
|
inherited |
Compute the distance between a zone and its associated warped zone.
| Z | : Zone to consider. |
| p | : Parameters of the warping function. |
Definition at line 69 of file vpTemplateTrackerWarp.cpp.
References vpTemplateTrackerTriangle::getCorner(), and warpX().
Referenced by warpXInv().
|
virtual |
Compute the derivative of the image with relation to the warping function parameters.
| v | : Coordinate (along the image rows axis) of the point to consider in the image. |
| u | : Coordinate (along the image columns axis) of the point to consider in the image. |
| dv | : Derivative on the v-axis (along the rows) of the point (u,v). |
| du | : Derivative on the u-axis (along the columns) of the point (u,v). |
| dIdW | : Resulting derivative matrix (image according to the warping function). |
Implements vpTemplateTrackerWarp.
Definition at line 373 of file vpTemplateTrackerWarpHomographySL3.cpp.
References dGx, G, and vpTemplateTrackerWarp::nbParam.
| void vpTemplateTrackerWarpHomographySL3::getdWdp0 | ( | const double & | v, |
| const double & | u, | ||
| double * | dIdW ) |
Compute the derivative of the warping model
according to the initial parameters
at point
:
| v | : Coordinate (along the image rows axis) of the point X(u,v) to consider in the image. |
| u | : Coordinate (along the image columns axis) of the point X(u,v) to consider in the image. |
| dIdW | : Resulting 2-by-8 derivative matrix. |
Definition at line 454 of file vpTemplateTrackerWarpHomographySL3.cpp.
References dGx, G, and vpTemplateTrackerWarp::nbParam.
|
virtual |
Compute the derivative of the warping model
according to the initial parameters
at point
:
| v | : Coordinate (along the image rows axis) of the point X(u,v) to consider in the image. |
| u | : Coordinate (along the image columns axis) of the point X(u,v) to consider in the image. |
| dIdW | : Resulting 2-by-8 derivative matrix. |
Implements vpTemplateTrackerWarp.
Definition at line 413 of file vpTemplateTrackerWarpHomographySL3.cpp.
References dGx, G, and vpTemplateTrackerWarp::nbParam.
Referenced by findWarp().
| vpHomography vpTemplateTrackerWarpHomographySL3::getHomography | ( | ) | const |
Return the homography corresponding to the parameters.
Definition at line 320 of file vpTemplateTrackerWarpHomographySL3.cpp.
References G.
|
inlineinherited |
Get the number of parameters of the warping function.
Definition at line 222 of file vpTemplateTrackerWarp.h.
References nbParam.
Referenced by vpTemplateTrackerWarpHomography::getParam(), and vpTemplateTrackerWarpHomography::getParam().
|
virtual |
Compute inverse of the warping transformation.
| p | : 8-dim vector that contains the parameters corresponding to the transformation to inverse. |
| p_inv | : 8-dim vector that contains the parameters of the inverse transformation |
Implements vpTemplateTrackerWarp.
Definition at line 510 of file vpTemplateTrackerWarpHomographySL3.cpp.
|
virtual |
Get the parameters of the warping function one level down where image size is divided by two along the lines and the columns.
| p | : 8-dim vector that contains the current parameters of the warping function. |
| p_down | : 8-dim vector that contains the resulting parameters one level down. |
Implements vpTemplateTrackerWarp.
Definition at line 161 of file vpTemplateTrackerWarpHomographySL3.cpp.
References findWarp(), and vpTemplateTrackerWarp::warp().
|
virtual |
Get the parameters of the warping function one level up where image size is multiplied by two along the lines and the columns.
| p | : 8-dim vector that contains the current parameters of the warping function. |
| p_up | : 8-dim vector that contains the resulting parameters one level up. |
Implements vpTemplateTrackerWarp.
Definition at line 201 of file vpTemplateTrackerWarpHomographySL3.cpp.
References findWarp(), and vpTemplateTrackerWarp::warp().
|
inlinevirtual |
Tells if the warping function is ESM compatible.
Implements vpTemplateTrackerWarp.
Definition at line 93 of file vpTemplateTrackerWarpHomographySL3.h.
|
virtual |
Compute the transformation resulting from the composition of two other transformations.
| p1 | : 8-dim vector that contains the parameters corresponding to first transformation. |
| p2 | : 8-dim vector that contains the parameters corresponding to second transformation. |
| p12 | : 8-dim vector that contains the resulting transformation |
Implements vpTemplateTrackerWarp.
Definition at line 520 of file vpTemplateTrackerWarpHomographySL3.cpp.
Referenced by findWarp().
|
inlineinherited |
Set the number of parameters of the warping function.
| nb | : New number of parameters. |
Definition at line 229 of file vpTemplateTrackerWarp.h.
References nbParam.
|
inherited |
Warp a list of points.
| ut0 | : List of u coordinates of the points. |
| vt0 | : List of v coordinates of the points. |
| nb_pt | : Number of points to consider. |
| p | : Parameters of the warp. |
| u | : Resulting u coordinates. |
| v | : resulting v coordinates. |
Definition at line 91 of file vpTemplateTrackerWarp.cpp.
References warpX().
Referenced by vpTemplateTrackerWarpHomographySL3::getParamPyramidDown(), and vpTemplateTrackerWarpHomographySL3::getParamPyramidUp().
|
inherited |
Warp a triangle and store the result in a new zone.
| in | : Triangle to warp. |
| p | : Parameters of the warping function. These parameters are estimated by the template tracker and returned using vpTemplateTracker::getp(). |
| out | : Resulting triangle. |
Definition at line 38 of file vpTemplateTrackerWarp.cpp.
References vpException::dimensionError, vpTemplateTrackerTriangle::getCorners(), vpTemplateTrackerTriangle::init(), vpCTRACE, and warpX().
Referenced by warpZone().
|
virtual |
Warp point
using the transformation model with parameters
.
| v1 | : Coordinate (along the image rows axis) of the point |
| u1 | : Coordinate (along the image columns axis) of the point |
| v2 | : Coordinate of the warped point |
| u2 | : Coordinate of the warped point |
Implements vpTemplateTrackerWarp.
Definition at line 309 of file vpTemplateTrackerWarpHomographySL3.cpp.
References vpTemplateTrackerWarp::denom, and G.
|
virtual |
Warp point
using the transformation model.
| X1 | : 2-dim vector corresponding to the coordinates |
| X2 | : 2-dim vector corresponding to the coordinates |
Implements vpTemplateTrackerWarp.
Definition at line 292 of file vpTemplateTrackerWarpHomographySL3.cpp.
References vpTemplateTrackerWarp::denom, and G.
Referenced by findWarp().
|
pure virtualinherited |
Warp a point X1 with the inverse transformation
.
| X1 | : Vector corresponding to the coordinates (u,v) of the point to warp. |
| X2 | : Vector corresponding to the coordinates (u,v) of the warped point. |
| p | : Parameters corresponding to the warping RT model |
Implemented in vpTemplateTrackerWarpAffine, vpTemplateTrackerWarpHomography, vpTemplateTrackerWarpRT, vpTemplateTrackerWarpSRT, and vpTemplateTrackerWarpTranslation.
References getDistanceBetweenZoneAndWarpedZone().
|
inherited |
Warp a zone and store the result in a new zone.
| in | : Zone to warp. |
| p | : Parameters of the warping function. These parameters are estimated by the template tracker and returned using vpTemplateTracker::getp(). |
| out | : Resulting zone. |
Definition at line 58 of file vpTemplateTrackerWarp.cpp.
References vpTemplateTrackerZone::add(), vpTemplateTrackerZone::clear(), vpTemplateTrackerZone::getNbTriangle(), vpTemplateTrackerZone::getTriangle(), and warpTriangle().
|
protected |
Definition at line 66 of file vpTemplateTrackerWarpHomographySL3.h.
Referenced by vpTemplateTrackerWarpHomographySL3().
|
protectedinherited |
Internal value used by homography warp model.
Definition at line 67 of file vpTemplateTrackerWarp.h.
Referenced by vpTemplateTrackerWarpHomography::computeDenom(), vpTemplateTrackerWarpHomographySL3::computeDenom(), vpTemplateTrackerWarpHomography::dWarp(), vpTemplateTrackerWarpHomographySL3::dWarp(), vpTemplateTrackerWarpHomography::dWarpCompo(), vpTemplateTrackerWarpHomographySL3::dWarpCompo(), vpTemplateTrackerWarp(), vpTemplateTrackerWarpHomography::warpX(), vpTemplateTrackerWarpHomography::warpX(), vpTemplateTrackerWarpHomographySL3::warpX(), and vpTemplateTrackerWarpHomographySL3::warpX().
|
protected |
Definition at line 65 of file vpTemplateTrackerWarpHomographySL3.h.
Referenced by dWarp(), getdW0(), getdWdp0(), getdWdp0(), and vpTemplateTrackerWarpHomographySL3().
|
protected |
Definition at line 64 of file vpTemplateTrackerWarpHomographySL3.h.
Referenced by computeCoeff(), computeDenom(), dWarp(), dWarpCompo(), getdW0(), getdWdp0(), getdWdp0(), getHomography(), vpTemplateTrackerWarpHomographySL3(), warpX(), and warpX().
|
protectedinherited |
Number of parameters used to model warp transformation.
Definition at line 68 of file vpTemplateTrackerWarp.h.
Referenced by vpTemplateTrackerWarpAffine::dWarpCompo(), vpTemplateTrackerWarpHomography::dWarpCompo(), vpTemplateTrackerWarpHomographySL3::dWarpCompo(), vpTemplateTrackerWarpRT::dWarpCompo(), vpTemplateTrackerWarpSRT::dWarpCompo(), vpTemplateTrackerWarpTranslation::dWarpCompo(), vpTemplateTrackerWarpHomographySL3::findWarp(), vpTemplateTrackerWarpHomographySL3::getdW0(), vpTemplateTrackerWarpHomographySL3::getdWdp0(), vpTemplateTrackerWarpHomographySL3::getdWdp0(), getNbParam(), setNbParam(), vpTemplateTrackerWarp(), vpTemplateTrackerWarpAffine::vpTemplateTrackerWarpAffine(), vpTemplateTrackerWarpHomography::vpTemplateTrackerWarpHomography(), vpTemplateTrackerWarpHomographySL3::vpTemplateTrackerWarpHomographySL3(), vpTemplateTrackerWarpRT::vpTemplateTrackerWarpRT(), vpTemplateTrackerWarpSRT::vpTemplateTrackerWarpSRT(), and vpTemplateTrackerWarpTranslation::vpTemplateTrackerWarpTranslation().