Visual Servoing Platform  version 3.6.1 under development (2024-11-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.

Examples
testMbtXmlGenericParser.cpp.

Definition at line 62 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 65 of file vpMbtXmlGenericParser.h.

Constructor & Destructor Documentation

◆ vpMbtXmlGenericParser()

BEGIN_VISP_NAMESPACE vpMbtXmlGenericParser::vpMbtXmlGenericParser ( int  type = EDGE_PARSER)

Definition at line 1537 of file vpMbtXmlGenericParser.cpp.

◆ ~vpMbtXmlGenericParser()

vpMbtXmlGenericParser::~vpMbtXmlGenericParser ( )
virtual

Definition at line 1540 of file vpMbtXmlGenericParser.cpp.

Member Function Documentation

◆ getAngleAppear()

double vpMbtXmlGenericParser::getAngleAppear ( ) const

Get the angle to determine if a face appeared.

Examples
testMbtXmlGenericParser.cpp.

Definition at line 1552 of file vpMbtXmlGenericParser.cpp.

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

◆ getAngleDisappear()

double vpMbtXmlGenericParser::getAngleDisappear ( ) const

Get the angle to determine if a face disappeared.

Examples
testMbtXmlGenericParser.cpp.

Definition at line 1557 of file vpMbtXmlGenericParser.cpp.

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

◆ getCameraParameters()

void vpMbtXmlGenericParser::getCameraParameters ( vpCameraParameters cam) const

◆ getDepthDenseSamplingStepX()

unsigned int vpMbtXmlGenericParser::getDepthDenseSamplingStepX ( ) const

Get depth dense sampling step in X.

Examples
testMbtXmlGenericParser.cpp.

Definition at line 1569 of file vpMbtXmlGenericParser.cpp.

Referenced by vpMbDepthDenseTracker::loadConfigFile().

◆ getDepthDenseSamplingStepY()

unsigned int vpMbtXmlGenericParser::getDepthDenseSamplingStepY ( ) const

Get depth dense sampling step in Y.

Examples
testMbtXmlGenericParser.cpp.

Definition at line 1574 of file vpMbtXmlGenericParser.cpp.

Referenced by vpMbDepthDenseTracker::loadConfigFile().

◆ getDepthNormalFeatureEstimationMethod()

vpMbtFaceDepthNormal::vpFeatureEstimationType vpMbtXmlGenericParser::getDepthNormalFeatureEstimationMethod ( ) const

Get depth normal feature estimation method.

Examples
testMbtXmlGenericParser.cpp.

Definition at line 1579 of file vpMbtXmlGenericParser.cpp.

Referenced by vpMbDepthNormalTracker::loadConfigFile().

◆ getDepthNormalPclPlaneEstimationMethod()

int vpMbtXmlGenericParser::getDepthNormalPclPlaneEstimationMethod ( ) const

Get depth normal PCL plane estimation method.

Examples
testMbtXmlGenericParser.cpp.

Definition at line 1587 of file vpMbtXmlGenericParser.cpp.

Referenced by vpMbDepthNormalTracker::loadConfigFile().

◆ getDepthNormalPclPlaneEstimationRansacMaxIter()

int vpMbtXmlGenericParser::getDepthNormalPclPlaneEstimationRansacMaxIter ( ) const

Get depth normal PCL maximum number of iterations.

Examples
testMbtXmlGenericParser.cpp.

Definition at line 1595 of file vpMbtXmlGenericParser.cpp.

Referenced by vpMbDepthNormalTracker::loadConfigFile().

◆ getDepthNormalPclPlaneEstimationRansacThreshold()

double vpMbtXmlGenericParser::getDepthNormalPclPlaneEstimationRansacThreshold ( ) const

Get depth normal PCL RANSAC threshold.

Examples
testMbtXmlGenericParser.cpp.

Definition at line 1603 of file vpMbtXmlGenericParser.cpp.

Referenced by vpMbDepthNormalTracker::loadConfigFile().

◆ getDepthNormalSamplingStepX()

unsigned int vpMbtXmlGenericParser::getDepthNormalSamplingStepX ( ) const

Get depth normal sampling step in X.

Examples
testMbtXmlGenericParser.cpp.

Definition at line 1611 of file vpMbtXmlGenericParser.cpp.

Referenced by vpMbDepthNormalTracker::loadConfigFile().

◆ getDepthNormalSamplingStepY()

unsigned int vpMbtXmlGenericParser::getDepthNormalSamplingStepY ( ) const

Get depth normal sampling step in Y.

Examples
testMbtXmlGenericParser.cpp.

Definition at line 1619 of file vpMbtXmlGenericParser.cpp.

Referenced by vpMbDepthNormalTracker::loadConfigFile().

◆ getEdgeMe()

void vpMbtXmlGenericParser::getEdgeMe ( vpMe ecm) const

Get moving edge parameters.

Examples
testMbtXmlGenericParser.cpp.

Definition at line 1564 of file vpMbtXmlGenericParser.cpp.

Referenced by vpMbEdgeTracker::loadConfigFile().

◆ getFarClippingDistance()

double vpMbtXmlGenericParser::getFarClippingDistance ( ) const

◆ getFovClipping()

bool vpMbtXmlGenericParser::getFovClipping ( ) const

◆ getKltBlockSize()

unsigned int vpMbtXmlGenericParser::getKltBlockSize ( ) const

Get the size of a block.

Examples
testMbtXmlGenericParser.cpp.

Definition at line 1637 of file vpMbtXmlGenericParser.cpp.

◆ getKltHarrisParam()

double vpMbtXmlGenericParser::getKltHarrisParam ( ) const

Get the Harris free parameter.

Examples
testMbtXmlGenericParser.cpp.

Definition at line 1642 of file vpMbtXmlGenericParser.cpp.

◆ getKltMaskBorder()

unsigned int vpMbtXmlGenericParser::getKltMaskBorder ( ) const

Get the Border of the mask.

Examples
testMbtXmlGenericParser.cpp.

Definition at line 1647 of file vpMbtXmlGenericParser.cpp.

◆ getKltMaxFeatures()

unsigned int vpMbtXmlGenericParser::getKltMaxFeatures ( ) const

Get the maximum number of features for the KLT.

Examples
testMbtXmlGenericParser.cpp.

Definition at line 1652 of file vpMbtXmlGenericParser.cpp.

◆ getKltMinDistance()

double vpMbtXmlGenericParser::getKltMinDistance ( ) const

Get the minimum distance between KLT points.

Examples
testMbtXmlGenericParser.cpp.

Definition at line 1657 of file vpMbtXmlGenericParser.cpp.

◆ getKltPyramidLevels()

unsigned int vpMbtXmlGenericParser::getKltPyramidLevels ( ) const

Get the number of pyramid levels

Examples
testMbtXmlGenericParser.cpp.

Definition at line 1662 of file vpMbtXmlGenericParser.cpp.

◆ getKltQuality()

double vpMbtXmlGenericParser::getKltQuality ( ) const

Get the quality of the KLT.

Examples
testMbtXmlGenericParser.cpp.

Definition at line 1667 of file vpMbtXmlGenericParser.cpp.

◆ getKltWindowSize()

unsigned int vpMbtXmlGenericParser::getKltWindowSize ( ) const

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

Examples
testMbtXmlGenericParser.cpp.

Definition at line 1672 of file vpMbtXmlGenericParser.cpp.

◆ getLodMinLineLengthThreshold()

double vpMbtXmlGenericParser::getLodMinLineLengthThreshold ( ) const

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

Definition at line 1682 of file vpMbtXmlGenericParser.cpp.

Referenced by vpMbEdgeTracker::loadConfigFile().

◆ getLodMinPolygonAreaThreshold()

double vpMbtXmlGenericParser::getLodMinPolygonAreaThreshold ( ) const

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

Definition at line 1687 of file vpMbtXmlGenericParser.cpp.

Referenced by vpMbEdgeTracker::loadConfigFile().

◆ getLodState()

bool vpMbtXmlGenericParser::getLodState ( ) const

Get the state of LOD setting.

Definition at line 1677 of file vpMbtXmlGenericParser.cpp.

Referenced by vpMbEdgeTracker::loadConfigFile().

◆ getNearClippingDistance()

double vpMbtXmlGenericParser::getNearClippingDistance ( ) const

◆ getProjectionErrorKernelSize()

unsigned int vpMbtXmlGenericParser::getProjectionErrorKernelSize ( ) const
Examples
testMbtXmlGenericParser.cpp.

Definition at line 1699 of file vpMbtXmlGenericParser.cpp.

Referenced by vpMbTracker::loadConfigFile().

◆ getProjectionErrorMe()

void vpMbtXmlGenericParser::getProjectionErrorMe ( vpMe me) const

Get ME parameters for projection error computation.

Examples
testMbtXmlGenericParser.cpp.

Definition at line 1697 of file vpMbtXmlGenericParser.cpp.

Referenced by vpMbTracker::loadConfigFile().

◆ hasFarClippingDistance()

bool vpMbtXmlGenericParser::hasFarClippingDistance ( ) const

Has Far clipping been specified?

Returns
True if yes, False otherwise.

Definition at line 1709 of file vpMbtXmlGenericParser.cpp.

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

◆ hasNearClippingDistance()

bool vpMbtXmlGenericParser::hasNearClippingDistance ( ) const

Has Near clipping been specified?

Returns
True if yes, False otherwise.

Definition at line 1716 of file vpMbtXmlGenericParser.cpp.

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

◆ 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.
Examples
testMbtXmlGenericParser.cpp.

Definition at line 1547 of file vpMbtXmlGenericParser.cpp.

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

◆ setAngleAppear()

void vpMbtXmlGenericParser::setAngleAppear ( const double &  aappear)

Set the angle to determine if a face appeared.

Parameters
aappear: New angleAppear

Definition at line 1723 of file vpMbtXmlGenericParser.cpp.

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

◆ setAngleDisappear()

void vpMbtXmlGenericParser::setAngleDisappear ( const double &  adisappear)

Set the angle to determine if a face disappeared.

Parameters
adisappear: New angleDisappear

Definition at line 1730 of file vpMbtXmlGenericParser.cpp.

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

◆ setCameraParameters()

void vpMbtXmlGenericParser::setCameraParameters ( const vpCameraParameters cam)

Set camera parameters.

Parameters
cam: New camera parameters

Definition at line 1737 of file vpMbtXmlGenericParser.cpp.

Referenced by vpMbDepthDenseTracker::loadConfigFile(), vpMbDepthNormalTracker::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 1744 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 1754 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 1764 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 1775 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 1785 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 1795 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 1805 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 1815 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 1825 of file vpMbtXmlGenericParser.cpp.

Referenced by vpMbEdgeTracker::loadConfigFile().

◆ setFarClippingDistance()

void vpMbtXmlGenericParser::setFarClippingDistance ( const double &  fclip)

Set the far clipping distance.

Parameters
fclip: New farClipping

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

◆ setKltHarrisParam()

void vpMbtXmlGenericParser::setKltHarrisParam ( const double &  hp)

Set the Harris free parameter.

Parameters
hp: New harrisParam

Definition at line 1846 of file vpMbtXmlGenericParser.cpp.

◆ setKltMaskBorder()

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

Set the Border of the mask.

Parameters
mb= new maskBorder

Definition at line 1853 of file vpMbtXmlGenericParser.cpp.

◆ setKltMaxFeatures()

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

Set the maximum number of features for the KLT.

Parameters
mF: New maxFeatures

Definition at line 1860 of file vpMbtXmlGenericParser.cpp.

◆ setKltMinDistance()

void vpMbtXmlGenericParser::setKltMinDistance ( const double &  mD)

Set the minimum distance between KLT points.

Parameters
mD: New minDist

Definition at line 1867 of file vpMbtXmlGenericParser.cpp.

◆ setKltPyramidLevels()

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

Set the number of pyramid levels

Parameters
pL: New pyramidLevels

Definition at line 1874 of file vpMbtXmlGenericParser.cpp.

◆ setKltQuality()

void vpMbtXmlGenericParser::setKltQuality ( const double &  q)

Set the quality of the KLT.

Parameters
q: New quality

Definition at line 1881 of file vpMbtXmlGenericParser.cpp.

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

◆ setNearClippingDistance()

void vpMbtXmlGenericParser::setNearClippingDistance ( const double &  nclip)

Set the near clipping distance.

Parameters
nclip: New nearClipping

Definition at line 1895 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 1909 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 1902 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 1919 of file vpMbtXmlGenericParser.cpp.

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