ViSP  2.9.0
vpFeaturePoint3D.h
1 /****************************************************************************
2  *
3  * $Id: vpFeaturePoint3D.h 4574 2014-01-09 08:48:51Z 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  * 3D point visual feature.
36  *
37  * Authors:
38  * Eric Marchand
39  * Fabien Spindler
40  *
41  *****************************************************************************/
42 
43 
44 #ifndef vpFeaturePoint3d_H
45 #define vpFeaturePoint3d_H
46 
52 #include <visp/vpMatrix.h>
53 #include <visp/vpBasicFeature.h>
54 #include <visp/vpPoint.h>
55 
56 #include <visp/vpHomogeneousMatrix.h>
57 #include <visp/vpRGBa.h>
58 
216 class VISP_EXPORT vpFeaturePoint3D : public vpBasicFeature
217 
218 {
219 
220 public:
221  // basic construction
222  void init() ;
223  // basic constructor
224  vpFeaturePoint3D() ;
226  virtual ~vpFeaturePoint3D() { if (flags != NULL) delete [] flags; }
227 
228  /*
229  /section Set coordinates
230  */
231 
232  // build feature from a point (vpPoint)
233  void buildFrom(const vpPoint &p) ;
234  // set the point XY and Z-coordinates
235  void buildFrom(const double X, const double Y, const double Z) ;
236 
237  // set the point X-coordinates
238  void set_X(const double X) ;
239  // set the point Y-coordinates
240  void set_Y(const double Y) ;
241  // set the point depth (camera frame)
242  void set_Z(const double Z) ;
243  // set the point XY and Z-coordinates
244  void set_XYZ(const double X, const double Y, const double Z) ;
245 
246  // get the point X-coordinates
247  double get_X() const ;
248  // get the point Y-coordinates
249  double get_Y() const ;
250  // get the point depth (camera frame)
251  double get_Z() const ;
252 
253 
254  /*
255  vpBasicFeature method instantiation
256  */
257 
282  inline static unsigned int selectX() { return FEATURE_LINE[0] ; }
283 
308  inline static unsigned int selectY() { return FEATURE_LINE[1] ; }
309 
334  inline static unsigned int selectZ() { return FEATURE_LINE[2] ; }
335  // compute the interaction matrix from a subset a the possible features
336  vpMatrix interaction(const unsigned int select = FEATURE_ALL);
337  // compute the error between two visual features from a subset
338  // a the possible features
339  vpColVector error(const vpBasicFeature &s_star,
340  const unsigned int select = FEATURE_ALL) ;
341  // print the name of the feature
342  void print(const unsigned int select=FEATURE_ALL ) const ;
343 
344  // feature duplication
345  vpFeaturePoint3D *duplicate() const ;
346 
347  void display(const vpCameraParameters &cam,
348  const vpImage<unsigned char> &I,
349  const vpColor &color=vpColor::green,
350  unsigned int thickness=1) const ;
351  void display(const vpCameraParameters &cam,
352  const vpImage<vpRGBa> &I,
353  const vpColor &color=vpColor::green,
354  unsigned int thickness=1) const ;
355 
356 } ;
357 
358 
359 
360 #endif
361 
362 /*
363  * Local variables:
364  * c-basic-offset: 2
365  * End:
366  */
Definition of the vpMatrix class.
Definition: vpMatrix.h:98
bool * flags
Ensure that all the parameters needed to compute the iteraction matrix are set.
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
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 point.
Definition: vpPoint.h:65
class that defines what is a visual feature
Class that defines the 3D point 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.
static unsigned int selectZ()
virtual void init()=0
virtual ~vpFeaturePoint3D()
Destructor. Does nothing.
static unsigned int selectX()
Class that provides a data structure for the column vectors as well as a set of operations on these v...
Definition: vpColVector.h:72
static unsigned int selectY()
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