Visual Servoing Platform
version 3.6.1 under development (2024-11-21)
|
#include <visp3/visual_features/vpBasicFeature.h>
Public Types | |
enum | vpBasicFeatureSelect { FEATURE_ALL = 0xffff } |
enum | vpBasicFeatureDeallocatorType { user , vpServo } |
Public Member Functions | |
vpBasicFeature () | |
vpBasicFeature (const vpBasicFeature &f) | |
virtual | ~vpBasicFeature () |
Static Public Attributes | |
static const unsigned int | FEATURE_LINE [32] |
Protected Attributes | |
vpColVector | s |
unsigned int | dim_s |
bool * | flags |
unsigned int | nbParameters |
Inherited functionalities from vpBasicFeature | |
vpBasicFeatureDeallocatorType | deallocate |
unsigned int | dimension_s () |
virtual void | display (const vpCameraParameters &cam, const vpImage< unsigned char > &I, const vpColor &color=vpColor::green, unsigned int thickness=1) const =0 |
virtual void | display (const vpCameraParameters &cam, const vpImage< vpRGBa > &I, const vpColor &color=vpColor::green, unsigned int thickness=1) const =0 |
virtual void | init ()=0 |
virtual vpColVector | error (const vpBasicFeature &s_star, unsigned int select=FEATURE_ALL) |
vpColVector | get_s (unsigned int select=FEATURE_ALL) const |
vpBasicFeatureDeallocatorType | getDeallocate () |
unsigned int | getDimension (unsigned int select=FEATURE_ALL) const |
virtual vpMatrix | interaction (unsigned int select=FEATURE_ALL)=0 |
virtual double | operator[] (unsigned int i) const |
vpBasicFeature & | operator= (const vpBasicFeature &f) |
virtual void | print (unsigned int select=FEATURE_ALL) const =0 |
virtual vpBasicFeature * | duplicate () const =0 |
void | setDeallocate (vpBasicFeatureDeallocatorType d) |
void | setFlags () |
static unsigned int | selectAll () |
void | resetFlags () |
class that defines what is a visual feature
Definition at line 78 of file vpBasicFeature.h.
Indicates who should deallocate the feature.
Enumerator | |
---|---|
user | |
vpServo |
Definition at line 88 of file vpBasicFeature.h.
Enumerator | |
---|---|
FEATURE_ALL |
Definition at line 83 of file vpBasicFeature.h.
vpBasicFeature::vpBasicFeature | ( | ) |
Default constructor.
Definition at line 61 of file vpBasicFeature.cpp.
vpBasicFeature::vpBasicFeature | ( | const vpBasicFeature & | f | ) |
Copy constructor.
Definition at line 77 of file vpBasicFeature.cpp.
|
virtual |
Destructor that free allocated memory.
Definition at line 66 of file vpBasicFeature.cpp.
References flags.
|
inline |
Return the dimension of the feature vector .
Definition at line 110 of file vpBasicFeature.h.
|
pure virtual |
|
pure virtual |
|
pure virtual |
Implemented in vpGenericFeature, vpFeatureVanishingPoint, vpFeatureTranslation, vpFeatureThetaU, vpFeatureSegment, vpFeaturePointPolar, vpFeaturePoint3D, vpFeaturePoint, vpFeatureMoment, vpFeatureLuminanceMapping, vpFeatureLuminance, vpFeatureLine, vpFeatureEllipse, and vpFeatureDepth.
Referenced by vpServo::addFeature().
|
virtual |
Compute the error between two visual features from a subset of the possible features.
Reimplemented in vpGenericFeature, vpFeatureTranslation, vpFeatureThetaU, vpFeatureSegment, vpFeaturePointPolar, vpFeaturePoint3D, vpFeaturePoint, vpFeatureMomentAlpha, vpFeatureLuminanceMapping, vpFeatureLuminance, vpFeatureLine, vpFeatureEllipse, vpFeatureDepth, and vpFeatureVanishingPoint.
Definition at line 152 of file vpBasicFeature.cpp.
References dim_s, FEATURE_LINE, get_s(), and s.
Referenced by vpServo::computeError().
vpColVector vpBasicFeature::get_s | ( | unsigned int | select = FEATURE_ALL | ) | const |
Get the feature vector .
Definition at line 115 of file vpBasicFeature.cpp.
References dim_s, FEATURE_LINE, s, and vpColVector::stack().
Referenced by vpServo::computeError(), error(), vpFeatureDepth::error(), vpFeatureThetaU::error(), vpFeatureTranslation::error(), and vpGenericFeature::error().
|
inline |
Definition at line 123 of file vpBasicFeature.h.
unsigned int vpBasicFeature::getDimension | ( | unsigned int | select = FEATURE_ALL | ) | const |
Get the feature vector dimension.
Definition at line 102 of file vpBasicFeature.cpp.
References dim_s, FEATURE_LINE, vpArray2D< Type >::getRows(), and s.
|
pure virtual |
Implemented in vpFeatureMoment, vpGenericFeature, vpFeatureVanishingPoint, vpFeatureTranslation, vpFeatureThetaU, vpFeatureSegment, vpFeaturePointPolar, vpFeaturePoint3D, vpFeaturePoint, vpFeatureLuminanceMapping, vpFeatureLuminance, vpFeatureLine, vpFeatureEllipse, and vpFeatureDepth.
Referenced by vpServo::addFeature().
|
pure virtual |
Compute the interaction matrix from a subset of the possible features.
Implemented in vpGenericFeature, vpFeatureTranslation, vpFeatureThetaU, vpFeatureSegment, vpFeaturePointPolar, vpFeaturePoint3D, vpFeaturePoint, vpFeatureMoment, vpFeatureLuminanceMapping, vpFeatureLuminance, vpFeatureLine, vpFeatureEllipse, vpFeatureDepth, and vpFeatureVanishingPoint.
vpBasicFeature & vpBasicFeature::operator= | ( | const vpBasicFeature & | f | ) |
Copy operator.
Definition at line 86 of file vpBasicFeature.cpp.
References deallocate, dim_s, flags, nbParameters, and s.
|
inlinevirtual |
Return element i in the state vector (usage : x = s[i] )
Definition at line 130 of file vpBasicFeature.h.
|
pure virtual |
Print the name of the feature.
Implemented in vpGenericFeature, vpFeatureTranslation, vpFeatureThetaU, vpFeatureSegment, vpFeaturePointPolar, vpFeaturePoint3D, vpFeaturePoint, vpFeatureMoment, vpFeatureLuminanceMapping, vpFeatureLuminance, vpFeatureLine, vpFeatureEllipse, vpFeatureDepth, and vpFeatureVanishingPoint.
|
protected |
Definition at line 132 of file vpBasicFeature.cpp.
References flags, and nbParameters.
Referenced by vpFeatureVanishingPoint::interaction(), vpFeatureDepth::interaction(), vpFeatureEllipse::interaction(), vpFeatureLine::interaction(), vpFeaturePoint::interaction(), vpFeaturePoint3D::interaction(), vpFeaturePointPolar::interaction(), vpFeatureThetaU::interaction(), and vpFeatureTranslation::interaction().
|
inlinestatic |
|
inline |
Definition at line 137 of file vpBasicFeature.h.
Referenced by vpServo::addFeature().
void vpBasicFeature::setFlags | ( | ) |
Set feature flags to true to prevent warning when re-computing the interaction matrix without having updated the feature.
Definition at line 142 of file vpBasicFeature.cpp.
References flags, and nbParameters.
|
protected |
Definition at line 148 of file vpBasicFeature.h.
Referenced by vpFeatureVanishingPoint::interaction(), vpFeatureDepth::interaction(), vpFeatureEllipse::interaction(), vpFeatureLine::interaction(), vpFeaturePoint::interaction(), vpFeaturePoint3D::interaction(), vpFeaturePointPolar::interaction(), vpFeatureSegment::interaction(), vpFeatureThetaU::interaction(), vpFeatureTranslation::interaction(), and operator=().
|
protected |
Dimension of the visual feature.
Definition at line 94 of file vpBasicFeature.h.
Referenced by vpFeatureMoment::duplicate(), vpGenericFeature::duplicate(), error(), vpFeatureLuminanceMapping::error(), vpGenericFeature::error(), vpFeatureLuminance::error(), get_s(), vpGenericFeature::get_s(), getDimension(), vpFeatureMoment::getDimension(), vpFeatureDepth::init(), vpFeatureEllipse::init(), vpFeatureLine::init(), vpFeatureLuminanceMapping::init(), vpFeaturePoint::init(), vpFeaturePoint3D::init(), vpFeaturePointPolar::init(), vpFeatureSegment::init(), vpFeatureThetaU::init(), vpFeatureTranslation::init(), vpFeatureVanishingPoint::init(), vpFeatureLuminance::init(), vpFeatureMoment::init(), vpFeatureLuminanceMapping::interaction(), vpFeatureMoment::interaction(), vpGenericFeature::interaction(), vpFeatureLuminance::interaction(), operator=(), vpFeatureLuminance::operator=(), vpFeatureLuminanceMapping::operator=(), vpFeatureMoment::print(), vpGenericFeature::print(), vpGenericFeature::set_s(), vpGenericFeature::setError(), vpGenericFeature::setInteractionMatrix(), vpFeatureMoment::update(), vpFeatureLuminance::vpFeatureLuminance(), and vpGenericFeature::vpGenericFeature().
|
static |
Definition at line 81 of file vpBasicFeature.h.
Referenced by error(), vpGenericFeature::error(), get_s(), getDimension(), vpFeatureMoment::getDimension(), vpFeatureMoment::interaction(), vpGenericFeature::interaction(), vpFeatureMoment::print(), vpGenericFeature::print(), vpFeatureEllipse::select_n02(), vpFeatureEllipse::select_n11(), vpFeatureEllipse::select_n20(), vpFeatureSegment::selectAlpha(), vpFeatureVanishingPoint::selectAlpha(), vpFeatureVanishingPoint::selectAtanOneOverRho(), vpFeatureSegment::selectL(), vpFeatureVanishingPoint::selectOneOverRho(), vpFeatureLine::selectRho(), vpFeaturePointPolar::selectRho(), vpFeatureLine::selectTheta(), vpFeaturePointPolar::selectTheta(), vpFeatureThetaU::selectTUx(), vpFeatureThetaU::selectTUy(), vpFeatureThetaU::selectTUz(), vpFeatureTranslation::selectTx(), vpFeatureTranslation::selectTy(), vpFeatureTranslation::selectTz(), vpFeatureEllipse::selectX(), vpFeaturePoint::selectX(), vpFeaturePoint3D::selectX(), vpFeatureVanishingPoint::selectX(), vpFeatureSegment::selectXc(), vpFeatureEllipse::selectY(), vpFeaturePoint::selectY(), vpFeaturePoint3D::selectY(), vpFeatureVanishingPoint::selectY(), vpFeatureSegment::selectYc(), and vpFeaturePoint3D::selectZ().
|
protected |
Ensure that all the parameters needed to compute the interaction matrix are set.
Definition at line 98 of file vpBasicFeature.h.
Referenced by vpFeatureLine::buildFrom(), vpFeaturePointPolar::buildFrom(), vpFeatureEllipse::buildFrom(), vpFeaturePoint::buildFrom(), vpFeatureDepth::buildFrom(), vpFeatureTranslation::buildFrom(), vpFeaturePoint3D::buildFrom(), vpFeatureThetaU::buildFrom(), vpFeatureMoment::duplicate(), vpFeatureDepth::init(), vpFeatureEllipse::init(), vpFeatureLine::init(), vpFeatureLuminance::init(), vpFeaturePoint::init(), vpFeaturePoint3D::init(), vpFeaturePointPolar::init(), vpFeatureSegment::init(), vpFeatureThetaU::init(), vpFeatureTranslation::init(), vpFeatureVanishingPoint::init(), vpFeatureMoment::init(), vpFeatureVanishingPoint::interaction(), vpFeatureDepth::interaction(), vpFeatureEllipse::interaction(), vpFeatureLine::interaction(), vpFeaturePoint::interaction(), vpFeaturePoint3D::interaction(), vpFeaturePointPolar::interaction(), vpFeatureSegment::interaction(), vpFeatureThetaU::interaction(), vpFeatureTranslation::interaction(), operator=(), resetFlags(), vpFeaturePointPolar::set_rho(), vpFeaturePointPolar::set_rhoThetaZ(), vpFeaturePointPolar::set_theta(), vpFeatureThetaU::set_TUx(), vpFeatureThetaU::set_TUy(), vpFeatureThetaU::set_TUz(), vpFeatureDepth::set_x(), vpFeatureEllipse::set_x(), vpFeaturePoint::set_x(), vpFeaturePoint3D::set_X(), vpFeatureVanishingPoint::set_x(), vpFeatureEllipse::set_xy(), vpFeaturePoint::set_xyZ(), vpFeaturePoint3D::set_XYZ(), vpFeatureDepth::set_xyZLogZoverZstar(), vpFeatureDepth::set_y(), vpFeatureEllipse::set_y(), vpFeaturePoint::set_y(), vpFeaturePoint3D::set_Y(), vpFeatureVanishingPoint::set_y(), vpFeatureDepth::set_Z(), vpFeatureLuminance::set_Z(), vpFeaturePoint::set_Z(), vpFeaturePoint3D::set_Z(), vpFeaturePointPolar::set_Z(), vpFeatureEllipse::setABC(), vpFeatureLine::setABCD(), vpFeatureVanishingPoint::setAlpha(), vpFeatureVanishingPoint::setAtanOneOverRho(), setFlags(), vpFeatureEllipse::setMoments(), vpFeatureVanishingPoint::setOneOverRho(), vpFeatureLine::setRhoTheta(), vpFeatureMoment::update(), vpFeatureLuminance::vpFeatureLuminance(), and ~vpBasicFeature().
|
protected |
Number of parameters needed to compute the interaction matrix.
Definition at line 100 of file vpBasicFeature.h.
Referenced by vpFeatureLine::buildFrom(), vpFeaturePointPolar::buildFrom(), vpFeatureEllipse::buildFrom(), vpFeaturePoint::buildFrom(), vpFeatureDepth::buildFrom(), vpFeaturePoint3D::buildFrom(), vpFeatureThetaU::buildFrom(), vpFeatureMoment::duplicate(), vpFeatureDepth::init(), vpFeatureEllipse::init(), vpFeatureLine::init(), vpFeatureLuminance::init(), vpFeaturePoint::init(), vpFeaturePoint3D::init(), vpFeaturePointPolar::init(), vpFeatureSegment::init(), vpFeatureThetaU::init(), vpFeatureTranslation::init(), vpFeatureVanishingPoint::init(), vpFeatureMoment::init(), vpFeatureVanishingPoint::interaction(), vpFeatureDepth::interaction(), vpFeatureEllipse::interaction(), vpFeatureLine::interaction(), vpFeaturePoint::interaction(), vpFeaturePoint3D::interaction(), vpFeaturePointPolar::interaction(), vpFeatureSegment::interaction(), vpFeatureThetaU::interaction(), vpFeatureTranslation::interaction(), operator=(), resetFlags(), vpFeaturePointPolar::set_rhoThetaZ(), vpFeaturePoint::set_xyZ(), vpFeaturePoint3D::set_XYZ(), vpFeatureDepth::set_xyZLogZoverZstar(), vpFeatureEllipse::setABC(), vpFeatureLine::setABCD(), setFlags(), vpFeatureMoment::update(), and vpFeatureLuminance::vpFeatureLuminance().
|
protected |
State of the visual feature.
Definition at line 92 of file vpBasicFeature.h.
Referenced by vpFeatureLine::buildFrom(), vpFeaturePointPolar::buildFrom(), vpFeatureEllipse::buildFrom(), vpFeaturePoint::buildFrom(), vpFeatureDepth::buildFrom(), vpFeatureTranslation::buildFrom(), vpFeaturePoint3D::buildFrom(), vpFeatureThetaU::buildFrom(), vpFeatureLuminance::buildFrom(), vpFeatureLuminanceMapping::buildFrom(), vpFeatureEllipse::display(), vpFeatureMoment::duplicate(), vpFeatureVanishingPoint::error(), error(), vpFeatureDepth::error(), vpFeatureEllipse::error(), vpFeatureLine::error(), vpFeatureMomentAlpha::error(), vpFeaturePoint::error(), vpFeaturePoint3D::error(), vpFeaturePointPolar::error(), vpFeatureThetaU::error(), vpFeatureTranslation::error(), vpGenericFeature::error(), vpFeatureLuminance::error(), vpFeatureLuminanceMapping::error(), vpFeatureDepth::get_LogZoverZstar(), vpFeaturePointPolar::get_rho(), get_s(), vpGenericFeature::get_s(), vpFeaturePointPolar::get_theta(), vpFeatureThetaU::get_TUx(), vpFeatureThetaU::get_TUy(), vpFeatureThetaU::get_TUz(), vpFeatureTranslation::get_Tx(), vpFeatureTranslation::get_Ty(), vpFeatureTranslation::get_Tz(), vpFeaturePoint::get_x(), vpFeaturePoint3D::get_X(), vpFeatureVanishingPoint::get_x(), vpFeaturePoint::get_y(), vpFeaturePoint3D::get_Y(), vpFeatureVanishingPoint::get_y(), vpFeaturePoint3D::get_Z(), vpFeatureVanishingPoint::getAlpha(), vpFeatureVanishingPoint::getAtanOneOverRho(), getDimension(), vpFeatureVanishingPoint::getOneOverRho(), vpFeatureDepth::init(), vpFeatureEllipse::init(), vpFeatureLine::init(), vpFeaturePoint::init(), vpFeaturePoint3D::init(), vpFeaturePointPolar::init(), vpFeatureSegment::init(), vpFeatureThetaU::init(), vpFeatureTranslation::init(), vpFeatureVanishingPoint::init(), vpGenericFeature::init(), vpFeatureLuminanceMapping::init(), vpFeatureLuminance::init(), vpFeatureMoment::init(), vpFeatureEllipse::interaction(), vpFeatureLine::interaction(), vpFeatureThetaU::interaction(), vpFeatureTranslation::interaction(), vpFeatureLuminanceMapping::interaction(), operator=(), vpFeatureLuminance::operator=(), vpFeatureLuminanceMapping::operator=(), vpFeatureEllipse::print(), vpFeatureLine::print(), vpFeatureLuminanceMapping::print(), vpFeatureMoment::print(), vpFeatureSegment::print(), vpFeatureThetaU::print(), vpFeatureTranslation::print(), vpGenericFeature::print(), vpFeatureDepth::set_LogZoverZstar(), vpFeaturePointPolar::set_rho(), vpGenericFeature::set_s(), vpFeaturePointPolar::set_theta(), vpFeatureThetaU::set_TUx(), vpFeatureThetaU::set_TUy(), vpFeatureThetaU::set_TUz(), vpFeatureTranslation::set_Tx(), vpFeatureTranslation::set_Ty(), vpFeatureTranslation::set_Tz(), vpFeatureEllipse::set_x(), vpFeaturePoint::set_x(), vpFeaturePoint3D::set_X(), vpFeatureVanishingPoint::set_x(), vpFeatureEllipse::set_xy(), vpFeatureEllipse::set_y(), vpFeaturePoint::set_y(), vpFeaturePoint3D::set_Y(), vpFeatureVanishingPoint::set_y(), vpFeaturePoint3D::set_Z(), vpFeatureVanishingPoint::setAlpha(), vpFeatureVanishingPoint::setAtanOneOverRho(), vpFeatureEllipse::setMoments(), vpFeatureVanishingPoint::setOneOverRho(), vpFeatureLine::setRhoTheta(), vpFeatureMoment::update(), and vpGenericFeature::vpGenericFeature().