45 #include <visp/vpTemplateTrackerSSDForwardAdditional.h>
46 #include <visp/vpImageTools.h>
69 unsigned int iteration=0;
79 Warp->computeCoeff(
p);
104 double *tempt=
new double[
nbParam];
105 for(
unsigned int it=0;it<
nbParam;it++)
106 tempt[it]=
dW[0][it]*dIWx+
dW[1][it]*dIWy;
108 for(
unsigned int it=0;it<
nbParam;it++)
109 for(
unsigned int jt=0;jt<
nbParam;jt++)
110 H[it][jt]+=tempt[it]*tempt[jt];
113 for(
unsigned int it=0;it<
nbParam;it++)
122 if(Nbpoint==0)std::cout<<
"plus de point dans template suivi"<<std::endl;
131 std::cout<<
"probleme inversion"<<std::endl;
135 switch(minimizationMethod)
142 double erreur_LMA=-
getCost(I,p_test_LMA);
143 if(erreur_LMA<erreur)
146 lambda=(lambda/10.<1e-6)?lambda/10.:1e-6;
150 lambda=(lambda*10.<1e6)?1e6:lambda*10.;
174 s_scal_y=s_quasi.
t()*y_quasi;
178 if(std::fabs(s_scal_y) > std::numeric_limits<double>::epsilon())
179 KQuasiNewton=KQuasiNewton+0.001*(s_quasi*s_quasi.
t()/s_scal_y-KQuasiNewton*y_quasi*y_quasi.
t()*KQuasiNewton/(y_quasi.
t()*KQuasiNewton*y_quasi));
unsigned int getWidth() const
vpTemplateTrackerPoint * ptTemplate
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)
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)
vpRowVector t() const
transpose of Vector
unsigned int iterationGlobale
Class that provides a data structure for the column vectors as well as a set of operations on these v...
vpMatrix inverseByLU() const
unsigned int getHeight() const
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