39 #include <visp3/core/vpConfig.h> 46 #include <libxml/xmlmemory.h> 48 #include <visp3/mbt/vpMbtEdgeKltXmlParser.h> 84 std::string file = filename;
107 bool camera_node =
false;
108 bool face_node =
false;
109 bool ecm_node =
false;
110 bool klt_node =
false;
111 bool lod_node =
false;
113 for (xmlNodePtr dataNode = node->xmlChildrenNode; dataNode != NULL; dataNode = dataNode->next) {
114 if (dataNode->type == XML_ELEMENT_NODE) {
115 std::map<std::string, int>::iterator iter_data = this->
nodeMap.find((
char *)dataNode->name);
116 if (iter_data !=
nodeMap.end()) {
117 switch (iter_data->second) {
151 std::cout <<
"camera : u0 : " << this->
cam.
get_u0() <<
" (default)" << std::endl;
152 std::cout <<
"camera : v0 : " << this->
cam.
get_v0() <<
" (default)" << std::endl;
153 std::cout <<
"camera : px : " << this->
cam.
get_px() <<
" (default)" << std::endl;
154 std::cout <<
"camera : py : " << this->
cam.
get_py() <<
" (default)" << std::endl;
158 std::cout <<
"face : Angle Appear : " <<
angleAppear <<
" (default)" << std::endl;
159 std::cout <<
"face : Angle Disappear : " <<
angleDisappear <<
" (default)" << std::endl;
163 std::cout <<
"klt : Mask Border : " <<
maskBorder <<
" (default)" << std::endl;
164 std::cout <<
"klt : Max Features : " <<
maxFeatures <<
" (default)" << std::endl;
165 std::cout <<
"klt : Windows Size : " <<
winSize <<
" (default)" << std::endl;
166 std::cout <<
"klt : Quality : " <<
qualityValue <<
" (default)" << std::endl;
167 std::cout <<
"klt : Min Distance : " <<
minDist <<
" (default)" << std::endl;
168 std::cout <<
"klt : Harris Parameter : " <<
harrisParam <<
" (default)" << std::endl;
169 std::cout <<
"klt : Block Size : " <<
blockSize <<
" (default)" << std::endl;
170 std::cout <<
"klt : Pyramid Levels : " <<
pyramidLevels <<
" (default)" << std::endl;
174 std::cout <<
"ecm : mask : size : " << this->
m_ecm.
getMaskSize() <<
" (default)" << std::endl;
175 std::cout <<
"ecm : mask : nb_mask : " << this->
m_ecm.
getMaskNumber() <<
" (default)" << std::endl;
176 std::cout <<
"ecm : range : tracking : " << this->
m_ecm.
getRange() <<
" (default)" << std::endl;
177 std::cout <<
"ecm : contrast : threshold : " << this->
m_ecm.
getThreshold() <<
" (default)" << std::endl;
178 std::cout <<
"ecm : contrast : mu1 : " << this->
m_ecm.
getMu1() <<
" (default)" << std::endl;
179 std::cout <<
"ecm : contrast : mu2 : " << this->
m_ecm.
getMu2() <<
" (default)" << std::endl;
180 std::cout <<
"ecm : sample : sample_step : " << this->
m_ecm.
getSampleStep() <<
" (default)" << std::endl;
184 std::cout <<
"lod : use lod : " <<
useLod <<
" (default)" << std::endl;
190 #elif !defined(VISP_BUILD_SHARED_LIBS) 193 void dummy_vpMbtEdgeKltXmlParser(){};
unsigned int winSize
Windows size.
virtual void readMainClass(xmlDocPtr doc, xmlNodePtr node)
vpCameraParameters cam
Camera parameters.
void parse(const char *filename)
void read_lod(xmlDocPtr doc, xmlNodePtr node)
double minDist
Minimum distance between klt points.
unsigned int maskBorder
Border of the mask used on Klt points.
double angleAppear
Angle to determine if a face appeared.
error that can be emited by ViSP classes.
double minLineLengthThreshold
Minimum line length to track a segment when LOD is enabled.
double harrisParam
Harris free parameters.
unsigned int getMaskSize() const
double angleDisappear
Angle to determine if a face disappeared.
unsigned int maxFeatures
Maximum of Klt features.
void read_sample_deprecated(xmlDocPtr doc, xmlNodePtr node)
void read_camera(xmlDocPtr doc, xmlNodePtr node)
double getThreshold() const
vpMe m_ecm
Moving edges parameters.
double getSampleStep() const
virtual ~vpMbtEdgeKltXmlParser()
unsigned int pyramidLevels
Number of pyramid levels.
void read_face(xmlDocPtr doc, xmlNodePtr node)
unsigned int getMaskNumber() const
void writeMainClass(xmlNodePtr node)
unsigned int blockSize
Block size.
void read_klt(xmlDocPtr doc, xmlNodePtr node)
double qualityValue
Quality of the Klt points.
void read_ecm(xmlDocPtr doc, xmlNodePtr node)
std::map< std::string, int > nodeMap
unsigned int getRange() const
double minPolygonAreaThreshold
Minimum polygon area to track a face when LOD is enabled.
bool useLod
If true, the LOD is enabled, otherwise it is not.
void parse(const std::string &filename)