Visual Servoing Platform
version 3.6.1 under development (2024-12-17)
|
#include <visp3/visual_features/vpFeatureEllipse.h>
Public Types | |
enum | vpBasicFeatureSelect { FEATURE_ALL = 0xffff } |
enum | vpBasicFeatureDeallocatorType { user , vpServo } |
Public Member Functions | |
vpFeatureEllipse () | |
vpFeatureEllipse (double x, double y, double n20, double n11, double n02) | |
vpFeatureEllipse & | buildFrom (const double &x, const double &y, const double &n20, const double &n11, const double &n02) |
vpFeatureEllipse & | buildFrom (const double &x, const double &y, const double &n20, const double &n11, const double &n02, const double &A, const double &B, const double &C) |
void | display (const vpCameraParameters &cam, const vpImage< unsigned char > &I, const vpColor &color=vpColor::green, unsigned int thickness=1) const VP_OVERRIDE |
void | display (const vpCameraParameters &cam, const vpImage< vpRGBa > &I, const vpColor &color=vpColor::green, unsigned int thickness=1) const VP_OVERRIDE |
vpFeatureEllipse * | duplicate () const VP_OVERRIDE |
vpColVector | error (const vpBasicFeature &s_star, unsigned int select=FEATURE_ALL) VP_OVERRIDE |
double | get_x () const |
double | get_y () const |
double | get_n20 () const |
double | get_n11 () const |
double | get_n02 () const |
void | init () VP_OVERRIDE |
vpMatrix | interaction (unsigned int select=FEATURE_ALL) VP_OVERRIDE |
void | print (unsigned int select=FEATURE_ALL) const VP_OVERRIDE |
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 |
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 |
Indicates who should deallocate the feature.
Enumerator | |
---|---|
user | |
vpServo |
Definition at line 88 of file vpBasicFeature.h.
|
inherited |
Enumerator | |
---|---|
FEATURE_ALL |
Definition at line 83 of file vpBasicFeature.h.
vpFeatureEllipse::vpFeatureEllipse | ( | ) |
Default constructor.
Definition at line 83 of file vpFeatureEllipse.cpp.
References init().
Referenced by duplicate().
vpFeatureEllipse::vpFeatureEllipse | ( | double | x, |
double | y, | ||
double | n20, | ||
double | n11, | ||
double | n02 | ||
) |
basic constructor
Definition at line 84 of file vpFeatureEllipse.cpp.
References buildFrom().
vpFeatureEllipse & vpFeatureEllipse::buildFrom | ( | const double & | x, |
const double & | y, | ||
const double & | n20, | ||
const double & | n11, | ||
const double & | n02 | ||
) |
Definition at line 283 of file vpFeatureEllipse.cpp.
References vpBasicFeature::flags, and vpBasicFeature::s.
Referenced by vpFeatureBuilder::create(), and vpFeatureEllipse().
vpFeatureEllipse & vpFeatureEllipse::buildFrom | ( | const double & | x, |
const double & | y, | ||
const double & | n20, | ||
const double & | n11, | ||
const double & | n02, | ||
const double & | A, | ||
const double & | B, | ||
const double & | C | ||
) |
Definition at line 297 of file vpFeatureEllipse.cpp.
References vpBasicFeature::flags, vpBasicFeature::nbParameters, and vpBasicFeature::s.
|
inlineinherited |
Return the dimension of the feature vector .
Definition at line 110 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 378 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 400 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 414 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 220 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 112 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 107 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 102 of file vpFeatureEllipse.h.
|
inherited |
Get the feature vector .
Definition at line 115 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 93 of file vpFeatureEllipse.h.
|
inline |
Returns the visual feature corresponding to the ellipse centroid coordinate along camera y-axis.
Definition at line 97 of file vpFeatureEllipse.h.
|
inlineinherited |
Definition at line 123 of file vpBasicFeature.h.
|
inherited |
Get the feature vector dimension.
Definition at line 102 of file vpBasicFeature.cpp.
References vpBasicFeature::dim_s, vpBasicFeature::FEATURE_LINE, vpArray2D< Type >::getRows(), and vpBasicFeature::s.
|
virtual |
Default initialization.
Implements vpBasicFeature.
Definition at line 65 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 88 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(), and vpBasicFeature::user.
Referenced by vpMbtDistanceCircle::computeInteractionMatrixError().
|
inlinevirtualinherited |
Return element i in the state vector (usage : x = s[i] )
Definition at line 130 of file vpBasicFeature.h.
|
virtual |
Print the name of the feature.
Implements vpBasicFeature.
Definition at line 265 of file vpFeatureEllipse.cpp.
References vpBasicFeature::s, select_n02(), select_n11(), select_n20(), selectX(), and selectY().
|
protectedinherited |
Definition at line 132 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 443 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 438 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 433 of file vpFeatureEllipse.cpp.
References vpBasicFeature::FEATURE_LINE.
Referenced by error(), interaction(), and print().
|
inlinestaticinherited |
|
static |
vpBasicFeature method instantiation
Select as visual feature ellipse centroid coordinate along camera x-axis.
Definition at line 423 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 427 of file vpFeatureEllipse.cpp.
References vpBasicFeature::FEATURE_LINE.
Referenced by error(), interaction(), and print().
void vpFeatureEllipse::set_x | ( | double | x | ) |
Definition at line 315 of file vpFeatureEllipse.cpp.
References vpBasicFeature::flags, and vpBasicFeature::s.
void vpFeatureEllipse::set_xy | ( | double | x, |
double | y | ||
) |
Definition at line 327 of file vpFeatureEllipse.cpp.
References vpBasicFeature::flags, and vpBasicFeature::s.
void vpFeatureEllipse::set_y | ( | double | y | ) |
Definition at line 321 of file vpFeatureEllipse.cpp.
References vpBasicFeature::flags, and vpBasicFeature::s.
void vpFeatureEllipse::setABC | ( | double | A, |
double | B, | ||
double | C | ||
) |
Definition at line 335 of file vpFeatureEllipse.cpp.
References vpBasicFeature::flags, and vpBasicFeature::nbParameters.
Referenced by vpFeatureBuilder::create().
|
inlineinherited |
Definition at line 137 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 142 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 350 of file vpFeatureEllipse.cpp.
References vpBasicFeature::flags, and vpBasicFeature::s.
|
protectedinherited |
Definition at line 148 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 94 of file vpBasicFeature.h.
Referenced by vpFeatureMoment::duplicate(), vpGenericFeature::duplicate(), vpBasicFeature::error(), vpFeatureLuminanceMapping::error(), vpGenericFeature::error(), vpFeatureLuminance::error(), vpBasicFeature::get_s(), vpGenericFeature::get_s(), vpBasicFeature::getDimension(), vpFeatureMoment::getDimension(), vpFeatureDepth::init(), 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(), vpBasicFeature::operator=(), vpFeatureLuminance::operator=(), vpFeatureLuminanceMapping::operator=(), vpFeatureMoment::print(), vpGenericFeature::print(), vpGenericFeature::set_s(), vpGenericFeature::setError(), vpGenericFeature::setInteractionMatrix(), vpFeatureMoment::update(), vpFeatureLuminance::vpFeatureLuminance(), and vpGenericFeature::vpGenericFeature().
|
staticinherited |
Definition at line 81 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(), 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 interaction matrix are set.
Definition at line 98 of file vpBasicFeature.h.
Referenced by vpFeatureLine::buildFrom(), vpFeaturePointPolar::buildFrom(), buildFrom(), vpFeaturePoint::buildFrom(), vpFeatureDepth::buildFrom(), vpFeatureTranslation::buildFrom(), vpFeaturePoint3D::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 100 of file vpBasicFeature.h.
Referenced by vpFeatureLine::buildFrom(), vpFeaturePointPolar::buildFrom(), buildFrom(), vpFeaturePoint::buildFrom(), vpFeatureDepth::buildFrom(), vpFeaturePoint3D::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 92 of file vpBasicFeature.h.
Referenced by vpFeatureLine::buildFrom(), vpFeaturePointPolar::buildFrom(), buildFrom(), vpFeaturePoint::buildFrom(), vpFeatureDepth::buildFrom(), vpFeatureTranslation::buildFrom(), vpFeaturePoint3D::buildFrom(), vpFeatureThetaU::buildFrom(), vpFeatureLuminance::buildFrom(), vpFeatureLuminanceMapping::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(), vpFeatureLuminanceMapping::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(), vpFeatureLuminanceMapping::init(), vpFeatureLuminance::init(), vpFeatureMoment::init(), interaction(), vpFeatureLine::interaction(), vpFeatureThetaU::interaction(), vpFeatureTranslation::interaction(), vpFeatureLuminanceMapping::interaction(), vpBasicFeature::operator=(), vpFeatureLuminance::operator=(), vpFeatureLuminanceMapping::operator=(), 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(), 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().