39 #include <visp3/tt/vpTemplateTrackerZNCCForwardAdditional.h>
40 #include <visp3/core/vpImageFilter.h>
61 Warp->computeCoeff(
p);
96 moyTij=moyTij/Nbpoint;
123 double *tempt=
new double[
nbParam];
124 for(
unsigned int it=0;it<
nbParam;it++)
125 tempt[it]=
dW[0][it]*dIWx+
dW[1][it]*dIWy;
128 double prod=(Tij-moyTij);
134 for(
unsigned int it=0;it<
nbParam;it++)
135 for(
unsigned int jt=0;jt<
nbParam;jt++)
136 Hdesire[it][jt] +=prod*(
dW[0][it]*(
dW[0][jt]*d_Ixx+
dW[1][jt]*d_Ixy)
137 +
dW[1][it]*(
dW[0][jt]*d_Ixy+
dW[1][jt]*d_Iyy));
143 denom+=(Tij-moyTij)*(Tij-moyTij)*(IW-moyIW)*(IW-moyIW);
176 unsigned int iteration=0;
186 Warp->computeCoeff(
p);
217 "Cannot track the template: no point")) ;
220 moyTij=moyTij/Nbpoint;
247 double *tempt=
new double[
nbParam];
248 for(
unsigned int it=0;it<
nbParam;it++)
249 tempt[it]=
dW[0][it]*dIWx+
dW[1][it]*dIWy;
252 double prod=(Tij-moyTij);
253 for(
unsigned int it=0;it<
nbParam;it++)
254 G[it]+=prod*tempt[it];
275 denom+=(Tij-moyTij)*(Tij-moyTij)*(IW-moyIW)*(IW-moyIW);
unsigned int getWidth() const
static void getGradX(const vpImage< unsigned char > &I, vpImage< double > &dIx)
vpTemplateTrackerPoint * ptTemplate
static void getGradY(const vpImage< unsigned char > &I, vpImage< double > &dIy)
virtual void warpX(const int &i, const int &j, double &i2, double &j2, const vpColVector &ParamM)=0
void computeOptimalBrentGain(const vpImage< unsigned char > &I, vpColVector &tp, double tMI, vpColVector &direction, double &alpha)
error that can be emited by ViSP classes.
Type getValue(double i, double j) const
static void getGradYGauss2D(const vpImage< unsigned char > &I, vpImage< double > &dIy, const double *gaussianKernel, const double *gaussianDerivativeKernel, unsigned int size)
static void getGradXGauss2D(const vpImage< unsigned char > &I, vpImage< double > &dIx, const double *gaussianKernel, const double *gaussianDerivativeKernel, unsigned int size)
unsigned int templateSize
unsigned int iterationMax
vpMatrix HLMdesireInverse
void initHessienDesired(const vpImage< unsigned char > &I)
vpMatrix inverseByLU() const
unsigned int getHeight() const
static void filter(const vpImage< double > &I, vpImage< double > &Iu, vpImage< double > &Iv, const vpMatrix &M, const bool convolve=false)
void trackNoPyr(const vpImage< unsigned char > &I)
vpTemplateTrackerZNCCForwardAdditional(vpTemplateTrackerWarp *warp)
vpTemplateTrackerWarp * Warp
static void computeHLM(const vpMatrix &H, const double &alpha, vpMatrix &HLM)
virtual void dWarp(const vpColVector &X1, const vpColVector &X2, const vpColVector &ParamM, vpMatrix &dW)=0