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>
53 HESSIAN_NONSECOND = -1,
59 } vpHessienApproximationType;
62 typedef enum { USE_HESSIEN_NORMAL, USE_HESSIEN_DESIRE, USE_HESSIEN_BEST_COND } vpHessienType;
65 typedef enum { BSPLINE_THIRD_ORDER = 3, BSPLINE_FOURTH_ORDER = 4 } vpBsplineType;
108 std::vector<std::vector<double> >
m_d2u;
109 std::vector<std::vector<double> >
m_d2v;
110 std::vector<std::vector<double> >
m_dA;
113 void computeGradient();
115 void computeHessienNormalized(
vpMatrix &H);
116 void computeMI(
double &MI);
117 void computeProba(
int &nbpoint);
123 void zeroProbabilities();
148 :
vpTemplateTracker(), hessianComputation(USE_HESSIEN_NORMAL), ApproxHessian(HESSIAN_0), lambda(0), temp(nullptr),
149 Prt(nullptr), dPrt(nullptr), Pt(nullptr), Pr(nullptr), d2Prt(nullptr), PrtTout(nullptr), dprtemp(nullptr), PrtD(nullptr), dPrtD(nullptr),
150 influBspline(0), bspline(0), Nc(0), Ncb(0), d2Ix(), d2Iy(), d2Ixy(), MI_preEstimation(0), MI_postEstimation(0),
151 NMI_preEstimation(0), NMI_postEstimation(0), covarianceMatrix(), computeCovariance(false), m_du(), m_dv(), m_A(),
152 m_dB(), m_d2u(), m_d2v(), m_dA()
156 vpMatrix getCovarianceMatrix()
const {
return covarianceMatrix; }
157 double getMI()
const {
return MI_postEstimation; }
160 double getNMI()
const {
return NMI_postEstimation; }
165 void setBspline(
const vpBsplineType &newbs);
167 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