Visual Servoing Platform  version 3.6.1 under development (2024-04-26)
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 61 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 64 of file vpMbtXmlGenericParser.h.

Constructor & Destructor Documentation

◆ vpMbtXmlGenericParser()

vpMbtXmlGenericParser::vpMbtXmlGenericParser ( int  type = EDGE_PARSER)

Definition at line 1536 of file vpMbtXmlGenericParser.cpp.

◆ ~vpMbtXmlGenericParser()

vpMbtXmlGenericParser::~vpMbtXmlGenericParser ( )
virtual

Definition at line 1539 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 1568 of file vpMbtXmlGenericParser.cpp.

Referenced by vpMbDepthDenseTracker::loadConfigFile().

◆ getDepthDenseSamplingStepY()

unsigned int vpMbtXmlGenericParser::getDepthDenseSamplingStepY ( ) const

Get depth dense sampling step in Y.

Definition at line 1573 of file vpMbtXmlGenericParser.cpp.

Referenced by vpMbDepthDenseTracker::loadConfigFile().

◆ getDepthNormalFeatureEstimationMethod()

vpMbtFaceDepthNormal::vpFeatureEstimationType vpMbtXmlGenericParser::getDepthNormalFeatureEstimationMethod ( ) const

Get depth normal feature estimation method.

Definition at line 1578 of file vpMbtXmlGenericParser.cpp.

Referenced by vpMbDepthNormalTracker::loadConfigFile().

◆ getDepthNormalPclPlaneEstimationMethod()

int vpMbtXmlGenericParser::getDepthNormalPclPlaneEstimationMethod ( ) const

Get depth normal PCL plane estimation method.

Definition at line 1586 of file vpMbtXmlGenericParser.cpp.

Referenced by vpMbDepthNormalTracker::loadConfigFile().

◆ getDepthNormalPclPlaneEstimationRansacMaxIter()

int vpMbtXmlGenericParser::getDepthNormalPclPlaneEstimationRansacMaxIter ( ) const

Get depth normal PCL maximum number of iterations.

Definition at line 1594 of file vpMbtXmlGenericParser.cpp.

Referenced by vpMbDepthNormalTracker::loadConfigFile().

◆ getDepthNormalPclPlaneEstimationRansacThreshold()

double vpMbtXmlGenericParser::getDepthNormalPclPlaneEstimationRansacThreshold ( ) const

Get depth normal PCL RANSAC threshold.

Definition at line 1602 of file vpMbtXmlGenericParser.cpp.

Referenced by vpMbDepthNormalTracker::loadConfigFile().

◆ getDepthNormalSamplingStepX()

unsigned int vpMbtXmlGenericParser::getDepthNormalSamplingStepX ( ) const

Get depth normal sampling step in X.

Definition at line 1610 of file vpMbtXmlGenericParser.cpp.

Referenced by vpMbDepthNormalTracker::loadConfigFile().

◆ getDepthNormalSamplingStepY()

unsigned int vpMbtXmlGenericParser::getDepthNormalSamplingStepY ( ) const

Get depth normal sampling step in Y.

Definition at line 1618 of file vpMbtXmlGenericParser.cpp.

Referenced by vpMbDepthNormalTracker::loadConfigFile().

◆ getEdgeMe()

void vpMbtXmlGenericParser::getEdgeMe ( vpMe ecm) const

Get moving edge parameters.

Definition at line 1563 of file vpMbtXmlGenericParser.cpp.

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

◆ getFarClippingDistance()

double vpMbtXmlGenericParser::getFarClippingDistance ( ) const

◆ getFovClipping()

bool vpMbtXmlGenericParser::getFovClipping ( ) const

◆ getKltBlockSize()

unsigned int vpMbtXmlGenericParser::getKltBlockSize ( ) const

Get the size of a block.

Definition at line 1636 of file vpMbtXmlGenericParser.cpp.

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

◆ getKltHarrisParam()

double vpMbtXmlGenericParser::getKltHarrisParam ( ) const

Get the Harris free parameter.

Definition at line 1641 of file vpMbtXmlGenericParser.cpp.

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

◆ getKltMaskBorder()

unsigned int vpMbtXmlGenericParser::getKltMaskBorder ( ) const

Get the Border of the mask.

Definition at line 1646 of file vpMbtXmlGenericParser.cpp.

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

◆ getKltMaxFeatures()

unsigned int vpMbtXmlGenericParser::getKltMaxFeatures ( ) const

Get the maximum number of features for the KLT.

Definition at line 1651 of file vpMbtXmlGenericParser.cpp.

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

◆ getKltMinDistance()

double vpMbtXmlGenericParser::getKltMinDistance ( ) const

Get the minimum distance between KLT points.

Definition at line 1656 of file vpMbtXmlGenericParser.cpp.

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

◆ getKltPyramidLevels()

unsigned int vpMbtXmlGenericParser::getKltPyramidLevels ( ) const

Get the number of pyramid levels

Definition at line 1661 of file vpMbtXmlGenericParser.cpp.

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

◆ getKltQuality()

double vpMbtXmlGenericParser::getKltQuality ( ) const

Get the quality of the KLT.

Definition at line 1666 of file vpMbtXmlGenericParser.cpp.

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

◆ getKltWindowSize()

unsigned int vpMbtXmlGenericParser::getKltWindowSize ( ) const

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

Definition at line 1671 of file vpMbtXmlGenericParser.cpp.

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

◆ getLodMinLineLengthThreshold()

double vpMbtXmlGenericParser::getLodMinLineLengthThreshold ( ) const

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

Definition at line 1681 of file vpMbtXmlGenericParser.cpp.

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

◆ getLodMinPolygonAreaThreshold()

double vpMbtXmlGenericParser::getLodMinPolygonAreaThreshold ( ) const

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

Definition at line 1686 of file vpMbtXmlGenericParser.cpp.

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

◆ getLodState()

bool vpMbtXmlGenericParser::getLodState ( ) const

◆ getNearClippingDistance()

double vpMbtXmlGenericParser::getNearClippingDistance ( ) const

◆ getProjectionErrorKernelSize()

unsigned int vpMbtXmlGenericParser::getProjectionErrorKernelSize ( ) const

Definition at line 1698 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 1696 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 1546 of file vpMbtXmlGenericParser.cpp.

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

◆ setAngleAppear()

void vpMbtXmlGenericParser::setAngleAppear ( const double &  aappear)

Set the angle to determine if a face appeared.

Parameters
aappear: New angleAppear

Definition at line 1722 of file vpMbtXmlGenericParser.cpp.

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

◆ setAngleDisappear()

void vpMbtXmlGenericParser::setAngleDisappear ( const double &  adisappear)

Set the angle to determine if a face disappeared.

Parameters
adisappear: New angleDisappear

Definition at line 1729 of file vpMbtXmlGenericParser.cpp.

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

◆ setCameraParameters()

void vpMbtXmlGenericParser::setCameraParameters ( const vpCameraParameters cam)

Set camera parameters.

Parameters
cam: New camera parameters

Definition at line 1736 of file vpMbtXmlGenericParser.cpp.

Referenced by vpMbDepthDenseTracker::loadConfigFile(), vpMbDepthNormalTracker::loadConfigFile(), vpMbEdgeKltTracker::loadConfigFile(), and vpMbEdgeTracker::loadConfigFile().

◆ setDepthDenseSamplingStepX()

void vpMbtXmlGenericParser::setDepthDenseSamplingStepX ( unsigned int  stepX)

Set depth dense sampling step in X.

Parameters
stepX: New sampling step

Definition at line 1743 of file vpMbtXmlGenericParser.cpp.

Referenced by vpMbDepthDenseTracker::loadConfigFile().

◆ setDepthDenseSamplingStepY()

void vpMbtXmlGenericParser::setDepthDenseSamplingStepY ( unsigned int  stepY)

Set depth dense sampling step in Y.

Parameters
stepY: New sampling step

Definition at line 1753 of file vpMbtXmlGenericParser.cpp.

Referenced by vpMbDepthDenseTracker::loadConfigFile().

◆ setDepthNormalFeatureEstimationMethod()

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

Set depth normal feature estimation method.

Parameters
method: New feature estimation method

Definition at line 1763 of file vpMbtXmlGenericParser.cpp.

Referenced by vpMbDepthNormalTracker::loadConfigFile().

◆ setDepthNormalPclPlaneEstimationMethod()

void vpMbtXmlGenericParser::setDepthNormalPclPlaneEstimationMethod ( int  method)

Set depth normal PCL plane estimation method.

Parameters
method: New PCL plane estimation method

Definition at line 1774 of file vpMbtXmlGenericParser.cpp.

Referenced by vpMbDepthNormalTracker::loadConfigFile().

◆ 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 1784 of file vpMbtXmlGenericParser.cpp.

Referenced by vpMbDepthNormalTracker::loadConfigFile().

◆ setDepthNormalPclPlaneEstimationRansacThreshold()

void vpMbtXmlGenericParser::setDepthNormalPclPlaneEstimationRansacThreshold ( double  threshold)

Set depth normal PCL RANSAC threshold.

Parameters
threshold: New RANSAC threshold

Definition at line 1794 of file vpMbtXmlGenericParser.cpp.

Referenced by vpMbDepthNormalTracker::loadConfigFile().

◆ setDepthNormalSamplingStepX()

void vpMbtXmlGenericParser::setDepthNormalSamplingStepX ( unsigned int  stepX)

Set depth normal sampling step in X.

Parameters
stepX: New sampling step

Definition at line 1804 of file vpMbtXmlGenericParser.cpp.

Referenced by vpMbDepthNormalTracker::loadConfigFile().

◆ setDepthNormalSamplingStepY()

void vpMbtXmlGenericParser::setDepthNormalSamplingStepY ( unsigned int  stepY)

Set depth normal sampling step in Y.

Parameters
stepY: New sampling step

Definition at line 1814 of file vpMbtXmlGenericParser.cpp.

Referenced by vpMbDepthNormalTracker::loadConfigFile().

◆ setEdgeMe()

void vpMbtXmlGenericParser::setEdgeMe ( const vpMe moving_edge)

Set moving edge parameters.

Parameters
moving_edge: New moving edge parameters

Definition at line 1824 of file vpMbtXmlGenericParser.cpp.

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

◆ setFarClippingDistance()

void vpMbtXmlGenericParser::setFarClippingDistance ( const double &  fclip)

Set the far clipping distance.

Parameters
fclip: New farClipping

Definition at line 1831 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 1838 of file vpMbtXmlGenericParser.cpp.

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

◆ setKltHarrisParam()

void vpMbtXmlGenericParser::setKltHarrisParam ( const double &  hp)

Set the Harris free parameter.

Parameters
hp: New harrisParam

Definition at line 1845 of file vpMbtXmlGenericParser.cpp.

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

◆ setKltMaskBorder()

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

Set the Border of the mask.

Parameters
mb= new maskBorder

Definition at line 1852 of file vpMbtXmlGenericParser.cpp.

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

◆ setKltMaxFeatures()

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

Set the maximum number of features for the KLT.

Parameters
mF: New maxFeatures

Definition at line 1859 of file vpMbtXmlGenericParser.cpp.

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

◆ setKltMinDistance()

void vpMbtXmlGenericParser::setKltMinDistance ( const double &  mD)

Set the minimum distance between KLT points.

Parameters
mD: New minDist

Definition at line 1866 of file vpMbtXmlGenericParser.cpp.

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

◆ setKltPyramidLevels()

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

Set the number of pyramid levels

Parameters
pL: New pyramidLevels

Definition at line 1873 of file vpMbtXmlGenericParser.cpp.

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

◆ setKltQuality()

void vpMbtXmlGenericParser::setKltQuality ( const double &  q)

Set the quality of the KLT.

Parameters
q: New quality

Definition at line 1880 of file vpMbtXmlGenericParser.cpp.

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

◆ 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 1887 of file vpMbtXmlGenericParser.cpp.

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

◆ setNearClippingDistance()

void vpMbtXmlGenericParser::setNearClippingDistance ( const double &  nclip)

Set the near clipping distance.

Parameters
nclip: New nearClipping

Definition at line 1894 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 1908 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 1901 of file vpMbtXmlGenericParser.cpp.

Referenced by vpMbTracker::loadConfigFile().

◆ setVerbose()

void vpMbtXmlGenericParser::setVerbose ( bool  verbose)

Set verbose mode (print tracker configuration in the standard output if set).

Parameters
verbose: verbose flag

Definition at line 1918 of file vpMbtXmlGenericParser.cpp.

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