Visual Servoing Platform
version 3.5.1 under development (2023-09-22)
|
#include <visp3/visual_features/vpFeatureEllipse.h>
Public Types | |
enum | { FEATURE_ALL = 0xffff } |
enum | vpBasicFeatureDeallocatorType { user , vpServo } |
Public Member Functions | |
vpFeatureEllipse () | |
virtual | ~vpFeatureEllipse () |
vpFeatureEllipse (double x, double y, double n20, double n11, double n02) | |
void | buildFrom (double x, double y, double n20, double n11, double n02) |
void | buildFrom (double x, double y, double n20, double n11, double n02, double A, double B, double C) |
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 |
vpFeatureEllipse * | duplicate () const |
vpColVector | error (const vpBasicFeature &s_star, unsigned int select=FEATURE_ALL) |
double | get_x () const |
double | get_y () const |
double | get_n20 () const |
double | get_n11 () const |
double | get_n02 () const |
void | init () |
vpMatrix | interaction (unsigned int select=FEATURE_ALL) |
void | print (unsigned int select=FEATURE_ALL) const |
void | set_x (double x) |
void | set_y (double y) |
void | set_xy (double x, double y) |
void | setABC (double A, double B, double C) |
void | setMoments (double n20, double n11, double n02) |
Static Public Member Functions | |
static unsigned int | selectX () |
static unsigned int | selectY () |
static unsigned int | select_n20 () |
static unsigned int | select_n11 () |
static unsigned int | select_n02 () |
Static Public Attributes | |
static const unsigned int | FEATURE_LINE [32] |
Protected Attributes | |
vpColVector | s |
unsigned int | dim_s |
bool * | flags |
unsigned int | nbParameters |
Deprecated functions | |
vp_deprecated void | setMu (double mu20, double mu11, double mu02) |
vp_deprecated double | getMu20 () const |
vp_deprecated double | getMu11 () const |
vp_deprecated double | getMu02 () const |
static vp_deprecated unsigned int | selectMu20 () |
static vp_deprecated unsigned int | selectMu11 () |
static vp_deprecated unsigned int | selectMu02 () |
Inherited functionalities from vpBasicFeature | |
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 () |
vpBasicFeatureDeallocatorType | deallocate |
void | resetFlags () |
Class that defines 2D ellipse visual feature.
Definition at line 55 of file vpFeatureEllipse.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.
vpFeatureEllipse::vpFeatureEllipse | ( | ) |
Default constructor.
Definition at line 81 of file vpFeatureEllipse.cpp.
References init().
Referenced by duplicate().
|
inlinevirtual |
Destructor.
Definition at line 70 of file vpFeatureEllipse.h.
vpFeatureEllipse::vpFeatureEllipse | ( | double | x, |
double | y, | ||
double | n20, | ||
double | n11, | ||
double | n02 | ||
) |
basic constructor
Definition at line 82 of file vpFeatureEllipse.cpp.
References buildFrom().
void vpFeatureEllipse::buildFrom | ( | double | x, |
double | y, | ||
double | n20, | ||
double | n11, | ||
double | n02 | ||
) |
Definition at line 281 of file vpFeatureEllipse.cpp.
References vpBasicFeature::flags, and vpBasicFeature::s.
Referenced by vpFeatureBuilder::create(), and vpFeatureEllipse().
void vpFeatureEllipse::buildFrom | ( | double | x, |
double | y, | ||
double | n20, | ||
double | n11, | ||
double | n02, | ||
double | A, | ||
double | B, | ||
double | C | ||
) |
Definition at line 293 of file vpFeatureEllipse.cpp.
References vpBasicFeature::flags, vpBasicFeature::nbParameters, and vpBasicFeature::s.
|
inlineinherited |
Return the dimension of the feature vector .
Definition at line 109 of file vpBasicFeature.h.
|
virtual |
Display ellipse feature.
cam | : Camera parameters. |
I | : Image on which features have to be displayed. |
color | : Color used to display the feature. |
thickness | : Thickness of the feature representation. |
Implements vpBasicFeature.
Definition at line 372 of file vpFeatureEllipse.cpp.
References vpFeatureDisplay::displayEllipse(), and vpBasicFeature::s.
|
virtual |
Display ellipse feature.
cam | : Camera parameters. |
I | : Color image on which features have to be displayed. |
color | : Color used to display the feature. |
thickness | : Thickness of the feature representation. |
Implements vpBasicFeature.
Definition at line 394 of file vpFeatureEllipse.cpp.
References vpFeatureDisplay::displayEllipse(), and vpBasicFeature::s.
|
virtual |
Feature duplication.
For memory issue (used by the vpServo class only).
Implements vpBasicFeature.
Definition at line 408 of file vpFeatureEllipse.cpp.
References vpFeatureEllipse().
|
virtual |
compute the error between two visual features from a subset a the possible features
Reimplemented from vpBasicFeature.
Definition at line 218 of file vpFeatureEllipse.cpp.
References vpBasicFeature::s, select_n02(), select_n11(), select_n20(), selectX(), selectY(), and vpColVector::stack().
|
inline |
Returns the visual feature corresponding to the second order centered moments of the ellipse normalized by its area .
Definition at line 116 of file vpFeatureEllipse.h.
|
inline |
Returns the visual feature corresponding to the second order centered moments of the ellipse normalized by its area .
Definition at line 111 of file vpFeatureEllipse.h.
|
inline |
Returns the visual feature corresponding to the second order centered moments of the ellipse normalized by its area .
Definition at line 106 of file vpFeatureEllipse.h.
|
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().
|
inline |
Returns the visual feature corresponding to the ellipse centroid coordinate along camera x-axis.
Definition at line 97 of file vpFeatureEllipse.h.
|
inline |
Returns the visual feature corresponding to the ellipse centroid coordinate along camera y-axis.
Definition at line 101 of file vpFeatureEllipse.h.
|
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.
|
inline |
Definition at line 172 of file vpFeatureEllipse.h.
|
inline |
Definition at line 165 of file vpFeatureEllipse.h.
|
inline |
Definition at line 158 of file vpFeatureEllipse.h.
|
virtual |
Default initialization.
Implements vpBasicFeature.
Definition at line 63 of file vpFeatureEllipse.cpp.
References vpBasicFeature::dim_s, vpBasicFeature::flags, vpBasicFeature::nbParameters, vpColVector::resize(), and vpBasicFeature::s.
Referenced by vpFeatureEllipse().
|
virtual |
compute the interaction matrix from a subset a the possible features
Implements vpBasicFeature.
Definition at line 86 of file vpFeatureEllipse.cpp.
References vpBasicFeature::deallocate, vpBasicFeature::flags, vpBasicFeature::nbParameters, vpBasicFeature::resetFlags(), vpBasicFeature::s, select_n02(), select_n11(), select_n20(), selectX(), selectY(), vpMath::sqr(), vpMatrix::stack(), vpBasicFeature::user, and vpTRACE.
Referenced by vpMbtDistanceCircle::computeInteractionMatrixError().
|
inlinevirtualinherited |
Return element i in the state vector (usage : x = s[i] )
Definition at line 129 of file vpBasicFeature.h.
|
virtual |
print the name of the feature
Implements vpBasicFeature.
Definition at line 263 of file vpFeatureEllipse.cpp.
References vpBasicFeature::s, select_n02(), select_n11(), select_n20(), selectX(), and selectY().
|
protectedinherited |
Definition at line 129 of file vpBasicFeature.cpp.
References vpBasicFeature::flags, and vpBasicFeature::nbParameters.
Referenced by vpFeatureVanishingPoint::interaction(), vpFeatureDepth::interaction(), interaction(), vpFeatureLine::interaction(), vpFeaturePoint::interaction(), vpFeaturePoint3D::interaction(), vpFeaturePointPolar::interaction(), vpFeatureThetaU::interaction(), and vpFeatureTranslation::interaction().
|
static |
Select as visual feature second order centered moments of the ellipse normalized by its area that corresponds to .
Definition at line 437 of file vpFeatureEllipse.cpp.
References vpBasicFeature::FEATURE_LINE.
Referenced by error(), interaction(), and print().
|
static |
Select as visual feature second order centered moments of the ellipse normalized by its area that corresponds to .
Definition at line 432 of file vpFeatureEllipse.cpp.
References vpBasicFeature::FEATURE_LINE.
Referenced by error(), interaction(), and print().
|
static |
Select as visual feature second order centered moments of the ellipse normalized by its area that corresponds to .
Definition at line 427 of file vpFeatureEllipse.cpp.
References vpBasicFeature::FEATURE_LINE.
Referenced by error(), interaction(), and print().
|
inlinestaticinherited |
Select all the features.
Definition at line 141 of file vpBasicFeature.h.
|
static |
Definition at line 460 of file vpFeatureEllipse.cpp.
References vpBasicFeature::FEATURE_LINE.
|
static |
Definition at line 453 of file vpFeatureEllipse.cpp.
References vpBasicFeature::FEATURE_LINE.
|
static |
Definition at line 446 of file vpFeatureEllipse.cpp.
References vpBasicFeature::FEATURE_LINE.
|
static |
vpBasicFeature method instantiation
Select as visual feature ellipse centroid coordinate along camera x-axis.
Definition at line 417 of file vpFeatureEllipse.cpp.
References vpBasicFeature::FEATURE_LINE.
Referenced by error(), interaction(), and print().
|
static |
Select as visual feature ellipse centroid coordinate along camera y-axis.
Definition at line 421 of file vpFeatureEllipse.cpp.
References vpBasicFeature::FEATURE_LINE.
Referenced by error(), interaction(), and print().
void vpFeatureEllipse::set_x | ( | double | x | ) |
Definition at line 309 of file vpFeatureEllipse.cpp.
References vpBasicFeature::flags, and vpBasicFeature::s.
void vpFeatureEllipse::set_xy | ( | double | x, |
double | y | ||
) |
Definition at line 321 of file vpFeatureEllipse.cpp.
References vpBasicFeature::flags, and vpBasicFeature::s.
void vpFeatureEllipse::set_y | ( | double | y | ) |
Definition at line 315 of file vpFeatureEllipse.cpp.
References vpBasicFeature::flags, and vpBasicFeature::s.
void vpFeatureEllipse::setABC | ( | double | A, |
double | B, | ||
double | C | ||
) |
Definition at line 329 of file vpFeatureEllipse.cpp.
References vpBasicFeature::flags, and vpBasicFeature::nbParameters.
Referenced by vpFeatureBuilder::create().
|
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.
void vpFeatureEllipse::setMoments | ( | double | n20, |
double | n11, | ||
double | n02 | ||
) |
Update visual features corresponding to the second order centered moments of the ellipse normalized by its area (i.e., such that where are the centered moments and a the area).
n20,n11,n02 | Second order centered moments. |
Definition at line 344 of file vpFeatureEllipse.cpp.
References vpBasicFeature::flags, and vpBasicFeature::s.
Referenced by setMu().
void vpFeatureEllipse::setMu | ( | double | mu20, |
double | mu11, | ||
double | mu02 | ||
) |
Definition at line 360 of file vpFeatureEllipse.cpp.
References setMoments().
|
protectedinherited |
Definition at line 147 of file vpBasicFeature.h.
Referenced by vpFeatureVanishingPoint::interaction(), vpFeatureDepth::interaction(), 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(), vpFeatureLuminance::error(), vpBasicFeature::get_s(), vpGenericFeature::get_s(), vpBasicFeature::getDimension(), vpFeatureMoment::getDimension(), vpFeatureDepth::init(), init(), vpFeatureLine::init(), vpFeaturePoint::init(), vpFeaturePoint3D::init(), vpFeaturePointPolar::init(), vpFeatureSegment::init(), vpFeatureThetaU::init(), vpFeatureTranslation::init(), vpFeatureVanishingPoint::init(), vpFeatureLuminance::init(), vpFeatureMoment::init(), vpFeatureMoment::interaction(), vpGenericFeature::interaction(), vpFeatureLuminance::interaction(), vpBasicFeature::operator=(), vpFeatureLuminance::operator=(), vpFeatureMoment::print(), vpGenericFeature::print(), vpGenericFeature::set_s(), vpGenericFeature::setError(), vpGenericFeature::setInteractionMatrix(), vpFeatureMoment::update(), vpFeatureLuminance::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(), select_n02(), select_n11(), select_n20(), vpFeatureSegment::selectAlpha(), vpFeatureVanishingPoint::selectAlpha(), vpFeatureVanishingPoint::selectAtanOneOverRho(), vpFeatureSegment::selectL(), selectMu02(), selectMu11(), selectMu20(), vpFeatureVanishingPoint::selectOneOverRho(), vpFeatureLine::selectRho(), vpFeaturePointPolar::selectRho(), vpFeatureLine::selectTheta(), vpFeaturePointPolar::selectTheta(), vpFeatureThetaU::selectTUx(), vpFeatureThetaU::selectTUy(), vpFeatureThetaU::selectTUz(), vpFeatureTranslation::selectTx(), vpFeatureTranslation::selectTy(), vpFeatureTranslation::selectTz(), selectX(), vpFeaturePoint::selectX(), vpFeaturePoint3D::selectX(), vpFeatureVanishingPoint::selectX(), vpFeatureSegment::selectXc(), selectY(), vpFeaturePoint::selectY(), vpFeaturePoint3D::selectY(), vpFeatureVanishingPoint::selectY(), vpFeatureSegment::selectYc(), and vpFeaturePoint3D::selectZ().
|
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(), buildFrom(), vpFeaturePoint::buildFrom(), vpFeatureDepth::buildFrom(), vpFeatureThetaU::buildFrom(), vpFeatureMoment::duplicate(), vpFeatureDepth::init(), 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(), 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(), set_x(), vpFeaturePoint::set_x(), vpFeaturePoint3D::set_X(), vpFeatureVanishingPoint::set_x(), set_xy(), vpFeaturePoint::set_xyZ(), vpFeaturePoint3D::set_XYZ(), vpFeatureDepth::set_xyZLogZoverZstar(), vpFeatureDepth::set_y(), 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(), setABC(), vpFeatureLine::setABCD(), vpFeatureVanishingPoint::setAlpha(), vpFeatureVanishingPoint::setAtanOneOverRho(), vpBasicFeature::setFlags(), setMoments(), vpFeatureVanishingPoint::setOneOverRho(), vpFeatureLine::setRhoTheta(), vpFeatureMoment::update(), vpFeatureLuminance::vpFeatureLuminance(), and vpBasicFeature::~vpBasicFeature().
|
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(), buildFrom(), vpFeaturePoint::buildFrom(), vpFeatureDepth::buildFrom(), vpFeatureThetaU::buildFrom(), vpFeatureMoment::duplicate(), vpFeatureDepth::init(), 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(), 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(), setABC(), vpFeatureLine::setABCD(), vpBasicFeature::setFlags(), vpFeatureMoment::update(), and vpFeatureLuminance::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(), buildFrom(), vpFeaturePoint::buildFrom(), vpFeatureDepth::buildFrom(), vpFeatureLuminance::buildFrom(), vpFeatureThetaU::buildFrom(), display(), vpFeatureMoment::duplicate(), vpFeatureVanishingPoint::error(), vpBasicFeature::error(), vpFeatureDepth::error(), error(), vpFeatureLine::error(), vpFeatureMomentAlpha::error(), vpFeaturePoint::error(), vpFeaturePoint3D::error(), vpFeaturePointPolar::error(), vpFeatureThetaU::error(), vpFeatureTranslation::error(), vpGenericFeature::error(), vpFeatureLuminance::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(), init(), vpFeatureLine::init(), vpFeaturePoint::init(), vpFeaturePoint3D::init(), vpFeaturePointPolar::init(), vpFeatureSegment::init(), vpFeatureThetaU::init(), vpFeatureTranslation::init(), vpFeatureVanishingPoint::init(), vpGenericFeature::init(), vpFeatureLuminance::init(), vpFeatureMoment::init(), interaction(), vpFeatureLine::interaction(), vpFeatureThetaU::interaction(), vpFeatureTranslation::interaction(), vpBasicFeature::operator=(), 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(), set_x(), vpFeaturePoint::set_x(), vpFeaturePoint3D::set_X(), vpFeatureVanishingPoint::set_x(), set_xy(), set_y(), vpFeaturePoint::set_y(), vpFeaturePoint3D::set_Y(), vpFeatureVanishingPoint::set_y(), vpFeaturePoint3D::set_Z(), vpFeatureVanishingPoint::setAlpha(), vpFeatureVanishingPoint::setAtanOneOverRho(), setMoments(), vpFeatureVanishingPoint::setOneOverRho(), vpFeatureLine::setRhoTheta(), vpFeatureMoment::update(), and vpGenericFeature::vpGenericFeature().