ViSP  2.10.0
vpFeaturePoint.h
1 /****************************************************************************
2  *
3  * $Id: vpFeaturePoint.h 5237 2015-01-30 13:52:04Z fspindle $
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  * 2D point visual feature.
36  *
37  * Authors:
38  * Eric Marchand
39  *
40  *****************************************************************************/
41 
42 
43 #ifndef vpFeaturePoint_H
44 #define vpFeaturePoint_H
45 
51 #include <visp/vpMatrix.h>
52 #include <visp/vpBasicFeature.h>
53 #include <visp/vpPoint.h>
54 
55 #include <visp/vpHomogeneousMatrix.h>
56 #include <visp/vpRGBa.h>
57 
58 
187 class VISP_EXPORT vpFeaturePoint : public vpBasicFeature
188 {
189 private:
192  double Z ;
193 
194 public:
195 
196  void init() ;
197 
198  vpFeaturePoint() ;
200  virtual ~vpFeaturePoint() {}
201 
202 
203  /*
204  section Set coordinates
205  */
206 
207  void buildFrom(const double x, const double y, const double Z) ;
208 
209  void set_x(const double x) ;
210 
211  void set_y(const double y) ;
212 
213  void set_Z(const double Z) ;
214 
215  void set_xyZ(const double x, const double y, const double Z) ;
216 
217  double get_x() const ;
218 
219  double get_y() const ;
220 
221  double get_Z() const ;
222 
223 
224  /*
225  vpBasicFeature method instantiation
226  */
227 
228  // feature selection
245  inline static unsigned int selectX() { return FEATURE_LINE[0] ; }
246 
263  inline static unsigned int selectY() { return FEATURE_LINE[1] ; }
264 
265  vpMatrix interaction(const unsigned int select = FEATURE_ALL);
266 
267  vpColVector error(const vpBasicFeature &s_star,
268  const unsigned int select = FEATURE_ALL) ;
269 
270  void print(const unsigned int select = FEATURE_ALL ) const ;
271 
272  vpFeaturePoint *duplicate() const ;
273 
274 
275  void display(const vpCameraParameters &cam,
276  const vpImage<unsigned char> &I,
277  const vpColor &color=vpColor::green,
278  unsigned int thickness=1) const ;
279  void display(const vpCameraParameters &cam,
280  const vpImage<vpRGBa> &I,
281  const vpColor &color=vpColor::green,
282  unsigned int thickness=1) const ;
283 
284 
288  typedef enum
289  {
290  X = 1, // x coordinates
291  Y = 2 // y coordinates
292  } vpFeaturePointType;
294  vpColVector error(const unsigned int select = FEATURE_ALL) ;
295 
296 } ;
297 
298 
299 
300 #endif
301 
302 /*
303  * Local variables:
304  * c-basic-offset: 2
305  * End:
306  */
Definition of the vpMatrix class.
Definition: vpMatrix.h:98
virtual void print(const unsigned int select=FEATURE_ALL) const =0
Print the name of the feature.
Class to define colors available for display functionnalities.
Definition: vpColor.h:125
Class that defines a 2D point visual feature which is composed by two parameters that are the cartes...
virtual vpColVector error(const vpBasicFeature &s_star, const unsigned int select=FEATURE_ALL)
Compute the error between two visual features from a subset of the possible features.
static const vpColor green
Definition: vpColor.h:170
class that defines what is a visual feature
virtual vpMatrix interaction(const unsigned int select=FEATURE_ALL)=0
Compute the interaction matrix from a subset of the possible features.
Generic class defining intrinsic camera parameters.
virtual void init()=0
Class that provides a data structure for the column vectors as well as a set of operations on these v...
Definition: vpColVector.h:72
virtual vpBasicFeature * duplicate() const =0
virtual void display(const vpCameraParameters &cam, const vpImage< unsigned char > &I, const vpColor &color=vpColor::green, unsigned int thickness=1) const =0
static unsigned int selectX()
virtual ~vpFeaturePoint()
Destructor.
static unsigned int selectY()