37 #include <visp3/core/vpConfig.h>
45 #include <libxml/xmlmemory.h>
47 #include <visp3/mbt/vpMbtEdgeKltXmlParser.h>
91 std::string file = filename;
116 bool camera_node =
false;
117 bool face_node =
false;
118 bool ecm_node =
false;
119 bool klt_node =
false;
120 bool lod_node =
false;
122 for(xmlNodePtr dataNode = node->xmlChildrenNode; dataNode != NULL; dataNode = dataNode->next) {
123 if(dataNode->type == XML_ELEMENT_NODE){
124 std::map<std::string, int>::iterator iter_data= this->
nodeMap.find((
char*)dataNode->name);
125 if(iter_data !=
nodeMap.end()){
126 switch (iter_data->second){
159 std::cout <<
"camera : u0 : "<< this->
cam.
get_u0() <<
" (default)" <<std::endl;
160 std::cout <<
"camera : v0 : "<< this->
cam.
get_v0() <<
" (default)" <<std::endl;
161 std::cout <<
"camera : px : "<< this->
cam.
get_px() <<
" (default)" <<std::endl;
162 std::cout <<
"camera : py : "<< this->
cam.
get_py() <<
" (default)" <<std::endl;
166 std::cout <<
"face : Angle Appear : "<<
angleAppear <<
" (default)" <<std::endl;
167 std::cout <<
"face : Angle Disappear : "<<
angleDisappear <<
" (default)" <<std::endl;
171 std::cout <<
"klt : Mask Border : "<<
maskBorder <<
" (default)" <<std::endl;
172 std::cout <<
"klt : Max Features : "<<
maxFeatures <<
" (default)" <<std::endl;
173 std::cout <<
"klt : Windows Size : "<<
winSize <<
" (default)" <<std::endl;
174 std::cout <<
"klt : Quality : "<<
qualityValue <<
" (default)" <<std::endl;
175 std::cout <<
"klt : Min Distance : "<<
minDist <<
" (default)" <<std::endl;
176 std::cout <<
"klt : Harris Parameter : "<<
harrisParam <<
" (default)" <<std::endl;
177 std::cout <<
"klt : Block Size : "<<
blockSize <<
" (default)" <<std::endl;
178 std::cout <<
"klt : Pyramid Levels : "<<
pyramidLevels <<
" (default)" <<std::endl;
182 std::cout <<
"ecm : mask : size : "<< this->
m_ecm.
getMaskSize() <<
" (default)" <<std::endl;
183 std::cout <<
"ecm : mask : nb_mask : "<< this->
m_ecm.
getMaskNumber() <<
" (default)" <<std::endl;
184 std::cout <<
"ecm : range : tracking : "<< this->
m_ecm.
getRange()<<
" (default)" <<std::endl;
185 std::cout <<
"ecm : contrast : threshold : " << this->
m_ecm.
getThreshold()<<
" (default)" <<std::endl;
186 std::cout <<
"ecm : contrast : mu1 : " << this->
m_ecm.
getMu1()<<
" (default)" <<std::endl;
187 std::cout <<
"ecm : contrast : mu2 : " << this->
m_ecm.
getMu2()<<
" (default)" <<std::endl;
188 std::cout <<
"ecm : sample : sample_step : "<< this->
m_ecm.
getSampleStep()<<
" (default)" << std::endl;
192 std::cout <<
"lod : use lod : " <<
useLod <<
" (default)" << std::endl;
198 #elif !defined(VISP_BUILD_SHARED_LIBS)
200 void dummy_vpMbtEdgeKltXmlParser() {};
unsigned int winSize
Windows size.
unsigned int getRange() const
unsigned int getMaskSize() const
virtual void readMainClass(xmlDocPtr doc, xmlNodePtr node)
vpCameraParameters cam
Camera parameters.
void parse(const char *filename)
unsigned int getMaskNumber() const
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.
double angleDisappear
Angle to determine if a face disappeared.
unsigned int maxFeatures
Maximum of Klt features.
void read_sample_deprecated(xmlDocPtr doc, xmlNodePtr node)
double getThreshold() const
void read_camera(xmlDocPtr doc, xmlNodePtr node)
vpMe m_ecm
Moving edges parameters.
virtual ~vpMbtEdgeKltXmlParser()
unsigned int pyramidLevels
Number of pyramid levels.
void read_face(xmlDocPtr doc, xmlNodePtr node)
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)
double getSampleStep() const
std::map< std::string, int > nodeMap
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)