![]() |
Visual Servoing Platform
version 3.3.0
|
#include <vpFeatureMomentCInvariant.h>
Public Types | |
enum | { FEATURE_ALL = 0xffff } |
enum | vpBasicFeatureDeallocatorType { user, vpServo } |
Public Member Functions | |
vpFeatureMomentCInvariant (vpMomentDatabase &data_base, double A_, double B_, double C_, vpFeatureMomentDatabase *featureMoments=NULL) | |
void | compute_interaction () |
const char * | momentName () const |
const char * | name () const |
void | printLsofInvariants (std::ostream &os) const |
Inherited functionalities from vpFeatureMoment | |
vpBasicFeature * | duplicate () const |
void | display (const vpCameraParameters &cam, const vpImage< unsigned char > &I, const vpColor &color=vpColor::green, unsigned int thickness=1) const |
void | display (const vpCameraParameters &cam, const vpImage< vpRGBa > &I, const vpColor &color=vpColor::green, unsigned int thickness=1) const |
int | getDimension (unsigned int select=FEATURE_ALL) const |
void | init (void) |
vpMatrix | interaction (unsigned int select=FEATURE_ALL) |
void | linkTo (vpFeatureMomentDatabase &featureMoments) |
void | print (unsigned int select=FEATURE_ALL) const |
virtual void | printDependencies (std::ostream &os) const |
void | update (double A, double B, double C) |
Static Public Member Functions | |
static unsigned int | selectC1 () |
static unsigned int | selectC2 () |
static unsigned int | selectC3 () |
static unsigned int | selectC4 () |
static unsigned int | selectC5 () |
static unsigned int | selectC6 () |
static unsigned int | selectC7 () |
static unsigned int | selectC8 () |
static unsigned int | selectC9 () |
static unsigned int | selectC10 () |
static unsigned int | selectSx () |
static unsigned int | selectSy () |
static unsigned int | selectPx () |
static unsigned int | selectPy () |
Static Public Attributes | |
static const unsigned int | FEATURE_LINE [32] |
Protected Member Functions | |
const vpMoment & | getMoment () const |
Protected Attributes | |
const vpMoment * | moment |
vpMomentDatabase & | moments |
vpFeatureMomentDatabase * | featureMomentsDataBase |
std::vector< vpMatrix > | interaction_matrices |
double | A |
double | B |
double | C |
char | _name [255] |
vpColVector | s |
unsigned int | dim_s |
bool * | flags |
unsigned int | nbParameters |
Friends | |
VISP_EXPORT std::ostream & | operator<< (std::ostream &os, const vpFeatureMomentCInvariant &featcinv) |
Inherited functionalities from vpBasicFeature | |
unsigned int | dimension_s () |
virtual vpColVector | error (const vpBasicFeature &s_star, unsigned int select=FEATURE_ALL) |
vpColVector | get_s (unsigned int select=FEATURE_ALL) const |
vpBasicFeatureDeallocatorType | getDeallocate () |
virtual double | operator[] (unsigned int i) const |
void | setDeallocate (vpBasicFeatureDeallocatorType d) |
void | setFlags () |
static unsigned int | selectAll () |
vpBasicFeatureDeallocatorType | deallocate |
void | resetFlags () |
Functionality computation for 2D rotation/translation/scale non-symmetric invariant moment feature. Computes the interaction matrix associated with vpMomentCInvariant.
The interaction matrix for the moment feature can be deduced from [Tahri05z], equations (9). To do so, one must derive them and obtain a combination of interaction matrices by using (1). It allows to compute the interaction matrix for .
These interaction matrices may be selected afterwards by calling vpFeatureMomentCInvariant::interaction(). The selection by the vpFeatureMomentCInvariant::selectCi method for . For example, to select
you should input vpFeatureMomentCInvariant::selectC1() into ViSP's selector. Special matrices for features
and
are selected by vpFeatureMomentCInvariant::selectSx() and vpFeatureMomentCInvariant::selectSy() respectively. Special matrices for features
and
are selected by vpFeatureMomentCInvariant::selectPx() and vpFeatureMomentCInvariant::selectPy() respectively.
These features are often used in moment-based visual servoing to control the two out-of-plane rotations.
Be careful about the nature of your object when selecting the right features. Use and
when you're dealing with a symmetric object all other features otherwise.
Minimum vpMomentObject order needed to compute this feature: 6. This is the highest ordrer required by classic features.
This feature depends on:
An example of how to use vpFeatureMomentCInvariant in a complete visual servoing example is given in vpFeatureMomentCommon.
Definition at line 231 of file vpFeatureMomentCInvariant.h.
|
inherited |
Enumerator | |
---|---|
FEATURE_ALL |
Definition at line 81 of file vpBasicFeature.h.
|
inherited |
Indicates who should deallocate the feature.
Enumerator | |
---|---|
user | |
vpServo |
Definition at line 87 of file vpBasicFeature.h.
|
inline |
Initializes the feature with information about the database of moment primitives, the object plane and feature database.
data_base | : Moment database. The database of moment primitives (first parameter) is mandatory. It is used to access different moment values later used to compute the final matrix. |
A_ | : Plane coefficient in a ![]() |
B_ | : Plane coefficient in a ![]() |
C_ | : Plane coefficient in a ![]() |
featureMoments | : Feature database. |
Definition at line 249 of file vpFeatureMomentCInvariant.h.
|
virtual |
Computes interaction matrix for space-scale-rotation invariants. Called internally. The moment primitives must be computed before calling this. This feature depends on:
Reimplemented from vpFeatureMoment.
Definition at line 435 of file vpFeatureMomentCInvariant.cpp.
|
inlineinherited |
Return the dimension of the feature vector .
Definition at line 109 of file vpBasicFeature.h.
|
virtualinherited |
Not implemented since visual representation of a moment doesn't often make sense.
Implements vpBasicFeature.
Definition at line 113 of file vpFeatureMoment.cpp.
|
virtualinherited |
Not implemented since visual representation of a moment doesn't often make sense.
Implements vpBasicFeature.
Definition at line 127 of file vpFeatureMoment.cpp.
|
virtualinherited |
Duplicates the feature into a vpGenericFeature harbouring the same properties. The resulting feature is of vpMomentGenericFeature type. While it still can compute interaction matrices and has acces to it's moment primitive, it has lost all precise information about its precise type and therefore cannot be used in a feature database.
Implements vpBasicFeature.
Definition at line 219 of file vpFeatureMoment.cpp.
|
virtualinherited |
Compute the error between two visual features from a subset of the possible features.
Reimplemented in vpFeatureTranslation, vpFeaturePointPolar, vpFeatureThetaU, vpFeaturePoint3D, vpFeatureLine, vpFeaturePoint, vpGenericFeature, vpFeatureDepth, vpFeatureMomentAlpha, vpFeatureLuminance, vpFeatureEllipse, vpFeatureSegment, and vpFeatureVanishingPoint.
Definition at line 150 of file vpBasicFeature.cpp.
|
inherited |
Get the feature vector .
Definition at line 113 of file vpBasicFeature.cpp.
|
inlineinherited |
Definition at line 122 of file vpBasicFeature.h.
|
inherited |
Feature's dimension according to selection.
Definition at line 84 of file vpFeatureMoment.cpp.
|
inlineprotectedinherited |
Definition at line 162 of file vpFeatureMoment.h.
|
virtualinherited |
Initialize common parameters for moment features.
Implements vpBasicFeature.
Definition at line 55 of file vpFeatureMoment.cpp.
|
virtualinherited |
Retrieves the interaction matrix. No computation is done.
select | : Feature selector. |
There is no rule about the format of the feature selector. It may be different for different features. For example, for vpFeatureMomentBasic or vpFeatureMomentCentered features, select may refer to the couple in the
format, but for vpFeatureMomentCInvariant the selector allows to select couples
in the following format: 1 << i
Implements vpBasicFeature.
Definition at line 198 of file vpFeatureMoment.cpp.
|
inherited |
Links the feature to the feature's database. NB: The feature's database is different from the moment's database.
featureMoments | : database in which the moment features are stored. |
Definition at line 243 of file vpFeatureMoment.cpp.
|
inlinevirtual |
associated moment name
Implements vpFeatureMoment.
Definition at line 259 of file vpFeatureMomentCInvariant.h.
|
inlinevirtual |
feature name
Implements vpFeatureMoment.
Definition at line 263 of file vpFeatureMomentCInvariant.h.
|
inlinevirtualinherited |
Return element i in the state vector (usage : x = s[i] )
Definition at line 129 of file vpBasicFeature.h.
|
virtualinherited |
Outputs the content of the feature: it's corresponding selected moments.
Implements vpBasicFeature.
Definition at line 98 of file vpFeatureMoment.cpp.
|
virtualinherited |
Interface function to display the moments and other interaction matrices on which a particular vpFeatureMoment is dependent upon Not made pure to maintain compatibility Recommended : Types inheriting from vpFeatureMoment should implement this function
Definition at line 280 of file vpFeatureMoment.cpp.
void vpFeatureMomentCInvariant::printLsofInvariants | ( | std::ostream & | os | ) | const |
Print all the interaction matrices of the moment invariants
Print out all invariants that were computed There are 15 of them, as in [Point-based and region based.ITRO05] [Tahri05z]
Definition at line 688 of file vpFeatureMomentCInvariant.cpp.
|
protectedinherited |
Definition at line 130 of file vpBasicFeature.cpp.
References vpBasicFeature::flags, and vpBasicFeature::nbParameters.
|
inlinestaticinherited |
Select all the features.
Definition at line 141 of file vpBasicFeature.h.
|
inlinestatic |
Shortcut selector for .
Definition at line 268 of file vpFeatureMomentCInvariant.h.
|
inlinestatic |
Shortcut selector for .
Definition at line 304 of file vpFeatureMomentCInvariant.h.
|
inlinestatic |
Shortcut selector for .
Definition at line 272 of file vpFeatureMomentCInvariant.h.
|
inlinestatic |
Shortcut selector for .
Definition at line 276 of file vpFeatureMomentCInvariant.h.
|
inlinestatic |
Shortcut selector for .
Definition at line 280 of file vpFeatureMomentCInvariant.h.
|
inlinestatic |
Shortcut selector for .
Definition at line 284 of file vpFeatureMomentCInvariant.h.
|
inlinestatic |
Shortcut selector for .
Definition at line 288 of file vpFeatureMomentCInvariant.h.
|
inlinestatic |
Shortcut selector for .
Definition at line 292 of file vpFeatureMomentCInvariant.h.
|
inlinestatic |
Shortcut selector for .
Definition at line 296 of file vpFeatureMomentCInvariant.h.
|
inlinestatic |
Shortcut selector for .
Definition at line 300 of file vpFeatureMomentCInvariant.h.
|
inlinestatic |
Shortcut selector for .
Definition at line 316 of file vpFeatureMomentCInvariant.h.
|
inlinestatic |
Shortcut selector for .
Definition at line 320 of file vpFeatureMomentCInvariant.h.
|
inlinestatic |
Shortcut selector for .
Definition at line 308 of file vpFeatureMomentCInvariant.h.
|
inlinestatic |
Shortcut selector for .
Definition at line 312 of file vpFeatureMomentCInvariant.h.
|
inlineinherited |
Definition at line 136 of file vpBasicFeature.h.
|
inherited |
Set feature flags to true to prevent warning when re-computing the interaction matrix without having updated the feature.
Definition at line 140 of file vpBasicFeature.cpp.
|
inherited |
Updates the interaction matrices with the image plane the camera is facing. The plane must be in the format: . The moment primitives MUST be updated before calling this function.
This method also computes the interaction matrix. Therefore, you must call vpFeatureMoment::update before calling vpFeatureMoment::interaction.
A_ | : A coefficient of the plane. |
B_ | : B coefficient of the plane. |
C_ | : C coefficient of the plane. |
Definition at line 152 of file vpFeatureMoment.cpp.
|
friend |
Print all the interaction matrices of visual features
Definition at line 701 of file vpFeatureMomentCInvariant.cpp.
|
protectedinherited |
Definition at line 170 of file vpFeatureMoment.h.
|
protectedinherited |
Definition at line 167 of file vpFeatureMoment.h.
|
protectedinherited |
Definition at line 168 of file vpFeatureMoment.h.
|
protectedinherited |
Definition at line 169 of file vpFeatureMoment.h.
|
protectedinherited |
Definition at line 147 of file vpBasicFeature.h.
|
protectedinherited |
Dimension of the visual feature.
Definition at line 93 of file vpBasicFeature.h.
Referenced by vpGenericFeature::duplicate(), vpFeatureEllipse::init(), and vpFeatureLuminance::init().
|
staticinherited |
Definition at line 79 of file vpBasicFeature.h.
Referenced by vpFeatureEllipse::selectMu02(), vpFeatureEllipse::selectMu11(), vpFeatureEllipse::selectMu20(), and vpFeatureEllipse::selectY().
|
protectedinherited |
Definition at line 164 of file vpFeatureMoment.h.
|
protectedinherited |
Ensure that all the parameters needed to compute the iteraction matrix are set.
Definition at line 97 of file vpBasicFeature.h.
Referenced by vpFeatureEllipse::buildFrom(), vpFeatureEllipse::init(), vpBasicFeature::resetFlags(), vpFeatureEllipse::set_x(), vpFeatureEllipse::set_xy(), vpFeatureEllipse::set_y(), vpFeatureEllipse::setABC(), and vpFeatureEllipse::setMu().
|
protectedinherited |
Definition at line 165 of file vpFeatureMoment.h.
|
protectedinherited |
Definition at line 161 of file vpFeatureMoment.h.
|
protectedinherited |
Definition at line 163 of file vpFeatureMoment.h.
|
protectedinherited |
Number of parameters needed to compute the interaction matrix.
Definition at line 99 of file vpBasicFeature.h.
Referenced by vpFeatureEllipse::buildFrom(), vpFeatureEllipse::init(), vpBasicFeature::resetFlags(), and vpFeatureEllipse::setABC().
|
protectedinherited |
State of the visual feature.
Definition at line 91 of file vpBasicFeature.h.
Referenced by vpFeatureEllipse::buildFrom(), vpFeatureMomentAlpha::error(), vpFeatureEllipse::init(), vpFeatureLuminance::init(), vpGenericFeature::init(), vpFeatureEllipse::print(), vpFeatureEllipse::set_x(), vpFeatureEllipse::set_xy(), vpFeatureEllipse::set_y(), and vpFeatureEllipse::setMu().