Visual Servoing Platform  version 3.0.1
 All Classes Namespaces Functions Variables Typedefs Enumerations Enumerator Friends Groups Pages
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
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:
99  virtual ~vpMbtKltXmlParser();
100 
106  inline unsigned int getBlockSize() const {return blockSize;}
107 
113  inline double getHarrisParam() const {return harrisParam;}
114 
120  inline unsigned int getMaskBorder() const {return maskBorder;}
121 
127  inline unsigned int getMaxFeatures() const {return maxFeatures;}
128 
134  inline double getMinDistance() const {return minDist;}
135 
141  inline unsigned int getPyramidLevels() const {return pyramidLevels;}
142 
148  inline double getQuality() const {return qualityValue;}
149 
155  inline unsigned int getWindowSize() const {return winSize;}
156 
157  void parse(const char * filename);
158 
159  virtual void readMainClass(xmlDocPtr doc, xmlNodePtr node);
160  void read_klt(xmlDocPtr doc, xmlNodePtr node);
161 
167  inline void setBlockSize(const unsigned int &bs) {blockSize = bs;}
168 
174  inline void setHarrisParam(const double &hp) {harrisParam = hp;}
175 
181  inline void setMaskBorder(const unsigned int &mb) {maskBorder = mb;}
182 
188  inline void setMaxFeatures(const unsigned int &mF) {maxFeatures = mF;}
189 
195  inline void setMinDistance(const double &mD) {minDist = mD;}
196 
202  inline void setPyramidLevels(const unsigned int &pL) {pyramidLevels = pL;}
203 
209  inline void setQuality(const double &q) {qualityValue = q;}
210 
216  inline void setWindowSize(const unsigned int &w) {winSize = w;}
217 
218  void writeMainClass(xmlNodePtr node);
220 
221 protected:
224  void init();
226 
227 };
228 
229 #endif
230 
231 #endif
232 
233 
234 
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