Visual Servoing Platform
version 3.5.1 under development (2023-09-22)
|
#include <visp3/visual_features/vpFeatureLuminance.h>
Public Types | |
enum | { FEATURE_ALL = 0xffff } |
enum | vpBasicFeatureDeallocatorType { user , vpServo } |
Public Member Functions | |
vpFeatureLuminance () | |
vpFeatureLuminance (const vpFeatureLuminance &f) | |
virtual | ~vpFeatureLuminance () |
void | buildFrom (vpImage< unsigned char > &I) |
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 |
vpFeatureLuminance * | duplicate () const |
vpColVector | error (const vpBasicFeature &s_star, unsigned int select=FEATURE_ALL) |
void | error (const vpBasicFeature &s_star, vpColVector &e) |
double | get_Z () const |
void | init () |
void | init (unsigned int _nbr, unsigned int _nbc, double _Z) |
vpMatrix | interaction (unsigned int select=FEATURE_ALL) |
void | interaction (vpMatrix &L) |
vpFeatureLuminance & | operator= (const vpFeatureLuminance &f) |
void | print (unsigned int select=FEATURE_ALL) const |
void | setCameraParameters (vpCameraParameters &_cam) |
void | set_Z (double Z) |
Public Attributes | |
vpCameraParameters | cam |
Static Public Attributes | |
static const unsigned int | FEATURE_LINE [32] |
Protected Attributes | |
double | Z |
unsigned int | nbr |
unsigned int | nbc |
unsigned int | bord |
vpLuminance * | pixInfo |
int | firstTimeIn |
vpColVector | s |
unsigned int | dim_s |
bool * | flags |
unsigned int | nbParameters |
Inherited functionalities from vpBasicFeature | |
vpBasicFeatureDeallocatorType | deallocate |
unsigned int | dimension_s () |
vpColVector | get_s (unsigned int select=FEATURE_ALL) const |
vpBasicFeatureDeallocatorType | getDeallocate () |
unsigned int | getDimension (unsigned int select=FEATURE_ALL) const |
virtual double | operator[] (unsigned int i) const |
void | setDeallocate (vpBasicFeatureDeallocatorType d) |
void | setFlags () |
static unsigned int | selectAll () |
void | resetFlags () |
Class that defines the image luminance visual feature.
For more details see [7].
Definition at line 76 of file vpFeatureLuminance.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.
vpFeatureLuminance::vpFeatureLuminance | ( | ) |
Default constructor that build a visual feature.
Definition at line 98 of file vpFeatureLuminance.cpp.
References vpBasicFeature::dim_s, vpBasicFeature::flags, init(), and vpBasicFeature::nbParameters.
Referenced by duplicate().
vpFeatureLuminance::vpFeatureLuminance | ( | const vpFeatureLuminance & | f | ) |
Copy constructor.
Definition at line 110 of file vpFeatureLuminance.cpp.
|
virtual |
Destructor.
Destructor that free allocated memory.
Definition at line 138 of file vpFeatureLuminance.cpp.
References pixInfo.
void vpFeatureLuminance::buildFrom | ( | vpImage< unsigned char > & | I | ) |
Build a luminance feature directly from the image
Definition at line 171 of file vpFeatureLuminance.cpp.
References bord, cam, vpPixelMeterConversion::convertPoint(), vpImageFilter::derivativeFilterX(), vpImageFilter::derivativeFilterY(), firstTimeIn, vpCameraParameters::get_px(), vpCameraParameters::get_py(), nbc, nbr, pixInfo, vpBasicFeature::s, and Z.
|
inlineinherited |
Return the dimension of the feature vector .
Definition at line 109 of file vpBasicFeature.h.
|
virtual |
Not implemented.
Implements vpBasicFeature.
Definition at line 313 of file vpFeatureLuminance.cpp.
References vpERROR_TRACE.
|
virtual |
Not implemented.
Implements vpBasicFeature.
Definition at line 331 of file vpFeatureLuminance.cpp.
References vpERROR_TRACE.
|
virtual |
Create an object with the same type.
Implements vpBasicFeature.
Definition at line 354 of file vpFeatureLuminance.cpp.
References vpFeatureLuminance().
|
virtual |
Compute the error between the current and the desired
s_star | : Desired visual feature. |
select | : Not used. |
Reimplemented from vpBasicFeature.
Definition at line 281 of file vpFeatureLuminance.cpp.
void vpFeatureLuminance::error | ( | const vpBasicFeature & | s_star, |
vpColVector & | e | ||
) |
Compute the error between the current and the desired
s_star | : Desired visual feature. |
e | : Error between the current and the desired features. |
Definition at line 265 of file vpFeatureLuminance.cpp.
References vpBasicFeature::dim_s, vpColVector::resize(), and vpBasicFeature::s.
|
inherited |
Get the feature vector .
Definition at line 112 of file vpBasicFeature.cpp.
References vpBasicFeature::dim_s, vpBasicFeature::FEATURE_LINE, vpBasicFeature::s, and vpColVector::stack().
Referenced by vpServo::computeError(), vpBasicFeature::error(), vpFeatureDepth::error(), vpFeatureThetaU::error(), vpFeatureTranslation::error(), and vpGenericFeature::error().
double vpFeatureLuminance::get_Z | ( | ) | const |
Get the value of which represents the depth in the 3D camera frame.
Definition at line 162 of file vpFeatureLuminance.cpp.
References Z.
|
inlineinherited |
Definition at line 122 of file vpBasicFeature.h.
|
inherited |
Get the feature vector dimension.
Definition at line 99 of file vpBasicFeature.cpp.
References vpBasicFeature::dim_s, vpBasicFeature::FEATURE_LINE, vpArray2D< Type >::getRows(), and vpBasicFeature::s.
|
virtual |
Initialize the memory space requested for vpFeatureLuminance visual feature.
Implements vpBasicFeature.
Definition at line 56 of file vpFeatureLuminance.cpp.
References firstTimeIn, vpBasicFeature::flags, nbc, vpBasicFeature::nbParameters, nbr, and Z.
Referenced by init(), and vpFeatureLuminance().
void vpFeatureLuminance::init | ( | unsigned int | _nbr, |
unsigned int | _nbc, | ||
double | _Z | ||
) |
Definition at line 71 of file vpFeatureLuminance.cpp.
References bord, vpBasicFeature::dim_s, vpException::dimensionError, init(), nbc, nbr, pixInfo, vpColVector::resize(), vpBasicFeature::s, and Z.
|
virtual |
Compute and return the interaction matrix . The computation is made thanks to the values of the luminance features
Implements vpBasicFeature.
Definition at line 250 of file vpFeatureLuminance.cpp.
void vpFeatureLuminance::interaction | ( | vpMatrix & | L | ) |
Compute and return the interaction matrix . The computation is made thanks to the values of the luminance features
Definition at line 223 of file vpFeatureLuminance.cpp.
References vpBasicFeature::dim_s, and pixInfo.
vpFeatureLuminance & vpFeatureLuminance::operator= | ( | const vpFeatureLuminance & | f | ) |
Copy operator.
Definition at line 119 of file vpFeatureLuminance.cpp.
References bord, cam, vpBasicFeature::dim_s, firstTimeIn, nbc, nbr, pixInfo, and Z.
|
inlinevirtualinherited |
Return element i in the state vector (usage : x = s[i] )
Definition at line 129 of file vpBasicFeature.h.
|
virtual |
Not implemented.
Implements vpBasicFeature.
Definition at line 296 of file vpFeatureLuminance.cpp.
References vpERROR_TRACE.
|
protectedinherited |
Definition at line 129 of file vpBasicFeature.cpp.
References vpBasicFeature::flags, and vpBasicFeature::nbParameters.
Referenced by vpFeatureVanishingPoint::interaction(), vpFeatureDepth::interaction(), vpFeatureEllipse::interaction(), vpFeatureLine::interaction(), vpFeaturePoint::interaction(), vpFeaturePoint3D::interaction(), vpFeaturePointPolar::interaction(), vpFeatureThetaU::interaction(), and vpFeatureTranslation::interaction().
|
inlinestaticinherited |
Select all the features.
Definition at line 141 of file vpBasicFeature.h.
void vpFeatureLuminance::set_Z | ( | double | Z_ | ) |
Set the value of which represents the depth in the 3D camera frame.
Z_ | : value to set. |
Definition at line 150 of file vpFeatureLuminance.cpp.
References vpBasicFeature::flags, and Z.
void vpFeatureLuminance::setCameraParameters | ( | vpCameraParameters & | _cam | ) |
Definition at line 164 of file vpFeatureLuminance.cpp.
References cam.
|
inlineinherited |
Definition at line 136 of file vpBasicFeature.h.
Referenced by vpServo::addFeature().
|
inherited |
Set feature flags to true to prevent warning when re-computing the interaction matrix without having updated the feature.
Definition at line 139 of file vpBasicFeature.cpp.
References vpBasicFeature::flags, and vpBasicFeature::nbParameters.
|
protected |
Border size.
Definition at line 88 of file vpFeatureLuminance.h.
Referenced by buildFrom(), init(), and operator=().
vpCameraParameters vpFeatureLuminance::cam |
Definition at line 127 of file vpFeatureLuminance.h.
Referenced by buildFrom(), operator=(), and setCameraParameters().
|
protectedinherited |
Definition at line 147 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 vpBasicFeature::operator=().
|
protectedinherited |
Dimension of the visual feature.
Definition at line 93 of file vpBasicFeature.h.
Referenced by vpFeatureMoment::duplicate(), vpGenericFeature::duplicate(), vpBasicFeature::error(), vpGenericFeature::error(), error(), vpBasicFeature::get_s(), vpGenericFeature::get_s(), vpBasicFeature::getDimension(), vpFeatureMoment::getDimension(), vpFeatureDepth::init(), vpFeatureEllipse::init(), vpFeatureLine::init(), vpFeaturePoint::init(), vpFeaturePoint3D::init(), vpFeaturePointPolar::init(), vpFeatureSegment::init(), vpFeatureThetaU::init(), vpFeatureTranslation::init(), vpFeatureVanishingPoint::init(), init(), vpFeatureMoment::init(), vpFeatureMoment::interaction(), vpGenericFeature::interaction(), interaction(), vpBasicFeature::operator=(), operator=(), vpFeatureMoment::print(), vpGenericFeature::print(), vpGenericFeature::set_s(), vpGenericFeature::setError(), vpGenericFeature::setInteractionMatrix(), vpFeatureMoment::update(), vpFeatureLuminance(), and vpGenericFeature::vpGenericFeature().
|
staticinherited |
Definition at line 79 of file vpBasicFeature.h.
Referenced by vpBasicFeature::error(), vpGenericFeature::error(), vpBasicFeature::get_s(), vpBasicFeature::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(), 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(), vpFeatureEllipse::selectX(), vpFeaturePoint::selectX(), vpFeaturePoint3D::selectX(), vpFeatureVanishingPoint::selectX(), vpFeatureSegment::selectXc(), vpFeatureEllipse::selectY(), vpFeaturePoint::selectY(), vpFeaturePoint3D::selectY(), vpFeatureVanishingPoint::selectY(), vpFeatureSegment::selectYc(), and vpFeaturePoint3D::selectZ().
|
protected |
Definition at line 92 of file vpFeatureLuminance.h.
Referenced by buildFrom(), init(), and operator=().
|
protectedinherited |
Ensure that all the parameters needed to compute the iteraction matrix are set.
Definition at line 97 of file vpBasicFeature.h.
Referenced by vpFeatureTranslation::buildFrom(), vpFeaturePoint3D::buildFrom(), vpFeatureLine::buildFrom(), vpFeaturePointPolar::buildFrom(), vpFeatureEllipse::buildFrom(), vpFeaturePoint::buildFrom(), vpFeatureDepth::buildFrom(), vpFeatureThetaU::buildFrom(), vpFeatureMoment::duplicate(), vpFeatureDepth::init(), vpFeatureEllipse::init(), vpFeatureLine::init(), 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(), vpBasicFeature::operator=(), vpBasicFeature::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(), set_Z(), vpFeaturePoint::set_Z(), vpFeaturePoint3D::set_Z(), vpFeaturePointPolar::set_Z(), vpFeatureEllipse::setABC(), vpFeatureLine::setABCD(), vpFeatureVanishingPoint::setAlpha(), vpFeatureVanishingPoint::setAtanOneOverRho(), vpBasicFeature::setFlags(), vpFeatureEllipse::setMoments(), vpFeatureVanishingPoint::setOneOverRho(), vpFeatureLine::setRhoTheta(), vpFeatureMoment::update(), vpFeatureLuminance(), and vpBasicFeature::~vpBasicFeature().
|
protected |
Number of column.
Definition at line 86 of file vpFeatureLuminance.h.
Referenced by buildFrom(), init(), and operator=().
|
protectedinherited |
Number of parameters needed to compute the interaction matrix.
Definition at line 99 of file vpBasicFeature.h.
Referenced by vpFeaturePoint3D::buildFrom(), vpFeatureLine::buildFrom(), vpFeaturePointPolar::buildFrom(), vpFeatureEllipse::buildFrom(), vpFeaturePoint::buildFrom(), vpFeatureDepth::buildFrom(), vpFeatureThetaU::buildFrom(), vpFeatureMoment::duplicate(), vpFeatureDepth::init(), vpFeatureEllipse::init(), vpFeatureLine::init(), 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(), vpBasicFeature::operator=(), vpBasicFeature::resetFlags(), vpFeaturePointPolar::set_rhoThetaZ(), vpFeaturePoint::set_xyZ(), vpFeaturePoint3D::set_XYZ(), vpFeatureDepth::set_xyZLogZoverZstar(), vpFeatureEllipse::setABC(), vpFeatureLine::setABCD(), vpBasicFeature::setFlags(), vpFeatureMoment::update(), and vpFeatureLuminance().
|
protected |
Number of rows.
Definition at line 84 of file vpFeatureLuminance.h.
Referenced by buildFrom(), init(), and operator=().
|
protected |
Store the image (as a vector with intensity and gradient I, Ix, Iy)
Definition at line 91 of file vpFeatureLuminance.h.
Referenced by buildFrom(), init(), interaction(), operator=(), and ~vpFeatureLuminance().
|
protectedinherited |
State of the visual feature.
Definition at line 91 of file vpBasicFeature.h.
Referenced by vpFeatureTranslation::buildFrom(), vpFeaturePoint3D::buildFrom(), vpFeatureLine::buildFrom(), vpFeaturePointPolar::buildFrom(), vpFeatureEllipse::buildFrom(), vpFeaturePoint::buildFrom(), vpFeatureDepth::buildFrom(), buildFrom(), vpFeatureThetaU::buildFrom(), vpFeatureEllipse::display(), vpFeatureMoment::duplicate(), vpFeatureVanishingPoint::error(), vpBasicFeature::error(), vpFeatureDepth::error(), vpFeatureEllipse::error(), vpFeatureLine::error(), vpFeatureMomentAlpha::error(), vpFeaturePoint::error(), vpFeaturePoint3D::error(), vpFeaturePointPolar::error(), vpFeatureThetaU::error(), vpFeatureTranslation::error(), vpGenericFeature::error(), error(), vpFeatureDepth::get_LogZoverZstar(), vpFeaturePointPolar::get_rho(), vpBasicFeature::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(), vpBasicFeature::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(), init(), vpFeatureMoment::init(), vpFeatureEllipse::interaction(), vpFeatureLine::interaction(), vpFeatureThetaU::interaction(), vpFeatureTranslation::interaction(), vpBasicFeature::operator=(), vpFeatureEllipse::print(), vpFeatureLine::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().
|
protected |
FeaturePoint depth (required to compute the interaction matrix) default Z = 1m
Definition at line 81 of file vpFeatureLuminance.h.
Referenced by buildFrom(), get_Z(), init(), operator=(), and set_Z().