39 #include <visp3/tt/vpTemplateTrackerWarp.h>
44 vpCTRACE <<
"Bad template tracker warp parameters dimension. Should never occur. " << std::endl;
56 out.
init(rS1,rS2,rS3);
81 for (
unsigned int j=0; j<3; j++) {
86 res+=sqrt((X2[0]-X1[0])*(X2[0]-X1[0])+(X2[1]-X1[1])*(X2[1]-X1[1]));
90 return res/nb_corners;
97 for(
int i=0;i<nb_pt;i++)
109 #ifndef DOXYGEN_SHOULD_SKIP_THIS
110 void vpTemplateTrackerWarp::findWarp(
const double *ut0,
const double *vt0,
const double *u,
const double *v,
int nb_pt,
vpColVector& p)
131 for(
int i=0;i<nb_pt;i++)
146 erreur+=((u[i]-fX1[0])*(u[i]-fX1[0])+(v[i]-fX1[1])*(v[i]-fX1[1]));
160 while((cpt<150)&&(sqrt((erreur_prec-erreur)*(erreur_prec-erreur))>1e-20));
163 #endif // #ifndef DOXYGEN_SHOULD_SKIP_THIS
Implementation of a matrix and operations on matrices.
void getTriangle(unsigned int i, vpTemplateTrackerTriangle &T) const
void warpTriangle(const vpTemplateTrackerTriangle &in, const vpColVector &p, vpTemplateTrackerTriangle &out)
virtual void warpX(const int &i, const int &j, double &i2, double &j2, const vpColVector &ParamM)=0
double getDistanceBetweenZoneAndWarpedZone(const vpTemplateTrackerZone &Z, const vpColVector &p)
error that can be emited by ViSP classes.
vpColVector getCorner(unsigned int i) const
unsigned int size() const
Return the number of elements of the 2D array.
void getCorners(vpColVector &c1, vpColVector &c2, vpColVector &c3) const
void add(const vpTemplateTrackerTriangle &t)
unsigned int getNbTriangle() const
void warpZone(const vpTemplateTrackerZone &in, const vpColVector &p, vpTemplateTrackerZone &out)
void init(const vpColVector &c1, const vpColVector &c2, const vpColVector &c3)
Implementation of column vector and the associated operations.
static void computeHLM(const vpMatrix &H, const double &alpha, vpMatrix &HLM)
void warp(const double *ut0, const double *vt0, int nb_pt, const vpColVector &p, double *u, double *v)
virtual void dWarp(const vpColVector &X1, const vpColVector &X2, const vpColVector &ParamM, vpMatrix &dW)=0