Visual Servoing Platform
version 3.0.1
|
#include <visp3/visual_features/vpFeatureMomentCommon.h>
Public Member Functions | |
vpFeatureMomentCommon (vpMomentDatabase &moments, double A=0.0, double B=0.0, double C=1.0) | |
void | updateAll (double A, double B, double C) |
vpFeatureMomentAlpha & | getFeatureAlpha () |
vpFeatureMomentAreaNormalized & | getFeatureAn () |
vpFeatureMomentBasic & | getFeatureMomentBasic () |
vpFeatureMomentCentered & | getFeatureCentered () |
vpFeatureMomentCInvariant & | getFeatureCInvariant () |
vpFeatureMomentGravityCenterNormalized & | getFeatureGravityNormalized () |
vpFeatureMomentArea & | getFeatureArea () |
vpFeatureMomentGravityCenter & | getFeatureGravityCenter () |
vpFeatureMoment & | get (const char *type, bool &found) |
This class allows to access common vpFeatureMoments in a pre-filled database.
It is a vpMomentDatabase filled with the following moments:
There is no need to do the linkTo operations manually nor is it necessary to care about the order of feature computation.
This class has an vpMomentCommon::updateAll method capable of updating the plane parameters AND computing interaction matrices inside the features.
The moment features computed by this class are classical moments features used in moment-based visual servoing. For more information see [30].
To initialize this feature set, the user needs to supply a vpMomentDatabase containing at least the contents of vpMomentCommon.
The features can be retrieved like from a normal vpFeatureMomentDatabase. However, some shortcuts to retrieve the features are provided.
The following code demonstrates the construction of a 6x6 interaction matrix as described in [1].
This code produces the following output:
Definition at line 217 of file vpFeatureMomentCommon.h.
vpFeatureMomentCommon::vpFeatureMomentCommon | ( | vpMomentDatabase & | moments, |
double | A = 0.0 , |
||
double | B = 0.0 , |
||
double | C = 1.0 |
||
) |
Constructor which initializes and links all common features in the database
moments | : database for moment primitives |
A | : first plane coefficient for a plane equation of the following type Ax+By+C=1/Z |
B | : second plane coefficient for a plane equation of the following type Ax+By+C=1/Z |
C | : third plane coefficient for a plane equation of the following type Ax+By+C=1/Z |
Definition at line 48 of file vpFeatureMomentCommon.cpp.
References vpFeatureMoment::linkTo().
|
inherited |
Retrieves a moment feature from the database
type | : the name of the feature, the one specified when using add |
found | : true if the type string is found inside the database, false otherwise |
Definition at line 60 of file vpFeatureMomentDatabase.cpp.
Referenced by vpFeatureMomentCentered::compute_interaction(), and vpFeatureMomentCInvariant::compute_interaction().
|
inline |
Returns alpha.
Definition at line 234 of file vpFeatureMomentCommon.h.
|
inline |
Returns normalized surface.
Definition at line 239 of file vpFeatureMomentCommon.h.
|
inline |
Returns the area
Definition at line 260 of file vpFeatureMomentCommon.h.
|
inline |
Returns centered moments.
Definition at line 247 of file vpFeatureMomentCommon.h.
|
inline |
Returns non-symmetric invariants.
Definition at line 252 of file vpFeatureMomentCommon.h.
|
inline |
Returns gravity center
Definition at line 264 of file vpFeatureMomentCommon.h.
|
inline |
Returns normalized gravity center.
Definition at line 256 of file vpFeatureMomentCommon.h.
|
inline |
Returns basic moment.
Definition at line 243 of file vpFeatureMomentCommon.h.
|
virtual |
Update all moment features in the database with plane coefficients
A | : first plane coefficient for a plane equation of the following type Ax+By+C=1/Z |
B | : second plane coefficient for a plane equation of the following type Ax+By+C=1/Z |
C | : third plane coefficient for a plane equation of the following type Ax+By+C=1/Z |
Reimplemented from vpFeatureMomentDatabase.
Definition at line 75 of file vpFeatureMomentCommon.cpp.
References vpFeatureMoment::update().