39 #ifndef vpTemplateTrackerMI_hh
40 #define vpTemplateTrackerMI_hh
42 #include <visp3/core/vpConfig.h>
44 #include <visp3/core/vpImageFilter.h>
45 #include <visp3/tt/vpTemplateTracker.h>
46 #include <visp3/tt/vpTemplateTrackerHeader.h>
57 HESSIAN_NONSECOND = -1,
63 } vpHessienApproximationType;
66 typedef enum { USE_HESSIEN_NORMAL, USE_HESSIEN_DESIRE, USE_HESSIEN_BEST_COND } vpHessienType;
69 typedef enum { BSPLINE_THIRD_ORDER = 3, BSPLINE_FOURTH_ORDER = 4 } vpBsplineType;
112 std::vector<std::vector<double> >
m_d2u;
113 std::vector<std::vector<double> >
m_d2v;
114 std::vector<std::vector<double> >
m_dA;
117 void computeGradient();
119 void computeHessienNormalized(
vpMatrix &H);
120 void computeMI(
double &MI);
121 void computeProba(
int &nbpoint);
129 void zeroProbabilities();
155 :
vpTemplateTracker(), hessianComputation(USE_HESSIEN_NORMAL), ApproxHessian(HESSIAN_0), lambda(0), temp(NULL),
156 Prt(NULL), dPrt(NULL), Pt(NULL), Pr(NULL), d2Prt(NULL), PrtTout(NULL), dprtemp(NULL), PrtD(NULL), dPrtD(NULL),
157 influBspline(0), bspline(0), Nc(0), Ncb(0), d2Ix(), d2Iy(), d2Ixy(), MI_preEstimation(0), MI_postEstimation(0),
158 NMI_preEstimation(0), NMI_postEstimation(0), covarianceMatrix(), computeCovariance(false), m_du(), m_dv(), m_A(),
159 m_dB(), m_d2u(), m_d2v(), m_dA()
165 double getMI()
const {
return MI_postEstimation; }
168 double getNMI()
const {
return NMI_postEstimation; }
173 void setBspline(
const vpBsplineType &newbs);
175 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)
virtual void initHessienDesired(const vpImage< unsigned char > &I)=0
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)
vpMatrix getCovarianceMatrix() const
std::vector< std::vector< double > > m_dA
vpMatrix covarianceMatrix
void setLambda(double _l)
void setCovarianceComputation(const bool &flag)
virtual void trackNoPyr(const vpImage< unsigned char > &I)=0
std::vector< double > m_A
double NMI_postEstimation
virtual double getCost(const vpImage< unsigned char > &I, const vpColVector &tp)=0