42 #include <visp/vpTemplateTrackerWarp.h>
55 out.
init(rS1,rS2,rS3);
80 for (
unsigned int j=0; j<3; j++) {
85 res+=sqrt((X2[0]-X1[0])*(X2[0]-X1[0])+(X2[1]-X1[1])*(X2[1]-X1[1]));
89 return res/nb_corners;
96 for(
int i=0;i<nb_pt;i++)
108 #ifndef DOXYGEN_SHOULD_SKIP_THIS
109 void vpTemplateTrackerWarp::findWarp(
const double *ut0,
const double *vt0,
const double *u,
const double *v,
int nb_pt,
vpColVector& p)
130 for(
int i=0;i<nb_pt;i++)
145 erreur+=((u[i]-fX1[0])*(u[i]-fX1[0])+(v[i]-fX1[1])*(v[i]-fX1[1]));
154 std::cout<<
"Cannot inverse the matrix by LU " << std::endl;
159 while((cpt<150)&&(sqrt((erreur_prec-erreur)*(erreur_prec-erreur))>1e-20));
162 #endif // #ifndef DOXYGEN_SHOULD_SKIP_THIS
Definition of the vpMatrix class.
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)
vpColVector getCorner(unsigned int i) const
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)
Class that provides a data structure for the column vectors as well as a set of operations on these v...
vpMatrix inverseByLU() const
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