33 #ifndef vpTemplateTrackerMI_hh
34 #define vpTemplateTrackerMI_hh
36 #include <visp3/core/vpConfig.h>
38 #include <visp3/core/vpImageFilter.h>
39 #include <visp3/tt/vpTemplateTracker.h>
40 #include <visp3/tt/vpTemplateTrackerHeader.h>
52 HESSIAN_NONSECOND = -1,
58 } vpHessienApproximationType;
61 typedef enum { USE_HESSIEN_NORMAL, USE_HESSIEN_DESIRE, USE_HESSIEN_BEST_COND } vpHessienType;
64 typedef enum { BSPLINE_THIRD_ORDER = 3, BSPLINE_FOURTH_ORDER = 4 } vpBsplineType;
107 std::vector<std::vector<double> >
m_d2u;
108 std::vector<std::vector<double> >
m_d2v;
109 std::vector<std::vector<double> >
m_dA;
112 void computeGradient();
114 void computeHessienNormalized(
vpMatrix &H);
115 void computeMI(
double &MI);
116 void computeProba(
int &nbpoint);
122 void zeroProbabilities();
147 :
vpTemplateTracker(), hessianComputation(USE_HESSIEN_NORMAL), ApproxHessian(HESSIAN_0), lambda(0), temp(nullptr),
148 Prt(nullptr), dPrt(nullptr), Pt(nullptr), Pr(nullptr), d2Prt(nullptr), PrtTout(nullptr), dprtemp(nullptr), PrtD(nullptr), dPrtD(nullptr),
149 influBspline(0), bspline(0), Nc(0), Ncb(0), d2Ix(), d2Iy(), d2Ixy(), MI_preEstimation(0), MI_postEstimation(0),
150 NMI_preEstimation(0), NMI_postEstimation(0), covarianceMatrix(), computeCovariance(false), m_du(), m_dv(), m_A(),
151 m_dB(), m_d2u(), m_d2v(), m_dA()
155 vpMatrix getCovarianceMatrix()
const {
return covarianceMatrix; }
156 double getMI()
const {
return MI_postEstimation; }
159 double getNMI()
const {
return NMI_postEstimation; }
164 void setBspline(
const vpBsplineType &newbs);
166 void setNc(
int newNc);
Implementation of column vector and the associated operations.
Implementation of a matrix and operations on matrices.
vpHessienApproximationType ApproxHessian
std::vector< std::vector< double > > m_d2v
vpHessienType hessianComputation
void setHessianComputation(vpHessienType type)
std::vector< double > m_dB
std::vector< double > m_du
vpTemplateTrackerMI()
Default constructor.
void setApprocHessian(vpHessienApproximationType approx)
double getCost(const vpImage< unsigned char > &I)
std::vector< double > m_dv
vpHessienApproximationType
std::vector< std::vector< double > > m_d2u
double getNormalizedCost(const vpImage< unsigned char > &I)
std::vector< std::vector< double > > m_dA
vpMatrix covarianceMatrix
void setLambda(double _l)
void setCovarianceComputation(const bool &flag)
std::vector< double > m_A
double NMI_postEstimation
virtual double getCost(const vpImage< unsigned char > &I, const vpColVector &tp)=0