37#include <visp3/core/vpImageTools.h>
38#include <visp3/tt/vpTemplateTrackerSSDInverseCompositional.h>
53 for (
unsigned int point = 0; point <
templateSize; point++) {
61 for (
unsigned int it = 0; it <
nbParam; it++)
62 for (
unsigned int jt = 0; jt <
nbParam; jt++)
72 for (
unsigned int point = 0; point <
templateSize; point++) {
76 for (
unsigned int i = 0; i <
HCompInverse.getRows(); i++) {
78 for (
unsigned int j = 0; j <
HCompInverse.getCols(); j++) {
100 unsigned int iteration = 0;
108 double evolRMS_init = 0;
109 double evolRMS_prec = 0;
110 double evolRMS_delta;
113 unsigned int Nbpoint = 0;
116 Warp->computeCoeff(
p);
117 for (
unsigned int point = 0; point <
templateSize; point++) {
129 if ((i2 >= 0) && (j2 >= 0) && (i2 < I.getHeight() - 1) && (j2 < I.getWidth() - 1)) {
132 IW = I.getValue(i2, j2);
134 IW =
BI.getValue(i2, j2);
136 double er = (Tij - IW);
137 for (
unsigned int it = 0; it <
nbParam; it++)
138 dp[it] += er * pt->
HiG[it];
153 Warp->getParamInverse(
dp, dpinv);
154 Warp->pRondp(
p, dpinv,
p);
158 if (iteration == 0) {
163 evolRMS_delta = std::fabs(
evolRMS - evolRMS_prec);
Implementation of column vector and the associated operations.
static void filter(const vpImage< ImageType > &I, vpImage< FilterType > &If, const vpArray2D< FilterType > &M, bool convolve=false, const vpImage< bool > *p_mask=nullptr)
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.