Visual Servoing Platform version 3.5.0
vpFeaturePointPolar.h
1/****************************************************************************
2 *
3 * ViSP, open source Visual Servoing Platform software.
4 * Copyright (C) 2005 - 2019 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 * 2D point with polar coordinates visual feature.
33 *
34 * Authors:
35 * Fabien Spindler
36 *
37 *****************************************************************************/
38
39#ifndef vpFeaturePointPolar_H
40#define vpFeaturePointPolar_H
41
47#include <visp3/core/vpMatrix.h>
48#include <visp3/core/vpPoint.h>
49#include <visp3/visual_features/vpBasicFeature.h>
50
51#include <visp3/core/vpHomogeneousMatrix.h>
52#include <visp3/core/vpRGBa.h>
53
258class VISP_EXPORT vpFeaturePointPolar : public vpBasicFeature
259{
260private:
263 double Z;
264
265public:
266 // basic constructor
270
271 void buildFrom(double rho, double theta, double Z);
272
273 void display(const vpCameraParameters &cam, const vpImage<unsigned char> &I, const vpColor &color = vpColor::green,
274 unsigned int thickness = 1) const;
275 void display(const vpCameraParameters &cam, const vpImage<vpRGBa> &I, const vpColor &color = vpColor::green,
276 unsigned int thickness = 1) const;
277
278 // feature duplication
280
281 // compute the error between two visual features from a subset
282 // a the possible features
283 vpColVector error(const vpBasicFeature &s_star, unsigned int select = FEATURE_ALL);
284
285 // basic construction
286 void init();
287
288 // get the point rho-coordinates
289 double get_rho() const;
290 // get the point theta-coordinates
291 double get_theta() const;
292 // get the point depth (camera frame)
293 double get_Z() const;
294
295 // compute the interaction matrix from a subset a the possible features
296 vpMatrix interaction(unsigned int select = FEATURE_ALL);
297
298 // print the name of the feature
299 void print(unsigned int select = FEATURE_ALL) const;
300
301 // set the point rho-coordinates
302 void set_rho(double rho);
303 // set the point theta-coordinates
304 void set_theta(double theta);
305 // set the point depth (camera frame)
306 void set_Z(double Z);
307 // set the point rho, theta polar coordinates and Z coordinate
308 void set_rhoThetaZ(double rho, double theta, double Z);
309
310 /*
311 vpBasicFeature method instantiation
312 */
313 static unsigned int selectRho();
314 static unsigned int selectTheta();
315
320 vpColVector error(unsigned int select = FEATURE_ALL);
321};
322
323#endif
324
325/*
326 * Local variables:
327 * c-basic-offset: 2
328 * End:
329 */
class that defines what is a visual feature
virtual vpColVector error(const vpBasicFeature &s_star, unsigned int select=FEATURE_ALL)
virtual void init()=0
virtual vpMatrix interaction(unsigned int select=FEATURE_ALL)=0
Compute the interaction matrix from a subset of the possible features.
virtual void print(unsigned int select=FEATURE_ALL) const =0
Print the name of the feature.
virtual void display(const vpCameraParameters &cam, const vpImage< unsigned char > &I, const vpColor &color=vpColor::green, unsigned int thickness=1) const =0
virtual vpBasicFeature * duplicate() const =0
Generic class defining intrinsic camera parameters.
Implementation of column vector and the associated operations.
Definition: vpColVector.h:131
Class to define RGB colors available for display functionnalities.
Definition: vpColor.h:158
static const vpColor green
Definition: vpColor.h:220
Class that defines 2D image point visual feature with polar coordinates described in .
virtual ~vpFeaturePointPolar()
Destructor. Does nothing.
vpColVector error(unsigned int select=FEATURE_ALL)
compute the error between a visual features and zero
Implementation of a matrix and operations on matrices.
Definition: vpMatrix.h:154