42 #ifndef _vpMbtXmlGenericParser_h_
43 #define _vpMbtXmlGenericParser_h_
45 #include <visp3/core/vpConfig.h>
49 #include <libxml/xmlmemory.h>
51 #include <visp3/core/vpCameraParameters.h>
52 #include <visp3/core/vpXmlParser.h>
53 #include <visp3/mbt/vpMbtFaceDepthNormal.h>
54 #include <visp3/me/vpMe.h>
71 DEPTH_NORMAL_PARSER = 1 << 2,
73 DEPTH_DENSE_PARSER = 1 << 3
75 , PROJECTION_ERROR_PARSER = 0
80 vpParserType m_parserType;
86 double m_angleDisappear;
88 bool m_hasNearClipping;
90 double m_nearClipping;
92 bool m_hasFarClipping;
101 double m_minLineLengthThreshold;
103 double m_minPolygonAreaThreshold;
109 unsigned int m_kltMaskBorder;
111 unsigned int m_kltMaxFeatures;
113 unsigned int m_kltWinSize;
115 double m_kltQualityValue;
119 double m_kltHarrisParam;
121 unsigned int m_kltBlockSize;
123 unsigned int m_kltPyramidLevels;
128 int m_depthNormalPclPlaneEstimationMethod;
130 int m_depthNormalPclPlaneEstimationRansacMaxIter;
132 double m_depthNormalPclPlaneEstimationRansacThreshold;
134 unsigned int m_depthNormalSamplingStepX;
136 unsigned int m_depthNormalSamplingStepY;
139 unsigned int m_depthDenseSamplingStepX;
141 unsigned int m_depthDenseSamplingStepY;
144 vpMe m_projectionErrorMe;
146 unsigned int m_projectionErrorKernelSize;
168 min_line_length_threshold,
169 min_polygon_area_threshold,
195 feature_estimation_method,
196 PCL_plane_estimation,
197 PCL_plane_estimation_method,
198 PCL_plane_estimation_ransac_max_iter,
199 PCL_plane_estimation_ransac_threshold,
201 depth_sampling_step_X,
202 depth_sampling_step_Y,
205 depth_dense_sampling_step,
206 depth_dense_sampling_step_X,
207 depth_dense_sampling_step_Y,
210 projection_error_sample_step,
211 projection_error_kernel_size
223 inline double getAngleAppear()
const {
return m_angleAppear; }
228 inline double getAngleDisappear()
const {
return m_angleDisappear; }
235 void getEdgeMe(
vpMe &_ecm)
const { _ecm = m_ecm; }
240 inline unsigned int getDepthDenseSamplingStepX()
const {
return m_depthDenseSamplingStepX; }
245 inline unsigned int getDepthDenseSamplingStepY()
const {
return m_depthDenseSamplingStepY; }
252 return m_depthNormalFeatureEstimationMethod;
258 inline int getDepthNormalPclPlaneEstimationMethod()
const {
return m_depthNormalPclPlaneEstimationMethod; }
263 inline int getDepthNormalPclPlaneEstimationRansacMaxIter()
const
265 return m_depthNormalPclPlaneEstimationRansacMaxIter;
271 inline double getDepthNormalPclPlaneEstimationRansacThreshold()
const
273 return m_depthNormalPclPlaneEstimationRansacThreshold;
279 inline unsigned int getDepthNormalSamplingStepX()
const {
return m_depthNormalSamplingStepX; }
284 inline unsigned int getDepthNormalSamplingStepY()
const {
return m_depthNormalSamplingStepY; }
289 inline double getFarClippingDistance()
const {
return m_farClipping; }
294 inline bool getFovClipping()
const {
return m_fovClipping; }
299 inline unsigned int getKltBlockSize()
const {
return m_kltBlockSize; }
304 inline double getKltHarrisParam()
const {
return m_kltHarrisParam; }
309 inline unsigned int getKltMaskBorder()
const {
return m_kltMaskBorder; }
314 inline unsigned int getKltMaxFeatures()
const {
return m_kltMaxFeatures; }
319 inline double getKltMinDistance()
const {
return m_kltMinDist; }
324 inline unsigned int getKltPyramidLevels()
const {
return m_kltPyramidLevels; }
329 inline double getKltQuality()
const {
return m_kltQualityValue; }
334 inline unsigned int getKltWindowSize()
const {
return m_kltWinSize; }
339 inline bool getLodState()
const {
return m_useLod; }
344 inline double getLodMinLineLengthThreshold()
const {
return m_minLineLengthThreshold; }
349 inline double getLodMinPolygonAreaThreshold()
const {
return m_minPolygonAreaThreshold; }
354 inline double getNearClippingDistance()
const {
return m_nearClipping; }
359 inline void getProjectionErrorMe(
vpMe &me)
const { me = m_projectionErrorMe; }
361 inline unsigned int getProjectionErrorKernelSize()
const {
return m_projectionErrorKernelSize; }
368 inline bool hasFarClippingDistance()
const {
return m_hasFarClipping; }
375 inline bool hasNearClippingDistance()
const {
return m_hasNearClipping; }
384 inline void setAngleAppear(
const double &aappear) { m_angleAppear = aappear; }
391 inline void setAngleDisappear(
const double &adisappear) { m_angleDisappear = adisappear; }
405 inline void setDepthDenseSamplingStepX(
const unsigned int stepX) { m_depthDenseSamplingStepX = stepX; }
412 inline void setDepthDenseSamplingStepY(
const unsigned int stepY) { m_depthDenseSamplingStepY = stepY; }
421 m_depthNormalFeatureEstimationMethod = method;
429 inline void setDepthNormalPclPlaneEstimationMethod(
const int method)
431 m_depthNormalPclPlaneEstimationMethod = method;
439 inline void setDepthNormalPclPlaneEstimationRansacMaxIter(
const int maxIter)
441 m_depthNormalPclPlaneEstimationRansacMaxIter = maxIter;
449 inline void setDepthNormalPclPlaneEstimationRansacThreshold(
const double threshold)
451 m_depthNormalPclPlaneEstimationRansacThreshold = threshold;
459 inline void setDepthNormalSamplingStepX(
const unsigned int stepX) { m_depthNormalSamplingStepX = stepX; }
466 inline void setDepthNormalSamplingStepY(
const unsigned int stepY) { m_depthNormalSamplingStepY = stepY; }
473 inline void setEdgeMe(
const vpMe &_ecm) { m_ecm = _ecm; }
480 inline void setFarClippingDistance(
const double &fclip) { m_farClipping = fclip; }
487 inline void setKltBlockSize(
const unsigned int &bs) { m_kltBlockSize = bs; }
494 inline void setKltHarrisParam(
const double &hp) { m_kltHarrisParam = hp; }
501 inline void setKltMaskBorder(
const unsigned int &mb) { m_kltMaskBorder = mb; }
508 inline void setKltMaxFeatures(
const unsigned int &mF) { m_kltMaxFeatures = mF; }
515 inline void setKltMinDistance(
const double &mD) { m_kltMinDist = mD; }
522 inline void setKltPyramidLevels(
const unsigned int &pL) { m_kltPyramidLevels = pL; }
529 inline void setKltQuality(
const double &q) { m_kltQualityValue = q; }
536 inline void setKltWindowSize(
const unsigned int &w) { m_kltWinSize = w; }
543 inline void setNearClippingDistance(
const double &nclip) { m_nearClipping = nclip; }
550 inline void setProjectionErrorMe(
const vpMe &me) { m_projectionErrorMe = me; }
557 inline void setProjectionErrorKernelSize(
const unsigned int &size) { m_projectionErrorKernelSize = size; }
565 void read_camera(xmlDocPtr doc, xmlNodePtr node);
566 void read_face(xmlDocPtr doc, xmlNodePtr node);
567 void read_lod(xmlDocPtr doc, xmlNodePtr node);
570 void read_ecm(xmlDocPtr doc, xmlNodePtr node);
571 void read_ecm_sample(xmlDocPtr doc, xmlNodePtr node);
572 void read_sample_deprecated(xmlDocPtr doc, xmlNodePtr node);
573 void read_ecm_mask(xmlDocPtr doc, xmlNodePtr node);
574 void read_ecm_range(xmlDocPtr doc, xmlNodePtr node);
575 void read_ecm_contrast(xmlDocPtr doc, xmlNodePtr node);
578 void read_klt(xmlDocPtr doc, xmlNodePtr node);
581 void read_depth_normal(xmlDocPtr doc, xmlNodePtr node);
582 void read_depth_normal_PCL(xmlDocPtr doc, xmlNodePtr node);
583 void read_depth_normal_sampling_step(xmlDocPtr doc, xmlNodePtr node);
586 void read_depth_dense(xmlDocPtr doc, xmlNodePtr node);
587 void read_depth_dense_sampling_step(xmlDocPtr doc, xmlNodePtr node);
590 void read_projection_error(xmlDocPtr doc, xmlNodePtr node);