ViSP  2.8.0

#include <vpFeatureEllipse.h>

+ Inheritance diagram for vpFeatureEllipse:

Public Types

enum  vpBasicFeatureDeallocatorType { user, vpServo }
 

Public Member Functions

void init ()
 
 vpFeatureEllipse ()
 
virtual ~vpFeatureEllipse ()
 
 vpFeatureEllipse (const double x, const double y, const double mu20, const double mu11, const double mu02)
 
void buildFrom (const double x, const double y, const double mu20, const double mu11, const double mu02)
 
void buildFrom (const double x, const double y, const double mu20, const double mu11, const double mu02, const double A, const double B, const double C)
 
void set_x (const double x)
 
void set_y (const double y)
 
void set_xy (const double x, const double y)
 
void setABC (const double A, const double B, const double C)
 
void setMu (const double mu20, const double mu11, const double mu02)
 
double get_x () const
 
double get_y () const
 
double getMu20 () const
 
double getMu11 () const
 
double getMu02 () const
 
vpMatrix interaction (const unsigned int select=FEATURE_ALL)
 
vpColVector error (const vpBasicFeature &s_star, const unsigned int select=FEATURE_ALL)
 
vpColVector error (const unsigned int select=FEATURE_ALL)
 
void print (const unsigned int select=FEATURE_ALL) const
 
vpFeatureEllipseduplicate () 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
 
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 selectX ()
 
static unsigned int selectY ()
 
static unsigned int selectMu20 ()
 
static unsigned int selectMu11 ()
 
static unsigned int selectMu02 ()
 
static unsigned int selectAll ()
 

Static Public Attributes

static const unsigned int FEATURE_LINE [32]
 
static const unsigned int FEATURE_ALL = 0xffff
 

Protected Member Functions

void resetFlags ()
 

Protected Attributes

vpColVector s
 
unsigned int dim_s
 
bool * flags
 
unsigned int nbParameters
 
vpBasicFeatureDeallocatorType deallocate
 

Detailed Description

Member Enumeration Documentation

Indicates who should deallocate the feature.

Enumerator
user 
vpServo 

Definition at line 152 of file vpBasicFeature.h.

Constructor & Destructor Documentation

vpFeatureEllipse::vpFeatureEllipse ( )

basic constructor

Definition at line 100 of file vpFeatureEllipse.cpp.

References init().

Referenced by duplicate().

virtual vpFeatureEllipse::~vpFeatureEllipse ( )
inlinevirtual

destructor

Definition at line 82 of file vpFeatureEllipse.h.

References vpBasicFeature::flags.

vpFeatureEllipse::vpFeatureEllipse ( const double  x,
const double  y,
const double  mu20,
const double  mu11,
const double  mu02 
)

basic constructor

coordinates

Member Function Documentation

void vpFeatureEllipse::buildFrom ( const double  x,
const double  y,
const double  mu20,
const double  mu11,
const double  mu02 
)
void vpFeatureEllipse::buildFrom ( const double  x,
const double  y,
const double  mu20,
const double  mu11,
const double  mu02,
const double  A,
const double  B,
const double  C 
)
unsigned int vpBasicFeature::dimension_s ( )
inlineinherited

Return the dimension of the feature vector $\bf s$.

Definition at line 102 of file vpBasicFeature.h.

void vpFeatureEllipse::display ( const vpCameraParameters cam,
const vpImage< unsigned char > &  I,
const vpColor color = vpColor::green,
unsigned int  thickness = 1 
) const
virtual

Display ellipse feature.

Parameters
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.

Examples:
testTrackDot.cpp.

Definition at line 418 of file vpFeatureEllipse.cpp.

References vpFeatureDisplay::displayEllipse(), vpBasicFeature::s, and vpERROR_TRACE.

void vpFeatureEllipse::display ( const vpCameraParameters cam,
const vpImage< vpRGBa > &  I,
const vpColor color = vpColor::green,
unsigned int  thickness = 1 
) const
virtual

Display ellipse feature.

Parameters
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 452 of file vpFeatureEllipse.cpp.

References vpFeatureDisplay::displayEllipse(), vpBasicFeature::s, and vpERROR_TRACE.

vpFeatureEllipse * vpFeatureEllipse::duplicate ( ) const
virtual

feature duplication

for memory issue (used by the vpServo class only)

Implements vpBasicFeature.

Definition at line 478 of file vpFeatureEllipse.cpp.

References vpFeatureEllipse().

vpColVector vpFeatureEllipse::error ( const vpBasicFeature s_star,
const unsigned int  select = FEATURE_ALL 
)
virtual

compute the error between two visual features from a subset a the possible features

Reimplemented from vpBasicFeature.

Definition at line 244 of file vpFeatureEllipse.cpp.

References vpBasicFeature::s, selectMu02(), selectMu11(), selectMu20(), selectX(), selectY(), vpMatrix::stackMatrices(), and vpERROR_TRACE.

vpColVector vpFeatureEllipse::error ( const unsigned int  select = FEATURE_ALL)

compute the error between a visual features and zero

double vpFeatureEllipse::get_x ( ) const
inline

Definition at line 104 of file vpFeatureEllipse.h.

double vpFeatureEllipse::get_y ( ) const
inline

Definition at line 105 of file vpFeatureEllipse.h.

vpBasicFeatureDeallocatorType vpBasicFeature::getDeallocate ( )
inlineinherited

Definition at line 162 of file vpBasicFeature.h.

Referenced by vpServo::kill().

unsigned int vpBasicFeature::getDimension ( const unsigned int  select = FEATURE_ALL) const
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().

double vpFeatureEllipse::getMu02 ( ) const
inline

Definition at line 108 of file vpFeatureEllipse.h.

double vpFeatureEllipse::getMu11 ( ) const
inline

Definition at line 107 of file vpFeatureEllipse.h.

double vpFeatureEllipse::getMu20 ( ) const
inline

Definition at line 106 of file vpFeatureEllipse.h.

void vpFeatureEllipse::init ( void  )
virtual
vpMatrix vpFeatureEllipse::interaction ( const unsigned int  select = FEATURE_ALL)
virtual
virtual double vpBasicFeature::operator[] ( const unsigned int  i) const
inlinevirtualinherited

Return element i in the state vector (usage : x = s[i] )

Definition at line 111 of file vpBasicFeature.h.

void vpFeatureEllipse::print ( const unsigned int  select = FEATURE_ALL) const
virtual

print the name of the feature

Implements vpBasicFeature.

Examples:
servoSimuCircle2DCamVelocityDisplay.cpp.

Definition at line 308 of file vpFeatureEllipse.cpp.

References vpBasicFeature::s, selectMu02(), selectMu11(), selectMu20(), selectX(), and selectY().

static unsigned int vpBasicFeature::selectAll ( )
inlinestaticinherited

Select all the features.

Definition at line 114 of file vpBasicFeature.h.

static unsigned int vpFeatureEllipse::selectMu02 ( )
inlinestatic

Definition at line 120 of file vpFeatureEllipse.h.

Referenced by error(), interaction(), and print().

static unsigned int vpFeatureEllipse::selectMu11 ( )
inlinestatic

Definition at line 119 of file vpFeatureEllipse.h.

Referenced by error(), interaction(), and print().

static unsigned int vpFeatureEllipse::selectMu20 ( )
inlinestatic

Definition at line 118 of file vpFeatureEllipse.h.

Referenced by error(), interaction(), and print().

static unsigned int vpFeatureEllipse::selectX ( )
inlinestatic

vpBasicFeature method instantiation

Definition at line 116 of file vpFeatureEllipse.h.

Referenced by error(), interaction(), and print().

static unsigned int vpFeatureEllipse::selectY ( )
inlinestatic

Definition at line 117 of file vpFeatureEllipse.h.

Referenced by error(), interaction(), and print().

void vpFeatureEllipse::set_x ( const double  x)

Definition at line 363 of file vpFeatureEllipse.cpp.

References vpBasicFeature::flags, and vpBasicFeature::s.

void vpFeatureEllipse::set_xy ( const double  x,
const double  y 
)

Definition at line 377 of file vpFeatureEllipse.cpp.

References vpBasicFeature::flags, and vpBasicFeature::s.

void vpFeatureEllipse::set_y ( const double  y)

Definition at line 370 of file vpFeatureEllipse.cpp.

References vpBasicFeature::flags, and vpBasicFeature::s.

void vpFeatureEllipse::setABC ( const double  A,
const double  B,
const double  C 
)
void vpBasicFeature::setDeallocate ( vpBasicFeatureDeallocatorType  d)
inlineinherited

Definition at line 161 of file vpBasicFeature.h.

Referenced by vpServo::addFeature().

void vpBasicFeature::setFlags ( )
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.

void vpFeatureEllipse::setMu ( const double  mu20,
const double  mu11,
const double  mu02 
)

Definition at line 395 of file vpFeatureEllipse.cpp.

References vpBasicFeature::flags, and vpBasicFeature::s.

Member Data Documentation

const unsigned int vpBasicFeature::FEATURE_ALL = 0xffff
staticinherited
const unsigned int vpBasicFeature::FEATURE_LINE
staticinherited
Initial value:
=
{
(unsigned int)(1 << 0), (unsigned int)(1 << 1),
(unsigned int)(1 << 2), (unsigned int)(1 << 3),
(unsigned int)(1 << 4), (unsigned int)(1 << 5),
(unsigned int)(1 << 6), (unsigned int)(1 << 7),
(unsigned int)(1 << 8), (unsigned int)(1 << 9),
(unsigned int)(1 << 10), (unsigned int)(1 << 11),
(unsigned int)(1 << 12), (unsigned int)(1 << 13),
(unsigned int)(1 << 14), (unsigned int)(1 << 15),
(unsigned int)(1 << 16), (unsigned int)(1 << 17),
(unsigned int)(1 << 18), (unsigned int)(1 << 19),
(unsigned int)(1 << 20), (unsigned int)(1 << 21),
(unsigned int)(1 << 22), (unsigned int)(1 << 23),
(unsigned int)(1 << 24), (unsigned int)(1 << 25),
(unsigned int)(1 << 26), (unsigned int)(1 << 27),
(unsigned int)(1 << 28), (unsigned int)(1 << 29),
(unsigned int)(1 << 30), (unsigned int)(1 << 31)
}

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().

bool* vpBasicFeature::flags
protectedinherited

Ensure that all the parameters needed to compute the iteraction matrix are set.

Definition at line 96 of file vpBasicFeature.h.

Referenced by buildFrom(), vpFeatureVanishingPoint::buildFrom(), vpFeatureDepth::buildFrom(), vpFeaturePoint::buildFrom(), vpFeatureLine::buildFrom(), vpFeaturePoint3D::buildFrom(), vpFeatureThetaU::buildFrom(), vpFeaturePointPolar::buildFrom(), vpFeatureTranslation::buildFrom(), vpFeatureMoment::duplicate(), init(), vpFeatureVanishingPoint::init(), vpFeatureLuminance::init(), vpFeatureSegment::init(), vpFeatureDepth::init(), vpFeatureMoment::init(), vpFeaturePoint::init(), vpFeatureLine::init(), vpFeaturePoint3D::init(), vpFeatureThetaU::init(), vpFeaturePointPolar::init(), vpFeatureTranslation::init(), 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(), set_x(), vpFeatureVanishingPoint::set_x(), vpFeatureDepth::set_x(), vpFeaturePoint::set_x(), vpFeaturePoint3D::set_X(), set_xy(), vpFeaturePoint::set_xyZ(), vpFeaturePoint3D::set_XYZ(), vpFeatureDepth::set_xyZLogZoverZstar(), set_y(), vpFeatureVanishingPoint::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(), setABC(), vpFeatureLine::setABCD(), vpBasicFeature::setFlags(), setMu(), vpFeatureLine::setRhoTheta(), vpFeatureMoment::update(), vpBasicFeature::vpBasicFeature(), vpFeatureLuminance::vpFeatureLuminance(), vpFeatureDepth::~vpFeatureDepth(), ~vpFeatureEllipse(), vpFeatureLine::~vpFeatureLine(), vpFeatureLuminance::~vpFeatureLuminance(), vpFeatureMoment::~vpFeatureMoment(), vpFeaturePoint::~vpFeaturePoint(), vpFeaturePoint3D::~vpFeaturePoint3D(), vpFeaturePointPolar::~vpFeaturePointPolar(), vpFeatureSegment::~vpFeatureSegment(), vpFeatureThetaU::~vpFeatureThetaU(), vpFeatureTranslation::~vpFeatureTranslation(), and vpFeatureVanishingPoint::~vpFeatureVanishingPoint().

vpColVector vpBasicFeature::s
protectedinherited

State of the visual feature.

Definition at line 91 of file vpBasicFeature.h.

Referenced by buildFrom(), vpFeatureVanishingPoint::buildFrom(), vpFeatureLuminance::buildFrom(), vpFeatureDepth::buildFrom(), vpFeaturePoint::buildFrom(), vpFeatureLine::buildFrom(), vpFeaturePoint3D::buildFrom(), vpFeatureThetaU::buildFrom(), vpFeaturePointPolar::buildFrom(), vpFeatureTranslation::buildFrom(), display(), vpFeatureMoment::duplicate(), vpBasicFeature::error(), error(), vpFeatureVanishingPoint::error(), vpFeatureLuminance::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(), init(), vpFeatureVanishingPoint::init(), vpFeatureLuminance::init(), vpFeatureSegment::init(), vpFeatureDepth::init(), vpGenericFeature::init(), vpFeatureMoment::init(), vpFeaturePoint::init(), vpFeatureLine::init(), vpFeaturePoint3D::init(), vpFeatureThetaU::init(), vpFeaturePointPolar::init(), vpFeatureTranslation::init(), interaction(), vpFeatureLine::interaction(), vpFeaturePointPolar::interaction(), vpFeatureThetaU::interaction(), vpFeatureTranslation::interaction(), 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(), set_x(), vpFeatureVanishingPoint::set_x(), vpFeaturePoint::set_x(), vpFeaturePoint3D::set_X(), set_xy(), set_y(), vpFeatureVanishingPoint::set_y(), vpFeaturePoint::set_y(), vpFeaturePoint3D::set_Y(), vpFeaturePoint3D::set_Z(), setMu(), vpFeatureLine::setRhoTheta(), vpFeatureMoment::update(), and vpGenericFeature::vpGenericFeature().