ViSP
2.8.0
|
#include <vpMomentCInvariant.h>
Public Member Functions | |
vpMomentCInvariant () | |
double | C1 () |
double | C2 () |
double | C3 () |
double | C4 () |
double | C5 () |
double | C6 () |
double | C7 () |
double | C8 () |
double | C9 () |
double | C10 () |
void | compute () |
double | get (unsigned int i) |
double | getC (unsigned int i) |
double | getI (unsigned int index) |
double | getII (unsigned int i) |
double | getK () |
double | getS (unsigned int i) |
const char * | name () |
void | printI (unsigned int index) |
double | Px () |
double | Py () |
double | Sx () |
double | Sy () |
vpMomentObject & | getObject () const |
std::vector< double > & | get () |
void | linkTo (vpMomentDatabase &moments) |
void | update (vpMomentObject &object) |
Protected Member Functions | |
vpMomentDatabase & | getMoments () |
Protected Attributes | |
std::vector< double > | values |
Friends | |
VISP_EXPORT std::ostream & | operator<< (std::ostream &os, const vpMomentCInvariant &v) |
This class defines several 2D (translation+rotation+scale) invariants for both symmetric and non-symmetric objects. These moment-based invariants are described in the following papers [3], [12].
The descriptions for the invariants to can be found in [1] and for invariants , , , in [2].
These invariants are classicaly used in visual servoing to control the out-of-plane rotations. The C-type or P-type invariants are used for non-symmetric objects whereas the S-type invariants are used for symmetric objects.
For most cases of non-symmetric objects, ( , ) or ( , ) couples are widely used to control x and y rotations. For symmetric objects and are the only choice.
There are 14 translation+rotation+scale invariants (10 C-type, 2 P-type and 2 S-type) that can be accessed from by vpMomentCInvariant::get or any of the get shortcuts.
The example below shows how to retrieve the invariant:
vpMomentCInvariant depends on vpMomentCentered (see vpMomentDatabase and vpMomentCommon).
Definition at line 118 of file vpMomentCInvariant.h.
vpMomentCInvariant::vpMomentCInvariant | ( | ) |
Default constructor.
Definition at line 49 of file vpMomentCInvariant.cpp.
References vpMoment::values.
|
inline |
Shorcut for getting the value of .
Definition at line 134 of file vpMomentCInvariant.h.
|
inline |
Shorcut for getting the value of .
Definition at line 170 of file vpMomentCInvariant.h.
|
inline |
Shorcut for getting the value of .
Definition at line 138 of file vpMomentCInvariant.h.
|
inline |
Shorcut for getting the value of .
Definition at line 142 of file vpMomentCInvariant.h.
|
inline |
Shorcut for getting the value of .
Definition at line 146 of file vpMomentCInvariant.h.
|
inline |
Shorcut for getting the value of .
Definition at line 150 of file vpMomentCInvariant.h.
|
inline |
Shorcut for getting the value of .
Definition at line 154 of file vpMomentCInvariant.h.
|
inline |
Shorcut for getting the value of .
Definition at line 158 of file vpMomentCInvariant.h.
|
inline |
Shorcut for getting the value of .
Definition at line 162 of file vpMomentCInvariant.h.
|
inline |
Shorcut for getting the value of .
Definition at line 166 of file vpMomentCInvariant.h.
|
virtual |
Computes translation-plane-rotation-scale invariants. Depends on vpMomentCentered. All possible invariants are computed here. The selection of the invariant is done afterwards.
Implements vpMoment.
Definition at line 162 of file vpMomentCInvariant.cpp.
References vpMomentObject::DISCRETE, vpMomentCentered::get(), vpMomentDatabase::get(), vpMomentObject::get(), vpMoment::getMoments(), vpMoment::getObject(), vpException::notInitialized, and vpMoment::values.
Referenced by vpMomentCommon::updateAll().
|
inlineinherited |
Returns all values computed by the moment.
Definition at line 125 of file vpMoment.h.
Referenced by vpMomentGravityCenterNormalized::compute(), vpFeatureMomentArea::compute_interaction(), vpFeatureMomentAreaNormalized::compute_interaction(), vpFeatureMomentGravityCenterNormalized::compute_interaction(), vpMomentCentered::get(), vpFeatureMoment::init(), and vpFeatureMoment::update().
|
inline |
Gets the desired invariant.
i | given index. For invariants from C1 to C10 the corresponding index is from 0 to 9. For , the indexes are 10,11 and for , they are 12,13. |
Definition at line 178 of file vpMomentCInvariant.h.
|
inline |
Access to partial invariant c (see [2]).
Definition at line 183 of file vpMomentCInvariant.h.
Referenced by vpFeatureMomentCInvariant::compute_interaction().
|
inline |
Access to partial invariants. The index convention is the same as in [1].
Definition at line 187 of file vpMomentCInvariant.h.
Referenced by vpFeatureMomentCInvariant::compute_interaction().
|
inline |
Access to partial invariant I (see [2]).
Definition at line 192 of file vpMomentCInvariant.h.
Referenced by vpFeatureMomentCInvariant::compute_interaction().
|
inline |
Access to partial invariant K (see [2]).
Definition at line 196 of file vpMomentCInvariant.h.
|
inlineprotectedinherited |
Returns the linked moment database.
Definition at line 115 of file vpMoment.h.
Referenced by vpMomentArea::compute(), vpMomentGravityCenterNormalized::compute(), vpMomentCentered::compute(), vpMomentAreaNormalized::compute(), compute(), and vpMomentAlpha::compute().
|
inlineinherited |
Definition at line 119 of file vpMoment.h.
Referenced by vpMomentArea::compute(), vpMomentCentered::compute(), vpMomentGravityCenter::compute(), vpMomentAreaNormalized::compute(), compute(), vpFeatureMomentArea::compute_interaction(), vpFeatureMomentBasic::compute_interaction(), vpFeatureMomentCentered::compute_interaction(), vpFeatureMomentAlpha::compute_interaction(), vpFeatureMomentAreaNormalized::compute_interaction(), vpFeatureMomentCInvariant::compute_interaction(), vpFeatureMomentGravityCenter::compute_interaction(), vpFeatureMomentGravityCenterNormalized::compute_interaction(), vpMomentBasic::get(), vpMomentCentered::get(), vpFeatureMomentBasic::interaction(), and vpFeatureMomentCentered::interaction().
|
inline |
Access to partial invariant S (see [2]).
Definition at line 201 of file vpMomentCInvariant.h.
Referenced by vpFeatureMomentCInvariant::compute_interaction().
|
inherited |
Links the moment to a database of moment primitives. If the moment depends on other moments, these moments must be linked to the same database.
moments | : database of moment primitives. |
Definition at line 104 of file vpMoment.cpp.
References vpMoment::name().
Referenced by vpMomentCommon::getAlpha(), vpMomentCommon::getMu3(), vpMomentCommon::getSurface(), and vpMomentCommon::vpMomentCommon().
|
inlinevirtual |
void vpMomentCInvariant::printI | ( | unsigned int | index | ) |
Print partial invariant.
Prints the temporary invariants. Used for debug purposes only
index | : index of the temporary invariant |
Definition at line 209 of file vpMomentCInvariant.cpp.
|
inline |
Shorcut for getting the value of .
Definition at line 216 of file vpMomentCInvariant.h.
|
inline |
Shorcut for getting the value of .
Definition at line 220 of file vpMomentCInvariant.h.
|
inline |
Shorcut for getting the value of .
Definition at line 225 of file vpMomentCInvariant.h.
|
inline |
Shorcut for getting the value of .
Definition at line 229 of file vpMomentCInvariant.h.
|
inherited |
Updates the moment with the current object. This does not compute any values.
object | : object descriptor of the current camera vision. |
Definition at line 117 of file vpMoment.cpp.
|
friend |
Outputs the moment's values to a stream.
Definition at line 216 of file vpMomentCInvariant.cpp.
|
protectedinherited |
Definition at line 110 of file vpMoment.h.
Referenced by vpMomentArea::compute(), vpMomentGravityCenterNormalized::compute(), vpMomentCentered::compute(), vpMomentGravityCenter::compute(), vpMomentAreaNormalized::compute(), compute(), vpMomentAlpha::compute(), vpMomentCentered::get(), vpMomentGravityCenter::get(), vpMomentAlpha::vpMomentAlpha(), vpMomentArea::vpMomentArea(), vpMomentAreaNormalized::vpMomentAreaNormalized(), vpMomentCInvariant(), and vpMomentGravityCenter::vpMomentGravityCenter().