41 #include <visp/vpConfig.h>
49 #include <libxml/xmlmemory.h>
51 #include <visp/vpMbtEdgeKltXmlParser.h>
95 std::string file = filename;
120 bool camera_node =
false;
121 bool face_node =
false;
122 bool ecm_node =
false;
123 bool sample_node =
false;
124 bool klt_node =
false;
126 for(xmlNodePtr dataNode = node->xmlChildrenNode; dataNode != NULL; dataNode = dataNode->next) {
127 if(dataNode->type == XML_ELEMENT_NODE){
128 std::map<std::string, int>::iterator iter_data= this->
nodeMap.find((
char*)dataNode->name);
129 if(iter_data !=
nodeMap.end()){
130 switch (iter_data->second){
160 std::cout <<
"camera : u0 : "<< this->
cam.
get_u0() <<
" (default)" <<std::endl;
161 std::cout <<
"camera : v0 : "<< this->
cam.
get_v0() <<
" (default)" <<std::endl;
162 std::cout <<
"camera : px : "<< this->
cam.
get_px() <<
" (default)" <<std::endl;
163 std::cout <<
"camera : py : "<< this->
cam.
get_py() <<
" (default)" <<std::endl;
167 std::cout <<
"face : Angle Appear : "<<
angleAppear <<
" (default)" <<std::endl;
168 std::cout <<
"face : Angle Disappear : "<<
angleDisappear <<
" (default)" <<std::endl;
172 std::cout <<
"klt : Mask Border : "<<
maskBorder <<
" (default)" <<std::endl;
173 std::cout <<
"klt : Max Features : "<<
maxFeatures <<
" (default)" <<std::endl;
174 std::cout <<
"klt : Windows Size : "<<
winSize <<
" (default)" <<std::endl;
175 std::cout <<
"klt : Quality : "<<
qualityValue <<
" (default)" <<std::endl;
176 std::cout <<
"klt : Min Distance : "<<
minDist <<
" (default)" <<std::endl;
177 std::cout <<
"klt : Harris Parameter : "<<
harrisParam <<
" (default)" <<std::endl;
178 std::cout <<
"klt : Block Size : "<<
blockSize <<
" (default)" <<std::endl;
179 std::cout <<
"klt : Pyramid Levels : "<<
pyramidLevels <<
" (default)" <<std::endl;
183 std::cout <<
"ecm : mask : size : "<< this->
m_ecm.
getMaskSize() <<
" (default)" <<std::endl;
184 std::cout <<
"ecm : mask : nb_mask : "<< this->
m_ecm.
getMaskNumber() <<
" (default)" <<std::endl;
185 std::cout <<
"ecm : range : tracking : "<< this->
m_ecm.
getRange()<<
" (default)" <<std::endl;
186 std::cout <<
"ecm : contrast : threshold : " << this->
m_ecm.
getThreshold()<<
" (default)" <<std::endl;
187 std::cout <<
"ecm : contrast : mu1 : " << this->
m_ecm.
getMu1()<<
" (default)" <<std::endl;
188 std::cout <<
"ecm : contrast : mu2 : " << this->
m_ecm.
getMu2()<<
" (default)" <<std::endl;
192 std::cout <<
"sample : sample_step : "<< this->
m_ecm.
getSampleStep()<<
" (default)" << std::endl;
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
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 harrisParam
Harris free parameters.
double angleDisappear
Angle to determine if a face disappeared.
unsigned int maxFeatures
Maximum of Klt features.
int getNbTotalSample() const
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)
void read_sample(xmlDocPtr doc, 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
void parse(const std::string &filename)