Visual Servoing Platform  version 3.0.0
vpMbtKltXmlParser.h
1 /****************************************************************************
2  *
3  * This file is part of the ViSP software.
4  * Copyright (C) 2005 - 2015 by Inria. All rights reserved.
5  *
6  * This software is free software; you can redistribute it and/or
7  * modify it under the terms of the GNU General Public License
8  * ("GPL") version 2 as published by the Free Software Foundation.
9  * See the file LICENSE.txt at the root directory of this source
10  * distribution for additional information about the GNU GPL.
11  *
12  * For using ViSP with software that can not be combined with the GNU
13  * GPL, please contact Inria about acquiring a ViSP Professional
14  * Edition License.
15  *
16  * See http://visp.inria.fr for more information.
17  *
18  * This software was developed at:
19  * Inria Rennes - Bretagne Atlantique
20  * Campus Universitaire de Beaulieu
21  * 35042 Rennes Cedex
22  * France
23  *
24  * If you have questions regarding the use of this file, please contact
25  * Inria at visp@inria.fr
26  *
27  * This file is provided AS IS with NO WARRANTY OF ANY KIND, INCLUDING THE
28  * WARRANTY OF DESIGN, MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE.
29  *
30  * Description:
31  * Load XML parameters of the Model based tracker (using point features).
32  *
33  * Authors:
34  * Aurelien Yol
35  *
36  *****************************************************************************/
37 
42 #ifndef vpMbtKltXmlParser_HH
43 #define vpMbtKltXmlParser_HH
44 
45 #include <visp3/core/vpConfig.h>
46 
47 #ifdef VISP_HAVE_XML2
48 
49 #include <libxml/xmlmemory.h> /* Fonctions de la lib XML. */
50 
51 #include <visp3/mbt/vpMbXmlParser.h>
52 
61 class VISP_EXPORT vpMbtKltXmlParser: virtual public vpMbXmlParser
62 {
63 protected:
65  unsigned int maskBorder;
67  unsigned int maxFeatures;
69  unsigned int winSize;
71  double qualityValue;
73  double minDist;
75  double harrisParam;
77  unsigned int blockSize;
79  unsigned int pyramidLevels;
80 
81  typedef enum{
91  last
92  } dataToParseMbKlt;
93 
94 
95 public:
96 
98  virtual ~vpMbtKltXmlParser();
99 
105  inline unsigned int getBlockSize() const {return blockSize;}
106 
112  inline double getHarrisParam() const {return harrisParam;}
113 
119  inline unsigned int getMaskBorder() const {return maskBorder;}
120 
126  inline unsigned int getMaxFeatures() const {return maxFeatures;}
127 
133  inline double getMinDistance() const {return minDist;}
134 
140  inline unsigned int getPyramidLevels() const {return pyramidLevels;}
141 
147  inline double getQuality() const {return qualityValue;}
148 
154  inline unsigned int getWindowSize() const {return winSize;}
155 
156  void parse(const char * filename);
157 
158  virtual void readMainClass(xmlDocPtr doc, xmlNodePtr node);
159  void read_klt(xmlDocPtr doc, xmlNodePtr node);
160 
166  inline void setBlockSize(const unsigned int &bs) {blockSize = bs;}
167 
173  inline void setHarrisParam(const double &hp) {harrisParam = hp;}
174 
180  inline void setMaskBorder(const unsigned int &mb) {maskBorder = mb;}
181 
187  inline void setMaxFeatures(const unsigned int &mF) {maxFeatures = mF;}
188 
194  inline void setMinDistance(const double &mD) {minDist = mD;}
195 
201  inline void setPyramidLevels(const unsigned int &pL) {pyramidLevels = pL;}
202 
208  inline void setQuality(const double &q) {qualityValue = q;}
209 
215  inline void setWindowSize(const unsigned int &w) {winSize = w;}
216 
217  void writeMainClass(xmlNodePtr node);
218 
219 protected:
220  void init();
221 
222 };
223 
224 #endif
225 
226 #endif
227 
228 
229 
unsigned int winSize
Windows size.
unsigned int getMaskBorder() const
void setQuality(const double &q)
double getHarrisParam() const
double minDist
Minimum distance between klt points.
unsigned int maskBorder
Border of the mask used on Klt points.
unsigned int getBlockSize() const
virtual void readMainClass(xmlDocPtr doc, xmlNodePtr node)
unsigned int getMaxFeatures() const
double harrisParam
Harris free parameters.
unsigned int maxFeatures
Maximum of Klt features.
void setPyramidLevels(const unsigned int &pL)
Parse an Xml file to extract configuration parameters of a Mbt Klt object.Data parser for the KLT mod...
unsigned int getWindowSize() const
void writeMainClass(xmlNodePtr node)
void setWindowSize(const unsigned int &w)
unsigned int pyramidLevels
Number of pyramid levels.
void setHarrisParam(const double &hp)
void setMinDistance(const double &mD)
Parse an Xml file to extract configuration parameters of a mbtConfig object.Data parser for the model...
Definition: vpMbXmlParser.h:63
void setMaxFeatures(const unsigned int &mF)
unsigned int blockSize
Block size.
double getQuality() const
double qualityValue
Quality of the Klt points.
void parse(const char *filename)
void setBlockSize(const unsigned int &bs)
double getMinDistance() const
void setMaskBorder(const unsigned int &mb)
unsigned int getPyramidLevels() const