40 #include <visp3/core/vpImageTools.h> 41 #include <visp3/tt/vpTemplateTrackerSSDInverseCompositional.h> 44 :
vpTemplateTrackerSSD(warp), compoInitialised(false), HInv(), HCompInverse(), useTemplateSelect(false), evolRMS(0),
45 x_pos(), y_pos(), threshold_RMS(1e-8)
58 for (
unsigned int point = 0; point <
templateSize; point++) {
69 for (
unsigned int it = 0; it <
nbParam; it++)
70 for (
unsigned int jt = 0; jt <
nbParam; jt++)
84 for (
unsigned int point = 0; point <
templateSize; point++) {
88 for (
unsigned int it = 0; it <
nbParam; it++)
94 for (
unsigned int it = 0; it <
nbParam; it++)
114 unsigned int iteration = 0;
123 unsigned int Nbpoint = 0;
126 Warp->computeCoeff(
p);
127 for (
unsigned int point = 0; point <
templateSize; point++) {
140 if ((i2 >= 0) && (j2 >= 0) && (i2 < I.
getHeight() - 1) && (j2 < I.
getWidth() - 1)) {
147 double er = (Tij - IW);
148 for (
unsigned int it = 0; it <
nbParam; it++)
149 dp[it] += er * pt->
HiG[it];
185 x_pos.resize(nb_corners);
186 y_pos.resize(nb_corners);
188 Warp->computeCoeff(p_);
193 for (
unsigned int j = 0; j < 3; j++) {
196 Warp->computeDenom(
X1, p_);
208 Warp->computeCoeff(p_);
214 for (
unsigned int j = 0; j < 3; j++) {
217 Warp->computeDenom(
X1, p_);
Implementation of a matrix and operations on matrices.
void getTriangle(unsigned int i, vpTemplateTrackerTriangle &T) const
unsigned int getWidth() const
vpTemplateTrackerPoint * ptTemplate
virtual void warpX(const int &i, const int &j, double &i2, double &j2, const vpColVector &ParamM)=0
void resize(const unsigned int nrows, const unsigned int ncols, const bool flagNullify=true, const bool recopy_=true)
void computeOptimalBrentGain(const vpImage< unsigned char > &I, vpColVector &tp, double tMI, vpColVector &direction, double &alpha)
vpColVector getCorner(unsigned int i) const
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
Type getValue(unsigned int i, unsigned int j) const
Error that can be emited by the vpTracker class and its derivates.
unsigned int getNbTriangle() const
virtual void getdW0(const int &i, const int &j, const double &dy, const double &dx, double *dIdW)=0
Implementation of column vector and the associated operations.
vpMatrix inverseByLU() const
vpTemplateTrackerZone * zoneTracked
unsigned int getHeight() const
static void filter(const vpImage< double > &I, vpImage< double > &Iu, vpImage< double > &Iv, const vpMatrix &M, const bool convolve=false)
vpTemplateTrackerWarp * Warp
static void computeHLM(const vpMatrix &H, const double &alpha, vpMatrix &HLM)