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

#include <visp3/mbt/vpMbtXmlGenericParser.h>

Public Types

enum  vpParserType {
  EDGE_PARSER = 1 << 0, KLT_PARSER = 1 << 1, DEPTH_NORMAL_PARSER = 1 << 2, DEPTH_DENSE_PARSER = 1 << 3,
  PROJECTION_ERROR_PARSER = 0
}
 

Public Member Functions

 vpMbtXmlGenericParser (int type=EDGE_PARSER)
 
virtual ~vpMbtXmlGenericParser ()
 
double getAngleAppear () const
 
double getAngleDisappear () const
 
void getCameraParameters (vpCameraParameters &cam) const
 
void getEdgeMe (vpMe &ecm) const
 
unsigned int getDepthDenseSamplingStepX () const
 
unsigned int getDepthDenseSamplingStepY () const
 
vpMbtFaceDepthNormal::vpFeatureEstimationType getDepthNormalFeatureEstimationMethod () const
 
int getDepthNormalPclPlaneEstimationMethod () const
 
int getDepthNormalPclPlaneEstimationRansacMaxIter () const
 
double getDepthNormalPclPlaneEstimationRansacThreshold () const
 
unsigned int getDepthNormalSamplingStepX () const
 
unsigned int getDepthNormalSamplingStepY () const
 
double getFarClippingDistance () const
 
bool getFovClipping () const
 
unsigned int getKltBlockSize () const
 
double getKltHarrisParam () const
 
unsigned int getKltMaskBorder () const
 
unsigned int getKltMaxFeatures () const
 
double getKltMinDistance () const
 
unsigned int getKltPyramidLevels () const
 
double getKltQuality () const
 
unsigned int getKltWindowSize () const
 
bool getLodState () const
 
double getLodMinLineLengthThreshold () const
 
double getLodMinPolygonAreaThreshold () const
 
double getNearClippingDistance () const
 
void getProjectionErrorMe (vpMe &me) const
 
unsigned int getProjectionErrorKernelSize () const
 
bool hasFarClippingDistance () const
 
bool hasNearClippingDistance () const
 
void parse (const std::string &filename)
 
void setAngleAppear (const double &aappear)
 
void setAngleDisappear (const double &adisappear)
 
void setCameraParameters (const vpCameraParameters &cam)
 
void setDepthDenseSamplingStepX (unsigned int stepX)
 
void setDepthDenseSamplingStepY (unsigned int stepY)
 
void setDepthNormalFeatureEstimationMethod (const vpMbtFaceDepthNormal::vpFeatureEstimationType &method)
 
void setDepthNormalPclPlaneEstimationMethod (int method)
 
void setDepthNormalPclPlaneEstimationRansacMaxIter (int maxIter)
 
void setDepthNormalPclPlaneEstimationRansacThreshold (double threshold)
 
void setDepthNormalSamplingStepX (unsigned int stepX)
 
void setDepthNormalSamplingStepY (unsigned int stepY)
 
void setEdgeMe (const vpMe &ecm)
 
void setFarClippingDistance (const double &fclip)
 
void setKltBlockSize (const unsigned int &bs)
 
void setKltHarrisParam (const double &hp)
 
void setKltMaskBorder (const unsigned int &mb)
 
void setKltMaxFeatures (const unsigned int &mF)
 
void setKltMinDistance (const double &mD)
 
void setKltPyramidLevels (const unsigned int &pL)
 
void setKltQuality (const double &q)
 
void setKltWindowSize (const unsigned int &w)
 
void setNearClippingDistance (const double &nclip)
 
void setProjectionErrorMe (const vpMe &me)
 
void setProjectionErrorKernelSize (const unsigned int &size)
 
void setVerbose (bool verbose)
 

Detailed Description

Parse an Xml file to extract configuration parameters of a mbtConfig object.

Data parser for the model-based tracker.

Definition at line 60 of file vpMbtXmlGenericParser.h.

Member Enumeration Documentation

◆ vpParserType

Enumerator
EDGE_PARSER 

Parser for model-based tracking using moving edges features.

KLT_PARSER 

Parser for model-based tracking using KLT features.

DEPTH_NORMAL_PARSER 

Parser for model-based tracking using depth normal features.

DEPTH_DENSE_PARSER 

Parser for model-based tracking using depth dense features.

PROJECTION_ERROR_PARSER 

Parser for projection error computation parameters.

Definition at line 63 of file vpMbtXmlGenericParser.h.

Constructor & Destructor Documentation

◆ vpMbtXmlGenericParser()

vpMbtXmlGenericParser::vpMbtXmlGenericParser ( int  type = EDGE_PARSER)

Definition at line 1484 of file vpMbtXmlGenericParser.cpp.

◆ ~vpMbtXmlGenericParser()

vpMbtXmlGenericParser::~vpMbtXmlGenericParser ( )
virtual

Definition at line 1495 of file vpMbtXmlGenericParser.cpp.

Member Function Documentation

◆ getAngleAppear()

double vpMbtXmlGenericParser::getAngleAppear ( ) const

◆ getAngleDisappear()

double vpMbtXmlGenericParser::getAngleDisappear ( ) const

◆ getCameraParameters()

◆ getDepthDenseSamplingStepX()

unsigned int vpMbtXmlGenericParser::getDepthDenseSamplingStepX ( ) const

Get depth dense sampling step in X.

Definition at line 1542 of file vpMbtXmlGenericParser.cpp.

Referenced by vpMbDepthDenseTracker::loadConfigFile(), and vpMbGenericTracker::track().

◆ getDepthDenseSamplingStepY()

unsigned int vpMbtXmlGenericParser::getDepthDenseSamplingStepY ( ) const

Get depth dense sampling step in Y.

Definition at line 1550 of file vpMbtXmlGenericParser.cpp.

Referenced by vpMbDepthDenseTracker::loadConfigFile(), and vpMbGenericTracker::track().

◆ getDepthNormalFeatureEstimationMethod()

vpMbtFaceDepthNormal::vpFeatureEstimationType vpMbtXmlGenericParser::getDepthNormalFeatureEstimationMethod ( ) const

Get depth normal feature estimation method.

Definition at line 1558 of file vpMbtXmlGenericParser.cpp.

Referenced by vpMbDepthNormalTracker::loadConfigFile(), and vpMbGenericTracker::track().

◆ getDepthNormalPclPlaneEstimationMethod()

int vpMbtXmlGenericParser::getDepthNormalPclPlaneEstimationMethod ( ) const

Get depth normal PCL plane estimation method.

Definition at line 1566 of file vpMbtXmlGenericParser.cpp.

Referenced by vpMbDepthNormalTracker::loadConfigFile(), and vpMbGenericTracker::track().

◆ getDepthNormalPclPlaneEstimationRansacMaxIter()

int vpMbtXmlGenericParser::getDepthNormalPclPlaneEstimationRansacMaxIter ( ) const

Get depth normal PCL maximum number of iterations.

Definition at line 1574 of file vpMbtXmlGenericParser.cpp.

Referenced by vpMbDepthNormalTracker::loadConfigFile(), and vpMbGenericTracker::track().

◆ getDepthNormalPclPlaneEstimationRansacThreshold()

double vpMbtXmlGenericParser::getDepthNormalPclPlaneEstimationRansacThreshold ( ) const

Get depth normal PCL RANSAC threshold.

Definition at line 1582 of file vpMbtXmlGenericParser.cpp.

Referenced by vpMbDepthNormalTracker::loadConfigFile(), and vpMbGenericTracker::track().

◆ getDepthNormalSamplingStepX()

unsigned int vpMbtXmlGenericParser::getDepthNormalSamplingStepX ( ) const

Get depth normal sampling step in X.

Definition at line 1590 of file vpMbtXmlGenericParser.cpp.

Referenced by vpMbDepthNormalTracker::loadConfigFile(), and vpMbGenericTracker::track().

◆ getDepthNormalSamplingStepY()

unsigned int vpMbtXmlGenericParser::getDepthNormalSamplingStepY ( ) const

Get depth normal sampling step in Y.

Definition at line 1598 of file vpMbtXmlGenericParser.cpp.

Referenced by vpMbDepthNormalTracker::loadConfigFile(), and vpMbGenericTracker::track().

◆ getEdgeMe()

void vpMbtXmlGenericParser::getEdgeMe ( vpMe ecm) const

◆ getFarClippingDistance()

◆ getFovClipping()

◆ getKltBlockSize()

unsigned int vpMbtXmlGenericParser::getKltBlockSize ( ) const

◆ getKltHarrisParam()

double vpMbtXmlGenericParser::getKltHarrisParam ( ) const

Get the Harris free parameter.

Definition at line 1630 of file vpMbtXmlGenericParser.cpp.

Referenced by vpMbEdgeKltTracker::loadConfigFile(), vpMbKltTracker::loadConfigFile(), and vpMbGenericTracker::track().

◆ getKltMaskBorder()

unsigned int vpMbtXmlGenericParser::getKltMaskBorder ( ) const

Get the Border of the mask.

Definition at line 1638 of file vpMbtXmlGenericParser.cpp.

Referenced by vpMbEdgeKltTracker::loadConfigFile(), vpMbKltTracker::loadConfigFile(), and vpMbGenericTracker::track().

◆ getKltMaxFeatures()

unsigned int vpMbtXmlGenericParser::getKltMaxFeatures ( ) const

Get the maximum number of features for the KLT.

Definition at line 1646 of file vpMbtXmlGenericParser.cpp.

Referenced by vpMbEdgeKltTracker::loadConfigFile(), vpMbKltTracker::loadConfigFile(), and vpMbGenericTracker::track().

◆ getKltMinDistance()

double vpMbtXmlGenericParser::getKltMinDistance ( ) const

Get the minimum distance between KLT points.

Definition at line 1654 of file vpMbtXmlGenericParser.cpp.

Referenced by vpMbEdgeKltTracker::loadConfigFile(), vpMbKltTracker::loadConfigFile(), and vpMbGenericTracker::track().

◆ getKltPyramidLevels()

unsigned int vpMbtXmlGenericParser::getKltPyramidLevels ( ) const

Get the number of pyramid levels

Definition at line 1662 of file vpMbtXmlGenericParser.cpp.

Referenced by vpMbEdgeKltTracker::loadConfigFile(), vpMbKltTracker::loadConfigFile(), and vpMbGenericTracker::track().

◆ getKltQuality()

double vpMbtXmlGenericParser::getKltQuality ( ) const

Get the quality of the KLT.

Definition at line 1670 of file vpMbtXmlGenericParser.cpp.

Referenced by vpMbEdgeKltTracker::loadConfigFile(), vpMbKltTracker::loadConfigFile(), and vpMbGenericTracker::track().

◆ getKltWindowSize()

unsigned int vpMbtXmlGenericParser::getKltWindowSize ( ) const

Get the size of the window used in the KLT tracker.

Definition at line 1678 of file vpMbtXmlGenericParser.cpp.

Referenced by vpMbEdgeKltTracker::loadConfigFile(), vpMbKltTracker::loadConfigFile(), and vpMbGenericTracker::track().

◆ getLodMinLineLengthThreshold()

double vpMbtXmlGenericParser::getLodMinLineLengthThreshold ( ) const

Get the minimum line length to track a segment when LOD is enabled.

Definition at line 1694 of file vpMbtXmlGenericParser.cpp.

Referenced by vpMbEdgeKltTracker::loadConfigFile(), vpMbKltTracker::loadConfigFile(), vpMbEdgeTracker::loadConfigFile(), and vpMbGenericTracker::track().

◆ getLodMinPolygonAreaThreshold()

double vpMbtXmlGenericParser::getLodMinPolygonAreaThreshold ( ) const

Get the minimum polygon area to track a face when LOD is enabled.

Definition at line 1702 of file vpMbtXmlGenericParser.cpp.

Referenced by vpMbEdgeKltTracker::loadConfigFile(), vpMbKltTracker::loadConfigFile(), vpMbEdgeTracker::loadConfigFile(), and vpMbGenericTracker::track().

◆ getLodState()

bool vpMbtXmlGenericParser::getLodState ( ) const

◆ getNearClippingDistance()

◆ getProjectionErrorKernelSize()

unsigned int vpMbtXmlGenericParser::getProjectionErrorKernelSize ( ) const

Definition at line 1723 of file vpMbtXmlGenericParser.cpp.

Referenced by vpMbTracker::loadConfigFile().

◆ getProjectionErrorMe()

void vpMbtXmlGenericParser::getProjectionErrorMe ( vpMe me) const

Get ME parameters for projection error computation.

Definition at line 1718 of file vpMbtXmlGenericParser.cpp.

Referenced by vpMbTracker::loadConfigFile().

◆ hasFarClippingDistance()

bool vpMbtXmlGenericParser::hasFarClippingDistance ( ) const

◆ hasNearClippingDistance()

bool vpMbtXmlGenericParser::hasNearClippingDistance ( ) const

◆ parse()

void vpMbtXmlGenericParser::parse ( const std::string &  filename)

Parse an XML config file that contains parameters for the Generic Model-Based Tracker.

Parameters
filename: Document to parse.

Definition at line 1505 of file vpMbtXmlGenericParser.cpp.

Referenced by vpMbDepthDenseTracker::loadConfigFile(), vpMbDepthNormalTracker::loadConfigFile(), vpMbEdgeKltTracker::loadConfigFile(), vpMbKltTracker::loadConfigFile(), vpMbEdgeTracker::loadConfigFile(), vpMbTracker::loadConfigFile(), and vpMbGenericTracker::track().

◆ setAngleAppear()

void vpMbtXmlGenericParser::setAngleAppear ( const double &  aappear)

◆ setAngleDisappear()

void vpMbtXmlGenericParser::setAngleDisappear ( const double &  adisappear)

◆ setCameraParameters()

void vpMbtXmlGenericParser::setCameraParameters ( const vpCameraParameters cam)

◆ setDepthDenseSamplingStepX()

void vpMbtXmlGenericParser::setDepthDenseSamplingStepX ( unsigned int  stepX)

Set depth dense sampling step in X.

Parameters
stepX: New sampling step

Definition at line 1783 of file vpMbtXmlGenericParser.cpp.

Referenced by vpMbDepthDenseTracker::loadConfigFile(), and vpMbGenericTracker::track().

◆ setDepthDenseSamplingStepY()

void vpMbtXmlGenericParser::setDepthDenseSamplingStepY ( unsigned int  stepY)

Set depth dense sampling step in Y.

Parameters
stepY: New sampling step

Definition at line 1793 of file vpMbtXmlGenericParser.cpp.

Referenced by vpMbDepthDenseTracker::loadConfigFile(), and vpMbGenericTracker::track().

◆ setDepthNormalFeatureEstimationMethod()

void vpMbtXmlGenericParser::setDepthNormalFeatureEstimationMethod ( const vpMbtFaceDepthNormal::vpFeatureEstimationType method)

Set depth normal feature estimation method.

Parameters
method: New feature estimation method

Definition at line 1803 of file vpMbtXmlGenericParser.cpp.

Referenced by vpMbDepthNormalTracker::loadConfigFile(), and vpMbGenericTracker::track().

◆ setDepthNormalPclPlaneEstimationMethod()

void vpMbtXmlGenericParser::setDepthNormalPclPlaneEstimationMethod ( int  method)

Set depth normal PCL plane estimation method.

Parameters
method: New PCL plane estimation method

Definition at line 1813 of file vpMbtXmlGenericParser.cpp.

Referenced by vpMbDepthNormalTracker::loadConfigFile(), and vpMbGenericTracker::track().

◆ setDepthNormalPclPlaneEstimationRansacMaxIter()

void vpMbtXmlGenericParser::setDepthNormalPclPlaneEstimationRansacMaxIter ( int  maxIter)

Set depth normal PCL RANSAC maximum number of iterations.

Parameters
maxIter: New maximum number of iterations

Definition at line 1823 of file vpMbtXmlGenericParser.cpp.

Referenced by vpMbDepthNormalTracker::loadConfigFile(), and vpMbGenericTracker::track().

◆ setDepthNormalPclPlaneEstimationRansacThreshold()

void vpMbtXmlGenericParser::setDepthNormalPclPlaneEstimationRansacThreshold ( double  threshold)

Set depth normal PCL RANSAC threshold.

Parameters
threshold: New RANSAC threshold

Definition at line 1833 of file vpMbtXmlGenericParser.cpp.

Referenced by vpMbDepthNormalTracker::loadConfigFile(), and vpMbGenericTracker::track().

◆ setDepthNormalSamplingStepX()

void vpMbtXmlGenericParser::setDepthNormalSamplingStepX ( unsigned int  stepX)

Set depth normal sampling step in X.

Parameters
stepX: New sampling step

Definition at line 1843 of file vpMbtXmlGenericParser.cpp.

Referenced by vpMbDepthNormalTracker::loadConfigFile(), and vpMbGenericTracker::track().

◆ setDepthNormalSamplingStepY()

void vpMbtXmlGenericParser::setDepthNormalSamplingStepY ( unsigned int  stepY)

Set depth normal sampling step in Y.

Parameters
stepY: New sampling step

Definition at line 1853 of file vpMbtXmlGenericParser.cpp.

Referenced by vpMbDepthNormalTracker::loadConfigFile(), and vpMbGenericTracker::track().

◆ setEdgeMe()

void vpMbtXmlGenericParser::setEdgeMe ( const vpMe ecm)

Set moving edge parameters.

Parameters
ecm: New moving edge parameters

Definition at line 1863 of file vpMbtXmlGenericParser.cpp.

Referenced by vpMbEdgeKltTracker::loadConfigFile(), vpMbEdgeTracker::loadConfigFile(), and vpMbGenericTracker::track().

◆ setFarClippingDistance()

void vpMbtXmlGenericParser::setFarClippingDistance ( const double &  fclip)

Set the far clipping distance.

Parameters
fclip: New farClipping

Definition at line 1873 of file vpMbtXmlGenericParser.cpp.

◆ setKltBlockSize()

void vpMbtXmlGenericParser::setKltBlockSize ( const unsigned int &  bs)

Set the size of a block.

Parameters
bs: New blockSize

Definition at line 1883 of file vpMbtXmlGenericParser.cpp.

Referenced by vpMbEdgeKltTracker::loadConfigFile(), vpMbKltTracker::loadConfigFile(), and vpMbGenericTracker::track().

◆ setKltHarrisParam()

void vpMbtXmlGenericParser::setKltHarrisParam ( const double &  hp)

Set the Harris free parameter.

Parameters
hp: New harrisParam

Definition at line 1893 of file vpMbtXmlGenericParser.cpp.

Referenced by vpMbEdgeKltTracker::loadConfigFile(), vpMbKltTracker::loadConfigFile(), and vpMbGenericTracker::track().

◆ setKltMaskBorder()

void vpMbtXmlGenericParser::setKltMaskBorder ( const unsigned int &  mb)

Set the Border of the mask.

Parameters
mb= new maskBorder

Definition at line 1903 of file vpMbtXmlGenericParser.cpp.

Referenced by vpMbEdgeKltTracker::loadConfigFile(), vpMbKltTracker::loadConfigFile(), and vpMbGenericTracker::track().

◆ setKltMaxFeatures()

void vpMbtXmlGenericParser::setKltMaxFeatures ( const unsigned int &  mF)

Set the maximum number of features for the KLT.

Parameters
mF: New maxFeatures

Definition at line 1913 of file vpMbtXmlGenericParser.cpp.

Referenced by vpMbEdgeKltTracker::loadConfigFile(), vpMbKltTracker::loadConfigFile(), and vpMbGenericTracker::track().

◆ setKltMinDistance()

void vpMbtXmlGenericParser::setKltMinDistance ( const double &  mD)

Set the minimum distance between KLT points.

Parameters
mD: New minDist

Definition at line 1923 of file vpMbtXmlGenericParser.cpp.

Referenced by vpMbEdgeKltTracker::loadConfigFile(), vpMbKltTracker::loadConfigFile(), and vpMbGenericTracker::track().

◆ setKltPyramidLevels()

void vpMbtXmlGenericParser::setKltPyramidLevels ( const unsigned int &  pL)

Set the number of pyramid levels

Parameters
pL: New pyramidLevels

Definition at line 1933 of file vpMbtXmlGenericParser.cpp.

Referenced by vpMbEdgeKltTracker::loadConfigFile(), vpMbKltTracker::loadConfigFile(), and vpMbGenericTracker::track().

◆ setKltQuality()

void vpMbtXmlGenericParser::setKltQuality ( const double &  q)

Set the quality of the KLT.

Parameters
q: New quality

Definition at line 1943 of file vpMbtXmlGenericParser.cpp.

Referenced by vpMbEdgeKltTracker::loadConfigFile(), vpMbKltTracker::loadConfigFile(), and vpMbGenericTracker::track().

◆ setKltWindowSize()

void vpMbtXmlGenericParser::setKltWindowSize ( const unsigned int &  w)

Set the size of the window used in the KLT tracker.

Parameters
w: New winSize

Definition at line 1953 of file vpMbtXmlGenericParser.cpp.

Referenced by vpMbEdgeKltTracker::loadConfigFile(), vpMbKltTracker::loadConfigFile(), and vpMbGenericTracker::track().

◆ setNearClippingDistance()

void vpMbtXmlGenericParser::setNearClippingDistance ( const double &  nclip)

Set the near clipping distance.

Parameters
nclip: New nearClipping

Definition at line 1963 of file vpMbtXmlGenericParser.cpp.

◆ setProjectionErrorKernelSize()

void vpMbtXmlGenericParser::setProjectionErrorKernelSize ( const unsigned int &  size)

Set kernel size used for projection error computation.

Parameters
size: Kernel size computed as kernel_size = size*2 + 1

Definition at line 1983 of file vpMbtXmlGenericParser.cpp.

Referenced by vpMbTracker::loadConfigFile().

◆ setProjectionErrorMe()

void vpMbtXmlGenericParser::setProjectionErrorMe ( const vpMe me)

Set ME parameters for projection error computation.

Parameters
me: ME parameters

Definition at line 1973 of file vpMbtXmlGenericParser.cpp.

Referenced by vpMbTracker::loadConfigFile().

◆ setVerbose()

void vpMbtXmlGenericParser::setVerbose ( bool  verbose)