42 #include <visp/vpTemplateTrackerZNCCForwardAdditional.h>
43 #include <visp/vpImageFilter.h>
64 Warp->computeCoeff(
p);
99 moyTij=moyTij/Nbpoint;
126 double *tempt=
new double[
nbParam];
127 for(
unsigned int it=0;it<
nbParam;it++)
128 tempt[it]=
dW[0][it]*dIWx+
dW[1][it]*dIWy;
131 double prod=(Tij-moyTij);
137 for(
unsigned int it=0;it<
nbParam;it++)
138 for(
unsigned int jt=0;jt<
nbParam;jt++)
139 Hdesire[it][jt] +=prod*(
dW[0][it]*(
dW[0][jt]*d_Ixx+
dW[1][jt]*d_Ixy)
140 +
dW[1][it]*(
dW[0][jt]*d_Ixy+
dW[1][jt]*d_Iyy));
146 denom+=(Tij-moyTij)*(Tij-moyTij)*(IW-moyIW)*(IW-moyIW);
182 unsigned int iteration=0;
192 Warp->computeCoeff(
p);
223 "Cannot track the template: no point")) ;
226 moyTij=moyTij/Nbpoint;
253 double *tempt=
new double[
nbParam];
254 for(
unsigned int it=0;it<
nbParam;it++)
255 tempt[it]=
dW[0][it]*dIWx+
dW[1][it]*dIWy;
258 double prod=(Tij-moyTij);
259 for(
unsigned int it=0;it<
nbParam;it++)
260 G[it]+=prod*tempt[it];
281 denom+=(Tij-moyTij)*(Tij-moyTij)*(IW-moyIW)*(IW-moyIW);
294 if(Nbpoint==0)std::cout<<
"plus de point dans template suivi"<<std::endl;
304 std::cout<<
"probleme inversion"<<std::endl;
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
static void filter(const vpImage< double > &I, vpImage< double > &Iu, vpImage< double > &Iv, const vpMatrix &M)
vpMatrix HLMdesireInverse
void initHessienDesired(const vpImage< unsigned char > &I)
vpMatrix inverseByLU() const
unsigned int getHeight() const
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