40 #include <visp3/tt/vpTemplateTrackerWarp.h> 46 vpCTRACE <<
"Bad template tracker warp parameters dimension. Should " 60 out.
init(rS1, rS2, rS3);
83 for (
unsigned int j = 0; j < 3; j++) {
88 res += sqrt((X2[0] - X1[0]) * (X2[0] - X1[0]) + (X2[1] - X1[1]) * (X2[1] - X1[1]));
92 return res / nb_corners;
100 for (
int i = 0; i < nb_pt; i++) {
111 #ifndef DOXYGEN_SHOULD_SKIP_THIS 112 void vpTemplateTrackerWarp::findWarp(
const double *ut0,
const double *vt0,
const double *u,
const double *v,
int nb_pt,
126 double lambda = 0.01;
128 erreur_prec = erreur;
133 for (
int i = 0; i < nb_pt; i++) {
138 dWarp(X1, fX1, p, dW_);
147 erreur += ((u[i] - fX1[0]) * (u[i] - fX1[0]) + (v[i] - fX1[1]) * (v[i] - fX1[1]));
158 }
while ((cpt < 150) && (sqrt((erreur_prec - erreur) * (erreur_prec - erreur)) > 1e-20));
161 #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.
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