Visual Servoing Platform
version 3.1.0
|
#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 } |
Public Member Functions | |
Public Member Functions Inherited from vpMbtXmlGenericParser | |
vpMbtXmlGenericParser (const vpParserType &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 |
bool | hasFarClippingDistance () const |
bool | hasNearClippingDistance () const |
void | parse (const std::string &filename) |
virtual void | readMainClass (xmlDocPtr doc, xmlNodePtr node) |
void | setAngleAppear (const double &aappear) |
void | setAngleDisappear (const double &adisappear) |
void | setCameraParameters (const vpCameraParameters &_cam) |
void | setDepthDenseSamplingStepX (const unsigned int stepX) |
void | setDepthDenseSamplingStepY (const unsigned int stepY) |
void | setDepthNormalFeatureEstimationMethod (const vpMbtFaceDepthNormal::vpFeatureEstimationType &method) |
void | setDepthNormalPclPlaneEstimationMethod (const int method) |
void | setDepthNormalPclPlaneEstimationRansacMaxIter (const int maxIter) |
void | setDepthNormalPclPlaneEstimationRansacThreshold (const double threshold) |
void | setDepthNormalSamplingStepX (const unsigned int stepX) |
void | setDepthNormalSamplingStepY (const 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 | writeMainClass (xmlNodePtr node) |
Public Member Functions Inherited from vpXmlParser | |
void | save (const std::string &filename, const bool append=false) |
void | setMap (const std::map< std::string, int > &_map) |
void | setMainTag (const std::string &tag) |
Static Public Member Functions | |
Static Public Member Functions Inherited from vpXmlParser | |
static void | cleanup () |
Protected Member Functions | |
void | init () |
void | read_camera (xmlDocPtr doc, xmlNodePtr node) |
void | read_face (xmlDocPtr doc, xmlNodePtr node) |
void | read_lod (xmlDocPtr doc, xmlNodePtr node) |
void | read_ecm (xmlDocPtr doc, xmlNodePtr node) |
void | read_ecm_sample (xmlDocPtr doc, xmlNodePtr node) |
void | read_sample_deprecated (xmlDocPtr doc, xmlNodePtr node) |
void | read_ecm_mask (xmlDocPtr doc, xmlNodePtr node) |
void | read_ecm_range (xmlDocPtr doc, xmlNodePtr node) |
void | read_ecm_contrast (xmlDocPtr doc, xmlNodePtr node) |
void | read_klt (xmlDocPtr doc, xmlNodePtr node) |
void | read_depth_normal (xmlDocPtr doc, xmlNodePtr node) |
void | read_depth_normal_PCL (xmlDocPtr doc, xmlNodePtr node) |
void | read_depth_normal_sampling_step (xmlDocPtr doc, xmlNodePtr node) |
void | read_depth_dense (xmlDocPtr doc, xmlNodePtr node) |
void | read_depth_dense_sampling_step (xmlDocPtr doc, xmlNodePtr node) |
Protected Member Functions Inherited from vpXmlParser | |
bool | xmlReadBoolChild (xmlDocPtr doc, xmlNodePtr node) |
char * | xmlReadCharChild (xmlDocPtr doc, xmlNodePtr node) |
double | xmlReadDoubleChild (xmlDocPtr doc, xmlNodePtr node) |
float | xmlReadFloatChild (xmlDocPtr doc, xmlNodePtr node) |
int | xmlReadIntChild (xmlDocPtr doc, xmlNodePtr node) |
std::string | xmlReadStringChild (xmlDocPtr doc, xmlNodePtr node) |
unsigned int | xmlReadUnsignedIntChild (xmlDocPtr doc, xmlNodePtr node) |
void | xmlWriteBoolChild (xmlNodePtr node, const char *label, const bool value) |
void | xmlWriteCharChild (xmlNodePtr node, const char *label, const char *value) |
void | xmlWriteDoubleChild (xmlNodePtr node, const char *label, const double value) |
void | xmlWriteFloatChild (xmlNodePtr node, const char *label, const float value) |
void | xmlWriteIntChild (xmlNodePtr node, const char *label, const int value) |
void | xmlWriteStringChild (xmlNodePtr node, const char *label, const std::string &value) |
void | xmlWriteUnsignedIntChild (xmlNodePtr node, const char *label, const unsigned int value) |
Protected Attributes | |
vpParserType | m_parserType |
vpCameraParameters | m_cam |
double | m_angleAppear |
double | m_angleDisappear |
bool | m_hasNearClipping |
double | m_nearClipping |
bool | m_hasFarClipping |
double | m_farClipping |
bool | m_fovClipping |
bool | m_useLod |
double | m_minLineLengthThreshold |
double | m_minPolygonAreaThreshold |
vpMe | m_ecm |
unsigned int | m_kltMaskBorder |
unsigned int | m_kltMaxFeatures |
unsigned int | m_kltWinSize |
double | m_kltQualityValue |
double | m_kltMinDist |
double | m_kltHarrisParam |
unsigned int | m_kltBlockSize |
unsigned int | m_kltPyramidLevels |
vpMbtFaceDepthNormal::vpFeatureEstimationType | m_depthNormalFeatureEstimationMethod |
int | m_depthNormalPclPlaneEstimationMethod |
int | m_depthNormalPclPlaneEstimationRansacMaxIter |
double | m_depthNormalPclPlaneEstimationRansacThreshold |
unsigned int | m_depthNormalSamplingStepX |
unsigned int | m_depthNormalSamplingStepY |
unsigned int | m_depthDenseSamplingStepX |
unsigned int | m_depthDenseSamplingStepY |
std::map< std::string, int > | nodeMap |
std::string | main_tag |
Parse an Xml file to extract configuration parameters of a mbtConfig object.
Data parser for the model-based tracker.
Definition at line 64 of file vpMbtXmlGenericParser.h.
|
protected |
Definition at line 142 of file vpMbtXmlGenericParser.h.
Definition at line 67 of file vpMbtXmlGenericParser.h.
|
explicit |
Definition at line 46 of file vpMbtXmlGenericParser.cpp.
References init().
|
virtual |
Definition at line 70 of file vpMbtXmlGenericParser.cpp.
|
inlinestaticinherited |
As stated in http://xmlsoft.org/html/libxml-parser.html#xmlCleanupParser to clean up memory allocated by the xml2 library itself, the user should call xmlCleanupParser() only when the process has finished using the xml2 library. In case of doubt abstain from calling this function or do it just before calling exit() to avoid leak reports from valgrind ! That's why in ViSP the destructor doesn't call xmlCleanupParser(). Rather we provide the static function vpXmlParser::cleanup() that calls xmlCleanupParser() that could be called just before exit().
Definition at line 310 of file vpXmlParser.h.
|
inline |
Get the angle to determine if a face appeared.
Definition at line 213 of file vpMbtXmlGenericParser.h.
Referenced by vpMbDepthDenseTracker::loadConfigFile(), vpMbDepthNormalTracker::loadConfigFile(), and vpMbGenericTracker::track().
|
inline |
Get the angle to determine if a face disappeared.
Definition at line 218 of file vpMbtXmlGenericParser.h.
Referenced by vpMbDepthDenseTracker::loadConfigFile(), vpMbDepthNormalTracker::loadConfigFile(), and vpMbGenericTracker::track().
|
inline |
Definition at line 220 of file vpMbtXmlGenericParser.h.
Referenced by vpMbDepthDenseTracker::loadConfigFile(), vpMbDepthNormalTracker::loadConfigFile(), and vpMbGenericTracker::track().
|
inline |
Get depth dense sampling step in X.
Definition at line 230 of file vpMbtXmlGenericParser.h.
Referenced by vpMbDepthDenseTracker::loadConfigFile(), and vpMbGenericTracker::track().
|
inline |
Get depth dense sampling step in Y.
Definition at line 235 of file vpMbtXmlGenericParser.h.
Referenced by vpMbDepthDenseTracker::loadConfigFile(), and vpMbGenericTracker::track().
|
inline |
Get depth normal feature estimation method.
Definition at line 240 of file vpMbtXmlGenericParser.h.
Referenced by vpMbDepthNormalTracker::loadConfigFile(), and vpMbGenericTracker::track().
|
inline |
Get depth normal PCL plane estimation method.
Definition at line 248 of file vpMbtXmlGenericParser.h.
Referenced by vpMbDepthNormalTracker::loadConfigFile(), and vpMbGenericTracker::track().
|
inline |
Get depth normal PCL maximum number of iterations.
Definition at line 253 of file vpMbtXmlGenericParser.h.
Referenced by vpMbDepthNormalTracker::loadConfigFile(), and vpMbGenericTracker::track().
|
inline |
Get depth normal PCL RANSAC threshold.
Definition at line 261 of file vpMbtXmlGenericParser.h.
Referenced by vpMbDepthNormalTracker::loadConfigFile(), and vpMbGenericTracker::track().
|
inline |
Get depth normal sampling step in X.
Definition at line 269 of file vpMbtXmlGenericParser.h.
Referenced by vpMbDepthNormalTracker::loadConfigFile(), and vpMbGenericTracker::track().
|
inline |
Get depth normal sampling step in Y.
Definition at line 274 of file vpMbtXmlGenericParser.h.
Referenced by vpMbDepthNormalTracker::loadConfigFile(), and vpMbGenericTracker::track().
|
inline |
Get moving edge parameters.
Definition at line 225 of file vpMbtXmlGenericParser.h.
Referenced by vpMbGenericTracker::track().
|
inline |
Get the far clipping distance.
Definition at line 279 of file vpMbtXmlGenericParser.h.
Referenced by vpMbDepthDenseTracker::loadConfigFile(), vpMbDepthNormalTracker::loadConfigFile(), and vpMbGenericTracker::track().
|
inline |
Get if FOV clipping should be used or not.
Definition at line 284 of file vpMbtXmlGenericParser.h.
Referenced by vpMbDepthDenseTracker::loadConfigFile(), vpMbDepthNormalTracker::loadConfigFile(), and vpMbGenericTracker::track().
|
inline |
Get the size of a block.
Definition at line 289 of file vpMbtXmlGenericParser.h.
Referenced by vpMbGenericTracker::track().
|
inline |
Get the Harris free parameter.
Definition at line 294 of file vpMbtXmlGenericParser.h.
Referenced by vpMbGenericTracker::track().
|
inline |
Get the Border of the mask.
Definition at line 299 of file vpMbtXmlGenericParser.h.
Referenced by vpMbGenericTracker::track().
|
inline |
Get the maximum number of features for the KLT.
Definition at line 304 of file vpMbtXmlGenericParser.h.
Referenced by vpMbGenericTracker::track().
|
inline |
Get the minimum distance between KLT points.
Definition at line 309 of file vpMbtXmlGenericParser.h.
Referenced by vpMbGenericTracker::track().
|
inline |
Get the number of pyramid levels
Definition at line 314 of file vpMbtXmlGenericParser.h.
Referenced by vpMbGenericTracker::track().
|
inline |
Get the quality of the KLT.
Definition at line 319 of file vpMbtXmlGenericParser.h.
Referenced by vpMbGenericTracker::track().
|
inline |
Get the size of the window used in the KLT tracker.
Definition at line 324 of file vpMbtXmlGenericParser.h.
Referenced by vpMbGenericTracker::track().
|
inline |
Get the minimum line length to track a segment when LOD is enabled.
Definition at line 334 of file vpMbtXmlGenericParser.h.
Referenced by vpMbGenericTracker::track().
|
inline |
Get the minimum polygon area to track a face when LOD is enabled.
Definition at line 339 of file vpMbtXmlGenericParser.h.
Referenced by vpMbGenericTracker::track().
|
inline |
Get the state of LOD setting.
Definition at line 329 of file vpMbtXmlGenericParser.h.
Referenced by vpMbGenericTracker::track().
|
inline |
Get the near clipping distance.
Definition at line 344 of file vpMbtXmlGenericParser.h.
Referenced by vpMbDepthDenseTracker::loadConfigFile(), vpMbDepthNormalTracker::loadConfigFile(), and vpMbGenericTracker::track().
|
inline |
Has Far clipping been specified?
Definition at line 351 of file vpMbtXmlGenericParser.h.
Referenced by vpMbDepthDenseTracker::loadConfigFile(), vpMbDepthNormalTracker::loadConfigFile(), and vpMbGenericTracker::track().
|
inline |
Has Near clipping been specified?
Definition at line 358 of file vpMbtXmlGenericParser.h.
References vpXmlParser::parse(), and vpXmlParser::readMainClass().
Referenced by vpMbDepthDenseTracker::loadConfigFile(), vpMbDepthNormalTracker::loadConfigFile(), and vpMbGenericTracker::track().
|
protected |
Initialise internal variables (including the map).
Definition at line 75 of file vpMbtXmlGenericParser.cpp.
References angle_appear, angle_disappear, camera, conf, contrast, depth_dense, depth_dense_sampling_step, depth_dense_sampling_step_X, depth_dense_sampling_step_Y, depth_normal, depth_sampling_step, depth_sampling_step_X, depth_sampling_step_Y, ecm, edge_threshold, face, far_clipping, feature_estimation_method, fov_clipping, harris, height, klt, lod, mask, mask_border, max_features, min_distance, min_line_length_threshold, min_polygon_area_threshold, mu1, mu2, nb_mask, near_clipping, vpXmlParser::nodeMap, PCL_plane_estimation, PCL_plane_estimation_method, PCL_plane_estimation_ransac_max_iter, PCL_plane_estimation_ransac_threshold, px, py, pyramid_lvl, quality, range, sample, vpXmlParser::setMainTag(), size, size_block, step, tracking, u0, use_lod, v0, width, and window_size.
Referenced by vpMbtXmlGenericParser().
void vpMbtXmlGenericParser::parse | ( | const std::string & | filename | ) |
Parse the file in parameters. This method is deprecated, use parse() instead.
filename | : File to parse. |
Definition at line 147 of file vpMbtXmlGenericParser.cpp.
References vpXmlParser::parse().
Referenced by vpMbDepthDenseTracker::loadConfigFile(), vpMbDepthNormalTracker::loadConfigFile(), and vpMbGenericTracker::track().
|
protected |
Read camera information.
vpException::fatalError | if there was an unexpected number of data. |
doc | : Pointer to the document. |
node | : Pointer to the node of the camera information. |
Definition at line 302 of file vpMbtXmlGenericParser.cpp.
References vpCameraParameters::get_px(), vpCameraParameters::get_py(), vpCameraParameters::get_u0(), vpCameraParameters::get_v0(), vpCameraParameters::initPersProjWithoutDistortion(), m_cam, vpXmlParser::nodeMap, px, py, u0, v0, and vpXmlParser::xmlReadDoubleChild().
Referenced by readMainClass().
|
protected |
Read depth dense information.
vpException::fatalError | if there was an unexpected number of data. |
doc | : Pointer to the document. |
node | : Pointer to the node of the ecm information. |
Definition at line 550 of file vpMbtXmlGenericParser.cpp.
References depth_dense_sampling_step, m_depthDenseSamplingStepX, m_depthDenseSamplingStepY, vpXmlParser::nodeMap, and read_depth_dense_sampling_step().
Referenced by readMainClass().
|
protected |
Read depth dense sampling step.
vpException::fatalError | if there was an unexpected number of data. |
doc | : Pointer to the document. |
node | : Pointer to the node of the range information. |
Definition at line 585 of file vpMbtXmlGenericParser.cpp.
References depth_dense_sampling_step_X, depth_dense_sampling_step_Y, m_depthDenseSamplingStepX, m_depthDenseSamplingStepY, vpXmlParser::nodeMap, and vpXmlParser::xmlReadUnsignedIntChild().
Referenced by read_depth_dense().
|
protected |
Read depth normal information.
vpException::fatalError | if there was an unexpected number of data. |
doc | : Pointer to the document. |
node | : Pointer to the node information. |
Definition at line 378 of file vpMbtXmlGenericParser.cpp.
References depth_sampling_step, feature_estimation_method, m_depthNormalFeatureEstimationMethod, m_depthNormalPclPlaneEstimationMethod, m_depthNormalPclPlaneEstimationRansacMaxIter, m_depthNormalPclPlaneEstimationRansacThreshold, m_depthNormalSamplingStepX, m_depthNormalSamplingStepY, vpXmlParser::nodeMap, PCL_plane_estimation, read_depth_normal_PCL(), read_depth_normal_sampling_step(), and vpXmlParser::xmlReadIntChild().
Referenced by readMainClass().
|
protected |
Read depth normal PCL properties.
vpException::fatalError | if there was an unexpected number of data. |
doc | : Pointer to the document. |
node | : Pointer to the node information. |
Definition at line 441 of file vpMbtXmlGenericParser.cpp.
References m_depthNormalPclPlaneEstimationMethod, m_depthNormalPclPlaneEstimationRansacMaxIter, m_depthNormalPclPlaneEstimationRansacThreshold, vpXmlParser::nodeMap, PCL_plane_estimation_method, PCL_plane_estimation_ransac_max_iter, PCL_plane_estimation_ransac_threshold, vpXmlParser::xmlReadDoubleChild(), and vpXmlParser::xmlReadIntChild().
Referenced by read_depth_normal().
|
protected |
Read depth normal sampling step.
vpException::fatalError | if there was an unexpected number of data. |
doc | : Pointer to the document. |
node | : Pointer to the node information. |
Definition at line 504 of file vpMbtXmlGenericParser.cpp.
References depth_sampling_step_X, depth_sampling_step_Y, m_depthNormalSamplingStepX, m_depthNormalSamplingStepY, vpXmlParser::nodeMap, and vpXmlParser::xmlReadUnsignedIntChild().
Referenced by read_depth_normal().
|
protected |
Read ecm information.
vpException::fatalError | if there was an unexpected number of data. |
doc | : Pointer to the document. |
node | : Pointer to the node of the ecm information. |
Definition at line 631 of file vpMbtXmlGenericParser.cpp.
References contrast, vpMe::getMaskNumber(), vpMe::getMaskSize(), vpMe::getMu1(), vpMe::getMu2(), vpMe::getRange(), vpMe::getSampleStep(), vpMe::getThreshold(), m_ecm, mask, vpXmlParser::nodeMap, range, read_ecm_contrast(), read_ecm_mask(), read_ecm_range(), read_ecm_sample(), and sample.
Referenced by readMainClass().
|
protected |
Read the contrast information from the xml file.
vpException::fatalError | if there was an unexpected number of data. |
doc | : Pointer to the document. |
node | : Pointer to the node of the contrast information. |
Definition at line 698 of file vpMbtXmlGenericParser.cpp.
References edge_threshold, vpMe::getMu1(), vpMe::getMu2(), vpMe::getThreshold(), m_ecm, mu1, mu2, vpXmlParser::nodeMap, vpMe::setMu1(), vpMe::setMu2(), vpMe::setThreshold(), and vpXmlParser::xmlReadDoubleChild().
Referenced by read_ecm().
|
protected |
Read mask information for the vpMeSite.
vpException::fatalError | if there was an unexpected number of data. |
doc | : Pointer to the document. |
node | : Pointer to the node of the mask information. |
Definition at line 764 of file vpMbtXmlGenericParser.cpp.
References vpException::badValue, vpMe::getMaskNumber(), vpMe::getMaskSize(), m_ecm, nb_mask, vpXmlParser::nodeMap, vpMe::setMaskNumber(), vpMe::setMaskSize(), size, and vpXmlParser::xmlReadUnsignedIntChild().
Referenced by read_ecm().
|
protected |
Read range information for the vpMeSite.
vpException::fatalError | if there was an unexpected number of data. |
doc | : Pointer to the document. |
node | : Pointer to the node of the range information. |
Definition at line 823 of file vpMbtXmlGenericParser.cpp.
References vpMe::getRange(), m_ecm, vpXmlParser::nodeMap, vpMe::setRange(), tracking, and vpXmlParser::xmlReadUnsignedIntChild().
Referenced by read_ecm().
|
protected |
Read sample information.
vpException::fatalError | if there was an unexpected number of data. |
doc | : Pointer to the document. |
node | : Pointer to the node of the sample information. |
Definition at line 863 of file vpMbtXmlGenericParser.cpp.
References vpMe::getSampleStep(), m_ecm, vpXmlParser::nodeMap, vpMe::setSampleStep(), step, and vpXmlParser::xmlReadIntChild().
Referenced by read_ecm().
|
protected |
Read face information.
vpException::fatalError | if there was an unexpected number of data. |
doc | : Pointer to the document. |
node | : Pointer to the node of the camera information. |
Definition at line 903 of file vpMbtXmlGenericParser.cpp.
References angle_appear, angle_disappear, far_clipping, fov_clipping, m_angleAppear, m_angleDisappear, m_farClipping, m_fovClipping, m_hasFarClipping, m_hasNearClipping, m_nearClipping, near_clipping, vpXmlParser::nodeMap, vpXmlParser::xmlReadDoubleChild(), and vpXmlParser::xmlReadIntChild().
Referenced by readMainClass().
|
protected |
Read klt information.
vpException::fatalError | if there was an unexpected number of data. |
doc | : Pointer to the document. |
node | : Pointer to the node of the camera information. |
Definition at line 987 of file vpMbtXmlGenericParser.cpp.
References harris, m_kltBlockSize, m_kltHarrisParam, m_kltMaskBorder, m_kltMaxFeatures, m_kltMinDist, m_kltPyramidLevels, m_kltQualityValue, m_kltWinSize, mask_border, max_features, min_distance, vpXmlParser::nodeMap, pyramid_lvl, quality, size_block, window_size, vpXmlParser::xmlReadDoubleChild(), and vpXmlParser::xmlReadUnsignedIntChild().
Referenced by readMainClass().
|
protected |
Definition at line 1091 of file vpMbtXmlGenericParser.cpp.
References m_minLineLengthThreshold, m_minPolygonAreaThreshold, m_useLod, min_line_length_threshold, min_polygon_area_threshold, vpXmlParser::nodeMap, use_lod, vpXmlParser::xmlReadDoubleChild(), and vpXmlParser::xmlReadIntChild().
Referenced by readMainClass().
|
protected |
Read sample information.
vpException::fatalError | if there was an unexpected number of data. |
doc | : Pointer to the document. |
node | : Pointer to the node of the sample information. |
Definition at line 1148 of file vpMbtXmlGenericParser.cpp.
References vpMe::getSampleStep(), m_ecm, vpXmlParser::nodeMap, vpMe::setSampleStep(), step, and vpXmlParser::xmlReadIntChild().
Referenced by readMainClass().
|
virtual |
Read the parameters of the class from the file given by its document pointer and by its root node.
doc | : Document to parse. |
node | : Root node. |
Implements vpXmlParser.
Definition at line 166 of file vpMbtXmlGenericParser.cpp.
References camera, depth_dense, DEPTH_DENSE_PARSER, depth_normal, DEPTH_NORMAL_PARSER, ecm, EDGE_PARSER, face, vpCameraParameters::get_px(), vpCameraParameters::get_py(), vpCameraParameters::get_u0(), vpCameraParameters::get_v0(), vpMe::getMaskNumber(), vpMe::getMaskSize(), vpMe::getMu1(), vpMe::getMu2(), vpMe::getRange(), vpMe::getSampleStep(), vpMe::getThreshold(), klt, KLT_PARSER, lod, m_angleAppear, m_angleDisappear, m_cam, m_depthDenseSamplingStepX, m_depthDenseSamplingStepY, m_depthNormalFeatureEstimationMethod, m_depthNormalPclPlaneEstimationMethod, m_depthNormalPclPlaneEstimationRansacMaxIter, m_depthNormalPclPlaneEstimationRansacThreshold, m_depthNormalSamplingStepX, m_depthNormalSamplingStepY, m_ecm, m_kltBlockSize, m_kltHarrisParam, m_kltMaskBorder, m_kltMaxFeatures, m_kltMinDist, m_kltPyramidLevels, m_kltQualityValue, m_kltWinSize, m_minLineLengthThreshold, m_minPolygonAreaThreshold, m_parserType, m_useLod, vpXmlParser::nodeMap, read_camera(), read_depth_dense(), read_depth_normal(), read_ecm(), read_face(), read_klt(), read_lod(), read_sample_deprecated(), and sample.
|
inherited |
Save the content of the class in the file given in parameters. The data of the class are in the child class. This method calls the write_main_class method which has to be implemented for every class depending on the data to save.
filename | : the name of the file used to record the data |
append | : if true and if the file exists, the data will be added to the data already in the file |
Definition at line 453 of file vpXmlParser.cpp.
References vpException::ioError, vpXmlParser::main_tag, vpERROR_TRACE, and vpXmlParser::writeMainClass().
Referenced by vpXmlParserHomogeneousMatrix::getHomogeneousMatrixName(), and vpXmlParserCamera::getWidth().
|
inline |
Set the angle to determine if a face appeared.
aappear | : New angleAppear |
Definition at line 369 of file vpMbtXmlGenericParser.h.
Referenced by vpMbDepthDenseTracker::loadConfigFile(), vpMbDepthNormalTracker::loadConfigFile(), and vpMbGenericTracker::track().
|
inline |
Set the angle to determine if a face disappeared.
adisappear | : New angleDisappear |
Definition at line 376 of file vpMbtXmlGenericParser.h.
Referenced by vpMbDepthDenseTracker::loadConfigFile(), vpMbDepthNormalTracker::loadConfigFile(), and vpMbGenericTracker::track().
|
inline |
Set camera parameters.
_cam | : New camera parameters |
Definition at line 383 of file vpMbtXmlGenericParser.h.
Referenced by vpMbDepthDenseTracker::loadConfigFile(), vpMbDepthNormalTracker::loadConfigFile(), and vpMbGenericTracker::track().
|
inline |
Set depth dense sampling step in X.
stepX | : New sampling step |
Definition at line 390 of file vpMbtXmlGenericParser.h.
Referenced by vpMbDepthDenseTracker::loadConfigFile(), and vpMbGenericTracker::track().
|
inline |
Set depth dense sampling step in Y.
stepY | : New sampling step |
Definition at line 397 of file vpMbtXmlGenericParser.h.
Referenced by vpMbDepthDenseTracker::loadConfigFile(), and vpMbGenericTracker::track().
|
inline |
Set depth normal feature estimation method.
method | : New feature estimation method |
Definition at line 404 of file vpMbtXmlGenericParser.h.
Referenced by vpMbDepthNormalTracker::loadConfigFile(), and vpMbGenericTracker::track().
|
inline |
Set depth normal PCL plane estimation method.
method | : New PCL plane estimation method |
Definition at line 414 of file vpMbtXmlGenericParser.h.
Referenced by vpMbDepthNormalTracker::loadConfigFile(), and vpMbGenericTracker::track().
|
inline |
Set depth normal PCL RANSAC maximum number of iterations.
maxIter | : New maximum number of iterations |
Definition at line 424 of file vpMbtXmlGenericParser.h.
Referenced by vpMbDepthNormalTracker::loadConfigFile(), and vpMbGenericTracker::track().
|
inline |
Set depth normal PCL RANSAC threshold.
threshold | : New RANSAC threshold |
Definition at line 434 of file vpMbtXmlGenericParser.h.
Referenced by vpMbDepthNormalTracker::loadConfigFile(), and vpMbGenericTracker::track().
|
inline |
Set depth normal sampling step in X.
stepX | : New sampling step |
Definition at line 444 of file vpMbtXmlGenericParser.h.
Referenced by vpMbDepthNormalTracker::loadConfigFile(), and vpMbGenericTracker::track().
|
inline |
Set depth normal sampling step in Y.
stepY | : New sampling step |
Definition at line 451 of file vpMbtXmlGenericParser.h.
Referenced by vpMbDepthNormalTracker::loadConfigFile(), and vpMbGenericTracker::track().
|
inline |
Set moving edge parameters.
_ecm | : New moving edge parameters |
Definition at line 458 of file vpMbtXmlGenericParser.h.
Referenced by vpMbGenericTracker::track().
|
inline |
Set the far clipping distance.
fclip | : New farClipping |
Definition at line 465 of file vpMbtXmlGenericParser.h.
|
inline |
Set the size of a block.
bs | : New blockSize |
Definition at line 472 of file vpMbtXmlGenericParser.h.
Referenced by vpMbGenericTracker::track().
|
inline |
Set the Harris free parameter.
hp | : New harrisParam |
Definition at line 479 of file vpMbtXmlGenericParser.h.
Referenced by vpMbGenericTracker::track().
|
inline |
Set the Border of the mask.
mb | = new maskBorder |
Definition at line 486 of file vpMbtXmlGenericParser.h.
Referenced by vpMbGenericTracker::track().
|
inline |
Set the maximum number of features for the KLT.
mF | : New maxFeatures |
Definition at line 493 of file vpMbtXmlGenericParser.h.
Referenced by vpMbGenericTracker::track().
|
inline |
Set the minimum distance between KLT points.
mD | : New minDist |
Definition at line 500 of file vpMbtXmlGenericParser.h.
Referenced by vpMbGenericTracker::track().
|
inline |
Set the number of pyramid levels
pL | : New pyramidLevels |
Definition at line 507 of file vpMbtXmlGenericParser.h.
Referenced by vpMbGenericTracker::track().
|
inline |
Set the quality of the KLT.
q | : New quality |
Definition at line 514 of file vpMbtXmlGenericParser.h.
Referenced by vpMbGenericTracker::track().
|
inline |
Set the size of the window used in the KLT tracker.
w | : New winSize |
Definition at line 521 of file vpMbtXmlGenericParser.h.
Referenced by vpMbGenericTracker::track().
|
inlineinherited |
set the name of the main tag
The main tag corresponds to the name of the root node
tag | : name of the root node of the document |
Definition at line 295 of file vpXmlParser.h.
Referenced by vpMbXmlParser::init(), init(), and vpXmlConfigParserKeyPoint::vpXmlConfigParserKeyPoint().
|
inlineinherited |
Set the map describing the data to parse. This map stores the name of each node and an associated key used to simplify the parsing of the file.
If the following file want to be parsed:
The following map has to be declared:
Or, you can use keyzord instead of number as key but it implies to declare in the child class an enumeration type of the name. For example:
_map | : the map describing the data to parse |
Definition at line 286 of file vpXmlParser.h.
|
inline |
Set the near clipping distance.
nclip | : New nearClipping |
Definition at line 528 of file vpMbtXmlGenericParser.h.
References vpXmlParser::writeMainClass().
|
virtual |
Write info to file.
Implements vpXmlParser.
Definition at line 154 of file vpMbtXmlGenericParser.cpp.
References vpException::notImplementedError.
|
protectedinherited |
read a boolean
doc | : The main xml document |
node | : a pointer to the node to read value |
Definition at line 282 of file vpXmlParser.cpp.
References vpException::fatalError.
|
protectedinherited |
Read an array of character.
doc | : The main xml document |
node | : a pointer to the node to read value |
Definition at line 100 of file vpXmlParser.cpp.
References vpException::fatalError.
Referenced by vpXmlParserHomogeneousMatrix::save(), and vpXmlParserCamera::save().
|
protectedinherited |
read a double
doc | : The main xml document |
node | : a pointer to the node to read value |
Definition at line 212 of file vpXmlParser.cpp.
References vpException::fatalError, and vpException::ioError.
Referenced by vpXmlConfigParserKeyPoint::parse(), vpMbXmlParser::read_camera(), read_camera(), vpMbtXmlParser::read_contrast(), read_depth_normal_PCL(), read_ecm_contrast(), vpMbXmlParser::read_face(), read_face(), vpMbtKltXmlParser::read_klt(), read_klt(), vpMbXmlParser::read_lod(), read_lod(), vpXmlParserHomogeneousMatrix::save(), and vpXmlParserCamera::save().
|
protectedinherited |
read a float
doc | : The main xml document |
node | : a pointer to the node to read value |
Definition at line 245 of file vpXmlParser.cpp.
References vpException::fatalError, and vpException::ioError.
|
protectedinherited |
read an int
doc | : The main xml document |
node | : a pointer to the node to read value |
Definition at line 144 of file vpXmlParser.cpp.
References vpException::fatalError, and vpException::ioError.
Referenced by vpXmlConfigParserKeyPoint::parse(), read_depth_normal(), read_depth_normal_PCL(), read_ecm_sample(), vpMbXmlParser::read_face(), read_face(), vpMbXmlParser::read_lod(), read_lod(), vpMbtXmlParser::read_sample(), vpMbtXmlParser::read_sample_deprecated(), and read_sample_deprecated().
|
protectedinherited |
Read an array of character.
doc | : The main xml document |
node | : a pointer to the node to read value |
Definition at line 120 of file vpXmlParser.cpp.
References vpException::fatalError.
Referenced by vpXmlConfigParserKeyPoint::parse().
|
protectedinherited |
read an int
doc | : The main xml document |
node | : a pointer to the node to read value |
Definition at line 178 of file vpXmlParser.cpp.
References vpException::fatalError, and vpException::ioError.
Referenced by read_depth_dense_sampling_step(), read_depth_normal_sampling_step(), read_ecm_mask(), read_ecm_range(), vpMbtKltXmlParser::read_klt(), read_klt(), vpMbtXmlParser::read_mask(), vpMbtXmlParser::read_range(), and vpXmlParserCamera::save().
|
protectedinherited |
write a bool.
node | : a pointer to the node to read value |
label | : label (name of the data) of the node |
value | : boolean to write (true or false) |
Definition at line 398 of file vpXmlParser.cpp.
|
protectedinherited |
write an array of character.
node | : a pointer to the node to read value |
label | : label (name of the data) of the node |
value | : pointer to the array of character to write |
Definition at line 306 of file vpXmlParser.cpp.
|
protectedinherited |
write a double.
node | : a pointer to the node to read value |
label | : label (name of the data) of the node |
value | : double to write |
Definition at line 366 of file vpXmlParser.cpp.
|
protectedinherited |
write a float.
node | : a pointer to the node to read value |
label | : label (name of the data) of the node |
value | : float to write |
Definition at line 382 of file vpXmlParser.cpp.
|
protectedinherited |
write an integer.
node | : a pointer to the node to read value |
label | : label (name of the data) of the node |
value | : integer to write |
Definition at line 334 of file vpXmlParser.cpp.
|
protectedinherited |
write an array of character.
node | : a pointer to the node to read value |
label | : label (name of the data) of the node |
value | : std::string to write; |
Definition at line 320 of file vpXmlParser.cpp.
|
protectedinherited |
write an unsigned integer.
node | : a pointer to the node to read value |
label | : label (name of the data) of the node |
value | : unsigned integer to write |
Definition at line 350 of file vpXmlParser.cpp.
|
protected |
Angle to determine if a face appeared.
Definition at line 83 of file vpMbtXmlGenericParser.h.
Referenced by read_face(), and readMainClass().
|
protected |
Angle to determine if a face disappeared.
Definition at line 85 of file vpMbtXmlGenericParser.h.
Referenced by read_face(), and readMainClass().
|
protected |
Camera parameters.
Definition at line 81 of file vpMbtXmlGenericParser.h.
Referenced by read_camera(), and readMainClass().
|
protected |
Sampling step in X.
Definition at line 138 of file vpMbtXmlGenericParser.h.
Referenced by read_depth_dense(), read_depth_dense_sampling_step(), and readMainClass().
|
protected |
Sampling step in Y.
Definition at line 140 of file vpMbtXmlGenericParser.h.
Referenced by read_depth_dense(), read_depth_dense_sampling_step(), and readMainClass().
|
protected |
Feature estimation method.
Definition at line 125 of file vpMbtXmlGenericParser.h.
Referenced by read_depth_normal(), and readMainClass().
|
protected |
PCL plane estimation method.
Definition at line 127 of file vpMbtXmlGenericParser.h.
Referenced by read_depth_normal(), read_depth_normal_PCL(), and readMainClass().
|
protected |
PCL RANSAC maximum number of iterations.
Definition at line 129 of file vpMbtXmlGenericParser.h.
Referenced by read_depth_normal(), read_depth_normal_PCL(), and readMainClass().
|
protected |
PCL RANSAC threshold.
Definition at line 131 of file vpMbtXmlGenericParser.h.
Referenced by read_depth_normal(), read_depth_normal_PCL(), and readMainClass().
|
protected |
Sampling step in X.
Definition at line 133 of file vpMbtXmlGenericParser.h.
Referenced by read_depth_normal(), read_depth_normal_sampling_step(), and readMainClass().
|
protected |
Sampling step in Y.
Definition at line 135 of file vpMbtXmlGenericParser.h.
Referenced by read_depth_normal(), read_depth_normal_sampling_step(), and readMainClass().
|
protected |
Moving edges parameters.
Definition at line 105 of file vpMbtXmlGenericParser.h.
Referenced by read_ecm(), read_ecm_contrast(), read_ecm_mask(), read_ecm_range(), read_ecm_sample(), read_sample_deprecated(), and readMainClass().
|
protected |
Near clipping distance.
Definition at line 93 of file vpMbtXmlGenericParser.h.
Referenced by read_face().
|
protected |
|
protected |
Is far clipping distance specified?
Definition at line 91 of file vpMbtXmlGenericParser.h.
Referenced by read_face().
|
protected |
Is near clipping distance specified?
Definition at line 87 of file vpMbtXmlGenericParser.h.
Referenced by read_face().
|
protected |
Block size.
Definition at line 120 of file vpMbtXmlGenericParser.h.
Referenced by read_klt(), and readMainClass().
|
protected |
Harris free parameters.
Definition at line 118 of file vpMbtXmlGenericParser.h.
Referenced by read_klt(), and readMainClass().
|
protected |
Border of the mask used on Klt points.
Definition at line 108 of file vpMbtXmlGenericParser.h.
Referenced by read_klt(), and readMainClass().
|
protected |
Maximum of Klt features.
Definition at line 110 of file vpMbtXmlGenericParser.h.
Referenced by read_klt(), and readMainClass().
|
protected |
Minimum distance between klt points.
Definition at line 116 of file vpMbtXmlGenericParser.h.
Referenced by read_klt(), and readMainClass().
|
protected |
Number of pyramid levels.
Definition at line 122 of file vpMbtXmlGenericParser.h.
Referenced by read_klt(), and readMainClass().
|
protected |
Quality of the Klt points.
Definition at line 114 of file vpMbtXmlGenericParser.h.
Referenced by read_klt(), and readMainClass().
|
protected |
Windows size.
Definition at line 112 of file vpMbtXmlGenericParser.h.
Referenced by read_klt(), and readMainClass().
|
protected |
Minimum line length to track a segment when LOD is enabled.
Definition at line 100 of file vpMbtXmlGenericParser.h.
Referenced by read_lod(), and readMainClass().
|
protected |
Minimum polygon area to track a face when LOD is enabled.
Definition at line 102 of file vpMbtXmlGenericParser.h.
Referenced by read_lod(), and readMainClass().
|
protected |
Near clipping distance.
Definition at line 89 of file vpMbtXmlGenericParser.h.
Referenced by read_face().
|
protected |
|
protected |
If true, the LOD is enabled, otherwise it is not.
Definition at line 98 of file vpMbtXmlGenericParser.h.
Referenced by read_lod(), and readMainClass().
|
protectedinherited |
The name of the main tag for the file to parse
Definition at line 231 of file vpXmlParser.h.
Referenced by vpXmlParser::save().
|
protectedinherited |
The map describing the data to parse
Definition at line 226 of file vpXmlParser.h.
Referenced by vpMbtEdgeKltXmlParser::init(), vpMbtXmlParser::init(), vpMbtKltXmlParser::init(), vpMbXmlParser::init(), init(), vpXmlConfigParserKeyPoint::parse(), vpMbXmlParser::read_camera(), read_camera(), vpMbtXmlParser::read_contrast(), read_depth_dense(), read_depth_dense_sampling_step(), read_depth_normal(), read_depth_normal_PCL(), read_depth_normal_sampling_step(), vpMbtXmlParser::read_ecm(), read_ecm(), read_ecm_contrast(), read_ecm_mask(), read_ecm_range(), read_ecm_sample(), vpMbXmlParser::read_face(), read_face(), vpMbtKltXmlParser::read_klt(), read_klt(), vpMbXmlParser::read_lod(), read_lod(), vpMbtXmlParser::read_mask(), vpMbtXmlParser::read_range(), vpMbtXmlParser::read_sample(), vpMbtXmlParser::read_sample_deprecated(), read_sample_deprecated(), vpMbtEdgeKltXmlParser::readMainClass(), vpMbtXmlParser::readMainClass(), vpMbtKltXmlParser::readMainClass(), vpMbXmlParser::readMainClass(), readMainClass(), and vpXmlConfigParserKeyPoint::vpXmlConfigParserKeyPoint().