Visual Servoing Platform version 3.7.0
Loading...
Searching...
No Matches
vpFeatureThetaU.h
1/*
2 * ViSP, open source Visual Servoing Platform software.
3 * Copyright (C) 2005 - 2025 by Inria. All rights reserved.
4 *
5 * This software is free software; you can redistribute it and/or modify
6 * it under the terms of the GNU General Public License as published by
7 * the Free Software Foundation; either version 2 of the License, or
8 * (at your option) any later version.
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 https://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 * ThetaU visual feature.
32 */
33
38
39#ifndef vpFeatureThetaU_H
40#define vpFeatureThetaU_H
41
42#include <visp3/core/vpConfig.h>
43#include <visp3/core/vpMatrix.h>
44#include <visp3/core/vpThetaUVector.h>
45#include <visp3/visual_features/vpBasicFeature.h>
46
47#include <visp3/core/vpHomogeneousMatrix.h>
48#include <visp3/core/vpRGBa.h>
49
226class VISP_EXPORT vpFeatureThetaU : public vpBasicFeature
227{
228public:
229 typedef enum
230 {
231 TUx = 1,
233 TUy = 2,
235 TUz = 4
237 } vpFeatureThetaUType;
238 typedef enum
239 {
248 } vpFeatureThetaURotationRepresentationType;
249 /*
250 attributes and members directly related to the vpBasicFeature needs
251 other functionalities are useful but not mandatory
252 */
253
254public:
255 // Basic constructor.
257 VP_EXPLICIT vpFeatureThetaU(vpFeatureThetaURotationRepresentationType r);
258 vpFeatureThetaU(vpThetaUVector &tu, vpFeatureThetaURotationRepresentationType r);
259 vpFeatureThetaU(vpRotationMatrix &R, vpFeatureThetaURotationRepresentationType r);
260 vpFeatureThetaU(vpHomogeneousMatrix &M, vpFeatureThetaURotationRepresentationType r);
261
262 vpFeatureThetaU &buildFrom(const vpThetaUVector &tu);
263 // build from a rotation matrix
264 vpFeatureThetaU &buildFrom(const vpRotationMatrix &R);
265 // build from an homogeneous matrix
266 vpFeatureThetaU &buildFrom(const vpHomogeneousMatrix &M);
267
268 void display(const vpCameraParameters &cam, const vpImage<unsigned char> &I, const vpColor &color = vpColor::green,
269 unsigned int thickness = 1) const VP_OVERRIDE;
270 void display(const vpCameraParameters &cam, const vpImage<vpRGBa> &I, const vpColor &color = vpColor::green,
271 unsigned int thickness = 1) const VP_OVERRIDE;
272
274 vpFeatureThetaU *duplicate() const VP_OVERRIDE;
275
276 // compute the error between two visual features from a subset
277 // a the possible features
278 vpColVector error(const vpBasicFeature &s_star, unsigned int select = FEATURE_ALL) VP_OVERRIDE;
279
280 vpFeatureThetaURotationRepresentationType getFeatureThetaURotationType() const;
281
282 double get_TUx() const;
283 double get_TUy() const;
284 double get_TUz() const;
285
286 // Basic construction.
287 void init() VP_OVERRIDE;
288 // compute the interaction matrix from a subset a the possible features
289 vpMatrix interaction(unsigned int select = FEATURE_ALL) VP_OVERRIDE;
290 void print(unsigned int select = FEATURE_ALL) const VP_OVERRIDE;
291
292 void set_TUx(double tu_x);
293 void set_TUy(double tu_y);
294 void set_TUz(double tu_z);
295
296 void setFeatureThetaURotationType(const vpFeatureThetaURotationRepresentationType r);
297
298public:
299 /*
300 vpBasicFeature method instantiation
301 */
302 static unsigned int selectTUx();
303 static unsigned int selectTUy();
304 static unsigned int selectTUz();
305
306private:
307 vpFeatureThetaURotationRepresentationType rotation;
308};
309END_VISP_NAMESPACE
310#endif
class that defines what is a visual feature
virtual void display(const vpCameraParameters &cam, const vpImage< unsigned char > &I, const vpColor &color=vpColor::green, unsigned int thickness=1) const =0
Generic class defining intrinsic camera parameters.
Implementation of column vector and the associated operations.
Class to define RGB colors available for display functionalities.
Definition vpColor.h:157
static const vpColor green
Definition vpColor.h:201
Class that defines a 3D visual feature from a axis/angle parametrization that represent the rotati...
Implementation of an homogeneous matrix and operations on such kind of matrices.
Definition of the vpImage class member functions.
Definition vpImage.h:131
Implementation of a matrix and operations on matrices.
Definition vpMatrix.h:175
Implementation of a rotation matrix and operations on such kind of matrices.
Implementation of a rotation vector as axis-angle minimal representation.