ViSP  2.10.0
vpFeaturePointPolar.h
1 /****************************************************************************
2  *
3  * $Id: vpFeaturePointPolar.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 with polar coordinates visual feature.
36  *
37  * Authors:
38  * Fabien Spindler
39  *
40  *****************************************************************************/
41 
42 
43 #ifndef vpFeaturePointPolar_H
44 #define vpFeaturePointPolar_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 
266 class VISP_EXPORT vpFeaturePointPolar : public vpBasicFeature
267 {
268 private:
271  double Z ;
272 
273 public:
274  // basic construction
275  void init() ;
276  // basic constructor
279  virtual ~vpFeaturePointPolar() { }
280 
281  void buildFrom(const double rho, const double theta, const double Z) ;
282 
283  /*
284  Set coordinates
285  */
286 
287  // set the point rho-coordinates
288  void set_rho(const double rho) ;
289  // set the point theta-coordinates
290  void set_theta(const double theta) ;
291  // set the point depth (camera frame)
292  void set_Z(const double Z) ;
293  // set the point rho, theta polar coordinates and Z coordinate
294  void set_rhoThetaZ(const double rho, const double theta, const double Z) ;
295 
296  // get the point rho-coordinates
297  double get_rho() const ;
298  // get the point theta-coordinates
299  double get_theta() const ;
300  // get the point depth (camera frame)
301  double get_Z() const ;
302 
303  /*
304  vpBasicFeature method instantiation
305  */
306 
330  inline static unsigned int selectRho() { return FEATURE_LINE[0] ; }
331 
332 
356  inline static unsigned int selectTheta() { return FEATURE_LINE[1] ; }
357  // compute the interaction matrix from a subset a the possible features
358  vpMatrix interaction(const unsigned int select = FEATURE_ALL);
359  // compute the error between two visual features from a subset
360  // a the possible features
361  vpColVector error(const vpBasicFeature &s_star,
362  const unsigned int select = FEATURE_ALL) ;
363  // print the name of the feature
364  void print(const unsigned int select = FEATURE_ALL ) const ;
365 
366  // feature duplication
367  vpFeaturePointPolar *duplicate() const ;
368 
369  void display(const vpCameraParameters &cam,
370  const vpImage<unsigned char> &I,
371  const vpColor &color=vpColor::green,
372  unsigned int thickness=1) const ;
373  void display(const vpCameraParameters &cam,
374  const vpImage<vpRGBa> &I,
375  const vpColor &color=vpColor::green,
376  unsigned int thickness=1) const ;
377 
381  vpColVector error(const unsigned int select = FEATURE_ALL) ;
383 
384 } ;
385 
386 
387 
388 #endif
389 
390 /*
391  * Local variables:
392  * c-basic-offset: 2
393  * End:
394  */
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
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 2D image point visual feature with polar coordinates described in ...
class that defines what is a visual feature
static unsigned int selectRho()
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
static unsigned int selectTheta()
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
virtual ~vpFeaturePointPolar()
Destructor. Does nothing.