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 virtual void warpX(const int &v1, const int &u1, double &v2, double &u2, const vpColVector &p)=0
Implementation of a matrix and operations on matrices.
void warpTriangle(const vpTemplateTrackerTriangle &in, const vpColVector &p, vpTemplateTrackerTriangle &out)
double getDistanceBetweenZoneAndWarpedZone(const vpTemplateTrackerZone &Z, const vpColVector &p)
vpMatrix inverseByLU() const
error that can be emited by ViSP classes.
unsigned int size() const
Return the number of elements of the 2D array.
void add(const vpTemplateTrackerTriangle &t)
vpColVector getCorner(unsigned int i) 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.
unsigned int getNbTriangle() const
void getCorners(vpColVector &c1, vpColVector &c2, vpColVector &c3) const
void getTriangle(unsigned int i, vpTemplateTrackerTriangle &T) const
virtual void dWarp(const vpColVector &X1, const vpColVector &X2, const vpColVector &p, vpMatrix &dM)=0
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)
unsigned int nbParam
Number of parameters used to model warp transformation.