40 #include <visp3/tt/vpTemplateTrackerZNCC.h> 63 Warp->computeCoeff(tp);
67 for (
unsigned int point = 0; point <
templateSize; point++) {
72 Warp->computeDenom(
X1, tp);
77 if ((j2 < I.
getWidth() - 1) && (i2 < I.
getHeight() - 1) && (i2 > 0) && (j2 > 0)) {
94 moyTij = moyTij / Nbpoint;
95 moyIW = moyIW / Nbpoint;
98 double var1 = 0, var2 = 0;
99 for (
unsigned int point = 0; point <
templateSize; point++) {
104 Warp->computeDenom(
X1, tp);
109 if ((j2 < I.
getWidth() - 1) && (i2 < I.
getHeight() - 1) && (i2 > 0) && (j2 > 0)) {
116 nom += (Tij - moyTij) * (IW - moyIW);
118 var1 += (IW - moyIW) * (IW - moyIW);
119 var2 += (Tij - moyTij) * (Tij - moyTij);
126 return -nom / sqrt(var1 * var2);
vpTemplateTrackerPoint * ptTemplate
virtual void warpX(const int &i, const int &j, double &i2, double &j2, const vpColVector &ParamM)=0
void resize(const unsigned int nrows, const unsigned int ncols, const bool flagNullify=true, const bool recopy_=true)
error that can be emited by ViSP classes.
vpTemplateTrackerZNCC(vpTemplateTrackerWarp *warp)
unsigned int templateSize
Type getValue(double i, double j) const
void resize(const unsigned int i, const bool flagNullify=true)
unsigned int getHeight() const
Implementation of column vector and the associated operations.
vpTemplateTrackerWarp * Warp
unsigned int getWidth() const
double getCost(const vpImage< unsigned char > &I, const vpColVector &tp)
void resize(const unsigned int i, const bool flagNullify=true)