Visual Servoing Platform  version 3.5.0 under development (2022-02-15)

#include <visp3/tt_mi/vpTemplateTrackerMIESM.h>

+ Inheritance diagram for vpTemplateTrackerMIESM:

Public Types

enum  vpHessienApproximationType {
  HESSIAN_NONSECOND = -1, HESSIAN_0, HESSIAN_d2I, HESSIAN_YOUCEF,
  HESSIAN_EXACT, HESSIAN_NEW
}
 
enum  vpHessienType { USE_HESSIEN_NORMAL, USE_HESSIEN_DESIRE, USE_HESSIEN_BEST_COND }
 
enum  vpBsplineType { BSPLINE_THIRD_ORDER = 3, BSPLINE_FOURTH_ORDER = 4 }
 

Public Member Functions

 vpTemplateTrackerMIESM ()
 
 vpTemplateTrackerMIESM (vpTemplateTrackerWarp *_warp)
 
void setMinimizationMethod (vpMinimizationTypeMIESM method)
 
vpMatrix getCovarianceMatrix () const
 
double getMI () const
 
double getMI (const vpImage< unsigned char > &I, int &nc, const int &bspline, vpColVector &tp)
 
double getMI256 (const vpImage< unsigned char > &I, const vpColVector &tp)
 
double getNMI () const
 
void setApprocHessian (vpHessienApproximationType approx)
 
void setCovarianceComputation (const bool &flag)
 
void setHessianComputation (vpHessienType type)
 
void setBspline (const vpBsplineType &newbs)
 
void setLambda (double _l)
 
void setNc (int newNc)
 
void display (const vpImage< unsigned char > &I, const vpColor &col=vpColor::green, unsigned int thickness=3)
 
void display (const vpImage< vpRGBa > &I, const vpColor &col=vpColor::green, unsigned int thickness=3)
 
bool getDiverge () const
 
vpColVector getdp ()
 
vpColVector getG () const
 
vpMatrix getH () const
 
unsigned int getNbParam () const
 
unsigned int getNbIteration () const
 
vpColVector getp () const
 
double getRatioPixelIn () const
 
vpTemplateTrackerWarpgetWarp () const
 
vpTemplateTrackerZone getZoneRef () const
 
void initClick (const vpImage< unsigned char > &I, bool delaunay=false)
 
void initFromPoints (const vpImage< unsigned char > &I, const std::vector< vpImagePoint > &v_ip, bool delaunay=false)
 
void initFromZone (const vpImage< unsigned char > &I, const vpTemplateTrackerZone &zone)
 
void resetTracker ()
 
void setBlur (bool b)
 
void setCostFunctionVerification (bool b)
 
void setGain (double g)
 
void setGaussianFilterSize (unsigned int new_taill)
 
void setHDes (vpMatrix &tH)
 
void setIterationMax (const unsigned int &n)
 
void setNbIterBrent (const unsigned int &b)
 
void setp (const vpColVector &tp)
 
void setPyramidal (unsigned int nlevels=2, unsigned int level_to_stop=1)
 
void setSampling (int sample_i, int sample_j)
 
void setThresholdGradient (double threshold)
 
void setThresholdResidualDifference (double threshold)
 
void setUseBrent (bool b)
 
void track (const vpImage< unsigned char > &I)
 
void trackRobust (const vpImage< unsigned char > &I)
 
Deprecated functions
vp_deprecated void setThresholdRMS (double threshold)
 

Protected Member Functions

void initCompInverse ()
 
void initHessienDesired (const vpImage< unsigned char > &I)
 
void trackNoPyr (const vpImage< unsigned char > &I)
 
void computeGradient ()
 
void computeHessien (vpMatrix &H)
 
void computeHessienNormalized (vpMatrix &H)
 
void computeMI (double &MI)
 
void computeProba (int &nbpoint)
 
double getCost (const vpImage< unsigned char > &I, const vpColVector &tp)
 
double getCost (const vpImage< unsigned char > &I)
 
double getNormalizedCost (const vpImage< unsigned char > &I, const vpColVector &tp)
 
double getNormalizedCost (const vpImage< unsigned char > &I)
 
void zeroProbabilities ()
 
void computeEvalRMS (const vpColVector &p)
 
void computeOptimalBrentGain (const vpImage< unsigned char > &I, vpColVector &tp, double tMI, vpColVector &direction, double &alpha)
 
void getGaussianBluredImage (const vpImage< unsigned char > &I)
 
virtual void initHessienDesiredPyr (const vpImage< unsigned char > &I)
 
void initPosEvalRMS (const vpColVector &p)
 
virtual void initPyramidal (unsigned int nbLvl, unsigned int l0)
 
void initTracking (const vpImage< unsigned char > &I, vpTemplateTrackerZone &zone)
 
virtual void initTrackingPyr (const vpImage< unsigned char > &I, vpTemplateTrackerZone &zone)
 
virtual void trackPyr (const vpImage< unsigned char > &I)
 

Protected Attributes

vpMinimizationTypeMIESM minimizationMethod
 
bool CompoInitialised
 
vpMatrix HDirect
 
vpMatrix HInverse
 
vpMatrix HdesireDirect
 
vpMatrix HdesireInverse
 
vpColVector GDirect
 
vpColVector GInverse
 
vpHessienType hessianComputation
 
vpHessienApproximationType ApproxHessian
 
double lambda
 
double * temp
 
double * Prt
 
double * dPrt
 
double * Pt
 
double * Pr
 
double * d2Prt
 
double * PrtTout
 
double * dprtemp
 
double * PrtD
 
double * dPrtD
 
int influBspline
 
int bspline
 
int Nc
 
int Ncb
 
vpImage< double > d2Ix
 
vpImage< double > d2Iy
 
vpImage< double > d2Ixy
 
double MI_preEstimation
 
double MI_postEstimation
 
double NMI_preEstimation
 
double NMI_postEstimation
 
vpMatrix covarianceMatrix
 
bool computeCovariance
 
std::vector< double > m_du
 
std::vector< double > m_dv
 
std::vector< double > m_A
 
std::vector< double > m_dB
 
std::vector< std::vector< double > > m_d2u
 
std::vector< std::vector< double > > m_d2v
 
std::vector< std::vector< double > > m_dA
 
unsigned int nbLvlPyr
 
unsigned int l0Pyr
 
bool pyrInitialised
 
double evolRMS
 
std::vector< double > x_pos
 
std::vector< double > y_pos
 
double evolRMS_eps
 
vpTemplateTrackerPointptTemplate
 
vpTemplateTrackerPoint ** ptTemplatePyr
 
bool ptTemplateInit
 
unsigned int templateSize
 
unsigned int * templateSizePyr
 
bool * ptTemplateSelect
 
bool ** ptTemplateSelectPyr
 
bool ptTemplateSelectInit
 
unsigned int templateSelectSize
 
vpTemplateTrackerPointCompoptTemplateCompo
 
vpTemplateTrackerPointCompo ** ptTemplateCompoPyr
 
vpTemplateTrackerZonezoneTracked
 
vpTemplateTrackerZonezoneTrackedPyr
 
vpImage< unsigned char > * pyr_IDes
 
vpMatrix H
 
vpMatrix Hdesire
 
vpMatrixHdesirePyr
 
vpMatrix HLM
 
vpMatrix HLMdesire
 
vpMatrixHLMdesirePyr
 
vpMatrix HLMdesireInverse
 
vpMatrixHLMdesireInversePyr
 
vpColVector G
 
double gain
 
double thresholdGradient
 
bool costFunctionVerification
 
bool blur
 
bool useBrent
 
unsigned int nbIterBrent
 
unsigned int taillef
 
double * fgG
 
double * fgdG
 
double ratioPixelIn
 
int mod_i
 
int mod_j
 
unsigned int nbParam
 
double lambdaDep
 
unsigned int iterationMax
 
unsigned int iterationGlobale
 
bool diverge
 
unsigned int nbIteration
 
bool useCompositionnal
 
bool useInverse
 
vpTemplateTrackerWarpWarp
 
vpColVector p
 
vpColVector dp
 
vpColVector X1
 
vpColVector X2
 
vpMatrix dW
 
vpImage< double > BI
 
vpImage< double > dIx
 
vpImage< double > dIy
 
vpTemplateTrackerZone zoneRef_
 

Detailed Description

Examples:
templateTracker.cpp.

Definition at line 54 of file vpTemplateTrackerMIESM.h.

Member Enumeration Documentation

◆ vpBsplineType

Hessian computation.

Enumerator
BSPLINE_THIRD_ORDER 
BSPLINE_FOURTH_ORDER 

Definition at line 70 of file vpTemplateTrackerMI.h.

◆ vpHessienApproximationType

Hessian approximation.

Enumerator
HESSIAN_NONSECOND 
HESSIAN_0 
HESSIAN_d2I 
HESSIAN_YOUCEF 
HESSIAN_EXACT 
HESSIAN_NEW 

Definition at line 57 of file vpTemplateTrackerMI.h.

◆ vpHessienType

Hessian computation.

Enumerator
USE_HESSIEN_NORMAL 
USE_HESSIEN_DESIRE 
USE_HESSIEN_BEST_COND 

Definition at line 67 of file vpTemplateTrackerMI.h.

Constructor & Destructor Documentation

◆ vpTemplateTrackerMIESM() [1/2]

vpTemplateTrackerMIESM::vpTemplateTrackerMIESM ( )
inline

Default constructor.

Definition at line 98 of file vpTemplateTrackerMIESM.h.

◆ vpTemplateTrackerMIESM() [2/2]

Member Function Documentation

◆ computeEvalRMS()

◆ computeGradient()

◆ computeHessien()

◆ computeHessienNormalized()

◆ computeMI()

◆ computeOptimalBrentGain()

◆ computeProba()

◆ display() [1/2]

void vpTemplateTracker::display ( const vpImage< unsigned char > &  I,
const vpColor col = vpColor::green,
unsigned int  thickness = 3 
)
inherited

Display the warped reference template in an image.

Parameters
IImage in which the warped zone has to be displayed.
colColor used to draw the triangle edges.
thicknessThickness of the lines.

The following code shows how to use display capabilities:

#include <visp3/tt/vpTemplateTrackerSSDInverseCompositional.h>
#include <visp3/tt/vpTemplateTrackerWarpHomography.h>
int main()
{
vpTemplateTrackerZone zoneRef, zoneWarped;
// Display the warped zone
tracker.display(I, vpColor::red);
// Display the reference zone
zoneRef = tracker.getZoneRef();
zoneRef.display(I, vpColor::green);
// Display the warped zone
vpColVector p = tracker.getp();
warp.warpZone(zoneRef, p, zoneWarped);
zoneWarped.display(I, vpColor::blue);
}
Examples:
templateTracker.cpp, and tutorial-template-tracker.cpp.

Definition at line 318 of file vpTemplateTracker.cpp.

References vpTemplateTrackerZone::display(), vpImage< Type >::display, vpTemplateTracker::p, vpTemplateTracker::Warp, vpTemplateTrackerWarp::warpZone(), and vpTemplateTracker::zoneTracked.

◆ display() [2/2]

void vpTemplateTracker::display ( const vpImage< vpRGBa > &  I,
const vpColor col = vpColor::green,
unsigned int  thickness = 3 
)
inherited

Display the warped reference template in an image.

Parameters
IImage in which the warped zone has to be displayed.
colColor used to draw the triangle edges.
thicknessThickness of the lines.

The following code shows how to use display capabilities:

#include <visp3/tt/vpTemplateTrackerSSDInverseCompositional.h>
#include <visp3/tt/vpTemplateTrackerWarpHomography.h>
int main()
{
vpTemplateTrackerZone zoneRef, zoneWarped;
// Display the warped zone
tracker.display(I, vpColor::red);
// Display the reference zone
zoneRef = tracker.getZoneRef();
zoneRef.display(I, vpColor::green);
// Display the warped zone
vpColVector p = tracker.getp();
warp.warpZone(zoneRef, p, zoneWarped);
zoneWarped.display(I, vpColor::blue);
}

Definition at line 360 of file vpTemplateTracker.cpp.

References vpTemplateTrackerZone::display(), vpImage< Type >::display, vpTemplateTracker::p, vpTemplateTracker::Warp, vpTemplateTrackerWarp::warpZone(), and vpTemplateTracker::zoneTracked.

◆ getCost() [1/2]

◆ getCost() [2/2]

double vpTemplateTrackerMI::getCost ( const vpImage< unsigned char > &  I)
inlineprotectedinherited

Definition at line 125 of file vpTemplateTrackerMI.h.

References vpTemplateTrackerMI::getCost().

Referenced by vpTemplateTrackerMI::getCost().

◆ getCovarianceMatrix()

vpMatrix vpTemplateTrackerMI::getCovarianceMatrix ( ) const
inlineinherited

Definition at line 165 of file vpTemplateTrackerMI.h.

◆ getDiverge()

bool vpTemplateTracker::getDiverge ( ) const
inlineinherited

Definition at line 167 of file vpTemplateTracker.h.

◆ getdp()

vpColVector vpTemplateTracker::getdp ( )
inlineinherited

Definition at line 168 of file vpTemplateTracker.h.

◆ getG()

vpColVector vpTemplateTracker::getG ( ) const
inlineinherited

Definition at line 169 of file vpTemplateTracker.h.

◆ getGaussianBluredImage()

void vpTemplateTracker::getGaussianBluredImage ( const vpImage< unsigned char > &  I)
inlineprotectedinherited

Definition at line 291 of file vpTemplateTracker.h.

References vpImageFilter::filter().

Referenced by vpTemplateTracker::trackRobust().

◆ getH()

vpMatrix vpTemplateTracker::getH ( ) const
inlineinherited

Definition at line 170 of file vpTemplateTracker.h.

◆ getMI() [1/2]

double vpTemplateTrackerMI::getMI ( ) const
inlineinherited

Definition at line 166 of file vpTemplateTrackerMI.h.

◆ getMI() [2/2]

◆ getMI256()

◆ getNbIteration()

unsigned int vpTemplateTracker::getNbIteration ( ) const
inlineinherited
Examples:
templateTracker.cpp.

Definition at line 172 of file vpTemplateTracker.h.

◆ getNbParam()

unsigned int vpTemplateTracker::getNbParam ( ) const
inlineinherited

Definition at line 171 of file vpTemplateTracker.h.

◆ getNMI()

double vpTemplateTrackerMI::getNMI ( ) const
inlineinherited

Definition at line 169 of file vpTemplateTrackerMI.h.

◆ getNormalizedCost() [1/2]

◆ getNormalizedCost() [2/2]

double vpTemplateTrackerMI::getNormalizedCost ( const vpImage< unsigned char > &  I)
inlineprotectedinherited

◆ getp()

vpColVector vpTemplateTracker::getp ( ) const
inlineinherited
Examples:
templateTracker.cpp, and tutorial-template-tracker.cpp.

Definition at line 173 of file vpTemplateTracker.h.

◆ getRatioPixelIn()

double vpTemplateTracker::getRatioPixelIn ( ) const
inlineinherited

Definition at line 174 of file vpTemplateTracker.h.

◆ getWarp()

vpTemplateTrackerWarp* vpTemplateTracker::getWarp ( ) const
inlineinherited
Returns
The pointer to the warper.
Examples:
templateTracker.cpp.

Definition at line 180 of file vpTemplateTracker.h.

◆ getZoneRef()

vpTemplateTrackerZone vpTemplateTracker::getZoneRef ( ) const
inlineinherited

Return the reference template zone.

Examples:
templateTracker.cpp.

Definition at line 185 of file vpTemplateTracker.h.

◆ initClick()

void vpTemplateTracker::initClick ( const vpImage< unsigned char > &  I,
bool  delaunay = false 
)
inherited

Select the reference template in image I using mouse click.

Parameters
IImage containing the reference template.
delaunayFlag used to enable Delaunay triangulation.
  • If true, from the image points selected by the user, a Delaunay triangulation is performed to initialize the reference template.
    • A left click select a image point;
    • A right click select the last image point and ends the initialisation stage.
  • If false, the user select directly points as successive triangle corners. The size of v_ip vector should be a multiple of 3. It is not mandatory that triangles have one edge in common; they can define a discontinued area.
    • A left click select a triangle corner;
    • A right click select the last triangle corner and ends the initialisation stage. For example, to select the reference template as two triangles, the user has to left click five times and finish the selection on the sixth corner with a right click.
Examples:
templateTracker.cpp, and tutorial-template-tracker.cpp.

Definition at line 584 of file vpTemplateTracker.cpp.

References vpTemplateTrackerZone::initClick(), vpTemplateTracker::initHessienDesired(), vpTemplateTracker::initHessienDesiredPyr(), vpTemplateTracker::initPyramidal(), vpTemplateTracker::initTracking(), vpTemplateTracker::initTrackingPyr(), vpTemplateTracker::l0Pyr, vpTemplateTracker::nbLvlPyr, and vpTemplateTracker::zoneRef_.

◆ initCompInverse()

◆ initFromPoints()

void vpTemplateTracker::initFromPoints ( const vpImage< unsigned char > &  I,
const std::vector< vpImagePoint > &  v_ip,
bool  delaunay = false 
)
inherited

Initialize the reference template from a vector of points.

Parameters
IImage containing the reference template.
v_ipVector of image points defining the reference template.
delaunay
  • If true, from the image points defining the reference template enable Delaunay triangulation.
  • If false, the vector of image points define the reference template as a list of triangles. The size of v_ip vector should be a multiple of 3.
Examples:
templateTracker.cpp.

Definition at line 609 of file vpTemplateTracker.cpp.

References vpTemplateTrackerZone::initFromPoints(), vpTemplateTracker::initHessienDesired(), vpTemplateTracker::initHessienDesiredPyr(), vpTemplateTracker::initPyramidal(), vpTemplateTracker::initTracking(), vpTemplateTracker::initTrackingPyr(), vpTemplateTracker::l0Pyr, vpTemplateTracker::nbLvlPyr, and vpTemplateTracker::zoneRef_.

◆ initFromZone()

void vpTemplateTracker::initFromZone ( const vpImage< unsigned char > &  I,
const vpTemplateTrackerZone zone 
)
inherited

Initialize the reference template from a vector of points.

Parameters
IImage containing the reference template.
zoneThe zone that describes the reference template.

Definition at line 630 of file vpTemplateTracker.cpp.

References vpTemplateTracker::initHessienDesired(), vpTemplateTracker::initHessienDesiredPyr(), vpTemplateTracker::initPyramidal(), vpTemplateTracker::initTracking(), vpTemplateTracker::initTrackingPyr(), vpTemplateTracker::l0Pyr, vpTemplateTracker::nbLvlPyr, and vpTemplateTracker::zoneRef_.

◆ initHessienDesired()

void vpTemplateTrackerMIESM::initHessienDesired ( const vpImage< unsigned char > &  I)
protectedvirtual

Implements vpTemplateTrackerMI.

Definition at line 59 of file vpTemplateTrackerMIESM.cpp.

References vpTemplateTrackerMI::ApproxHessian, vpTemplateTracker::BI, vpTemplateTracker::blur, vpTemplateTrackerMI::bspline, vpTemplateTrackerMI::computeHessien(), vpMatrix::computeHLM(), vpTemplateTrackerMI::computeMI(), vpTemplateTrackerMI::computeProba(), vpTemplateTrackerMI::d2Ix, vpTemplateTrackerMI::d2Ixy, vpTemplateTrackerMI::d2Iy, vpArray2D< Type >::data, vpTemplateTracker::dIx, vpTemplateTracker::dIy, vpTemplateTracker::dW, vpTemplateTrackerWarp::dWarpCompo(), vpTemplateTracker::fgdG, vpTemplateTracker::fgG, vpImageFilter::filter(), vpImageFilter::getGradX(), vpImageFilter::getGradXGauss2D(), vpImageFilter::getGradY(), vpImageFilter::getGradYGauss2D(), vpImage< Type >::getHeight(), vpImage< Type >::getValue(), vpImage< Type >::getWidth(), vpTemplateTracker::Hdesire, HdesireDirect, HdesireInverse, vpTemplateTrackerMI::HESSIAN_0, vpTemplateTrackerMI::HESSIAN_NEW, vpTemplateTrackerMI::HESSIAN_NONSECOND, vpTemplateTrackerMI::HESSIAN_YOUCEF, vpTemplateTracker::HLMdesire, vpTemplateTracker::HLMdesireInverse, initCompInverse(), vpMatrix::inverseByLU(), vpTemplateTrackerMI::lambda, vpTemplateTracker::lambdaDep, vpTemplateTracker::nbParam, vpTemplateTrackerMI::Nc, vpTemplateTracker::p, vpTemplateTrackerMI::PrtTout, vpTemplateTracker::ptTemplate, vpTemplateTracker::ptTemplateCompo, vpTemplateTracker::taillef, vpTemplateTracker::templateSize, vpTemplateTracker::Warp, vpTemplateTrackerWarp::warpX(), vpTemplateTrackerPoint::x, vpTemplateTracker::X1, vpTemplateTracker::X2, vpTemplateTrackerPoint::y, and vpTemplateTrackerMI::zeroProbabilities().

◆ initHessienDesiredPyr()

◆ initPosEvalRMS()

◆ initPyramidal()

void vpTemplateTracker::initPyramidal ( unsigned int  nbLvl,
unsigned int  l0 
)
protectedvirtualinherited

◆ initTracking()

◆ initTrackingPyr()

◆ resetTracker()

◆ setApprocHessian()

void vpTemplateTrackerMI::setApprocHessian ( vpHessienApproximationType  approx)
inlineinherited

Definition at line 171 of file vpTemplateTrackerMI.h.

◆ setBlur()

void vpTemplateTracker::setBlur ( bool  b)
inlineinherited

Definition at line 193 of file vpTemplateTracker.h.

◆ setBspline()

◆ setCostFunctionVerification()

void vpTemplateTracker::setCostFunctionVerification ( bool  b)
inlineinherited

Definition at line 194 of file vpTemplateTracker.h.

◆ setCovarianceComputation()

void vpTemplateTrackerMI::setCovarianceComputation ( const bool &  flag)
inlineinherited

Definition at line 172 of file vpTemplateTrackerMI.h.

◆ setGain()

void vpTemplateTracker::setGain ( double  g)
inlineinherited

Definition at line 195 of file vpTemplateTracker.h.

◆ setGaussianFilterSize()

void vpTemplateTracker::setGaussianFilterSize ( unsigned int  new_taill)
inherited

◆ setHDes()

void vpTemplateTracker::setHDes ( vpMatrix tH)
inlineinherited

Definition at line 197 of file vpTemplateTracker.h.

References vpMatrix::computeHLM(), and vpMatrix::inverseByLU().

◆ setHessianComputation()

void vpTemplateTrackerMI::setHessianComputation ( vpHessienType  type)
inlineinherited

Definition at line 173 of file vpTemplateTrackerMI.h.

◆ setIterationMax()

void vpTemplateTracker::setIterationMax ( const unsigned int &  n)
inlineinherited

Set the maximum number of iteration of the estimation scheme.

Parameters
n: Maximum number of iterations to stop the estimation scheme. A typical value is arround 100.
Examples:
templateTracker.cpp, and tutorial-template-tracker.cpp.

Definition at line 208 of file vpTemplateTracker.h.

◆ setLambda()

void vpTemplateTrackerMI::setLambda ( double  _l)
inlineinherited

Definition at line 175 of file vpTemplateTrackerMI.h.

◆ setMinimizationMethod()

void vpTemplateTrackerMIESM::setMinimizationMethod ( vpMinimizationTypeMIESM  method)
inline

Definition at line 105 of file vpTemplateTrackerMIESM.h.

◆ setNbIterBrent()

void vpTemplateTracker::setNbIterBrent ( const unsigned int &  b)
inlineinherited

Definition at line 214 of file vpTemplateTracker.h.

◆ setNc()

◆ setp()

void vpTemplateTracker::setp ( const vpColVector tp)
inlineinherited

Definition at line 215 of file vpTemplateTracker.h.

◆ setPyramidal()

void vpTemplateTracker::setPyramidal ( unsigned int  nlevels = 2,
unsigned int  level_to_stop = 1 
)
inlineinherited

Set the number of pyramid levels used in the multi-resolution scheme. If nlevels > 1, the tracker uses a pyramidal approach.

Parameters
nlevels: Number of pyramid levels. Algorithm starts at level nlevels-1.
level_to_stop: Last level of the pyramid that will be considered. Lowest level is zero.
Examples:
templateTracker.cpp, and tutorial-template-tracker.cpp.

Definition at line 230 of file vpTemplateTracker.h.

◆ setSampling()

void vpTemplateTracker::setSampling ( int  sample_i,
int  sample_j 
)
inlineinherited

Set the pixel sampling parameters along the rows and the columns.

Parameters
sample_i: Sampling factor along the rows. If 1 all the lines are considered. If 2, consider one line over two.
sample_j: Sampling factor along the columns. If 1 all the columns are considered. If 2, consider one column over two.
Examples:
templateTracker.cpp, and tutorial-template-tracker.cpp.

Definition at line 249 of file vpTemplateTracker.h.

◆ setThresholdGradient()

void vpTemplateTracker::setThresholdGradient ( double  threshold)
inlineinherited
Examples:
templateTracker.cpp.

Definition at line 254 of file vpTemplateTracker.h.

◆ setThresholdResidualDifference()

void vpTemplateTracker::setThresholdResidualDifference ( double  threshold)
inlineinherited

Set the threshold used to stop optimization loop. When the residual difference between two successive iterations becomes lower than the threshold we stop optimization loop.

Note
Increasing the default value allows to speed up the tracking.
Parameters
threshold: Threshold used to stop optimization. Default value is set to 1e-4.
Examples:
templateTracker.cpp.

Definition at line 264 of file vpTemplateTracker.h.

◆ setThresholdRMS()

vp_deprecated void vpTemplateTracker::setThresholdRMS ( double  threshold)
inlineinherited
Deprecated:
This function is deprecated and the value set is no more used. Use rather setThresholdResidualDerivative()
Parameters
threshold: Unused value.

Definition at line 282 of file vpTemplateTracker.h.

◆ setUseBrent()

void vpTemplateTracker::setUseBrent ( bool  b)
inlineinherited

By default Brent usage is disabled.

Definition at line 267 of file vpTemplateTracker.h.

◆ track()

void vpTemplateTracker::track ( const vpImage< unsigned char > &  I)
inherited

Track the template on image I.

Parameters
IImage to process.
Examples:
templateTracker.cpp, and tutorial-template-tracker.cpp.

Definition at line 697 of file vpTemplateTracker.cpp.

References vpTemplateTracker::nbLvlPyr, vpTemplateTracker::trackNoPyr(), and vpTemplateTracker::trackPyr().

◆ trackNoPyr()

void vpTemplateTrackerMIESM::trackNoPyr ( const vpImage< unsigned char > &  I)
protectedvirtual

Implements vpTemplateTrackerMI.

Definition at line 221 of file vpTemplateTrackerMIESM.cpp.

References vpTemplateTrackerMI::ApproxHessian, vpTemplateTracker::BI, vpTemplateTracker::blur, vpTemplateTrackerMI::bspline, CompoInitialised, vpTemplateTrackerMI::computeGradient(), vpTemplateTrackerMI::computeHessien(), vpMatrix::computeHLM(), vpTemplateTrackerMI::computeMI(), vpTemplateTracker::computeOptimalBrentGain(), vpTemplateTrackerMI::computeProba(), vpMatrix::cond(), vpArray2D< Type >::data, vpTemplateTracker::diverge, vpTemplateTracker::dIx, vpTemplateTracker::dIy, vpTemplateTracker::dp, vpTemplateTracker::dW, vpTemplateTrackerWarp::dWarpCompo(), vpTemplateTracker::fgdG, vpTemplateTracker::fgG, vpImageFilter::filter(), vpTemplateTracker::G, vpTemplateTracker::gain, GDirect, vpTemplateTrackerMI::getCost(), vpImageFilter::getGradXGauss2D(), vpImageFilter::getGradYGauss2D(), vpImage< Type >::getHeight(), vpImage< Type >::getValue(), vpImage< Type >::getWidth(), GInverse, vpTemplateTracker::H, HDirect, vpTemplateTrackerMI::HESSIAN_NONSECOND, vpTemplateTrackerMI::hessianComputation, HInverse, vpTemplateTracker::HLM, vpTemplateTracker::HLMdesire, vpTemplateTracker::HLMdesireInverse, vpMatrix::inverseByLU(), vpTemplateTracker::iterationMax, vpTemplateTrackerMI::lambda, vpTemplateTracker::lambdaDep, vpTemplateTrackerMI::MI_postEstimation, vpTemplateTrackerMI::MI_preEstimation, minimizationMethod, vpTemplateTracker::nbIteration, vpTemplateTracker::nbParam, vpTemplateTrackerMI::Nc, vpTrackingException::notEnoughPointError, vpTemplateTracker::p, vpTemplateTrackerMI::PrtTout, vpTemplateTracker::ptTemplate, vpTemplateTracker::ptTemplateCompo, vpTemplateTracker::taillef, vpTemplateTracker::templateSize, vpTemplateTrackerMI::USE_HESSIEN_BEST_COND, vpTemplateTrackerMI::USE_HESSIEN_DESIRE, vpTemplateTracker::useBrent, vpTemplateTracker::Warp, vpTemplateTrackerWarp::warpX(), vpTemplateTrackerPoint::x, vpTemplateTracker::X1, vpTemplateTracker::X2, vpTemplateTrackerPoint::y, and vpTemplateTrackerMI::zeroProbabilities().

◆ trackPyr()

◆ trackRobust()

void vpTemplateTracker::trackRobust ( const vpImage< unsigned char > &  I)
inherited

◆ zeroProbabilities()

Member Data Documentation

◆ ApproxHessian

◆ BI

◆ blur

◆ bspline

◆ CompoInitialised

bool vpTemplateTrackerMIESM::CompoInitialised
protected

Definition at line 66 of file vpTemplateTrackerMIESM.h.

Referenced by initCompInverse(), and trackNoPyr().

◆ computeCovariance

bool vpTemplateTrackerMI::computeCovariance
protectedinherited

◆ costFunctionVerification

bool vpTemplateTracker::costFunctionVerification
protectedinherited

Definition at line 109 of file vpTemplateTracker.h.

Referenced by vpTemplateTracker::trackRobust().

◆ covarianceMatrix

vpMatrix vpTemplateTrackerMI::covarianceMatrix
protectedinherited

◆ d2Ix

vpImage<double> vpTemplateTrackerMI::d2Ix
protectedinherited

◆ d2Ixy

vpImage<double> vpTemplateTrackerMI::d2Ixy
protectedinherited

◆ d2Iy

vpImage<double> vpTemplateTrackerMI::d2Iy
protectedinherited

◆ d2Prt

◆ diverge

◆ dIx

◆ dIy

◆ dp

◆ dPrt

◆ dPrtD

◆ dprtemp

◆ dW

◆ evolRMS

◆ evolRMS_eps

◆ fgdG

◆ fgG

◆ G

◆ gain

◆ GDirect

vpColVector vpTemplateTrackerMIESM::GDirect
protected

Definition at line 71 of file vpTemplateTrackerMIESM.h.

Referenced by initCompInverse(), and trackNoPyr().

◆ GInverse

vpColVector vpTemplateTrackerMIESM::GInverse
protected

Definition at line 72 of file vpTemplateTrackerMIESM.h.

Referenced by initCompInverse(), and trackNoPyr().

◆ H

◆ Hdesire

◆ HdesireDirect

vpMatrix vpTemplateTrackerMIESM::HdesireDirect
protected

Definition at line 69 of file vpTemplateTrackerMIESM.h.

Referenced by initCompInverse(), and initHessienDesired().

◆ HdesireInverse

vpMatrix vpTemplateTrackerMIESM::HdesireInverse
protected

Definition at line 70 of file vpTemplateTrackerMIESM.h.

Referenced by initCompInverse(), and initHessienDesired().

◆ HdesirePyr

◆ HDirect

vpMatrix vpTemplateTrackerMIESM::HDirect
protected

Definition at line 67 of file vpTemplateTrackerMIESM.h.

Referenced by initCompInverse(), and trackNoPyr().

◆ hessianComputation

◆ HInverse

vpMatrix vpTemplateTrackerMIESM::HInverse
protected

Definition at line 68 of file vpTemplateTrackerMIESM.h.

Referenced by initCompInverse(), and trackNoPyr().

◆ HLM

◆ HLMdesire

◆ HLMdesireInverse

◆ HLMdesireInversePyr

vpMatrix* vpTemplateTracker::HLMdesireInversePyr
protectedinherited

◆ HLMdesirePyr

◆ influBspline

◆ iterationGlobale

unsigned int vpTemplateTracker::iterationGlobale
protectedinherited

◆ iterationMax

◆ l0Pyr

◆ lambda

◆ lambdaDep

◆ m_A

std::vector<double> vpTemplateTrackerMI::m_A
protectedinherited

◆ m_d2u

std::vector< std::vector<double> > vpTemplateTrackerMI::m_d2u
protectedinherited

◆ m_d2v

std::vector< std::vector<double> > vpTemplateTrackerMI::m_d2v
protectedinherited

◆ m_dA

std::vector< std::vector<double> > vpTemplateTrackerMI::m_dA
protectedinherited

◆ m_dB

std::vector<double> vpTemplateTrackerMI::m_dB
protectedinherited

◆ m_du

std::vector<double> vpTemplateTrackerMI::m_du
protectedinherited

◆ m_dv

std::vector<double> vpTemplateTrackerMI::m_dv
protectedinherited

◆ MI_postEstimation

◆ MI_preEstimation

◆ minimizationMethod

vpMinimizationTypeMIESM vpTemplateTrackerMIESM::minimizationMethod
protected

Definition at line 65 of file vpTemplateTrackerMIESM.h.

Referenced by trackNoPyr().

◆ mod_i

int vpTemplateTracker::mod_i
protectedinherited

Definition at line 117 of file vpTemplateTracker.h.

Referenced by vpTemplateTracker::initTracking().

◆ mod_j

int vpTemplateTracker::mod_j
protectedinherited

Definition at line 118 of file vpTemplateTracker.h.

Referenced by vpTemplateTracker::initTracking().

◆ nbIteration

◆ nbIterBrent

unsigned int vpTemplateTracker::nbIterBrent
protectedinherited

Definition at line 112 of file vpTemplateTracker.h.

Referenced by vpTemplateTracker::computeOptimalBrentGain().

◆ nbLvlPyr

◆ nbParam

unsigned int vpTemplateTracker::nbParam
protectedinherited

Definition at line 119 of file vpTemplateTracker.h.

Referenced by vpTemplateTrackerMI::computeGradient(), vpTemplateTrackerMI::computeHessien(), vpTemplateTrackerMI::computeHessienNormalized(), vpTemplateTracker::computeOptimalBrentGain(), vpTemplateTrackerMI::computeProba(), vpTemplateTrackerZNCCInverseCompositional::initCompInverse(), vpTemplateTrackerSSDInverseCompositional::initCompInverse(), vpTemplateTrackerSSDESM::initCompInverse(), initCompInverse(), vpTemplateTrackerMIInverseCompositional::initCompInverse(), vpTemplateTrackerSSDForwardCompositional::initCompo(), vpTemplateTrackerMIForwardCompositional::initCompo(), vpTemplateTrackerZNCCForwardAdditional::initHessienDesired(), vpTemplateTrackerMIForwardCompositional::initHessienDesired(), vpTemplateTrackerZNCCInverseCompositional::initHessienDesired(), vpTemplateTrackerMIForwardAdditional::initHessienDesired(), initHessienDesired(), vpTemplateTrackerMIInverseCompositional::initHessienDesired(), vpTemplateTrackerMIInverseCompositional::initTemplateRefBspline(), vpTemplateTracker::initTracking(), vpTemplateTrackerMI::setBspline(), vpTemplateTrackerMI::setNc(), vpTemplateTrackerZNCCForwardAdditional::trackNoPyr(), vpTemplateTrackerSSDForwardCompositional::trackNoPyr(), vpTemplateTrackerMIForwardCompositional::trackNoPyr(), vpTemplateTrackerZNCCInverseCompositional::trackNoPyr(), vpTemplateTrackerSSDInverseCompositional::trackNoPyr(), vpTemplateTrackerSSDESM::trackNoPyr(), vpTemplateTrackerSSDForwardAdditional::trackNoPyr(), vpTemplateTrackerMIForwardAdditional::trackNoPyr(), trackNoPyr(), vpTemplateTrackerMIInverseCompositional::trackNoPyr(), vpTemplateTracker::trackPyr(), vpTemplateTracker::vpTemplateTracker(), vpTemplateTrackerMI::vpTemplateTrackerMI(), vpTemplateTrackerSSD::vpTemplateTrackerSSD(), vpTemplateTrackerSSDESM::vpTemplateTrackerSSDESM(), vpTemplateTrackerSSDInverseCompositional::vpTemplateTrackerSSDInverseCompositional(), vpTemplateTrackerZNCC::vpTemplateTrackerZNCC(), and vpTemplateTrackerMI::zeroProbabilities().

◆ Nc

◆ Ncb

◆ NMI_postEstimation

double vpTemplateTrackerMI::NMI_postEstimation
protectedinherited

◆ NMI_preEstimation

double vpTemplateTrackerMI::NMI_preEstimation
protectedinherited

◆ p

◆ Pr

◆ Prt

◆ PrtD

◆ PrtTout

◆ Pt

◆ ptTemplate

vpTemplateTrackerPoint* vpTemplateTracker::ptTemplate
protectedinherited

Definition at line 75 of file vpTemplateTracker.h.

Referenced by vpTemplateTrackerSSD::getCost(), vpTemplateTrackerZNCC::getCost(), vpTemplateTrackerMI::getCost(), vpTemplateTrackerMI::getMI(), vpTemplateTrackerMI::getMI256(), vpTemplateTrackerMI::getNormalizedCost(), vpTemplateTrackerSSD::getSSD(), vpTemplateTrackerZNCCInverseCompositional::initCompInverse(), vpTemplateTrackerSSDInverseCompositional::initCompInverse(), vpTemplateTrackerSSDESM::initCompInverse(), initCompInverse(), vpTemplateTrackerMIInverseCompositional::initCompInverse(), vpTemplateTrackerSSDForwardCompositional::initCompo(), vpTemplateTrackerMIForwardCompositional::initCompo(), vpTemplateTrackerZNCCForwardAdditional::initHessienDesired(), vpTemplateTrackerMIForwardCompositional::initHessienDesired(), vpTemplateTrackerZNCCInverseCompositional::initHessienDesired(), vpTemplateTrackerMIForwardAdditional::initHessienDesired(), initHessienDesired(), vpTemplateTrackerMIInverseCompositional::initHessienDesired(), vpTemplateTracker::initHessienDesiredPyr(), vpTemplateTrackerMIInverseCompositional::initTemplateRefBspline(), vpTemplateTracker::initTracking(), vpTemplateTracker::initTrackingPyr(), vpTemplateTracker::resetTracker(), vpTemplateTrackerZNCCForwardAdditional::trackNoPyr(), vpTemplateTrackerSSDForwardCompositional::trackNoPyr(), vpTemplateTrackerMIForwardCompositional::trackNoPyr(), vpTemplateTrackerZNCCInverseCompositional::trackNoPyr(), vpTemplateTrackerSSDInverseCompositional::trackNoPyr(), vpTemplateTrackerSSDESM::trackNoPyr(), vpTemplateTrackerSSDForwardAdditional::trackNoPyr(), vpTemplateTrackerMIForwardAdditional::trackNoPyr(), trackNoPyr(), vpTemplateTrackerMIInverseCompositional::trackNoPyr(), and vpTemplateTracker::trackPyr().

◆ ptTemplateCompo

◆ ptTemplateCompoPyr

◆ ptTemplateInit

bool vpTemplateTracker::ptTemplateInit
protectedinherited

◆ ptTemplatePyr

◆ ptTemplateSelect

◆ ptTemplateSelectInit

bool vpTemplateTracker::ptTemplateSelectInit
protectedinherited

◆ ptTemplateSelectPyr

◆ pyr_IDes

vpImage<unsigned char>* vpTemplateTracker::pyr_IDes
protectedinherited

◆ pyrInitialised

bool vpTemplateTracker::pyrInitialised
protectedinherited

◆ ratioPixelIn

double vpTemplateTracker::ratioPixelIn
protectedinherited

◆ taillef

◆ temp

double* vpTemplateTrackerMI::temp
protectedinherited

◆ templateSelectSize

unsigned int vpTemplateTracker::templateSelectSize
protectedinherited

Definition at line 83 of file vpTemplateTracker.h.

Referenced by vpTemplateTracker::initTracking().

◆ templateSize

unsigned int vpTemplateTracker::templateSize
protectedinherited

Definition at line 78 of file vpTemplateTracker.h.

Referenced by vpTemplateTrackerSSD::getCost(), vpTemplateTrackerZNCC::getCost(), vpTemplateTrackerMI::getCost(), vpTemplateTrackerMI::getMI(), vpTemplateTrackerMI::getMI256(), vpTemplateTrackerMI::getNormalizedCost(), vpTemplateTrackerSSD::getSSD(), vpTemplateTrackerZNCCInverseCompositional::initCompInverse(), vpTemplateTrackerSSDInverseCompositional::initCompInverse(), vpTemplateTrackerSSDESM::initCompInverse(), initCompInverse(), vpTemplateTrackerMIInverseCompositional::initCompInverse(), vpTemplateTrackerSSDForwardCompositional::initCompo(), vpTemplateTrackerMIForwardCompositional::initCompo(), vpTemplateTrackerZNCCForwardAdditional::initHessienDesired(), vpTemplateTrackerMIForwardCompositional::initHessienDesired(), vpTemplateTrackerZNCCInverseCompositional::initHessienDesired(), vpTemplateTrackerMIForwardAdditional::initHessienDesired(), initHessienDesired(), vpTemplateTrackerMIInverseCompositional::initHessienDesired(), vpTemplateTracker::initHessienDesiredPyr(), vpTemplateTracker::initTracking(), vpTemplateTracker::initTrackingPyr(), vpTemplateTracker::resetTracker(), vpTemplateTrackerZNCCForwardAdditional::trackNoPyr(), vpTemplateTrackerSSDForwardCompositional::trackNoPyr(), vpTemplateTrackerMIForwardCompositional::trackNoPyr(), vpTemplateTrackerSSDInverseCompositional::trackNoPyr(), vpTemplateTrackerZNCCInverseCompositional::trackNoPyr(), vpTemplateTrackerSSDESM::trackNoPyr(), vpTemplateTrackerSSDForwardAdditional::trackNoPyr(), vpTemplateTrackerMIForwardAdditional::trackNoPyr(), trackNoPyr(), vpTemplateTrackerMIInverseCompositional::trackNoPyr(), and vpTemplateTracker::trackPyr().

◆ templateSizePyr

◆ thresholdGradient

double vpTemplateTracker::thresholdGradient
protectedinherited

Definition at line 108 of file vpTemplateTracker.h.

Referenced by vpTemplateTracker::initTracking().

◆ useBrent

◆ useCompositionnal

◆ useInverse

◆ Warp

vpTemplateTrackerWarp* vpTemplateTracker::Warp
protectedinherited

Definition at line 130 of file vpTemplateTracker.h.

Referenced by vpTemplateTracker::computeEvalRMS(), vpTemplateTracker::computeOptimalBrentGain(), vpTemplateTracker::display(), vpTemplateTrackerSSD::getCost(), vpTemplateTrackerZNCC::getCost(), vpTemplateTrackerMI::getCost(), vpTemplateTrackerMI::getMI(), vpTemplateTrackerMI::getMI256(), vpTemplateTrackerMI::getNormalizedCost(), vpTemplateTrackerSSD::getSSD(), vpTemplateTrackerZNCCInverseCompositional::initCompInverse(), vpTemplateTrackerSSDInverseCompositional::initCompInverse(), vpTemplateTrackerSSDESM::initCompInverse(), initCompInverse(), vpTemplateTrackerMIInverseCompositional::initCompInverse(), vpTemplateTrackerSSDForwardCompositional::initCompo(), vpTemplateTrackerMIForwardCompositional::initCompo(), vpTemplateTrackerZNCCForwardAdditional::initHessienDesired(), vpTemplateTrackerMIForwardCompositional::initHessienDesired(), vpTemplateTrackerZNCCInverseCompositional::initHessienDesired(), vpTemplateTrackerMIForwardAdditional::initHessienDesired(), initHessienDesired(), vpTemplateTrackerMIInverseCompositional::initHessienDesired(), vpTemplateTracker::initPosEvalRMS(), vpTemplateTrackerZNCCForwardAdditional::trackNoPyr(), vpTemplateTrackerSSDForwardCompositional::trackNoPyr(), vpTemplateTrackerMIForwardCompositional::trackNoPyr(), vpTemplateTrackerZNCCInverseCompositional::trackNoPyr(), vpTemplateTrackerSSDInverseCompositional::trackNoPyr(), vpTemplateTrackerSSDESM::trackNoPyr(), vpTemplateTrackerSSDForwardAdditional::trackNoPyr(), vpTemplateTrackerMIForwardAdditional::trackNoPyr(), trackNoPyr(), vpTemplateTrackerMIInverseCompositional::trackNoPyr(), vpTemplateTracker::trackPyr(), vpTemplateTracker::vpTemplateTracker(), vpTemplateTrackerMIESM(), and vpTemplateTrackerSSDESM::vpTemplateTrackerSSDESM().

◆ X1

vpColVector vpTemplateTracker::X1
protectedinherited

◆ X2

◆ x_pos

std::vector<double> vpTemplateTracker::x_pos
protectedinherited

◆ y_pos

std::vector<double> vpTemplateTracker::y_pos
protectedinherited

◆ zoneRef_

vpTemplateTrackerZone vpTemplateTracker::zoneRef_
protectedinherited

◆ zoneTracked

◆ zoneTrackedPyr