39#include <visp3/core/vpImageTools.h>
40#include <visp3/tt/vpTemplateTrackerSSDInverseCompositional.h>
54 for (
unsigned int point = 0; point <
templateSize; point++) {
62 for (
unsigned int it = 0; it <
nbParam; it++)
63 for (
unsigned int jt = 0; jt <
nbParam; jt++)
73 for (
unsigned int point = 0; point <
templateSize; point++) {
77 for (
unsigned int i = 0; i <
HCompInverse.getRows(); i++) {
79 for (
unsigned int j = 0; j <
HCompInverse.getCols(); j++) {
101 unsigned int iteration = 0;
109 double evolRMS_init = 0;
110 double evolRMS_prec = 0;
111 double evolRMS_delta;
114 unsigned int Nbpoint = 0;
117 Warp->computeCoeff(
p);
118 for (
unsigned int point = 0; point <
templateSize; point++) {
130 if ((i2 >= 0) && (j2 >= 0) && (i2 < I.getHeight() - 1) && (j2 < I.getWidth() - 1)) {
133 IW = I.getValue(i2, j2);
135 IW =
BI.getValue(i2, j2);
137 double er = (Tij - IW);
138 for (
unsigned int it = 0; it <
nbParam; it++)
139 dp[it] += er * pt->
HiG[it];
154 Warp->getParamInverse(
dp, dpinv);
155 Warp->pRondp(
p, dpinv,
p);
159 if (iteration == 0) {
164 evolRMS_delta = std::fabs(
evolRMS - evolRMS_prec);
Implementation of column vector and the associated operations.
static void filter(const vpImage< unsigned char > &I, vpImage< FilterType > &If, const vpArray2D< FilterType > &M, bool convolve=false)
Definition of the vpImage class member functions.
Implementation of a matrix and operations on matrices.
vpMatrix inverseByLU() const
static void computeHLM(const vpMatrix &H, const double &alpha, vpMatrix &HLM)
void computeEvalRMS(const vpColVector &p)
void computeOptimalBrentGain(const vpImage< unsigned char > &I, vpColVector &tp, double tMI, vpColVector &direction, double &alpha)
unsigned int iterationMax
void initPosEvalRMS(const vpColVector &p)
vpTemplateTrackerPoint * ptTemplate
vpTemplateTrackerWarp * Warp
unsigned int templateSize
Error that can be emitted by the vpTracker class and its derivatives.
@ notEnoughPointError
Not enough point to track.