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.
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)
vpMatrix inverseByLU() const
void computeOptimalBrentGain(const vpImage< unsigned char > &I, vpColVector &tp, double tMI, vpColVector &direction, double &alpha)
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
Type getValue(double i, double j) const
vpColVector getCorner(unsigned int i) const
unsigned int getHeight() const
Implementation of column vector and the associated operations.
vpTemplateTrackerZone * zoneTracked
unsigned int getNbTriangle() const
static void filter(const vpImage< double > &I, vpImage< double > &Iu, vpImage< double > &Iv, const vpMatrix &M, const bool convolve=false)
void getTriangle(unsigned int i, vpTemplateTrackerTriangle &T) const
vpTemplateTrackerWarp * Warp
static void computeHLM(const vpMatrix &H, const double &alpha, vpMatrix &HLM)
unsigned int getWidth() const