Visual Servoing Platform
version 3.5.0 under development (2022-02-15)
|
#include <visp3/visual_features/vpBasicFeature.h>
Public Types | |
enum | { FEATURE_ALL = 0xffff } |
enum | vpBasicFeatureDeallocatorType { user, vpServo } |
Public Member Functions | |
vpBasicFeature () | |
vpBasicFeature (const vpBasicFeature &f) | |
virtual | ~vpBasicFeature () |
Inherited functionalities from vpBasicFeature | |
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 Public Member Functions | |
static unsigned int | selectAll () |
Static Public Attributes | |
static const unsigned int | FEATURE_LINE [32] |
Protected Member Functions | |
void | resetFlags () |
Protected Attributes | |
vpColVector | s |
unsigned int | dim_s |
bool * | flags |
unsigned int | nbParameters |
vpBasicFeatureDeallocatorType | deallocate |
class that defines what is a visual feature
Definition at line 77 of file vpBasicFeature.h.
anonymous enum |
Enumerator | |
---|---|
FEATURE_ALL |
Definition at line 82 of file vpBasicFeature.h.
Indicates who should deallocate the feature.
Enumerator | |
---|---|
user | |
vpServo |
Definition at line 88 of file vpBasicFeature.h.
vpBasicFeature::vpBasicFeature | ( | ) |
Default constructor.
Definition at line 59 of file vpBasicFeature.cpp.
vpBasicFeature::vpBasicFeature | ( | const vpBasicFeature & | f | ) |
Copy constructor.
Definition at line 75 of file vpBasicFeature.cpp.
|
virtual |
Destructor that free allocated memory.
Definition at line 64 of file vpBasicFeature.cpp.
References flags.
|
inline |
Return the dimension of the feature vector .
Definition at line 110 of file vpBasicFeature.h.
References vpColor::green.
|
pure virtual |
Implemented in vpFeatureTranslation, vpFeaturePointPolar, vpFeatureThetaU, vpFeaturePoint3D, vpFeatureMoment, vpFeatureLine, vpFeaturePoint, vpGenericFeature, vpFeatureDepth, vpFeatureLuminance, vpFeatureVanishingPoint, vpFeatureEllipse, and vpFeatureSegment.
Referenced by vpFeatureMoment::vpFeatureMoment(), vpFeatureDepth::~vpFeatureDepth(), vpFeatureEllipse::~vpFeatureEllipse(), vpFeatureLine::~vpFeatureLine(), vpFeaturePoint::~vpFeaturePoint(), vpFeaturePoint3D::~vpFeaturePoint3D(), vpFeaturePointPolar::~vpFeaturePointPolar(), vpFeatureSegment::~vpFeatureSegment(), vpFeatureThetaU::~vpFeatureThetaU(), vpFeatureTranslation::~vpFeatureTranslation(), and vpFeatureVanishingPoint::~vpFeatureVanishingPoint().
|
pure virtual |
|
pure virtual |
Implemented in vpFeatureTranslation, vpFeaturePointPolar, vpFeatureThetaU, vpFeaturePoint3D, vpFeatureLine, vpFeatureMoment, vpFeaturePoint, vpGenericFeature, vpFeatureDepth, vpFeatureLuminance, vpFeatureVanishingPoint, vpFeatureEllipse, and vpFeatureSegment.
Referenced by vpServo::addFeature(), vpFeatureMoment::vpFeatureMoment(), vpFeatureDepth::~vpFeatureDepth(), vpFeatureEllipse::~vpFeatureEllipse(), vpFeatureLine::~vpFeatureLine(), vpFeaturePoint::~vpFeaturePoint(), vpFeaturePoint3D::~vpFeaturePoint3D(), vpFeaturePointPolar::~vpFeaturePointPolar(), vpFeatureSegment::~vpFeatureSegment(), vpFeatureThetaU::~vpFeatureThetaU(), vpFeatureTranslation::~vpFeatureTranslation(), and vpFeatureVanishingPoint::~vpFeatureVanishingPoint().
|
virtual |
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, vpFeatureVanishingPoint, vpFeatureEllipse, and vpFeatureSegment.
Definition at line 151 of file vpBasicFeature.cpp.
References dim_s, FEATURE_LINE, get_s(), and s.
Referenced by vpServo::computeError(), vpFeatureMomentAlpha::name(), vpFeatureDepth::~vpFeatureDepth(), vpFeatureEllipse::~vpFeatureEllipse(), vpFeatureLine::~vpFeatureLine(), vpFeaturePoint::~vpFeaturePoint(), vpFeaturePoint3D::~vpFeaturePoint3D(), vpFeaturePointPolar::~vpFeaturePointPolar(), vpFeatureSegment::~vpFeatureSegment(), vpFeatureThetaU::~vpFeatureThetaU(), vpFeatureTranslation::~vpFeatureTranslation(), and vpFeatureVanishingPoint::~vpFeatureVanishingPoint().
vpColVector vpBasicFeature::get_s | ( | unsigned int | select = FEATURE_ALL | ) | const |
Get the feature vector .
Definition at line 114 of file vpBasicFeature.cpp.
References dim_s, FEATURE_LINE, s, and vpColVector::stack().
Referenced by vpServo::computeError(), error(), vpFeatureDepth::error(), vpGenericFeature::error(), vpFeatureThetaU::error(), vpFeatureTranslation::error(), and vpGenericFeature::getInteractionMatrix().
|
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 100 of file vpBasicFeature.cpp.
References dim_s, FEATURE_LINE, vpArray2D< Type >::getRows(), and s.
Referenced by vpFeatureMoment::vpFeatureMoment().
|
pure virtual |
Implemented in vpFeatureTranslation, vpFeaturePointPolar, vpFeatureThetaU, vpFeaturePoint3D, vpFeatureLine, vpFeatureMoment, vpFeaturePoint, vpGenericFeature, vpFeatureDepth, vpFeatureSegment, vpFeatureEllipse, vpFeatureLuminance, and vpFeatureVanishingPoint.
Referenced by vpServo::addFeature(), vpFeatureEllipse::get_n02(), vpGenericFeature::getInteractionMatrix(), vpFeatureLine::getTheta(), vpFeatureSegment::getZ2(), vpFeatureMoment::vpFeatureMoment(), vpFeatureDepth::~vpFeatureDepth(), vpFeaturePoint::~vpFeaturePoint(), vpFeaturePoint3D::~vpFeaturePoint3D(), vpFeaturePointPolar::~vpFeaturePointPolar(), vpFeatureThetaU::~vpFeatureThetaU(), vpFeatureTranslation::~vpFeatureTranslation(), and vpFeatureVanishingPoint::~vpFeatureVanishingPoint().
|
pure virtual |
Compute the interaction matrix from a subset of the possible features.
Implemented in vpFeatureTranslation, vpFeaturePointPolar, vpFeatureThetaU, vpFeaturePoint3D, vpFeatureLine, vpFeatureMoment, vpFeaturePoint, vpGenericFeature, vpFeatureDepth, vpFeatureSegment, vpFeatureEllipse, vpFeatureLuminance, and vpFeatureVanishingPoint.
Referenced by vpFeatureEllipse::get_n02(), vpGenericFeature::getInteractionMatrix(), vpFeatureLine::getTheta(), vpFeatureSegment::getZ2(), vpFeatureMoment::vpFeatureMoment(), vpFeatureDepth::~vpFeatureDepth(), vpFeaturePoint::~vpFeaturePoint(), vpFeaturePoint3D::~vpFeaturePoint3D(), vpFeaturePointPolar::~vpFeaturePointPolar(), vpFeatureThetaU::~vpFeatureThetaU(), vpFeatureTranslation::~vpFeatureTranslation(), and vpFeatureVanishingPoint::~vpFeatureVanishingPoint().
vpBasicFeature & vpBasicFeature::operator= | ( | const vpBasicFeature & | f | ) |
Copy operator.
Definition at line 84 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 vpFeatureTranslation, vpFeaturePointPolar, vpFeatureThetaU, vpFeaturePoint3D, vpFeatureLine, vpFeatureMoment, vpFeaturePoint, vpGenericFeature, vpFeatureDepth, vpFeatureSegment, vpFeatureEllipse, vpFeatureLuminance, and vpFeatureVanishingPoint.
Referenced by vpFeatureEllipse::get_n02(), vpGenericFeature::getInteractionMatrix(), vpFeatureLine::getTheta(), vpFeatureSegment::getZ2(), vpFeatureMoment::vpFeatureMoment(), vpFeatureDepth::~vpFeatureDepth(), vpFeaturePoint::~vpFeaturePoint(), vpFeaturePoint3D::~vpFeaturePoint3D(), vpFeaturePointPolar::~vpFeaturePointPolar(), vpFeatureThetaU::~vpFeatureThetaU(), vpFeatureTranslation::~vpFeatureTranslation(), and vpFeatureVanishingPoint::~vpFeatureVanishingPoint().
|
protected |
Definition at line 131 of file vpBasicFeature.cpp.
References flags, and nbParameters.
Referenced by vpFeatureVanishingPoint::interaction(), vpFeatureEllipse::interaction(), vpFeatureDepth::interaction(), vpFeaturePoint::interaction(), vpFeatureLine::interaction(), vpFeaturePoint3D::interaction(), vpFeatureThetaU::interaction(), vpFeaturePointPolar::interaction(), and vpFeatureTranslation::interaction().
|
inlinestatic |
Select all the features.
Definition at line 142 of file vpBasicFeature.h.
|
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 141 of file vpBasicFeature.cpp.
References flags, and nbParameters.
|
protected |
Definition at line 148 of file vpBasicFeature.h.
Referenced by vpFeatureVanishingPoint::interaction(), vpFeatureEllipse::interaction(), vpFeatureSegment::interaction(), vpFeatureDepth::interaction(), vpFeaturePoint::interaction(), vpFeatureLine::interaction(), vpFeaturePoint3D::interaction(), vpFeatureThetaU::interaction(), vpFeaturePointPolar::interaction(), vpFeatureTranslation::interaction(), and operator=().
|
protected |
Dimension of the visual feature.
Definition at line 94 of file vpBasicFeature.h.
Referenced by vpGenericFeature::duplicate(), vpFeatureMoment::duplicate(), vpFeatureLuminance::error(), error(), vpGenericFeature::error(), get_s(), vpGenericFeature::get_s(), getDimension(), vpFeatureMoment::getDimension(), vpFeatureVanishingPoint::init(), vpFeatureLuminance::init(), vpFeatureEllipse::init(), vpFeatureSegment::init(), vpFeatureDepth::init(), vpFeaturePoint::init(), vpFeatureMoment::init(), vpFeatureLine::init(), vpFeaturePoint3D::init(), vpFeatureThetaU::init(), vpFeaturePointPolar::init(), vpFeatureTranslation::init(), vpFeatureLuminance::interaction(), vpGenericFeature::interaction(), vpFeatureMoment::interaction(), vpFeatureLuminance::operator=(), operator=(), vpGenericFeature::print(), vpFeatureMoment::print(), vpGenericFeature::set_s(), vpGenericFeature::setError(), vpGenericFeature::setInteractionMatrix(), vpFeatureMoment::update(), vpFeatureLuminance::vpFeatureLuminance(), and vpGenericFeature::vpGenericFeature().
|
static |
Definition at line 80 of file vpBasicFeature.h.
Referenced by error(), vpGenericFeature::error(), get_s(), getDimension(), vpFeatureMoment::getDimension(), vpGenericFeature::interaction(), vpFeatureMoment::interaction(), vpGenericFeature::print(), vpFeatureMoment::print(), vpFeatureEllipse::select_n02(), vpFeatureEllipse::select_n11(), vpFeatureEllipse::select_n20(), vpFeatureVanishingPoint::selectAlpha(), vpFeatureSegment::selectAlpha(), vpFeatureVanishingPoint::selectAtanOneOverRho(), vpFeatureSegment::selectL(), vpFeatureEllipse::selectMu02(), vpFeatureEllipse::selectMu11(), vpFeatureEllipse::selectMu20(), vpFeatureVanishingPoint::selectOneOverRho(), vpFeatureLine::selectRho(), vpFeaturePointPolar::selectRho(), vpFeatureLine::selectTheta(), vpFeaturePointPolar::selectTheta(), vpFeatureThetaU::selectTUx(), vpFeatureThetaU::selectTUy(), vpFeatureThetaU::selectTUz(), vpFeatureTranslation::selectTx(), vpFeatureTranslation::selectTy(), vpFeatureTranslation::selectTz(), vpFeatureVanishingPoint::selectX(), vpFeatureEllipse::selectX(), vpFeaturePoint::selectX(), vpFeaturePoint3D::selectX(), vpFeatureSegment::selectXc(), vpFeatureVanishingPoint::selectY(), vpFeatureEllipse::selectY(), vpFeaturePoint::selectY(), vpFeaturePoint3D::selectY(), vpFeatureSegment::selectYc(), and vpFeaturePoint3D::selectZ().
|
protected |
Ensure that all the parameters needed to compute the iteraction matrix are set.
Definition at line 98 of file vpBasicFeature.h.
Referenced by vpFeatureEllipse::buildFrom(), vpFeatureDepth::buildFrom(), vpFeaturePoint::buildFrom(), vpFeatureLine::buildFrom(), vpFeaturePoint3D::buildFrom(), vpFeatureThetaU::buildFrom(), vpFeaturePointPolar::buildFrom(), vpFeatureTranslation::buildFrom(), vpFeatureMoment::duplicate(), vpFeatureVanishingPoint::init(), vpFeatureLuminance::init(), vpFeatureEllipse::init(), vpFeatureSegment::init(), vpFeatureDepth::init(), vpFeaturePoint::init(), vpFeatureMoment::init(), vpFeatureLine::init(), vpFeaturePoint3D::init(), vpFeatureThetaU::init(), vpFeaturePointPolar::init(), vpFeatureTranslation::init(), vpFeatureVanishingPoint::interaction(), vpFeatureEllipse::interaction(), vpFeatureSegment::interaction(), vpFeatureDepth::interaction(), vpFeaturePoint::interaction(), vpFeatureLine::interaction(), vpFeaturePoint3D::interaction(), vpFeatureThetaU::interaction(), vpFeaturePointPolar::interaction(), vpFeatureTranslation::interaction(), operator=(), resetFlags(), vpFeaturePointPolar::set_rho(), vpFeaturePointPolar::set_rhoThetaZ(), vpFeaturePointPolar::set_theta(), vpFeatureThetaU::set_TUx(), vpFeatureThetaU::set_TUy(), vpFeatureThetaU::set_TUz(), vpFeatureVanishingPoint::set_x(), vpFeatureEllipse::set_x(), vpFeatureDepth::set_x(), vpFeaturePoint::set_x(), vpFeaturePoint3D::set_X(), vpFeatureEllipse::set_xy(), vpFeaturePoint::set_xyZ(), vpFeaturePoint3D::set_XYZ(), vpFeatureDepth::set_xyZLogZoverZstar(), vpFeatureVanishingPoint::set_y(), vpFeatureEllipse::set_y(), vpFeatureDepth::set_y(), vpFeaturePoint::set_y(), vpFeaturePoint3D::set_Y(), vpFeatureLuminance::set_Z(), vpFeatureDepth::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 vpFeatureEllipse::buildFrom(), vpFeatureDepth::buildFrom(), vpFeaturePoint::buildFrom(), vpFeatureLine::buildFrom(), vpFeaturePoint3D::buildFrom(), vpFeatureThetaU::buildFrom(), vpFeaturePointPolar::buildFrom(), vpFeatureMoment::duplicate(), vpFeatureVanishingPoint::init(), vpFeatureLuminance::init(), vpFeatureEllipse::init(), vpFeatureSegment::init(), vpFeatureDepth::init(), vpFeaturePoint::init(), vpFeatureMoment::init(), vpFeatureLine::init(), vpFeaturePoint3D::init(), vpFeatureThetaU::init(), vpFeaturePointPolar::init(), vpFeatureTranslation::init(), vpFeatureVanishingPoint::interaction(), vpFeatureEllipse::interaction(), vpFeatureSegment::interaction(), vpFeatureDepth::interaction(), vpFeaturePoint::interaction(), vpFeatureLine::interaction(), vpFeaturePoint3D::interaction(), vpFeatureThetaU::interaction(), vpFeaturePointPolar::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 vpFeatureEllipse::buildFrom(), vpFeatureLuminance::buildFrom(), vpFeatureDepth::buildFrom(), vpFeaturePoint::buildFrom(), vpFeatureLine::buildFrom(), vpFeaturePoint3D::buildFrom(), vpFeatureThetaU::buildFrom(), vpFeaturePointPolar::buildFrom(), vpFeatureTranslation::buildFrom(), vpFeatureEllipse::display(), vpFeatureMoment::duplicate(), vpFeatureEllipse::error(), vpFeatureVanishingPoint::error(), vpFeatureLuminance::error(), error(), vpFeatureMomentAlpha::error(), vpFeatureDepth::error(), vpGenericFeature::error(), vpFeaturePoint::error(), vpFeatureLine::error(), vpFeaturePoint3D::error(), vpFeatureThetaU::error(), vpFeaturePointPolar::error(), vpFeatureTranslation::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(), vpFeatureVanishingPoint::get_x(), vpFeaturePoint::get_x(), vpFeaturePoint3D::get_X(), vpFeatureVanishingPoint::get_y(), vpFeaturePoint::get_y(), vpFeaturePoint3D::get_Y(), vpFeaturePoint3D::get_Z(), vpFeatureVanishingPoint::getAlpha(), vpFeatureVanishingPoint::getAtanOneOverRho(), getDimension(), vpFeatureVanishingPoint::getOneOverRho(), vpFeatureVanishingPoint::init(), vpFeatureLuminance::init(), vpFeatureEllipse::init(), vpFeatureSegment::init(), vpFeatureDepth::init(), vpGenericFeature::init(), vpFeaturePoint::init(), vpFeatureMoment::init(), vpFeatureLine::init(), vpFeaturePoint3D::init(), vpFeatureThetaU::init(), vpFeaturePointPolar::init(), vpFeatureTranslation::init(), vpFeatureEllipse::interaction(), vpFeatureLine::interaction(), vpFeatureThetaU::interaction(), vpFeatureTranslation::interaction(), operator=(), vpFeatureEllipse::print(), vpFeatureSegment::print(), vpGenericFeature::print(), vpFeatureMoment::print(), vpFeatureLine::print(), vpFeatureThetaU::print(), vpFeatureTranslation::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(), vpFeatureVanishingPoint::set_x(), vpFeatureEllipse::set_x(), vpFeaturePoint::set_x(), vpFeaturePoint3D::set_X(), vpFeatureEllipse::set_xy(), vpFeatureVanishingPoint::set_y(), vpFeatureEllipse::set_y(), vpFeaturePoint::set_y(), vpFeaturePoint3D::set_Y(), vpFeaturePoint3D::set_Z(), vpFeatureVanishingPoint::setAlpha(), vpFeatureVanishingPoint::setAtanOneOverRho(), vpFeatureEllipse::setMoments(), vpFeatureVanishingPoint::setOneOverRho(), vpFeatureLine::setRhoTheta(), vpFeatureMoment::update(), and vpGenericFeature::vpGenericFeature().