Visual Servoing Platform  version 3.1.0
vpMbtKltXmlParser.h
1 /****************************************************************************
2  *
3  * This file is part of the ViSP software.
4  * Copyright (C) 2005 - 2017 by Inria. All rights reserved.
5  *
6  * This software is free software; you can redistribute it and/or modify
7  * it under the terms of the GNU General Public License as published by
8  * the Free Software Foundation; either version 2 of the License, or
9  * (at your option) any later version.
10  * See the file LICENSE.txt at the root directory of this source
11  * distribution for additional information about the GNU GPL.
12  *
13  * For using ViSP with software that can not be combined with the GNU
14  * GPL, please contact Inria about acquiring a ViSP Professional
15  * Edition License.
16  *
17  * See http://visp.inria.fr for more information.
18  *
19  * This software was developed at:
20  * Inria Rennes - Bretagne Atlantique
21  * Campus Universitaire de Beaulieu
22  * 35042 Rennes Cedex
23  * France
24  *
25  * If you have questions regarding the use of this file, please contact
26  * Inria at visp@inria.fr
27  *
28  * This file is provided AS IS with NO WARRANTY OF ANY KIND, INCLUDING THE
29  * WARRANTY OF DESIGN, MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE.
30  *
31  * Description:
32  * Load XML parameters of the Model based tracker (using point features).
33  *
34  * Authors:
35  * Aurelien Yol
36  *
37  *****************************************************************************/
38 
44 #ifndef vpMbtKltXmlParser_HH
45 #define vpMbtKltXmlParser_HH
46 
47 #include <visp3/core/vpConfig.h>
48 
49 #ifdef VISP_HAVE_XML2
50 
51 #include <libxml/xmlmemory.h> /* Fonctions de la lib XML. */
52 
53 #include <visp3/mbt/vpMbXmlParser.h>
54 
63 class VISP_EXPORT vpMbtKltXmlParser : virtual public vpMbXmlParser
64 {
65 protected:
67  unsigned int maskBorder;
69  unsigned int maxFeatures;
71  unsigned int winSize;
73  double qualityValue;
75  double minDist;
77  double harrisParam;
79  unsigned int blockSize;
81  unsigned int pyramidLevels;
82 
83  typedef enum {
93  last
95 
96 public:
100  virtual ~vpMbtKltXmlParser();
101 
107  inline unsigned int getBlockSize() const { return blockSize; }
108 
114  inline double getHarrisParam() const { return harrisParam; }
115 
121  inline unsigned int getMaskBorder() const { return maskBorder; }
122 
128  inline unsigned int getMaxFeatures() const { return maxFeatures; }
129 
135  inline double getMinDistance() const { return minDist; }
136 
142  inline unsigned int getPyramidLevels() const { return pyramidLevels; }
143 
149  inline double getQuality() const { return qualityValue; }
150 
156  inline unsigned int getWindowSize() const { return winSize; }
157 
158  void parse(const char *filename);
159 
160  virtual void readMainClass(xmlDocPtr doc, xmlNodePtr node);
161  void read_klt(xmlDocPtr doc, xmlNodePtr node);
162 
168  inline void setBlockSize(const unsigned int &bs) { blockSize = bs; }
169 
175  inline void setHarrisParam(const double &hp) { harrisParam = hp; }
176 
182  inline void setMaskBorder(const unsigned int &mb) { maskBorder = mb; }
183 
189  inline void setMaxFeatures(const unsigned int &mF) { maxFeatures = mF; }
190 
196  inline void setMinDistance(const double &mD) { minDist = mD; }
197 
203  inline void setPyramidLevels(const unsigned int &pL) { pyramidLevels = pL; }
204 
210  inline void setQuality(const double &q) { qualityValue = q; }
211 
217  inline void setWindowSize(const unsigned int &w) { winSize = w; }
218 
219  void writeMainClass(xmlNodePtr node);
221 
222 protected:
225  void init();
227 };
228 
229 #endif
230 
231 #endif
unsigned int winSize
Windows size.
void setQuality(const double &q)
unsigned int getWindowSize() const
double minDist
Minimum distance between klt points.
unsigned int getBlockSize() const
unsigned int maskBorder
Border of the mask used on Klt points.
unsigned int getMaxFeatures() const
virtual void readMainClass(xmlDocPtr doc, xmlNodePtr node)
double harrisParam
Harris free parameters.
unsigned int maxFeatures
Maximum of Klt features.
unsigned int getMaskBorder() const
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...
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:65
void setMaxFeatures(const unsigned int &mF)
unsigned int blockSize
Block size.
double getMinDistance() const
double getHarrisParam() const
double qualityValue
Quality of the Klt points.
void parse(const char *filename)
unsigned int getPyramidLevels() const
double getQuality() const
void setBlockSize(const unsigned int &bs)
void setMaskBorder(const unsigned int &mb)