ViSP  2.9.0
vpMbtKltXmlParser.h
1 /****************************************************************************
2  *
3  * $Id: vpMbtKltXmlParser.h 4582 2014-01-14 14:02:46Z ayol $
4  *
5  * This file is part of the ViSP software.
6  * Copyright (C) 2005 - 2014 by INRIA. All rights reserved.
7  *
8  * This software is free software; you can redistribute it and/or
9  * modify it under the terms of the GNU General Public License
10  * ("GPL") version 2 as published by the Free Software Foundation.
11  * See the file LICENSE.txt at the root directory of this source
12  * distribution for additional information about the GNU GPL.
13  *
14  * For using ViSP with software that can not be combined with the GNU
15  * GPL, please contact INRIA about acquiring a ViSP Professional
16  * Edition License.
17  *
18  * See http://www.irisa.fr/lagadic/visp/visp.html for more information.
19  *
20  * This software was developed at:
21  * INRIA Rennes - Bretagne Atlantique
22  * Campus Universitaire de Beaulieu
23  * 35042 Rennes Cedex
24  * France
25  * http://www.irisa.fr/lagadic
26  *
27  * If you have questions regarding the use of this file, please contact
28  * INRIA at visp@inria.fr
29  *
30  * This file is provided AS IS with NO WARRANTY OF ANY KIND, INCLUDING THE
31  * WARRANTY OF DESIGN, MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE.
32  *
33  *
34  * Description:
35  * Load XML parameters of the Model based tracker (using point features).
36  *
37  * Authors:
38  * Aurelien Yol
39  *
40  *****************************************************************************/
41 
46 #ifndef vpMbtKltXmlParser_HH
47 #define vpMbtKltXmlParser_HH
48 
49 #include <visp/vpConfig.h>
50 
51 #ifdef VISP_HAVE_XML2
52 
53 #include <libxml/xmlmemory.h> /* Fonctions de la lib XML. */
54 
55 #include <visp/vpMbXmlParser.h>
56 
65 class VISP_EXPORT vpMbtKltXmlParser: virtual public vpMbXmlParser
66 {
67 protected:
69  unsigned int maskBorder;
71  unsigned int maxFeatures;
73  unsigned int winSize;
75  double qualityValue;
77  double minDist;
79  double harrisParam;
81  unsigned int blockSize;
83  unsigned int pyramidLevels;
84 
85  typedef enum{
95  last
96  } dataToParseMbKlt;
97 
98 
99 public:
100 
102  virtual ~vpMbtKltXmlParser();
103 
109  inline unsigned int getBlockSize() const {return blockSize;}
110 
116  inline double getHarrisParam() const {return harrisParam;}
117 
123  inline unsigned int getMaskBorder() const {return maskBorder;}
124 
130  inline unsigned int getMaxFeatures() const {return maxFeatures;}
131 
137  inline double getMinDistance() const {return minDist;}
138 
144  inline unsigned int getPyramidLevels() const {return pyramidLevels;}
145 
151  inline double getQuality() const {return qualityValue;}
152 
158  inline unsigned int getWindowSize() const {return winSize;}
159 
160  void parse(const char * filename);
161 
162  virtual void readMainClass(xmlDocPtr doc, xmlNodePtr node);
163  void read_klt(xmlDocPtr doc, xmlNodePtr node);
164 
170  inline void setBlockSize(const unsigned int &bs) {blockSize = bs;}
171 
177  inline void setHarrisParam(const double &hp) {harrisParam = hp;}
178 
184  inline void setMaskBorder(const unsigned int &mb) {maskBorder = mb;}
185 
191  inline void setMaxFeatures(const unsigned int &mF) {maxFeatures = mF;}
192 
198  inline void setMinDistance(const double &mD) {minDist = mD;}
199 
205  inline void setPyramidLevels(const unsigned int &pL) {pyramidLevels = pL;}
206 
212  inline void setQuality(const double &q) {qualityValue = q;}
213 
219  inline void setWindowSize(const unsigned int &w) {winSize = w;}
220 
221  void writeMainClass(xmlNodePtr node);
222 
223 protected:
224  void init();
225 
226 };
227 
228 #endif
229 
230 #endif
231 
232 
233 
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:67
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