40 #include <visp3/core/vpImageTools.h> 41 #include <visp3/tt/vpTemplateTrackerSSDInverseCompositional.h> 44 :
vpTemplateTrackerSSD(warp), compoInitialised(false), HInv(), HCompInverse(), useTemplateSelect(false)
56 for (
unsigned int point = 0; point <
templateSize; point++) {
64 for (
unsigned int it = 0; it <
nbParam; it++)
65 for (
unsigned int jt = 0; jt <
nbParam; jt++)
78 for (
unsigned int point = 0; point <
templateSize; point++) {
80 for (
unsigned int it = 0; it <
nbParam; it++)
86 for (
unsigned int it = 0; it <
nbParam; it++)
106 unsigned int iteration = 0;
114 double evolRMS_init = 0;
115 double evolRMS_prec = 0;
116 double evolRMS_delta;
119 unsigned int Nbpoint = 0;
122 Warp->computeCoeff(
p);
123 for (
unsigned int point = 0; point <
templateSize; point++) {
135 if ((i2 >= 0) && (j2 >= 0) && (i2 < I.
getHeight() - 1) && (j2 < I.
getWidth() - 1)) {
142 double er = (Tij - IW);
143 for (
unsigned int it = 0; it <
nbParam; it++)
144 dp[it] += er * pt->
HiG[it];
164 if (iteration == 0) {
169 evolRMS_delta = std::fabs(
evolRMS - evolRMS_prec);
Implementation of a matrix and operations on matrices.
void resize(unsigned int nrows, unsigned int ncols, bool flagNullify=true, bool recopy_=true)
Type getValue(unsigned int i, unsigned int j) const
vpTemplateTrackerPoint * ptTemplate
virtual void warpX(const int &i, const int &j, double &i2, double &j2, const vpColVector &ParamM)=0
vpMatrix inverseByLU() const
void computeOptimalBrentGain(const vpImage< unsigned char > &I, vpColVector &tp, double tMI, vpColVector &direction, double &alpha)
void initPosEvalRMS(const vpColVector &p)
void computeEvalRMS(const vpColVector &p)
virtual void getParamInverse(const vpColVector &ParamM, vpColVector &ParamMinv) const =0
unsigned int templateSize
unsigned int iterationMax
virtual void pRondp(const vpColVector &p1, const vpColVector &p2, vpColVector &pres) const =0
Error that can be emited by the vpTracker class and its derivates.
virtual void getdW0(const int &i, const int &j, const double &dy, const double &dx, double *dIdW)=0
static void filter(const vpImage< double > &I, vpImage< double > &Iu, vpImage< double > &Iv, const vpMatrix &M, bool convolve=false)
unsigned int getHeight() const
Implementation of column vector and the associated operations.
vpTemplateTrackerWarp * Warp
static void computeHLM(const vpMatrix &H, const double &alpha, vpMatrix &HLM)
unsigned int getWidth() const