42 #include <visp/vpTemplateTrackerZNCC.h>
67 Warp->computeCoeff(tp);
96 "Cannot get cost: size = 0")) ;
99 moyTij=moyTij/Nbpoint;
102 double nom=0,denom=0;
103 double var1=0,var2=0;
109 Warp->computeDenom(
X1,tp);
121 nom+=(Tij-moyTij)*(IW-moyIW);
122 denom+=(Tij-moyTij)*(Tij-moyTij)*(IW-moyIW)*(IW-moyIW);
123 var1+=(IW-moyIW)*(IW-moyIW);
124 var2+=(Tij-moyTij)*(Tij-moyTij);
131 return -nom/sqrt(var1*var2);
void resize(const unsigned int nrows, const unsigned int ncols, const bool nullify=true)
unsigned int getWidth() const
vpTemplateTrackerPoint * ptTemplate
virtual void warpX(const int &i, const int &j, double &i2, double &j2, const vpColVector &ParamM)=0
error that can be emited by ViSP classes.
Type getValue(double i, double j) const
double getCost(const vpImage< unsigned char > &I, vpColVector &tp)
vpTemplateTrackerZNCC(vpTemplateTrackerWarp *warp)
unsigned int templateSize
void resize(const unsigned int i, const bool flagNullify=true)
Class that provides a data structure for the column vectors as well as a set of operations on these v...
unsigned int getHeight() const
vpTemplateTrackerWarp * Warp
void resize(const unsigned int i, const bool flagNullify=true)