ViSP
2.8.0
|
#include <vpFeatureLuminance.h>
Public Types | |
enum | vpBasicFeatureDeallocatorType { user, vpServo } |
Public Member Functions | |
void | buildFrom (vpImage< unsigned char > &I) |
void | init () |
void | init (unsigned int _nbr, unsigned int _nbc, double _Z) |
vpFeatureLuminance () | |
virtual | ~vpFeatureLuminance () |
void | setCameraParameters (vpCameraParameters &_cam) |
void | set_Z (const double Z) |
double | get_Z () const |
vpMatrix | interaction (const unsigned int select=FEATURE_ALL) |
void | interaction (vpMatrix &L) |
vpColVector | error (const vpBasicFeature &s_star, const unsigned int select=FEATURE_ALL) |
void | error (const vpBasicFeature &s_star, vpColVector &e) |
void | print (const unsigned int select=FEATURE_ALL) const |
vpFeatureLuminance * | 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 |
vpColVector | error (const unsigned int select=FEATURE_ALL) |
unsigned int | dimension_s () |
virtual double | operator[] (const unsigned int i) const |
vpColVector | get_s (unsigned int select=FEATURE_ALL) const |
unsigned int | getDimension (const unsigned int select=FEATURE_ALL) const |
void | setFlags () |
void | setDeallocate (vpBasicFeatureDeallocatorType d) |
vpBasicFeatureDeallocatorType | getDeallocate () |
Static Public Member Functions | |
static unsigned int | selectAll () |
Public Attributes | |
vpCameraParameters | cam |
Static Public Attributes | |
static const unsigned int | FEATURE_LINE [32] |
static const unsigned int | FEATURE_ALL = 0xffff |
Protected Member Functions | |
void | resetFlags () |
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 |
vpBasicFeatureDeallocatorType | deallocate |
Class that defines the image luminance visual feature.
For more details see C. Collewet, E. Marchand, F. Chaumette. Visual servoing set free from image processing. In IEEE Int. Conf. on Robotics and Automation, ICRA'08, Pages 81-86, Pasadena, Californie, Mai 2008.
Definition at line 92 of file vpFeatureLuminance.h.
|
inherited |
Indicates who should deallocate the feature.
Enumerator | |
---|---|
user | |
vpServo |
Definition at line 152 of file vpBasicFeature.h.
vpFeatureLuminance::vpFeatureLuminance | ( | ) |
Default constructor that build a visual feature.
Definition at line 73 of file vpFeatureLuminance.cpp.
References bord, vpBasicFeature::dim_s, vpBasicFeature::flags, init(), vpBasicFeature::nbParameters, and pixInfo.
Referenced by duplicate().
|
virtual |
Destructor.
Default destructor.
Definition at line 87 of file vpFeatureLuminance.cpp.
References vpBasicFeature::flags, and pixInfo.
void vpFeatureLuminance::buildFrom | ( | vpImage< unsigned char > & | I | ) |
Build a luminance feature directly from the image
Definition at line 133 of file vpFeatureLuminance.cpp.
References bord, cam, vpPixelMeterConversion::convertPoint(), vpImageFilter::derivativeFilterX(), vpImageFilter::derivativeFilterY(), firstTimeIn, vpCameraParameters::get_px(), vpCameraParameters::get_py(), vpLuminance::I, vpLuminance::Ix, vpLuminance::Iy, nbc, nbr, pixInfo, vpBasicFeature::s, vpLuminance::x, vpLuminance::y, vpLuminance::Z, and Z.
|
inlineinherited |
Return the dimension of the feature vector .
Definition at line 102 of file vpBasicFeature.h.
|
virtual |
Not implemented.
Implements vpBasicFeature.
Definition at line 305 of file vpFeatureLuminance.cpp.
References vpERROR_TRACE.
|
virtual |
Not implemented.
Implements vpBasicFeature.
Definition at line 327 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 264 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 243 of file vpFeatureLuminance.cpp.
References vpBasicFeature::dim_s, vpColVector::resize(), and vpBasicFeature::s.
vpColVector vpFeatureLuminance::error | ( | const unsigned int | select = FEATURE_ALL | ) |
Compute the error between a visual features and zero.
|
inherited |
Get the feature vector .
Definition at line 105 of file vpBasicFeature.cpp.
References vpBasicFeature::dim_s, vpBasicFeature::FEATURE_LINE, vpBasicFeature::s, and vpMatrix::stackMatrices().
Referenced by vpServo::computeError(), vpBasicFeature::error(), vpGenericFeature::error(), vpFeatureDepth::error(), vpFeatureThetaU::error(), and vpFeatureTranslation::error().
double vpFeatureLuminance::get_Z | ( | ) | const |
Get the value of which represents the depth in the 3D camera frame.
Definition at line 114 of file vpFeatureLuminance.cpp.
References Z.
|
inlineinherited |
Definition at line 162 of file vpBasicFeature.h.
Referenced by vpServo::kill().
|
inherited |
Get the feature vector dimension.
Definition at line 90 of file vpBasicFeature.cpp.
References vpBasicFeature::dim_s, vpBasicFeature::FEATURE_LINE, vpMatrix::getRows(), and vpBasicFeature::s.
Referenced by vpServo::getDimension().
|
virtual |
Initialize the memory space requested for vpFeatureLuminance visual feature.
Implements vpBasicFeature.
Definition at line 31 of file vpFeatureLuminance.cpp.
References firstTimeIn, vpBasicFeature::flags, vpBasicFeature::nbParameters, and Z.
Referenced by init(), and vpFeatureLuminance().
void vpFeatureLuminance::init | ( | unsigned int | _nbr, |
unsigned int | _nbc, | ||
double | _Z | ||
) |
Definition at line 46 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 227 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 197 of file vpFeatureLuminance.cpp.
References vpBasicFeature::dim_s, vpMatrix::getRows(), vpLuminance::Ix, vpLuminance::Iy, pixInfo, vpMatrix::resize(), vpLuminance::x, vpLuminance::y, and vpLuminance::Z.
|
inlinevirtualinherited |
Return element i in the state vector (usage : x = s[i] )
Definition at line 111 of file vpBasicFeature.h.
|
virtual |
Not implemented.
Implements vpBasicFeature.
Definition at line 284 of file vpFeatureLuminance.cpp.
References vpERROR_TRACE.
|
protectedinherited |
Definition at line 123 of file vpBasicFeature.cpp.
References vpBasicFeature::flags, and vpBasicFeature::nbParameters.
Referenced by vpFeatureEllipse::interaction(), vpFeatureVanishingPoint::interaction(), vpFeatureDepth::interaction(), vpFeaturePoint::interaction(), vpFeatureLine::interaction(), vpFeaturePoint3D::interaction(), vpFeaturePointPolar::interaction(), vpFeatureThetaU::interaction(), and vpFeatureTranslation::interaction().
|
inlinestaticinherited |
Select all the features.
Definition at line 114 of file vpBasicFeature.h.
void vpFeatureLuminance::set_Z | ( | const double | Z | ) |
Set the value of which represents the depth in the 3D camera frame.
Z | : value to set. |
Definition at line 101 of file vpFeatureLuminance.cpp.
References vpBasicFeature::flags, and Z.
void vpFeatureLuminance::setCameraParameters | ( | vpCameraParameters & | _cam | ) |
Definition at line 121 of file vpFeatureLuminance.cpp.
References cam.
|
inlineinherited |
Definition at line 161 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 133 of file vpBasicFeature.cpp.
References vpBasicFeature::flags, and vpBasicFeature::nbParameters.
|
protected |
Border size.
Definition at line 104 of file vpFeatureLuminance.h.
Referenced by buildFrom(), init(), and vpFeatureLuminance().
vpCameraParameters vpFeatureLuminance::cam |
Definition at line 124 of file vpFeatureLuminance.h.
Referenced by buildFrom(), and setCameraParameters().
|
protectedinherited |
Definition at line 159 of file vpBasicFeature.h.
Referenced by vpFeatureEllipse::interaction(), vpFeatureVanishingPoint::interaction(), vpFeatureSegment::interaction(), vpFeatureDepth::interaction(), vpFeaturePoint::interaction(), vpFeatureLine::interaction(), vpFeaturePoint3D::interaction(), vpFeaturePointPolar::interaction(), vpFeatureThetaU::interaction(), vpFeatureTranslation::interaction(), and vpBasicFeature::vpBasicFeature().
|
protectedinherited |
Dimension of the visual feature.
Definition at line 93 of file vpBasicFeature.h.
Referenced by vpFeatureMoment::duplicate(), vpGenericFeature::duplicate(), vpBasicFeature::error(), error(), vpGenericFeature::error(), vpBasicFeature::get_s(), vpGenericFeature::get_s(), vpBasicFeature::getDimension(), vpFeatureMoment::getDimension(), vpFeatureEllipse::init(), vpFeatureVanishingPoint::init(), init(), vpFeatureSegment::init(), vpFeatureDepth::init(), vpFeatureMoment::init(), vpFeaturePoint::init(), vpFeatureLine::init(), vpFeaturePoint3D::init(), vpFeatureThetaU::init(), vpFeaturePointPolar::init(), vpFeatureTranslation::init(), interaction(), vpFeatureMoment::interaction(), vpGenericFeature::interaction(), vpGenericFeature::print(), vpFeatureMoment::print(), vpGenericFeature::set_s(), vpGenericFeature::setError(), vpGenericFeature::setInteractionMatrix(), vpFeatureMoment::update(), vpFeatureLuminance(), and vpGenericFeature::vpGenericFeature().
|
staticinherited |
Definition at line 87 of file vpBasicFeature.h.
Referenced by vpFeatureDepth::error(), vpFeatureDepth::interaction(), and vpFeatureDepth::print().
|
staticinherited |
Definition at line 85 of file vpBasicFeature.h.
Referenced by vpBasicFeature::error(), vpGenericFeature::error(), vpBasicFeature::get_s(), vpBasicFeature::getDimension(), vpFeatureMoment::getDimension(), vpFeatureMoment::interaction(), vpGenericFeature::interaction(), vpGenericFeature::print(), and vpFeatureMoment::print().
|
protected |
Definition at line 108 of file vpFeatureLuminance.h.
Referenced by buildFrom(), and init().
|
protectedinherited |
Ensure that all the parameters needed to compute the iteraction matrix are set.
Definition at line 96 of file vpBasicFeature.h.
Referenced by vpFeatureEllipse::buildFrom(), vpFeatureVanishingPoint::buildFrom(), vpFeatureDepth::buildFrom(), vpFeaturePoint::buildFrom(), vpFeatureLine::buildFrom(), vpFeaturePoint3D::buildFrom(), vpFeatureThetaU::buildFrom(), vpFeaturePointPolar::buildFrom(), vpFeatureTranslation::buildFrom(), vpFeatureMoment::duplicate(), vpFeatureEllipse::init(), vpFeatureVanishingPoint::init(), init(), vpFeatureSegment::init(), vpFeatureDepth::init(), vpFeatureMoment::init(), vpFeaturePoint::init(), vpFeatureLine::init(), vpFeaturePoint3D::init(), vpFeatureThetaU::init(), vpFeaturePointPolar::init(), vpFeatureTranslation::init(), vpFeatureEllipse::interaction(), vpFeatureVanishingPoint::interaction(), vpFeatureSegment::interaction(), vpFeatureDepth::interaction(), vpFeaturePoint::interaction(), vpFeatureLine::interaction(), vpFeaturePoint3D::interaction(), vpFeaturePointPolar::interaction(), vpFeatureThetaU::interaction(), vpFeatureTranslation::interaction(), vpBasicFeature::resetFlags(), vpFeaturePointPolar::set_rho(), vpFeaturePointPolar::set_rhoThetaZ(), vpFeaturePointPolar::set_theta(), vpFeatureThetaU::set_TUx(), vpFeatureThetaU::set_TUy(), vpFeatureThetaU::set_TUz(), vpFeatureEllipse::set_x(), vpFeatureVanishingPoint::set_x(), vpFeatureDepth::set_x(), vpFeaturePoint::set_x(), vpFeaturePoint3D::set_X(), vpFeatureEllipse::set_xy(), vpFeaturePoint::set_xyZ(), vpFeaturePoint3D::set_XYZ(), vpFeatureDepth::set_xyZLogZoverZstar(), vpFeatureEllipse::set_y(), vpFeatureVanishingPoint::set_y(), vpFeatureDepth::set_y(), vpFeaturePoint::set_y(), vpFeaturePoint3D::set_Y(), set_Z(), vpFeatureDepth::set_Z(), vpFeaturePoint::set_Z(), vpFeaturePoint3D::set_Z(), vpFeaturePointPolar::set_Z(), vpFeatureEllipse::setABC(), vpFeatureLine::setABCD(), vpBasicFeature::setFlags(), vpFeatureEllipse::setMu(), vpFeatureLine::setRhoTheta(), vpFeatureMoment::update(), vpBasicFeature::vpBasicFeature(), vpFeatureLuminance(), vpFeatureDepth::~vpFeatureDepth(), vpFeatureEllipse::~vpFeatureEllipse(), vpFeatureLine::~vpFeatureLine(), ~vpFeatureLuminance(), vpFeatureMoment::~vpFeatureMoment(), vpFeaturePoint::~vpFeaturePoint(), vpFeaturePoint3D::~vpFeaturePoint3D(), vpFeaturePointPolar::~vpFeaturePointPolar(), vpFeatureSegment::~vpFeatureSegment(), vpFeatureThetaU::~vpFeatureThetaU(), vpFeatureTranslation::~vpFeatureTranslation(), and vpFeatureVanishingPoint::~vpFeatureVanishingPoint().
|
protected |
Number of column.
Definition at line 102 of file vpFeatureLuminance.h.
Referenced by buildFrom(), and init().
|
protectedinherited |
Number of parameters needed to compute the interaction matrix.
Definition at line 98 of file vpBasicFeature.h.
Referenced by vpFeatureEllipse::buildFrom(), vpFeatureVanishingPoint::buildFrom(), vpFeatureDepth::buildFrom(), vpFeaturePoint::buildFrom(), vpFeatureLine::buildFrom(), vpFeaturePoint3D::buildFrom(), vpFeatureThetaU::buildFrom(), vpFeaturePointPolar::buildFrom(), vpFeatureMoment::duplicate(), vpFeatureEllipse::init(), vpFeatureVanishingPoint::init(), init(), vpFeatureSegment::init(), vpFeatureDepth::init(), vpFeatureMoment::init(), vpFeaturePoint::init(), vpFeatureLine::init(), vpFeaturePoint3D::init(), vpFeatureThetaU::init(), vpFeaturePointPolar::init(), vpFeatureTranslation::init(), vpFeatureEllipse::interaction(), vpFeatureVanishingPoint::interaction(), vpFeatureSegment::interaction(), vpFeatureDepth::interaction(), vpFeaturePoint::interaction(), vpFeatureLine::interaction(), vpFeaturePoint3D::interaction(), vpFeaturePointPolar::interaction(), vpFeatureThetaU::interaction(), vpFeatureTranslation::interaction(), 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 100 of file vpFeatureLuminance.h.
Referenced by buildFrom(), and init().
|
protected |
Store the image (as a vector with intensity and gradient I, Ix, Iy)
Definition at line 107 of file vpFeatureLuminance.h.
Referenced by buildFrom(), init(), interaction(), vpFeatureLuminance(), and ~vpFeatureLuminance().
|
protectedinherited |
State of the visual feature.
Definition at line 91 of file vpBasicFeature.h.
Referenced by vpFeatureEllipse::buildFrom(), vpFeatureVanishingPoint::buildFrom(), buildFrom(), vpFeatureDepth::buildFrom(), vpFeaturePoint::buildFrom(), vpFeatureLine::buildFrom(), vpFeaturePoint3D::buildFrom(), vpFeatureThetaU::buildFrom(), vpFeaturePointPolar::buildFrom(), vpFeatureTranslation::buildFrom(), vpFeatureEllipse::display(), vpFeatureMoment::duplicate(), vpBasicFeature::error(), vpFeatureEllipse::error(), vpFeatureVanishingPoint::error(), error(), vpFeatureMomentAlpha::error(), vpGenericFeature::error(), vpFeatureDepth::error(), vpFeaturePoint::error(), vpFeatureLine::error(), vpFeaturePoint3D::error(), vpFeaturePointPolar::error(), vpFeatureThetaU::error(), vpFeatureTranslation::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(), vpFeatureVanishingPoint::get_x(), vpFeaturePoint::get_x(), vpFeaturePoint3D::get_X(), vpFeatureVanishingPoint::get_y(), vpFeaturePoint::get_y(), vpFeaturePoint3D::get_Y(), vpFeaturePoint3D::get_Z(), vpBasicFeature::getDimension(), vpFeatureEllipse::init(), vpFeatureVanishingPoint::init(), init(), vpFeatureSegment::init(), vpFeatureDepth::init(), vpGenericFeature::init(), vpFeatureMoment::init(), vpFeaturePoint::init(), vpFeatureLine::init(), vpFeaturePoint3D::init(), vpFeatureThetaU::init(), vpFeaturePointPolar::init(), vpFeatureTranslation::init(), vpFeatureEllipse::interaction(), vpFeatureLine::interaction(), vpFeaturePointPolar::interaction(), vpFeatureThetaU::interaction(), vpFeatureTranslation::interaction(), 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(), vpFeatureEllipse::set_x(), vpFeatureVanishingPoint::set_x(), vpFeaturePoint::set_x(), vpFeaturePoint3D::set_X(), vpFeatureEllipse::set_xy(), vpFeatureEllipse::set_y(), vpFeatureVanishingPoint::set_y(), vpFeaturePoint::set_y(), vpFeaturePoint3D::set_Y(), vpFeaturePoint3D::set_Z(), vpFeatureEllipse::setMu(), vpFeatureLine::setRhoTheta(), vpFeatureMoment::update(), and vpGenericFeature::vpGenericFeature().
|
protected |
FeaturePoint depth (required to compute the interaction matrix) default Z = 1m
Definition at line 97 of file vpFeatureLuminance.h.
Referenced by buildFrom(), get_Z(), init(), and set_Z().