34#include <visp3/core/vpConfig.h>
40#include <visp3/mbt/vpMbtXmlGenericParser.h>
42#if defined(VISP_HAVE_PUGIXML)
46#ifndef DOXYGEN_SHOULD_SKIP_THIS
48class vpMbtXmlGenericParser::Impl
51 Impl(
int type = EDGE_PARSER)
56 m_angleAppear(70), m_angleDisappear(80), m_hasNearClipping(false), m_nearClipping(false), m_hasFarClipping(false),
57 m_farClipping(false), m_fovClipping(false),
59 m_useLod(false), m_minLineLengthThreshold(50.0), m_minPolygonAreaThreshold(2500.0),
63 m_kltMaskBorder(0), m_kltMaxFeatures(0), m_kltWinSize(0), m_kltQualityValue(0.), m_kltMinDist(0.),
64 m_kltHarrisParam(0.), m_kltBlockSize(0), m_kltPyramidLevels(0),
66 m_depthNormalFeatureEstimationMethod(vpMbtFaceDepthNormal::ROBUST_FEATURE_ESTIMATION),
67 m_depthNormalPclPlaneEstimationMethod(2), m_depthNormalPclPlaneEstimationRansacMaxIter(200),
68 m_depthNormalPclPlaneEstimationRansacThreshold(0.001), m_depthNormalSamplingStepX(2),
69 m_depthNormalSamplingStepY(2),
71 m_depthDenseSamplingStepX(2), m_depthDenseSamplingStepY(2),
73 m_projectionErrorMe(), m_projectionErrorKernelSize(2),
74 m_nodeMap(), m_verbose(true)
78 if (m_call_setlocale) {
83 if (std::setlocale(LC_ALL,
"C") ==
nullptr) {
84 std::cerr <<
"Cannot set locale to C" << std::endl;
86 m_call_setlocale =
false;
91 void parse(
const std::string &filename)
93 pugi::xml_document doc;
94 if (!doc.load_file(
filename.c_str())) {
98 bool camera_node =
false;
99 bool face_node =
false;
100 bool ecm_node =
false;
101 bool klt_node =
false;
102 bool lod_node =
false;
103 bool depth_normal_node =
false;
104 bool depth_dense_node =
false;
105 bool projection_error_node =
false;
107 pugi::xml_node root_node = doc.document_element();
108 for (pugi::xml_node dataNode = root_node.first_child(); dataNode; dataNode = dataNode.next_sibling()) {
109 if (dataNode.type() == pugi::node_element) {
110 std::map<std::string, int>::const_iterator iter_data = m_nodeMap.find(dataNode.name());
111 if (iter_data != m_nodeMap.end()) {
112 switch (iter_data->second) {
114 if (m_parserType != PROJECTION_ERROR_PARSER) {
115 read_camera(dataNode);
121 if (m_parserType != PROJECTION_ERROR_PARSER) {
128 if (m_parserType != PROJECTION_ERROR_PARSER) {
135 if (m_parserType & EDGE_PARSER) {
142 if (m_parserType & EDGE_PARSER)
143 read_sample_deprecated(dataNode);
147 if (m_parserType & KLT_PARSER) {
154 if (m_parserType & DEPTH_NORMAL_PARSER) {
155 read_depth_normal(dataNode);
156 depth_normal_node =
true;
161 if (m_parserType & DEPTH_DENSE_PARSER) {
162 read_depth_dense(dataNode);
163 depth_dense_node =
true;
167 case projection_error:
168 if (m_parserType == PROJECTION_ERROR_PARSER) {
169 read_projection_error(dataNode);
170 projection_error_node =
true;
182 if (m_parserType == PROJECTION_ERROR_PARSER) {
183 if (!projection_error_node) {
184 std::cout <<
"projection_error : sample_step : " << m_projectionErrorMe.getSampleStep() <<
" (default)"
186 std::cout <<
"projection_error : kernel_size : " << m_projectionErrorKernelSize * 2 + 1 <<
"x"
187 << m_projectionErrorKernelSize * 2 + 1 <<
" (default)" << std::endl;
192 std::cout <<
"camera : u0 : " << m_cam.get_u0() <<
" (default)" << std::endl;
193 std::cout <<
"camera : v0 : " << m_cam.get_v0() <<
" (default)" << std::endl;
194 std::cout <<
"camera : px : " << m_cam.get_px() <<
" (default)" << std::endl;
195 std::cout <<
"camera : py : " << m_cam.get_py() <<
" (default)" << std::endl;
199 std::cout <<
"face : Angle Appear : " << m_angleAppear <<
" (default)" << std::endl;
200 std::cout <<
"face : Angle Disappear : " << m_angleDisappear <<
" (default)" << std::endl;
204 std::cout <<
"lod : use lod : " << m_useLod <<
" (default)" << std::endl;
205 std::cout <<
"lod : min line length threshold : " << m_minLineLengthThreshold <<
" (default)" << std::endl;
206 std::cout <<
"lod : min polygon area threshold : " << m_minPolygonAreaThreshold <<
" (default)" << std::endl;
209 if (!ecm_node && (m_parserType & EDGE_PARSER)) {
210 std::cout <<
"me : mask : size : " << m_ecm.getMaskSize() <<
" (default)" << std::endl;
211 std::cout <<
"me : mask : nb_mask : " << m_ecm.getMaskNumber() <<
" (default)" << std::endl;
212 std::cout <<
"me : range : tracking : " << m_ecm.getRange() <<
" (default)" << std::endl;
213 std::cout <<
"me : contrast : threshold type : " << m_ecm.getLikelihoodThresholdType() <<
" (default)" << std::endl;
214 std::cout <<
"me : contrast : threshold : " << m_ecm.getThreshold() <<
" (default)" << std::endl;
215 std::cout <<
"me : contrast : mu1 : " << m_ecm.getMu1() <<
" (default)" << std::endl;
216 std::cout <<
"me : contrast : mu2 : " << m_ecm.getMu2() <<
" (default)" << std::endl;
217 std::cout <<
"me : sample : sample_step : " << m_ecm.getSampleStep() <<
" (default)" << std::endl;
220 if (!klt_node && (m_parserType & KLT_PARSER)) {
221 std::cout <<
"klt : Mask Border : " << m_kltMaskBorder <<
" (default)" << std::endl;
222 std::cout <<
"klt : Max Features : " << m_kltMaxFeatures <<
" (default)" << std::endl;
223 std::cout <<
"klt : Windows Size : " << m_kltWinSize <<
" (default)" << std::endl;
224 std::cout <<
"klt : Quality : " << m_kltQualityValue <<
" (default)" << std::endl;
225 std::cout <<
"klt : Min Distance : " << m_kltMinDist <<
" (default)" << std::endl;
226 std::cout <<
"klt : Harris Parameter : " << m_kltHarrisParam <<
" (default)" << std::endl;
227 std::cout <<
"klt : Block Size : " << m_kltBlockSize <<
" (default)" << std::endl;
228 std::cout <<
"klt : Pyramid Levels : " << m_kltPyramidLevels <<
" (default)" << std::endl;
231 if (!depth_normal_node && (m_parserType & DEPTH_NORMAL_PARSER)) {
232 std::cout <<
"depth normal : feature_estimation_method : " << m_depthNormalFeatureEstimationMethod
233 <<
" (default)" << std::endl;
234 std::cout <<
"depth normal : PCL_plane_estimation : method : " << m_depthNormalPclPlaneEstimationMethod
235 <<
" (default)" << std::endl;
236 std::cout <<
"depth normal : PCL_plane_estimation : max_iter : "
237 << m_depthNormalPclPlaneEstimationRansacMaxIter <<
" (default)" << std::endl;
238 std::cout <<
"depth normal : PCL_plane_estimation : ransac_threshold : "
239 << m_depthNormalPclPlaneEstimationRansacThreshold <<
" (default)" << std::endl;
240 std::cout <<
"depth normal : sampling_step : step_X " << m_depthNormalSamplingStepX <<
" (default)"
242 std::cout <<
"depth normal : sampling_step : step_Y " << m_depthNormalSamplingStepY <<
" (default)"
246 if (!depth_dense_node && (m_parserType & DEPTH_DENSE_PARSER)) {
247 std::cout <<
"depth dense : sampling_step : step_X " << m_depthDenseSamplingStepX <<
" (default)"
249 std::cout <<
"depth dense : sampling_step : step_Y " << m_depthDenseSamplingStepY <<
" (default)"
261 void read_camera(
const pugi::xml_node &node)
263 bool u0_node =
false;
264 bool v0_node =
false;
265 bool px_node =
false;
266 bool py_node =
false;
269 double d_u0 = m_cam.get_u0();
270 double d_v0 = m_cam.get_v0();
271 double d_px = m_cam.get_px();
272 double d_py = m_cam.get_py();
274 for (pugi::xml_node dataNode = node.first_child(); dataNode; dataNode = dataNode.next_sibling()) {
275 if (dataNode.type() == pugi::node_element) {
276 std::map<std::string, int>::const_iterator iter_data = m_nodeMap.find(dataNode.name());
277 if (iter_data != m_nodeMap.end()) {
278 switch (iter_data->second) {
280 d_u0 = dataNode.text().as_double();
285 d_v0 = dataNode.text().as_double();
290 d_px = dataNode.text().as_double();
295 d_py = dataNode.text().as_double();
306 m_cam.initPersProjWithoutDistortion(d_px, d_py, d_u0, d_v0);
310 std::cout <<
"camera : u0 : " << m_cam.get_u0() <<
" (default)" << std::endl;
312 std::cout <<
"camera : u0 : " << m_cam.get_u0() << std::endl;
315 std::cout <<
"camera : v0 : " << m_cam.get_v0() <<
" (default)" << std::endl;
317 std::cout <<
"camera : v0 : " << m_cam.get_v0() << std::endl;
320 std::cout <<
"camera : px : " << m_cam.get_px() <<
" (default)" << std::endl;
322 std::cout <<
"camera : px : " << m_cam.get_px() << std::endl;
325 std::cout <<
"camera : py : " << m_cam.get_py() <<
" (default)" << std::endl;
327 std::cout <<
"camera : py : " << m_cam.get_py() << std::endl;
336 void read_depth_normal(
const pugi::xml_node &node)
338 bool feature_estimation_method_node =
false;
339 bool PCL_plane_estimation_node =
false;
340 bool sampling_step_node =
false;
342 for (pugi::xml_node dataNode = node.first_child(); dataNode; dataNode = dataNode.next_sibling()) {
343 if (dataNode.type() == pugi::node_element) {
344 std::map<std::string, int>::const_iterator iter_data = m_nodeMap.find(dataNode.name());
345 if (iter_data != m_nodeMap.end()) {
346 switch (iter_data->second) {
347 case feature_estimation_method:
348 m_depthNormalFeatureEstimationMethod =
350 feature_estimation_method_node =
true;
353 case PCL_plane_estimation:
354 read_depth_normal_PCL(dataNode);
355 PCL_plane_estimation_node =
true;
358 case depth_sampling_step:
359 read_depth_normal_sampling_step(dataNode);
360 sampling_step_node =
true;
371 if (!feature_estimation_method_node)
372 std::cout <<
"depth normal : feature_estimation_method : " << m_depthNormalFeatureEstimationMethod
373 <<
" (default)" << std::endl;
375 std::cout <<
"depth normal : feature_estimation_method : " << m_depthNormalFeatureEstimationMethod << std::endl;
377 if (!PCL_plane_estimation_node) {
378 std::cout <<
"depth normal : PCL_plane_estimation : method : " << m_depthNormalPclPlaneEstimationMethod
379 <<
" (default)" << std::endl;
380 std::cout <<
"depth normal : PCL_plane_estimation : max_iter : " << m_depthNormalPclPlaneEstimationRansacMaxIter
381 <<
" (default)" << std::endl;
382 std::cout <<
"depth normal : PCL_plane_estimation : ransac_threshold : "
383 << m_depthNormalPclPlaneEstimationRansacThreshold <<
" (default)" << std::endl;
386 if (!sampling_step_node) {
387 std::cout <<
"depth normal : sampling_step : step_X " << m_depthNormalSamplingStepX <<
" (default)"
389 std::cout <<
"depth normal : sampling_step : step_Y " << m_depthNormalSamplingStepY <<
" (default)"
400 void read_depth_normal_PCL(
const pugi::xml_node &node)
402 bool PCL_plane_estimation_method_node =
false;
403 bool PCL_plane_estimation_ransac_max_iter_node =
false;
404 bool PCL_plane_estimation_ransac_threshold_node =
false;
406 for (pugi::xml_node dataNode = node.first_child(); dataNode; dataNode = dataNode.next_sibling()) {
407 if (dataNode.type() == pugi::node_element) {
408 std::map<std::string, int>::const_iterator iter_data = m_nodeMap.find(dataNode.name());
409 if (iter_data != m_nodeMap.end()) {
410 switch (iter_data->second) {
411 case PCL_plane_estimation_method:
412 m_depthNormalPclPlaneEstimationMethod = dataNode.text().as_int();
413 PCL_plane_estimation_method_node =
true;
416 case PCL_plane_estimation_ransac_max_iter:
417 m_depthNormalPclPlaneEstimationRansacMaxIter = dataNode.text().as_int();
418 PCL_plane_estimation_ransac_max_iter_node =
true;
421 case PCL_plane_estimation_ransac_threshold:
422 m_depthNormalPclPlaneEstimationRansacThreshold = dataNode.text().as_double();
423 PCL_plane_estimation_ransac_threshold_node =
true;
434 if (!PCL_plane_estimation_method_node)
435 std::cout <<
"depth normal : PCL_plane_estimation : method : " << m_depthNormalPclPlaneEstimationMethod
436 <<
" (default)" << std::endl;
438 std::cout <<
"depth normal : PCL_plane_estimation : method : " << m_depthNormalPclPlaneEstimationMethod
441 if (!PCL_plane_estimation_ransac_max_iter_node)
442 std::cout <<
"depth normal : PCL_plane_estimation : max_iter : " << m_depthNormalPclPlaneEstimationRansacMaxIter
443 <<
" (default)" << std::endl;
445 std::cout <<
"depth normal : PCL_plane_estimation : max_iter : " << m_depthNormalPclPlaneEstimationRansacMaxIter
448 if (!PCL_plane_estimation_ransac_threshold_node)
449 std::cout <<
"depth normal : PCL_plane_estimation : ransac_threshold : "
450 << m_depthNormalPclPlaneEstimationRansacThreshold <<
" (default)" << std::endl;
452 std::cout <<
"depth normal : PCL_plane_estimation : ransac_threshold : "
453 << m_depthNormalPclPlaneEstimationRansacThreshold << std::endl;
462 void read_depth_normal_sampling_step(
const pugi::xml_node &node)
464 bool sampling_step_X_node =
false;
465 bool sampling_step_Y_node =
false;
467 for (pugi::xml_node dataNode = node.first_child(); dataNode; dataNode = dataNode.next_sibling()) {
468 if (dataNode.type() == pugi::node_element) {
469 std::map<std::string, int>::const_iterator iter_data = m_nodeMap.find(dataNode.name());
470 if (iter_data != m_nodeMap.end()) {
471 switch (iter_data->second) {
472 case depth_sampling_step_X:
473 m_depthNormalSamplingStepX = dataNode.text().as_uint();
474 sampling_step_X_node =
true;
477 case depth_sampling_step_Y:
478 m_depthNormalSamplingStepY = dataNode.text().as_uint();
479 sampling_step_Y_node =
true;
490 if (!sampling_step_X_node)
491 std::cout <<
"depth normal : sampling_step : step_X : " << m_depthNormalSamplingStepX <<
" (default)"
494 std::cout <<
"depth normal : sampling_step : step_X : " << m_depthNormalSamplingStepX << std::endl;
496 if (!sampling_step_Y_node)
497 std::cout <<
"depth normal : sampling_step : step_Y : " << m_depthNormalSamplingStepY <<
" (default)"
500 std::cout <<
"depth normal : sampling_step : step_Y : " << m_depthNormalSamplingStepY << std::endl;
509 void read_depth_dense(
const pugi::xml_node &node)
511 bool sampling_step_node =
false;
513 for (pugi::xml_node dataNode = node.first_child(); dataNode; dataNode = dataNode.next_sibling()) {
514 if (dataNode.type() == pugi::node_element) {
515 std::map<std::string, int>::const_iterator iter_data = m_nodeMap.find(dataNode.name());
516 if (iter_data != m_nodeMap.end()) {
517 switch (iter_data->second) {
518 case depth_dense_sampling_step:
519 read_depth_dense_sampling_step(dataNode);
520 sampling_step_node =
true;
530 if (!sampling_step_node && m_verbose) {
531 std::cout <<
"depth dense : sampling_step : step_X " << m_depthDenseSamplingStepX <<
" (default)" << std::endl;
532 std::cout <<
"depth dense : sampling_step : step_Y " << m_depthDenseSamplingStepY <<
" (default)" << std::endl;
541 void read_depth_dense_sampling_step(
const pugi::xml_node &node)
543 bool sampling_step_X_node =
false;
544 bool sampling_step_Y_node =
false;
546 for (pugi::xml_node dataNode = node.first_child(); dataNode; dataNode = dataNode.next_sibling()) {
547 if (dataNode.type() == pugi::node_element) {
548 std::map<std::string, int>::const_iterator iter_data = m_nodeMap.find(dataNode.name());
549 if (iter_data != m_nodeMap.end()) {
550 switch (iter_data->second) {
551 case depth_dense_sampling_step_X:
552 m_depthDenseSamplingStepX = dataNode.text().as_uint();
553 sampling_step_X_node =
true;
556 case depth_dense_sampling_step_Y:
557 m_depthDenseSamplingStepY = dataNode.text().as_uint();
558 sampling_step_Y_node =
true;
569 if (!sampling_step_X_node)
570 std::cout <<
"depth dense : sampling_step : step_X : " << m_depthDenseSamplingStepX <<
" (default)"
573 std::cout <<
"depth dense : sampling_step : step_X : " << m_depthDenseSamplingStepX << std::endl;
575 if (!sampling_step_Y_node)
576 std::cout <<
"depth dense : sampling_step : step_Y : " << m_depthDenseSamplingStepY <<
" (default)"
579 std::cout <<
"depth dense : sampling_step : step_Y : " << m_depthDenseSamplingStepY << std::endl;
588 void read_ecm(
const pugi::xml_node &node)
590 bool mask_node =
false;
591 bool range_node =
false;
592 bool contrast_node =
false;
593 bool sample_node =
false;
595 for (pugi::xml_node dataNode = node.first_child(); dataNode; dataNode = dataNode.next_sibling()) {
596 if (dataNode.type() == pugi::node_element) {
597 std::map<std::string, int>::const_iterator iter_data = m_nodeMap.find(dataNode.name());
598 if (iter_data != m_nodeMap.end()) {
599 switch (iter_data->second) {
601 read_ecm_mask(dataNode);
606 read_ecm_range(dataNode);
611 read_ecm_contrast(dataNode);
612 contrast_node =
true;
616 read_ecm_sample(dataNode);
629 std::cout <<
"me : mask : size : " << m_ecm.getMaskSize() <<
" (default)" << std::endl;
630 std::cout <<
"me : mask : nb_mask : " << m_ecm.getMaskNumber() <<
" (default)" << std::endl;
634 std::cout <<
"me : range : tracking : " << m_ecm.getRange() <<
" (default)" << std::endl;
637 if (!contrast_node) {
638 std::cout <<
"me : contrast : threshold type " << m_ecm.getLikelihoodThresholdType() <<
" (default)" << std::endl;
639 std::cout <<
"me : contrast : threshold " << m_ecm.getThreshold() <<
" (default)" << std::endl;
640 std::cout <<
"me : contrast : mu1 " << m_ecm.getMu1() <<
" (default)" << std::endl;
641 std::cout <<
"me : contrast : mu2 " << m_ecm.getMu2() <<
" (default)" << std::endl;
645 std::cout <<
"me : sample : sample_step : " << m_ecm.getSampleStep() <<
" (default)" << std::endl;
655 void read_ecm_contrast(
const pugi::xml_node &node)
657 bool edge_threshold_type_node =
false;
658 bool edge_threshold_node =
false;
659 bool edge_min_node =
false;
660 bool edge_ratio_node =
false;
661 bool mu1_node =
false;
662 bool mu2_node =
false;
666 double d_edge_threshold = m_ecm.getThreshold();
667 double d_edge_min_threshold = m_ecm.getMinThreshold();
668 double d_edge_thresh_ratio = m_ecm.getThresholdMarginRatio();
669 double d_mu1 = m_ecm.getMu1();
670 double d_mu2 = m_ecm.getMu2();
672 for (pugi::xml_node dataNode = node.first_child(); dataNode; dataNode = dataNode.next_sibling()) {
673 if (dataNode.type() == pugi::node_element) {
674 std::map<std::string, int>::const_iterator iter_data = m_nodeMap.find(dataNode.name());
675 if (iter_data != m_nodeMap.end()) {
676 switch (iter_data->second) {
677 case edge_threshold_type:
679 edge_threshold_type_node =
true;
683 d_edge_threshold = dataNode.text().as_int();
684 edge_threshold_node =
true;
687 case edge_threshold_ratio:
688 d_edge_thresh_ratio = dataNode.text().as_double();
689 edge_ratio_node =
true;
692 case edge_min_threshold:
693 d_edge_min_threshold = dataNode.text().as_double();
694 edge_min_node =
true;
698 d_mu1 = dataNode.text().as_double();
703 d_mu2 = dataNode.text().as_double();
716 m_ecm.setLikelihoodThresholdType(d_edge_threshold_type);
717 m_ecm.setThreshold(d_edge_threshold);
718 m_ecm.setThresholdMarginRatio(d_edge_thresh_ratio);
719 m_ecm.setMinThreshold(d_edge_min_threshold);
722 if (!edge_threshold_type_node) {
723 std::cout <<
"me : contrast : threshold type " << m_ecm.getLikelihoodThresholdType() <<
" (default)" << std::endl;
726 std::cout <<
"me : contrast : threshold type " << m_ecm.getLikelihoodThresholdType() << std::endl;
729 if (!edge_threshold_node) {
730 std::cout <<
"me : contrast : threshold " << m_ecm.getThreshold() <<
" (default)" << std::endl;
733 std::cout <<
"me : contrast : threshold " << m_ecm.getThreshold() << std::endl;
736 if (!edge_min_node) {
737 std::cout <<
"me : contrast : min threshold " << m_ecm.getMinThreshold() <<
" (default)" << std::endl;
740 std::cout <<
"me : contrast : min threshold " << m_ecm.getMinThreshold() << std::endl;
743 if (!edge_ratio_node) {
744 std::cout <<
"me : contrast : threshold margin ratio " << m_ecm.getThresholdMarginRatio() <<
" (default)" << std::endl;
747 std::cout <<
"me : contrast : threshold margin ratio " << m_ecm.getThresholdMarginRatio() << std::endl;
751 std::cout <<
"me : contrast : mu1 " << m_ecm.getMu1() <<
" (default)" << std::endl;
754 std::cout <<
"me : contrast : mu1 " << m_ecm.getMu1() << std::endl;
758 std::cout <<
"me : contrast : mu2 " << m_ecm.getMu2() <<
" (default)" << std::endl;
761 std::cout <<
"me : contrast : mu2 " << m_ecm.getMu2() << std::endl;
771 void read_ecm_mask(
const pugi::xml_node &node)
773 bool size_node =
false;
774 bool nb_mask_node =
false;
777 unsigned int d_size = m_ecm.getMaskSize();
778 unsigned int d_nb_mask = m_ecm.getMaskNumber();
780 for (pugi::xml_node dataNode = node.first_child(); dataNode; dataNode = dataNode.next_sibling()) {
781 if (dataNode.type() == pugi::node_element) {
782 std::map<std::string, int>::const_iterator iter_data = m_nodeMap.find(dataNode.name());
783 if (iter_data != m_nodeMap.end()) {
784 switch (iter_data->second) {
786 d_size = dataNode.text().as_uint();
791 d_nb_mask = dataNode.text().as_uint();
802 m_ecm.setMaskSize(d_size);
807 "parameter should be different "
808 "from zero in xml file"));
809 m_ecm.setMaskNumber(d_nb_mask);
813 std::cout <<
"me : mask : size : " << m_ecm.getMaskSize() <<
" (default)" << std::endl;
815 std::cout <<
"me : mask : size : " << m_ecm.getMaskSize() << std::endl;
818 std::cout <<
"me : mask : nb_mask : " << m_ecm.getMaskNumber() <<
" (default)" << std::endl;
820 std::cout <<
"me : mask : nb_mask : " << m_ecm.getMaskNumber() << std::endl;
829 void read_ecm_range(
const pugi::xml_node &node)
831 bool tracking_node =
false;
832 bool init_node =
false;
835 unsigned int m_range_tracking = m_ecm.getRange();
838 for (pugi::xml_node dataNode = node.first_child(); dataNode; dataNode = dataNode.next_sibling()) {
839 if (dataNode.type() == pugi::node_element) {
840 std::map<std::string, int>::const_iterator iter_data = m_nodeMap.find(dataNode.name());
841 if (iter_data != m_nodeMap.end()) {
842 switch (iter_data->second) {
844 m_range_tracking = dataNode.text().as_uint();
845 tracking_node =
true;
848 initRange = dataNode.text().as_int();
849 tracking_node =
true;
859 m_ecm.setRange(m_range_tracking);
860 m_ecm.setInitRange(initRange);
863 if (!tracking_node) {
864 std::cout <<
"me : range : tracking : " << m_ecm.getRange() <<
" (default)" << std::endl;
867 std::cout <<
"me : range : tracking : " << m_ecm.getRange() << std::endl;
870 std::cout <<
"me : range : init range : " << m_ecm.getInitRange() <<
" (default)" << std::endl;
873 std::cout <<
"me : range : init range : " << initRange << std::endl;
883 void read_ecm_sample(
const pugi::xml_node &node)
885 bool step_node =
false;
888 double d_stp = m_ecm.getSampleStep();
890 for (pugi::xml_node dataNode = node.first_child(); dataNode; dataNode = dataNode.next_sibling()) {
891 if (dataNode.type() == pugi::node_element) {
892 std::map<std::string, int>::const_iterator iter_data = m_nodeMap.find(dataNode.name());
893 if (iter_data != m_nodeMap.end()) {
894 switch (iter_data->second) {
896 d_stp = dataNode.text().as_int();
907 m_ecm.setSampleStep(d_stp);
911 std::cout <<
"me : sample : sample_step : " << m_ecm.getSampleStep() <<
" (default)" << std::endl;
913 std::cout <<
"me : sample : sample_step : " << m_ecm.getSampleStep() << std::endl;
922 void read_face(
const pugi::xml_node &node)
924 bool angle_appear_node =
false;
925 bool angle_disappear_node =
false;
926 bool near_clipping_node =
false;
927 bool far_clipping_node =
false;
928 bool fov_clipping_node =
false;
929 m_hasNearClipping =
false;
930 m_hasFarClipping =
false;
932 for (pugi::xml_node dataNode = node.first_child(); dataNode; dataNode = dataNode.next_sibling()) {
933 if (dataNode.type() == pugi::node_element) {
934 std::map<std::string, int>::const_iterator iter_data = m_nodeMap.find(dataNode.name());
935 if (iter_data != m_nodeMap.end()) {
936 switch (iter_data->second) {
938 m_angleAppear = dataNode.text().as_double();
939 angle_appear_node =
true;
942 case angle_disappear:
943 m_angleDisappear = dataNode.text().as_double();
944 angle_disappear_node =
true;
948 m_nearClipping = dataNode.text().as_double();
949 m_hasNearClipping =
true;
950 near_clipping_node =
true;
954 m_farClipping = dataNode.text().as_double();
955 m_hasFarClipping =
true;
956 far_clipping_node =
true;
960 if (dataNode.text().as_int())
961 m_fovClipping =
true;
963 m_fovClipping =
false;
964 fov_clipping_node =
true;
975 if (!angle_appear_node)
976 std::cout <<
"face : Angle Appear : " << m_angleAppear <<
" (default)" << std::endl;
978 std::cout <<
"face : Angle Appear : " << m_angleAppear << std::endl;
980 if (!angle_disappear_node)
981 std::cout <<
"face : Angle Disappear : " << m_angleDisappear <<
" (default)" << std::endl;
983 std::cout <<
"face : Angle Disappear : " << m_angleDisappear << std::endl;
985 if (near_clipping_node)
986 std::cout <<
"face : Near Clipping : " << m_nearClipping << std::endl;
988 if (far_clipping_node)
989 std::cout <<
"face : Far Clipping : " << m_farClipping << std::endl;
991 if (fov_clipping_node) {
993 std::cout <<
"face : Fov Clipping : True" << std::endl;
995 std::cout <<
"face : Fov Clipping : False" << std::endl;
1005 void read_klt(
const pugi::xml_node &node)
1007 bool mask_border_node =
false;
1008 bool max_features_node =
false;
1009 bool window_size_node =
false;
1010 bool quality_node =
false;
1011 bool min_distance_node =
false;
1012 bool harris_node =
false;
1013 bool size_block_node =
false;
1014 bool pyramid_lvl_node =
false;
1016 for (pugi::xml_node dataNode = node.first_child(); dataNode; dataNode = dataNode.next_sibling()) {
1017 if (dataNode.type() == pugi::node_element) {
1018 std::map<std::string, int>::const_iterator iter_data = m_nodeMap.find(dataNode.name());
1019 if (iter_data != m_nodeMap.end()) {
1020 switch (iter_data->second) {
1022 m_kltMaskBorder = dataNode.text().as_uint();
1023 mask_border_node =
true;
1027 m_kltMaxFeatures = dataNode.text().as_uint();
1028 max_features_node =
true;
1032 m_kltWinSize = dataNode.text().as_uint();
1033 window_size_node =
true;
1037 m_kltQualityValue = dataNode.text().as_double();
1038 quality_node =
true;
1042 m_kltMinDist = dataNode.text().as_double();
1043 min_distance_node =
true;
1047 m_kltHarrisParam = dataNode.text().as_double();
1052 m_kltBlockSize = dataNode.text().as_uint();
1053 size_block_node =
true;
1057 m_kltPyramidLevels = dataNode.text().as_uint();
1058 pyramid_lvl_node =
true;
1069 if (!mask_border_node)
1070 std::cout <<
"klt : Mask Border : " << m_kltMaskBorder <<
" (default)" << std::endl;
1072 std::cout <<
"klt : Mask Border : " << m_kltMaskBorder << std::endl;
1074 if (!max_features_node)
1075 std::cout <<
"klt : Max Features : " << m_kltMaxFeatures <<
" (default)" << std::endl;
1077 std::cout <<
"klt : Max Features : " << m_kltMaxFeatures << std::endl;
1079 if (!window_size_node)
1080 std::cout <<
"klt : Windows Size : " << m_kltWinSize <<
" (default)" << std::endl;
1082 std::cout <<
"klt : Windows Size : " << m_kltWinSize << std::endl;
1085 std::cout <<
"klt : Quality : " << m_kltQualityValue <<
" (default)" << std::endl;
1087 std::cout <<
"klt : Quality : " << m_kltQualityValue << std::endl;
1089 if (!min_distance_node)
1090 std::cout <<
"klt : Min Distance : " << m_kltMinDist <<
" (default)" << std::endl;
1092 std::cout <<
"klt : Min Distance : " << m_kltMinDist << std::endl;
1095 std::cout <<
"klt : Harris Parameter : " << m_kltHarrisParam <<
" (default)" << std::endl;
1097 std::cout <<
"klt : Harris Parameter : " << m_kltHarrisParam << std::endl;
1099 if (!size_block_node)
1100 std::cout <<
"klt : Block Size : " << m_kltBlockSize <<
" (default)" << std::endl;
1102 std::cout <<
"klt : Block Size : " << m_kltBlockSize << std::endl;
1104 if (!pyramid_lvl_node)
1105 std::cout <<
"klt : Pyramid Levels : " << m_kltPyramidLevels <<
" (default)" << std::endl;
1107 std::cout <<
"klt : Pyramid Levels : " << m_kltPyramidLevels << std::endl;
1111 void read_lod(
const pugi::xml_node &node)
1113 bool use_lod_node =
false;
1114 bool min_line_length_threshold_node =
false;
1115 bool min_polygon_area_threshold_node =
false;
1117 for (pugi::xml_node dataNode = node.first_child(); dataNode; dataNode = dataNode.next_sibling()) {
1118 if (dataNode.type() == pugi::node_element) {
1119 std::map<std::string, int>::const_iterator iter_data = m_nodeMap.find(dataNode.name());
1120 if (iter_data != m_nodeMap.end()) {
1121 switch (iter_data->second) {
1123 m_useLod = (dataNode.text().as_int() != 0);
1124 use_lod_node =
true;
1127 case min_line_length_threshold:
1128 m_minLineLengthThreshold = dataNode.text().as_double();
1129 min_line_length_threshold_node =
true;
1132 case min_polygon_area_threshold:
1133 m_minPolygonAreaThreshold = dataNode.text().as_double();
1134 min_polygon_area_threshold_node =
true;
1146 std::cout <<
"lod : use lod : " << m_useLod <<
" (default)" << std::endl;
1148 std::cout <<
"lod : use lod : " << m_useLod << std::endl;
1150 if (!min_line_length_threshold_node)
1151 std::cout <<
"lod : min line length threshold : " << m_minLineLengthThreshold <<
" (default)" << std::endl;
1153 std::cout <<
"lod : min line length threshold : " << m_minLineLengthThreshold << std::endl;
1155 if (!min_polygon_area_threshold_node)
1156 std::cout <<
"lod : min polygon area threshold : " << m_minPolygonAreaThreshold <<
" (default)" << std::endl;
1158 std::cout <<
"lod : min polygon area threshold : " << m_minPolygonAreaThreshold << std::endl;
1162 void read_projection_error(
const pugi::xml_node &node)
1164 bool step_node =
false;
1165 bool kernel_size_node =
false;
1168 double d_stp = m_projectionErrorMe.getSampleStep();
1169 std::string kernel_size_str;
1171 for (pugi::xml_node dataNode = node.first_child(); dataNode; dataNode = dataNode.next_sibling()) {
1172 if (dataNode.type() == pugi::node_element) {
1173 std::map<std::string, int>::const_iterator iter_data = m_nodeMap.find(dataNode.name());
1174 if (iter_data != m_nodeMap.end()) {
1175 switch (iter_data->second) {
1176 case projection_error_sample_step:
1177 d_stp = dataNode.text().as_int();
1181 case projection_error_kernel_size:
1182 kernel_size_str = dataNode.text().as_string();
1183 kernel_size_node =
true;
1193 m_projectionErrorMe.setSampleStep(d_stp);
1195 if (kernel_size_str ==
"3x3") {
1196 m_projectionErrorKernelSize = 1;
1198 else if (kernel_size_str ==
"5x5") {
1199 m_projectionErrorKernelSize = 2;
1201 else if (kernel_size_str ==
"7x7") {
1202 m_projectionErrorKernelSize = 3;
1204 else if (kernel_size_str ==
"9x9") {
1205 m_projectionErrorKernelSize = 4;
1207 else if (kernel_size_str ==
"11x11") {
1208 m_projectionErrorKernelSize = 5;
1210 else if (kernel_size_str ==
"13x13") {
1211 m_projectionErrorKernelSize = 6;
1213 else if (kernel_size_str ==
"15x15") {
1214 m_projectionErrorKernelSize = 7;
1217 std::cerr <<
"Unsupported kernel size." << std::endl;
1222 std::cout <<
"projection_error : sample_step : " << m_projectionErrorMe.getSampleStep() <<
" (default)"
1225 std::cout <<
"projection_error : sample_step : " << m_projectionErrorMe.getSampleStep() << std::endl;
1227 if (!kernel_size_node)
1228 std::cout <<
"projection_error : kernel_size : " << m_projectionErrorKernelSize * 2 + 1 <<
"x"
1229 << m_projectionErrorKernelSize * 2 + 1 <<
" (default)" << std::endl;
1231 std::cout <<
"projection_error : kernel_size : " << kernel_size_str << std::endl;
1240 void read_sample_deprecated(
const pugi::xml_node &node)
1242 bool step_node =
false;
1246 double d_stp = m_ecm.getSampleStep();
1248 for (pugi::xml_node dataNode = node.first_child(); dataNode; dataNode = dataNode.next_sibling()) {
1249 if (dataNode.type() == pugi::node_element) {
1250 std::map<std::string, int>::const_iterator iter_data = m_nodeMap.find(dataNode.name());
1251 if (iter_data != m_nodeMap.end()) {
1252 switch (iter_data->second) {
1254 d_stp = dataNode.text().as_int();
1265 m_ecm.setSampleStep(d_stp);
1269 std::cout <<
"[DEPRECATED] sample : sample_step : " << m_ecm.getSampleStep() <<
" (default)" << std::endl;
1271 std::cout <<
"[DEPRECATED] sample : sample_step : " << m_ecm.getSampleStep() << std::endl;
1273 std::cout <<
" WARNING : This node (sample) is deprecated." << std::endl;
1274 std::cout <<
" It should be moved in the ecm node (me : sample)." << std::endl;
1278 double getAngleAppear()
const {
return m_angleAppear; }
1279 double getAngleDisappear()
const {
return m_angleDisappear; }
1281 void getCameraParameters(vpCameraParameters &cam)
const {
cam = m_cam; }
1283 void getEdgeMe(vpMe &moving_edge)
const { moving_edge = m_ecm; }
1285 unsigned int getDepthDenseSamplingStepX()
const {
return m_depthDenseSamplingStepX; }
1286 unsigned int getDepthDenseSamplingStepY()
const {
return m_depthDenseSamplingStepY; }
1290 return m_depthNormalFeatureEstimationMethod;
1292 int getDepthNormalPclPlaneEstimationMethod()
const {
return m_depthNormalPclPlaneEstimationMethod; }
1293 int getDepthNormalPclPlaneEstimationRansacMaxIter()
const {
return m_depthNormalPclPlaneEstimationRansacMaxIter; }
1294 double getDepthNormalPclPlaneEstimationRansacThreshold()
const
1296 return m_depthNormalPclPlaneEstimationRansacThreshold;
1298 unsigned int getDepthNormalSamplingStepX()
const {
return m_depthNormalSamplingStepX; }
1299 unsigned int getDepthNormalSamplingStepY()
const {
return m_depthNormalSamplingStepY; }
1301 double getFarClippingDistance()
const {
return m_farClipping; }
1302 bool getFovClipping()
const {
return m_fovClipping; }
1304 unsigned int getKltBlockSize()
const {
return m_kltBlockSize; }
1305 double getKltHarrisParam()
const {
return m_kltHarrisParam; }
1306 unsigned int getKltMaskBorder()
const {
return m_kltMaskBorder; }
1307 unsigned int getKltMaxFeatures()
const {
return m_kltMaxFeatures; }
1308 double getKltMinDistance()
const {
return m_kltMinDist; }
1309 unsigned int getKltPyramidLevels()
const {
return m_kltPyramidLevels; }
1310 double getKltQuality()
const {
return m_kltQualityValue; }
1311 unsigned int getKltWindowSize()
const {
return m_kltWinSize; }
1313 bool getLodState()
const {
return m_useLod; }
1314 double getLodMinLineLengthThreshold()
const {
return m_minLineLengthThreshold; }
1315 double getLodMinPolygonAreaThreshold()
const {
return m_minPolygonAreaThreshold; }
1317 double getNearClippingDistance()
const {
return m_nearClipping; }
1319 void getProjectionErrorMe(vpMe &me)
const { me = m_projectionErrorMe; }
1320 unsigned int getProjectionErrorKernelSize()
const {
return m_projectionErrorKernelSize; }
1322 bool hasFarClippingDistance()
const {
return m_hasFarClipping; }
1323 bool hasNearClippingDistance()
const {
return m_hasNearClipping; }
1325 void setAngleAppear(
const double &aappear) { m_angleAppear = aappear; }
1326 void setAngleDisappear(
const double &adisappear) { m_angleDisappear = adisappear; }
1328 void setCameraParameters(
const vpCameraParameters &cam) { m_cam =
cam; }
1330 void setDepthDenseSamplingStepX(
unsigned int stepX) { m_depthDenseSamplingStepX = stepX; }
1331 void setDepthDenseSamplingStepY(
unsigned int stepY) { m_depthDenseSamplingStepY = stepY; }
1334 m_depthNormalFeatureEstimationMethod = method;
1336 void setDepthNormalPclPlaneEstimationMethod(
int method) { m_depthNormalPclPlaneEstimationMethod = method; }
1337 void setDepthNormalPclPlaneEstimationRansacMaxIter(
int maxIter)
1339 m_depthNormalPclPlaneEstimationRansacMaxIter = maxIter;
1341 void setDepthNormalPclPlaneEstimationRansacThreshold(
double threshold)
1343 m_depthNormalPclPlaneEstimationRansacThreshold = threshold;
1345 void setDepthNormalSamplingStepX(
unsigned int stepX) { m_depthNormalSamplingStepX = stepX; }
1346 void setDepthNormalSamplingStepY(
unsigned int stepY) { m_depthNormalSamplingStepY = stepY; }
1348 void setEdgeMe(
const vpMe &moving_edge) { m_ecm = moving_edge; }
1350 void setFarClippingDistance(
const double &fclip) { m_farClipping = fclip; }
1352 void setKltBlockSize(
const unsigned int &bs) { m_kltBlockSize = bs; }
1353 void setKltHarrisParam(
const double &hp) { m_kltHarrisParam = hp; }
1354 void setKltMaskBorder(
const unsigned int &mb) { m_kltMaskBorder = mb; }
1355 void setKltMaxFeatures(
const unsigned int &mF) { m_kltMaxFeatures = mF; }
1356 void setKltMinDistance(
const double &mD) { m_kltMinDist = mD; }
1357 void setKltPyramidLevels(
const unsigned int &pL) { m_kltPyramidLevels = pL; }
1358 void setKltQuality(
const double &q) { m_kltQualityValue = q; }
1359 void setKltWindowSize(
const unsigned int &w) { m_kltWinSize =
w; }
1361 void setNearClippingDistance(
const double &nclip) { m_nearClipping = nclip; }
1363 void setProjectionErrorMe(
const vpMe &me) { m_projectionErrorMe = me; }
1364 void setProjectionErrorKernelSize(
const unsigned int &kernel_size) { m_projectionErrorKernelSize = kernel_size; }
1366 void setVerbose(
bool verbose) { m_verbose = verbose; }
1372 vpCameraParameters m_cam;
1374 double m_angleAppear;
1376 double m_angleDisappear;
1378 bool m_hasNearClipping;
1380 double m_nearClipping;
1382 bool m_hasFarClipping;
1384 double m_farClipping;
1391 double m_minLineLengthThreshold;
1393 double m_minPolygonAreaThreshold;
1399 unsigned int m_kltMaskBorder;
1401 unsigned int m_kltMaxFeatures;
1403 unsigned int m_kltWinSize;
1405 double m_kltQualityValue;
1407 double m_kltMinDist;
1409 double m_kltHarrisParam;
1411 unsigned int m_kltBlockSize;
1413 unsigned int m_kltPyramidLevels;
1418 int m_depthNormalPclPlaneEstimationMethod;
1420 int m_depthNormalPclPlaneEstimationRansacMaxIter;
1422 double m_depthNormalPclPlaneEstimationRansacThreshold;
1424 unsigned int m_depthNormalSamplingStepX;
1426 unsigned int m_depthNormalSamplingStepY;
1429 unsigned int m_depthDenseSamplingStepX;
1431 unsigned int m_depthDenseSamplingStepY;
1434 vpMe m_projectionErrorMe;
1436 unsigned int m_projectionErrorKernelSize;
1437 std::map<std::string, int> m_nodeMap;
1441 enum vpDataToParseMb
1462 min_line_length_threshold,
1463 min_polygon_area_threshold,
1475 edge_threshold_ratio,
1476 edge_threshold_type,
1493 feature_estimation_method,
1494 PCL_plane_estimation,
1495 PCL_plane_estimation_method,
1496 PCL_plane_estimation_ransac_max_iter,
1497 PCL_plane_estimation_ransac_threshold,
1498 depth_sampling_step,
1499 depth_sampling_step_X,
1500 depth_sampling_step_Y,
1503 depth_dense_sampling_step,
1504 depth_dense_sampling_step_X,
1505 depth_dense_sampling_step_Y,
1508 projection_error_sample_step,
1509 projection_error_kernel_size
1518 m_nodeMap[
"conf"] = conf;
1520 m_nodeMap[
"face"] = face;
1521 m_nodeMap[
"angle_appear"] = angle_appear;
1522 m_nodeMap[
"angle_disappear"] = angle_disappear;
1523 m_nodeMap[
"near_clipping"] = near_clipping;
1524 m_nodeMap[
"far_clipping"] = far_clipping;
1525 m_nodeMap[
"fov_clipping"] = fov_clipping;
1527 m_nodeMap[
"camera"] = camera;
1528 m_nodeMap[
"height"] =
height;
1529 m_nodeMap[
"width"] =
width;
1530 m_nodeMap[
"u0"] = u0;
1531 m_nodeMap[
"v0"] = v0;
1532 m_nodeMap[
"px"] = px;
1533 m_nodeMap[
"py"] = py;
1535 m_nodeMap[
"lod"] = lod;
1536 m_nodeMap[
"use_lod"] = use_lod;
1537 m_nodeMap[
"min_line_length_threshold"] = min_line_length_threshold;
1538 m_nodeMap[
"min_polygon_area_threshold"] = min_polygon_area_threshold;
1540 m_nodeMap[
"ecm"] = ecm;
1541 m_nodeMap[
"mask"] = mask;
1542 m_nodeMap[
"size"] = size;
1543 m_nodeMap[
"nb_mask"] = nb_mask;
1544 m_nodeMap[
"init_range"] = init_range;
1545 m_nodeMap[
"range"] = range;
1546 m_nodeMap[
"tracking"] = tracking;
1547 m_nodeMap[
"contrast"] = contrast;
1548 m_nodeMap[
"edge_threshold_type"] = edge_threshold_type;
1549 m_nodeMap[
"edge_threshold"] = edge_threshold;
1550 m_nodeMap[
"edge_min_threshold"] = edge_min_threshold;
1551 m_nodeMap[
"edge_threshold_margin_ratio"] = edge_threshold_ratio;
1552 m_nodeMap[
"mu1"] = mu1;
1553 m_nodeMap[
"mu2"] = mu2;
1554 m_nodeMap[
"sample"] = sample;
1555 m_nodeMap[
"step"] =
step;
1557 m_nodeMap[
"klt"] = klt;
1558 m_nodeMap[
"mask_border"] = mask_border;
1559 m_nodeMap[
"max_features"] = max_features;
1560 m_nodeMap[
"window_size"] = window_size;
1561 m_nodeMap[
"quality"] = quality;
1562 m_nodeMap[
"min_distance"] = min_distance;
1563 m_nodeMap[
"harris"] = harris;
1564 m_nodeMap[
"size_block"] = size_block;
1565 m_nodeMap[
"pyramid_lvl"] = pyramid_lvl;
1567 m_nodeMap[
"depth_normal"] = depth_normal;
1568 m_nodeMap[
"feature_estimation_method"] = feature_estimation_method;
1569 m_nodeMap[
"PCL_plane_estimation"] = PCL_plane_estimation;
1570 m_nodeMap[
"method"] = PCL_plane_estimation_method;
1571 m_nodeMap[
"ransac_max_iter"] = PCL_plane_estimation_ransac_max_iter;
1572 m_nodeMap[
"ransac_threshold"] = PCL_plane_estimation_ransac_threshold;
1573 m_nodeMap[
"sampling_step"] = depth_sampling_step;
1574 m_nodeMap[
"step_X"] = depth_sampling_step_X;
1575 m_nodeMap[
"step_Y"] = depth_sampling_step_Y;
1577 m_nodeMap[
"depth_dense"] = depth_dense;
1578 m_nodeMap[
"sampling_step"] = depth_dense_sampling_step;
1579 m_nodeMap[
"step_X"] = depth_dense_sampling_step_X;
1580 m_nodeMap[
"step_Y"] = depth_dense_sampling_step_Y;
1582 m_nodeMap[
"projection_error"] = projection_error;
1583 m_nodeMap[
"sample_step"] = projection_error_sample_step;
1584 m_nodeMap[
"kernel_size"] = projection_error_kernel_size;
1588 static bool m_call_setlocale;
1591bool vpMbtXmlGenericParser::Impl::m_call_setlocale =
true;
1639 return m_impl->getDepthNormalFeatureEstimationMethod();
1647 return m_impl->getDepthNormalPclPlaneEstimationMethod();
1655 return m_impl->getDepthNormalPclPlaneEstimationRansacMaxIter();
1663 return m_impl->getDepthNormalPclPlaneEstimationRansacThreshold();
1671 return m_impl->getDepthNormalSamplingStepX();
1679 return m_impl->getDepthNormalSamplingStepY();
1759 return m_impl->getProjectionErrorKernelSize();
1804 m_impl->setDepthDenseSamplingStepX(stepX);
1814 m_impl->setDepthDenseSamplingStepY(stepY);
1825 m_impl->setDepthNormalFeatureEstimationMethod(method);
1835 m_impl->setDepthNormalPclPlaneEstimationMethod(method);
1845 m_impl->setDepthNormalPclPlaneEstimationRansacMaxIter(maxIter);
1855 m_impl->setDepthNormalPclPlaneEstimationRansacThreshold(threshold);
1865 m_impl->setDepthNormalSamplingStepX(stepX);
1875 m_impl->setDepthNormalSamplingStepY(stepY);
1969 m_impl->setProjectionErrorKernelSize(size);
1979#elif !defined(VISP_BUILD_SHARED_LIBS)
1981void dummy_vpMbtXmlGenericParser() { }
Generic class defining intrinsic camera parameters.
@ badValue
Used to indicate that a value is not in the allowed range.
void setDepthNormalPclPlaneEstimationRansacMaxIter(int maxIter)
int getDepthNormalPclPlaneEstimationRansacMaxIter() const
unsigned int getKltMaxFeatures() const
void setProjectionErrorMe(const vpMe &me)
unsigned int getDepthNormalSamplingStepX() const
unsigned int getProjectionErrorKernelSize() const
void setKltMinDistance(const double &mD)
unsigned int getKltBlockSize() const
void getCameraParameters(vpCameraParameters &cam) const
vpMbtXmlGenericParser(int type=EDGE_PARSER)
void setDepthDenseSamplingStepY(unsigned int stepY)
double getAngleAppear() const
void setEdgeMe(const vpMe &ecm)
unsigned int getDepthNormalSamplingStepY() const
void setDepthNormalFeatureEstimationMethod(const vpMbtFaceDepthNormal::vpFeatureEstimationType &method)
void setKltMaskBorder(const unsigned int &mb)
vpMbtFaceDepthNormal::vpFeatureEstimationType getDepthNormalFeatureEstimationMethod() const
void getEdgeMe(vpMe &ecm) const
double getLodMinLineLengthThreshold() const
void setDepthNormalPclPlaneEstimationMethod(int method)
void setDepthNormalSamplingStepX(unsigned int stepX)
unsigned int getKltMaskBorder() const
void setAngleDisappear(const double &adisappear)
double getKltQuality() const
double getAngleDisappear() const
void setDepthDenseSamplingStepX(unsigned int stepX)
virtual ~vpMbtXmlGenericParser()
void setProjectionErrorKernelSize(const unsigned int &size)
void setKltPyramidLevels(const unsigned int &pL)
void setKltWindowSize(const unsigned int &w)
double getKltMinDistance() const
void setKltMaxFeatures(const unsigned int &mF)
int getDepthNormalPclPlaneEstimationMethod() const
void setAngleAppear(const double &aappear)
void setKltBlockSize(const unsigned int &bs)
void setKltHarrisParam(const double &hp)
unsigned int getDepthDenseSamplingStepY() const
double getDepthNormalPclPlaneEstimationRansacThreshold() const
void parse(const std::string &filename)
double getNearClippingDistance() const
void setNearClippingDistance(const double &nclip)
void setKltQuality(const double &q)
bool hasNearClippingDistance() const
void getProjectionErrorMe(vpMe &me) const
bool hasFarClippingDistance() const
unsigned int getKltPyramidLevels() const
void setFarClippingDistance(const double &fclip)
double getKltHarrisParam() const
unsigned int getKltWindowSize() const
void setDepthNormalPclPlaneEstimationRansacThreshold(double threshold)
unsigned int getDepthDenseSamplingStepX() const
void setCameraParameters(const vpCameraParameters &cam)
double getFarClippingDistance() const
bool getFovClipping() const
double getLodMinPolygonAreaThreshold() const
void setVerbose(bool verbose)
void setDepthNormalSamplingStepY(unsigned int stepY)
vpLikelihoodThresholdType