Visual Servoing Platform
version 3.4.0
|
#include <vpMeEllipse.h>
Public Member Functions | |
vpMeEllipse () | |
vpMeEllipse (const vpMeEllipse &me_ellipse) | |
virtual | ~vpMeEllipse () |
void | display (const vpImage< unsigned char > &I, vpColor col) |
vpColVector | get_nij () const |
vpColVector | get_ABE () const |
double | getArea () const |
vpImagePoint | getCenter () const |
unsigned int | getExpectedDensity () const |
vpImagePoint | getFirstEndpoint () const |
double | getHighestAngle () const |
vpImagePoint | getSecondEndpoint () const |
double | getSmallestAngle () const |
void | initTracking (const vpImage< unsigned char > &I, bool trackArc=false) |
void | initTracking (const vpImage< unsigned char > &I, const std::vector< vpImagePoint > &iP, bool trackArc=false) |
void | initTracking (const vpImage< unsigned char > &I, const vpColVector ¶m, vpImagePoint *pt1=NULL, const vpImagePoint *pt2=NULL) |
void | printParameters () const |
void | setEndpoints (const vpImagePoint &pt1, const vpImagePoint &pt2) |
void | setThresholdRobust (double threshold) |
void | track (const vpImage< unsigned char > &I) |
Deprecated functions | |
vp_deprecated double | getA () const |
vp_deprecated double | getB () const |
vp_deprecated double | getE () const |
vp_deprecated double | get_m00 () const |
vp_deprecated double | get_m10 () const |
vp_deprecated double | get_m01 () const |
vp_deprecated double | get_m11 () const |
vp_deprecated double | get_m20 () const |
vp_deprecated double | get_m02 () const |
vp_deprecated double | get_mu11 () const |
vp_deprecated double | get_mu02 () const |
vp_deprecated double | get_mu20 () const |
vp_deprecated void | getEquationParam (double &A, double &B, double &E) |
vp_deprecated void | initTracking (const vpImage< unsigned char > &I, const vpImagePoint ¢er_p, double a_p, double b_p, double e_p, double low_alpha, double high_alpha) |
vp_deprecated void | initTracking (const vpImage< unsigned char > &I, unsigned int n, vpImagePoint *iP) |
vp_deprecated void | initTracking (const vpImage< unsigned char > &I, unsigned int n, unsigned *i, unsigned *j) |
Public Member Functions Inherited from vpTracker | |
vpColVector | get_p () const |
vpColVector | get_cP () const |
Static Public Member Functions | |
static void | display (const vpImage< unsigned char > &I, const vpImagePoint ¢er, const double &A, const double &B, const double &E, const double &smallalpha, const double &highalpha, const vpColor &color=vpColor::green, unsigned int thickness=1) |
static void | display (const vpImage< vpRGBa > &I, const vpImagePoint ¢er, const double &A, const double &B, const double &E, const double &smallalpha, const double &highalpha, const vpColor &color=vpColor::green, unsigned int thickness=1) |
Public Attributes | |
vpColVector | K |
vpImagePoint | iPc |
double | a |
double | b |
double | e |
Public Attributes Inherited from vpMeTracker | |
std::list< vpMeSite > | list |
vpMe * | me |
unsigned int | init_range |
int | nGoodElement |
const vpImage< bool > * | m_mask |
int | query_range |
bool | display_point |
Public Attributes Inherited from vpTracker | |
vpColVector | p |
vpColVector | cP |
bool | cPAvailable |
Protected Member Functions | |
void | computeAbeFromNij () |
double | computeAngleOnEllipse (const vpImagePoint &pt) const |
void | computeKiFromNij () |
void | computeNijFromAbe () |
void | computePointOnEllipse (const double ang, vpImagePoint &iP) |
double | computeTheta (const vpImagePoint &iP) const |
double | computeTheta (double u, double v) const |
void | getParameters () |
void | leastSquare (const vpImage< unsigned char > &I, const std::vector< vpImagePoint > &iP) |
void | leastSquareRobust (const vpImage< unsigned char > &I) |
unsigned int | plugHoles (const vpImage< unsigned char > &I) |
virtual void | sample (const vpImage< unsigned char > &I, bool doNotTrack=false) |
void | updateTheta () |
Protected Attributes | |
vpImagePoint | iP1 |
vpImagePoint | iP2 |
double | alpha1 |
double | alpha2 |
double | ce |
double | se |
std::list< double > | angle |
double | m00 |
double | mu11 |
double | mu20 |
double | mu02 |
double | m10 |
double | m01 |
double | m11 |
double | m02 |
double | m20 |
double | thresholdWeight |
double | expecteddensity |
double | m_alphamin |
double | m_alphamax |
double | m_uc |
double | m_vc |
double | m_n20 |
double | m_n11 |
double | m_n02 |
unsigned int | m_expectedDensity |
unsigned int | m_numberOfGoodPoints |
bool | m_trackArc |
double | m_arcEpsilon |
Protected Attributes Inherited from vpMeTracker | |
vpMeSite::vpMeSiteDisplayType | selectDisplay |
Public Member Functions Inherited from vpMeTracker | |
virtual void | display (const vpImage< unsigned char > &I) |
virtual void | display (const vpImage< vpRGBa > &I) |
void | display (const vpImage< unsigned char > &I, vpColVector &w, unsigned int &index_w) |
unsigned int | getInitRange () |
vpMe * | getMe () |
std::list< vpMeSite > & | getMeList () |
std::list< vpMeSite > | getMeList () const |
int | getNbPoints () const |
void | init () |
void | initTracking (const vpImage< unsigned char > &I) |
unsigned int | numberOfSignal () |
int | outOfImage (int i, int j, int half, int row, int cols) |
int | outOfImage (const vpImagePoint &iP, int half, int rows, int cols) |
void | reset () |
void | setDisplay (vpMeSite::vpMeSiteDisplayType select) |
void | setInitRange (const unsigned int &r) |
virtual void | setMask (const vpImage< bool > &mask) |
void | setMe (vpMe *p_me) |
void | setMeList (const std::list< vpMeSite > &l) |
unsigned int | totalNumberOfSignal () |
static bool | inMask (const vpImage< bool > *mask, unsigned int i, unsigned int j) |
Class that tracks an ellipse using moving edges.
In this class, an ellipse is defined as the set of image points (for more information about the image frame see the vpImagePoint documentation) that satisfy the homogeneous equation:
with , , , etc. (see Eq. (25) of Chaumette TRO 2004 paper [5])
If and , the ellipse is a circle.
The six parameters are stored in the private attribute K.
An ellipse is also represented thanks to five parameters that are the center of the ellipse and either:
The example below available in tutorial-me-ellipse-tracker.cpp and described in Tutorial: Moving-edges tracking, section Ellipse tracking shows how to use this class.
Definition at line 97 of file vpMeEllipse.h.
vpMeEllipse::vpMeEllipse | ( | ) |
Basic constructor that calls the constructor of the class vpMeTracker.
Definition at line 54 of file vpMeEllipse.cpp.
References iP1, iP2, K, vpColVector::resize(), and vpImagePoint::set_ij().
vpMeEllipse::vpMeEllipse | ( | const vpMeEllipse & | me_ellipse | ) |
Copy constructor.
Definition at line 80 of file vpMeEllipse.cpp.
|
virtual |
Basic destructor.
Definition at line 104 of file vpMeEllipse.cpp.
References angle, and vpMeTracker::list.
|
protected |
Computes the length of the semimajor axis , the length of the semiminor axis , and that is the angle made by the major axis and the u axis of the image frame . They are computed from the normalized moments $ .
Definition at line 253 of file vpMeEllipse.cpp.
References a, b, ce, e, m_n02, m_n11, m_n20, and se.
Referenced by getParameters(), and initTracking().
|
protected |
Compute the angle of a point on the ellipse wrt the ellipse major axis.
pt | : Image point on the ellipse. |
Definition at line 207 of file vpMeEllipse.cpp.
References a, angle, b, ce, vpImagePoint::get_u(), vpImagePoint::get_v(), m_uc, m_vc, and se.
Referenced by initTracking(), leastSquareRobust(), plugHoles(), and track().
|
protected |
Computes the parameters from the center of the ellipse and the normalized moments . The parameters are such that , etc. as in Eq (25) of Chaumette 2004 TRO paper.
Definition at line 281 of file vpMeEllipse.cpp.
References K, m_n02, m_n11, m_n20, m_uc, and m_vc.
Referenced by initTracking().
|
protected |
Computes the normalized moments from the parameters as in Eq (24) of Chaumette 2004 TRO paper after simplifications to deal with the case cos(e) = 0.0
Definition at line 297 of file vpMeEllipse.cpp.
References a, b, ce, m_n02, m_n11, m_n20, and se.
Referenced by initTracking().
|
protected |
Compute the coordinates of a point on an ellipse from its angle with respect to the main orientation of the ellipse.
angle | : Angle on the ellipse with respect to its major axis. |
iP | : Image point on the ellipse. |
Definition at line 169 of file vpMeEllipse.cpp.
References a, b, ce, m_uc, m_vc, se, and vpImagePoint::set_uv().
Referenced by initTracking(), leastSquareRobust(), plugHoles(), sample(), and track().
|
protected |
Computes the angle that represents the angle between the tangent to the curve and the u axis. This angle is used for tracking the vpMeSite.
iP | : The point belonging to the ellipse where the angle is computed. |
Definition at line 117 of file vpMeEllipse.cpp.
References vpImagePoint::get_u(), and vpImagePoint::get_v().
Referenced by plugHoles(), sample(), and updateTheta().
|
protected |
Computes the angle that represents the angle between the tangent to the curve and the u axis. This angle is used for tracking the vpMeSite.
u,v | : The point belonging to the ellipse where the angle is computed. |
Definition at line 132 of file vpMeEllipse.cpp.
References K.
|
virtualinherited |
Display the moving edge sites with a color corresponding to their state.
I | : The image. |
Definition at line 326 of file vpMeTracker.cpp.
References vpMeSite::display(), and vpMeTracker::list.
Definition at line 340 of file vpMeTracker.cpp.
References vpMeSite::display(), and vpMeTracker::list.
Display the ellipse or arc of ellipse
I | : Image in which the ellipse appears. |
col | : Color of the displayed ellipse. |
Implements vpMeTracker.
Definition at line 844 of file vpMeEllipse.cpp.
References a, alpha1, alpha2, b, e, and iPc.
Referenced by track().
|
inherited |
Displays the status of moving edge sites
I | : The image. |
w | : vector |
index_w | : index |
Definition at line 354 of file vpMeTracker.cpp.
References vpMeTracker::display(), vpMeSite::getState(), vpMeTracker::list, vpMeSite::NO_SUPPRESSION, and vpMeSite::weight.
|
static |
Display the ellipse or the arc of ellipse thanks to the ellipse parameters.
I | : The image used as background. |
center | : Center of the ellipse. |
A | : Semimajor axis of the ellipse. |
B | : Semiminor axis of the ellipse. |
E | : Angle made by the major axis and the u axis of the image frame (in rad). |
smallalpha | : Smallest angle in rad (0 for a complete ellipse). |
highalpha | : Highest angle in rad (2 for a complete ellipse). |
color | : Color used to display the ellipse. |
thickness | : Thickness of the drawings. |
Definition at line 1197 of file vpMeEllipse.cpp.
References vpDisplay::displayEllipse().
|
static |
Display the ellipse or the arc of ellipse thanks to the ellipse parameters.
I | : The image used as background. |
center | : Center of the ellipse |
A | : Semimajor axis of the ellipse. |
B | : Semiminor axis of the ellipse. |
E | : Angle made by the major axis and the u axis of the image frame (in rad) |
smallalpha | : Smallest angle in rad (0 for a complete ellipse) |
highalpha | : Highest angle in rad ( for a complete ellipse) |
color | : Color used to display th lines. |
thickness | : Thickness of the drawings. |
Definition at line 1228 of file vpMeEllipse.cpp.
References vpDisplay::displayEllipse().
|
inline |
Gets the ellipse parameters as a 3-dim vector containing .
Definition at line 134 of file vpMeEllipse.h.
|
inlineinherited |
Return object parameters expressed in the 3D camera frame.
Definition at line 99 of file vpTracker.h.
|
inline |
Gets the zero order moment which represents the area of the ellipse.
Definition at line 274 of file vpMeEllipse.h.
|
inline |
Definition at line 290 of file vpMeEllipse.h.
|
inline |
Definition at line 314 of file vpMeEllipse.h.
|
inline |
Definition at line 282 of file vpMeEllipse.h.
|
inline |
Definition at line 298 of file vpMeEllipse.h.
|
inline |
Definition at line 306 of file vpMeEllipse.h.
|
inline |
Definition at line 328 of file vpMeEllipse.h.
|
inline |
Definition at line 321 of file vpMeEllipse.h.
|
inline |
Definition at line 335 of file vpMeEllipse.h.
|
inline |
Gets the second order normalized centered moment as a 3-dim vector containing such as
Definition at line 115 of file vpMeEllipse.h.
Referenced by vpFeatureBuilder::create().
|
inlineinherited |
Return object parameters expressed in the 2D image plane computed by perspective projection.
Definition at line 97 of file vpTracker.h.
|
inline |
Definition at line 245 of file vpMeEllipse.h.
|
inline |
Gets the area of the ellipse corresponding also to the zero order moment of the ellipse.
Definition at line 152 of file vpMeEllipse.h.
|
inline |
Definition at line 253 of file vpMeEllipse.h.
|
inline |
Gets the center of the ellipse.
Definition at line 159 of file vpMeEllipse.h.
Referenced by vpFeatureBuilder::create().
|
inline |
Definition at line 262 of file vpMeEllipse.h.
|
inline |
Definition at line 340 of file vpMeEllipse.h.
References vpMeTracker::initTracking().
|
inline |
Definition at line 164 of file vpMeEllipse.h.
|
inline |
Gets the first endpoint of the ellipse arc (corresponding to alpha1, not alphamin) when an arc is tracked.
Definition at line 172 of file vpMeEllipse.h.
|
inline |
Gets the highest angle of the moving edges tracked .
Definition at line 180 of file vpMeEllipse.h.
|
inlineinherited |
|
inlineinherited |
Return the moving edges initialisation parameters
Definition at line 120 of file vpMeTracker.h.
|
inlineinherited |
Return the list of moving edges
Definition at line 127 of file vpMeTracker.h.
|
inlineinherited |
Definition at line 128 of file vpMeTracker.h.
|
inlineinherited |
Return the number of points that has not been suppressed.
Definition at line 135 of file vpMeTracker.h.
References vpTracker::init(), and vpTracker::operator=().
|
protected |
Computes the coordinates of the ellipse center, the normalized moments , the length of the semimajor axis , the length of the semiminor axis , and that is the angle made by the major axis and the u axis of the image frame .
All those computations are made from the parameters so that .
Definition at line 313 of file vpMeEllipse.cpp.
References computeAbeFromNij(), vpException::fatalError, iPc, K, m_n02, m_n11, m_n20, m_uc, m_vc, printParameters(), vpImagePoint::set_uv(), and vpDEBUG_ENABLE.
Referenced by leastSquare(), and leastSquareRobust().
|
inline |
Gets the second endpoint of the ellipse arc (corresponding to alpha2, not alphamax) when an arc is tracked.
Definition at line 188 of file vpMeEllipse.h.
|
inline |
Gets the smallest angle of the moving edges tracked .
Definition at line 196 of file vpMeEllipse.h.
References vpMeTracker::initTracking().
|
inherited |
Definition at line 55 of file vpMeTracker.cpp.
References vpTracker::init(), vpMeSite::NONE, vpTracker::p, vpColVector::resize(), and vpMeTracker::selectDisplay.
Referenced by vpMeTracker::vpMeTracker().
|
inherited |
Virtual function that is called by lower classes vpMeEllipse, vpMeLine and vpMeNurbs.
vpTrackingException::initializationError | : Moving edges not initialized. |
Definition at line 169 of file vpMeTracker.cpp.
References vpDisplay::displayArrow(), vpMe::getRange(), vpMeSite::getState(), vpColor::green, vpMeSite::i, vpMeSite::i_1, vpMeTracker::init_range, vpTrackingException::initializationError, vpMeSite::j, vpMeSite::j_1, vpMeTracker::list, vpMeTracker::me, vpMeTracker::nGoodElement, vpMeSite::NO_SUPPRESSION, vpImagePoint::set_i(), vpImagePoint::set_j(), vpMe::setRange(), vpMeSite::track(), vpDERROR_TRACE, and vpERROR_TRACE.
Referenced by getEquationParam(), getSmallestAngle(), vpMeNurbs::initTracking(), vpMeLine::initTracking(), vpMeLine::reSample(), vpMeNurbs::reSample(), sample(), and vpMeNurbs::setCannyThreshold().
void vpMeEllipse::initTracking | ( | const vpImage< unsigned char > & | I, |
bool | trackArc = false |
||
) |
Initialize the tracking of an ellipse or an arc of an ellipse when trackArc is set to true. Ask the user to click on five points located on the ellipse to be tracked.
I | : Image in which the ellipse appears. |
trackArc | : When true, track an arc of the ellipse. First and fifth points specify the extremities of the arc (clockwise). When false track the complete ellipse. |
Definition at line 861 of file vpMeEllipse.cpp.
References vpDisplay::displayCross(), vpDisplay::flush(), vpDisplay::getClick(), m_trackArc, and vpColor::red.
Referenced by initTracking().
void vpMeEllipse::initTracking | ( | const vpImage< unsigned char > & | I, |
const std::vector< vpImagePoint > & | iP, | ||
bool | trackArc = false |
||
) |
Initialize the tracking of an ellipse or an arc of an ellipse when trackArc is set to true. The ellipse is defined thanks to a vector of image points.
I | : Image in which the ellipse appears. |
iP | : A vector of image points belonging to the ellipse edge used to initialize the tracking. |
trackArc | : When true, track an arc of the ellipse. First and last points specify the extremities of the arc (clockwise). When false track the complete ellipse. |
Definition at line 896 of file vpMeEllipse.cpp.
References alpha1, alpha2, computeAngleOnEllipse(), computePointOnEllipse(), vpMeTracker::display(), vpDisplay::flush(), iP1, iP2, leastSquare(), m_arcEpsilon, m_trackArc, sample(), and track().
void vpMeEllipse::initTracking | ( | const vpImage< unsigned char > & | I, |
const vpColVector & | param, | ||
vpImagePoint * | pt1 = NULL , |
||
const vpImagePoint * | pt2 = NULL |
||
) |
Initialize the tracking of an ellipse or an arc of an ellipse when arc extremities are given. The ellipse is defined by the vector containing the coordinates of its center and the three second order centered normalized moments . Without setting the arc extremities with parameters pt1 and pt2, the complete ellipse is considered. When extremities are set, we consider an ellipse arc defined clockwise from first extremity to second extremity.
I | : Image in which the ellipse appears. |
param | : Vector with the five parameters defining the ellipse (expressed in pixels). |
pt1 | : Image point defining the first extremity of the arc or NULL to track a complete ellipse. |
pt2 | : Image point defining the second extremity of the arc or NULL to track a complete ellipse. |
Definition at line 941 of file vpMeEllipse.cpp.
References alpha1, alpha2, computeAbeFromNij(), computeAngleOnEllipse(), computeKiFromNij(), computePointOnEllipse(), vpMeTracker::display(), vpDisplay::flush(), iP1, iP2, iPc, m_arcEpsilon, m_n02, m_n11, m_n20, m_trackArc, m_uc, m_vc, sample(), vpImagePoint::set_uv(), and track().
void vpMeEllipse::initTracking | ( | const vpImage< unsigned char > & | I, |
const vpImagePoint & | center_p, | ||
double | a_p, | ||
double | b_p, | ||
double | e_p, | ||
double | alpha1_p, | ||
double | alpha2_p | ||
) |
I | : Image in which the ellipse appears. |
center_p | : Ellipse center. |
a_p | : Semimajor axis. |
b_p | : Semiminor axis. |
e_p | : Orientationn in rad. |
alpha1_p | : Angle in rad defining the first extremity of the arc. |
alpha2_p | : Angle in rad defining the second extremity of the arc. |
Definition at line 1103 of file vpMeEllipse.cpp.
References a, alpha1, alpha2, b, ce, computeKiFromNij(), computeNijFromAbe(), computePointOnEllipse(), vpMeTracker::display(), e, vpDisplay::flush(), vpImagePoint::get_u(), vpImagePoint::get_v(), iP1, iP2, iPc, m_trackArc, m_uc, m_vc, sample(), se, and track().
void vpMeEllipse::initTracking | ( | const vpImage< unsigned char > & | I, |
unsigned int | n, | ||
vpImagePoint * | iP | ||
) |
I | : Image in which the ellipse appears. |
n | : The number of points in the list. |
iP | : A pointer to a list of points belonging to the ellipse edge. |
Definition at line 1151 of file vpMeEllipse.cpp.
References initTracking().
void vpMeEllipse::initTracking | ( | const vpImage< unsigned char > & | I, |
unsigned int | n, | ||
unsigned * | i, | ||
unsigned * | j | ||
) |
Definition at line 1164 of file vpMeEllipse.cpp.
References initTracking().
|
staticinherited |
Test whether the pixel is inside the mask. Mask values that are set to true are considered in the tracking.
mask | Mask image or NULL if not wanted. Mask values that are set to true are considered in the tracking. To disable a pixel, set false. |
i | : Pixel coordinate along the rows. |
j | : Pixel coordinate along the columns. |
Definition at line 140 of file vpMeTracker.cpp.
References vpImage< Type >::getValue().
Referenced by vpMbtFaceDepthDense::computeDesiredFeatures(), vpMbtFaceDepthNormal::computeDesiredFeatures(), vpMbtDistanceKltPoints::computeNbDetectedCurrent(), vpMbtDistanceKltPoints::init(), and vpMeTracker::track().
|
protected |
Least squares method to compute the ellipse to which the points belong.
I | : Image in which the ellipse appears (useful just to get its number of rows and columns... |
iP | : A vector of points belonging to the ellipse. |
Definition at line 573 of file vpMeEllipse.cpp.
References vpException::fatalError, vpImage< Type >::getHeight(), getParameters(), vpImage< Type >::getWidth(), K, and vpMatrix::nullSpace().
Referenced by initTracking().
|
protected |
Robust least squares method to compute the ellipse to which the vpMeSite belong. Manage also the lists of vpMeSite and corresponding angles.
I | : Image where tracking is done (useful just to get its number of rows and columns... |
Definition at line 631 of file vpMeEllipse.cpp.
References alpha1, alpha2, angle, vpColor::blue, computeAngleOnEllipse(), computePointOnEllipse(), vpColor::cyan, vpMath::deg(), vpException::dimensionError, vpDisplay::displayCross(), vpImagePoint::distance(), vpException::fatalError, vpImagePoint::get_i(), vpImagePoint::get_j(), vpImage< Type >::getHeight(), getParameters(), vpMe::getSampleStep(), vpMeSite::getState(), vpImage< Type >::getWidth(), vpColor::green, vpMeSite::ifloat, vpMeSite::jfloat, K, vpMeTracker::list, m_alphamax, m_alphamin, m_numberOfGoodPoints, vpMeTracker::me, vpRobust::MEstimator(), vpMeSite::NO_SUPPRESSION, vpMatrix::nullSpace(), vpMeTracker::numberOfSignal(), vpColor::orange, vpMath::rad(), vpColor::red, vpImagePoint::set_ij(), vpImagePoint::set_uv(), vpRobust::setMinMedianAbsoluteDeviation(), thresholdWeight, vpRobust::TUKEY, and vpDEBUG_ENABLE.
Referenced by track().
|
inherited |
Definition at line 120 of file vpMeTracker.cpp.
References vpMeTracker::list.
Referenced by vpMeLine::leastSquare(), leastSquareRobust(), vpMeNurbs::localReSample(), vpMeLine::reSample(), and vpMeNurbs::reSample().
|
inherited |
Definition at line 150 of file vpMeTracker.cpp.
Referenced by vpMeNurbs::localReSample(), plugHoles(), vpMeLine::sample(), vpMeNurbs::sample(), sample(), vpMeLine::seekExtremities(), and vpMeNurbs::seekExtremities().
|
inherited |
Definition at line 155 of file vpMeTracker.cpp.
References vpImagePoint::get_i(), vpImagePoint::get_j(), and vpMath::round().
|
protected |
Seek along the ellipse or arc of ellipse its two extremities to try recovering lost points. Try also to complete the parts with no tracked points.
I | : Image in which the ellipse appears. |
vpTrackingException::initializationError | : Moving edges not initialized. |
Definition at line 430 of file vpMeEllipse.cpp.
References alpha1, alpha2, angle, vpColor::blue, computeAngleOnEllipse(), computePointOnEllipse(), computeTheta(), vpDisplay::displayCross(), vpException::fatalError, vpImagePoint::get_i(), vpImagePoint::get_j(), vpImage< Type >::getHeight(), vpMe::getMu1(), vpMe::getMu2(), vpMe::getRange(), vpMe::getSampleStep(), vpMeSite::getState(), vpImage< Type >::getWidth(), vpMeSite::ifloat, vpMeSite::init(), vpMeSite::jfloat, vpMeTracker::list, m_alphamax, m_alphamin, vpMeTracker::me, vpMeSite::NO_SUPPRESSION, vpMeTracker::outOfImage(), vpMath::rad(), vpMath::round(), vpMeTracker::selectDisplay, vpImagePoint::set_ij(), vpMeSite::setDisplay(), vpMe::setMu1(), vpMe::setMu2(), vpMe::setRange(), vpMeSite::setState(), vpMeSite::track(), and vpDEBUG_ENABLE.
Referenced by track().
void vpMeEllipse::printParameters | ( | ) | const |
Print the parameters , the coordinates of the ellipse center, the normalized moments, and the A, B, E parameters.
Definition at line 347 of file vpMeEllipse.cpp.
References a, b, vpMath::deg(), e, K, m_n02, m_n11, m_n20, m_uc, m_vc, and vpColVector::t().
Referenced by getParameters(), and track().
|
inherited |
Reset the tracker by removing all the moving edges.
Definition at line 96 of file vpMeTracker.cpp.
References vpMeTracker::list, and vpMeTracker::nGoodElement.
Referenced by vpMeTracker::~vpMeTracker().
|
protectedvirtual |
Construct a list of vpMeSite moving edges at a particular sampling step between the two extremities. The two extremities are defined by the points with the smallest and the biggest angle.
I | : Image in which the ellipse appears. |
doNotTrack | : If true, moving-edges are not tracked. |
vpTrackingException::initializationError | : Moving edges not initialized. |
Implements vpMeTracker.
Definition at line 367 of file vpMeEllipse.cpp.
References alpha1, alpha2, angle, computePointOnEllipse(), computeTheta(), vpDisplay::displayCross(), expecteddensity, vpException::fatalError, vpImagePoint::get_i(), vpImagePoint::get_j(), vpImage< Type >::getHeight(), vpMe::getSampleStep(), vpImage< Type >::getWidth(), vpMeSite::init(), vpMeTracker::initTracking(), vpMeTracker::list, m_expectedDensity, vpMeTracker::me, vpMeSite::NO_SUPPRESSION, vpMeTracker::outOfImage(), vpMath::rad(), vpColor::red, vpMath::round(), vpMeTracker::selectDisplay, vpMeSite::setDisplay(), vpMe::setSampleStep(), and vpMeSite::setState().
Referenced by initTracking(), and track().
|
inlineinherited |
Definition at line 152 of file vpMeTracker.h.
|
inline |
Set the two endpoints of the ellipse arc when an arc is tracked.
Definition at line 206 of file vpMeEllipse.h.
|
inlineinherited |
|
inlinevirtualinherited |
|
inlineinherited |
Set the moving edges initialisation parameters
p_me | : Moving Edges. |
Definition at line 173 of file vpMeTracker.h.
|
inlineinherited |
Set the list of moving edges
l | : list of Moving Edges. |
Definition at line 180 of file vpMeTracker.h.
|
inline |
Set the threshold for the weights in the robust estimation of the ellipse parameters. If the weight of a point is below this threshold, this one is removed from the list of tracked meSite. Value must be between 0 (never rejected) and 1 (always rejected).
threshold | : The new value of the threshold. |
Definition at line 221 of file vpMeEllipse.h.
References vpMeTracker::track().
|
inherited |
Definition at line 129 of file vpMeTracker.cpp.
References vpMeTracker::list.
void vpMeEllipse::track | ( | const vpImage< unsigned char > & | I | ) |
Track the ellipse in the image I.
I | : Image in which the ellipse appears. |
Definition at line 987 of file vpMeEllipse.cpp.
References a, alpha1, alpha2, b, computeAngleOnEllipse(), computePointOnEllipse(), vpMath::deg(), vpException::dimensionError, vpMeTracker::display(), display(), vpDisplay::display(), vpDisplay::flush(), vpDisplay::getClick(), iP1, iP2, leastSquareRobust(), m00, m01, m02, m10, m11, m20, m_alphamax, m_alphamin, m_arcEpsilon, m_expectedDensity, m_n02, m_n11, m_n20, m_numberOfGoodPoints, m_trackArc, m_uc, m_vc, mu02, mu11, mu20, plugHoles(), printParameters(), vpMath::rad(), vpColor::red, sample(), vpMeTracker::track(), updateTheta(), and vpDEBUG_ENABLE.
Referenced by initTracking().
|
protected |
Compute the angle for each vpMeSite.
Definition at line 149 of file vpMeEllipse.cpp.
References vpMeSite::alpha, computeTheta(), vpMeSite::ifloat, vpMeSite::jfloat, vpMeTracker::list, and vpImagePoint::set_ij().
Referenced by track().
double vpMeEllipse::a |
is the semimajor axis of the ellipse.
Definition at line 365 of file vpMeEllipse.h.
Referenced by computeAbeFromNij(), computeAngleOnEllipse(), computeNijFromAbe(), computePointOnEllipse(), display(), initTracking(), printParameters(), and track().
|
protected |
The angle on the ellipse corresponding to the first endpoint. Its value is 0 for tracking a complete ellipse
Definition at line 385 of file vpMeEllipse.h.
Referenced by display(), initTracking(), leastSquareRobust(), plugHoles(), sample(), and track().
|
protected |
The angle on the ellipse corresponding to the second endpoint. Its value is for tracking a complete ellipse
Definition at line 390 of file vpMeEllipse.h.
Referenced by display(), initTracking(), leastSquareRobust(), plugHoles(), sample(), and track().
|
protected |
Stores the value in increasing order of the angle on the ellipse for each vpMeSite .
Definition at line 396 of file vpMeEllipse.h.
Referenced by computeAngleOnEllipse(), leastSquareRobust(), plugHoles(), sample(), and ~vpMeEllipse().
double vpMeEllipse::b |
is the semiminor axis of the ellipse.
Definition at line 367 of file vpMeEllipse.h.
Referenced by computeAbeFromNij(), computeAngleOnEllipse(), computeNijFromAbe(), computePointOnEllipse(), display(), initTracking(), printParameters(), and track().
|
protected |
Value of cos(e).
Definition at line 392 of file vpMeEllipse.h.
Referenced by computeAbeFromNij(), computeAngleOnEllipse(), computeNijFromAbe(), computePointOnEllipse(), and initTracking().
|
inherited |
Feature coordinates expressed in the camera frame cP.
Definition at line 77 of file vpTracker.h.
Referenced by vpFeaturePoint3D::buildFrom(), vpSphere::changeFrame(), vpPoint::changeFrame(), vpCircle::changeFrame(), vpLine::changeFrame(), vpCylinder::changeFrame(), vpFeatureBuilder::create(), vpPoint::get_W(), vpPoint::get_X(), vpPoint::get_Y(), vpPoint::get_Z(), vpSphere::init(), vpCircle::init(), vpPoint::init(), vpLine::init(), vpCylinder::init(), vpMbtPolygon::isVisible(), vpTracker::operator=(), vpForwardProjection::print(), vpPose::printPoint(), vpForwardProjection::project(), vpSphere::projection(), vpCircle::projection(), vpPoint::projection(), vpLine::projection(), vpCylinder::projection(), vpPoint::set_W(), vpPoint::set_X(), vpPoint::set_Y(), and vpPoint::set_Z().
|
inherited |
Flag used to indicate if the feature parameters cP expressed in the camera frame are available.
Definition at line 83 of file vpTracker.h.
Referenced by vpTracker::init(), and vpTracker::operator=().
|
inherited |
Definition at line 193 of file vpMeTracker.h.
Referenced by vpMeTracker::operator=(), and vpMeTracker::vpMeTracker().
double vpMeEllipse::e |
is the angle made by the major axis and the u axis of the image frame .
Definition at line 371 of file vpMeEllipse.h.
Referenced by computeAbeFromNij(), display(), initTracking(), and printParameters().
|
protected |
Expected number of points to track along the ellipse.
Definition at line 413 of file vpMeEllipse.h.
Referenced by sample().
|
inherited |
Definition at line 81 of file vpMeTracker.h.
Referenced by vpMeTracker::initTracking(), vpMeTracker::operator=(), and vpMeTracker::vpMeTracker().
|
protected |
The coordinates of the first endpoint of the ellipse arc corresponding to angle
Definition at line 377 of file vpMeEllipse.h.
Referenced by initTracking(), track(), and vpMeEllipse().
|
protected |
The coordinates of the second endpoint of the ellipse arc corresponding to angle
Definition at line 381 of file vpMeEllipse.h.
Referenced by initTracking(), track(), and vpMeEllipse().
vpImagePoint vpMeEllipse::iPc |
The coordinates of the ellipse center.
Definition at line 363 of file vpMeEllipse.h.
Referenced by display(), getParameters(), and initTracking().
vpColVector vpMeEllipse::K |
Parameters of the ellipse satisfying the homogeneous equation :
Definition at line 361 of file vpMeEllipse.h.
Referenced by computeKiFromNij(), computeTheta(), getParameters(), leastSquare(), leastSquareRobust(), printParameters(), and vpMeEllipse().
|
inherited |
Tracking dependent variables/functions List of tracked moving edges points.
Definition at line 78 of file vpMeTracker.h.
Referenced by vpMeTracker::display(), vpMeLine::display(), vpMeTracker::initTracking(), vpMeLine::leastSquare(), leastSquareRobust(), vpMeNurbs::localReSample(), vpMeTracker::numberOfSignal(), vpMeTracker::operator=(), plugHoles(), vpMeTracker::reset(), vpMeLine::sample(), vpMeNurbs::sample(), sample(), vpMeLine::seekExtremities(), vpMeNurbs::seekExtremities(), vpMeNurbs::seekExtremitiesCanny(), vpMeLine::setExtremities(), vpMeLine::suppressPoints(), vpMeNurbs::suppressPoints(), vpMeNurbs::supressNearPoints(), vpMeTracker::totalNumberOfSignal(), vpMeTracker::track(), vpMeNurbs::track(), vpMeLine::updateDelta(), vpMeNurbs::updateDelta(), updateTheta(), vpMeTracker::vpMeTracker(), ~vpMeEllipse(), and vpMeLine::~vpMeLine().
|
protected |
|
protected |
Definition at line 403 of file vpMeEllipse.h.
Referenced by track().
|
protected |
Definition at line 405 of file vpMeEllipse.h.
Referenced by track().
|
protected |
|
protected |
|
protected |
Definition at line 405 of file vpMeEllipse.h.
Referenced by track().
|
protected |
The highest angle of the current moving edge list
Definition at line 423 of file vpMeEllipse.h.
Referenced by leastSquareRobust(), plugHoles(), and track().
|
protected |
The smallest angle of the current moving edge list
Definition at line 419 of file vpMeEllipse.h.
Referenced by leastSquareRobust(), plugHoles(), and track().
|
protected |
Epsilon value used to check if arc angles are the same.
Definition at line 437 of file vpMeEllipse.h.
Referenced by initTracking(), and track().
|
protected |
Expected number of points to track along the ellipse.
Definition at line 431 of file vpMeEllipse.h.
|
inherited |
Mask used to disable tracking on a part of image.
Definition at line 84 of file vpMeTracker.h.
Referenced by vpMeTracker::track().
|
protected |
Definition at line 429 of file vpMeEllipse.h.
Referenced by computeAbeFromNij(), computeKiFromNij(), computeNijFromAbe(), getParameters(), initTracking(), printParameters(), and track().
|
protected |
Definition at line 429 of file vpMeEllipse.h.
Referenced by computeAbeFromNij(), computeKiFromNij(), computeNijFromAbe(), getParameters(), initTracking(), printParameters(), and track().
|
protected |
Second order centered and normalized moments.
Definition at line 429 of file vpMeEllipse.h.
Referenced by computeAbeFromNij(), computeKiFromNij(), computeNijFromAbe(), getParameters(), initTracking(), printParameters(), and track().
|
protected |
Number of correct points tracked along the ellipse.
Definition at line 433 of file vpMeEllipse.h.
Referenced by leastSquareRobust(), and track().
|
protected |
Track an arc of ellipse (true) or a complete one (false).
Definition at line 435 of file vpMeEllipse.h.
Referenced by initTracking(), and track().
|
protected |
Value of u coordinate of iPc.
Definition at line 425 of file vpMeEllipse.h.
Referenced by computeAngleOnEllipse(), computeKiFromNij(), computePointOnEllipse(), getParameters(), initTracking(), printParameters(), and track().
|
protected |
Value of v coordinate of iPc.
Definition at line 427 of file vpMeEllipse.h.
Referenced by computeAngleOnEllipse(), computeKiFromNij(), computePointOnEllipse(), getParameters(), initTracking(), printParameters(), and track().
|
inherited |
Moving edges initialisation parameters.
Definition at line 80 of file vpMeTracker.h.
Referenced by vpMeTracker::initTracking(), leastSquareRobust(), vpMeTracker::operator=(), plugHoles(), vpMeLine::reSample(), vpMeLine::sample(), sample(), vpMeLine::seekExtremities(), vpMeTracker::track(), and vpMeTracker::vpMeTracker().
|
protected |
Definition at line 401 of file vpMeEllipse.h.
Referenced by track().
|
protected |
|
protected |
Definition at line 401 of file vpMeEllipse.h.
Referenced by track().
|
inherited |
Definition at line 82 of file vpMeTracker.h.
Referenced by vpMeTracker::initTracking(), vpMeTracker::operator=(), vpMeTracker::reset(), vpMeTracker::track(), and vpMeTracker::vpMeTracker().
|
inherited |
Feature coordinates expressed in the image plane p. They correspond to 2D normalized coordinates expressed in meters.
Definition at line 73 of file vpTracker.h.
Referenced by vpMbtDistanceCircle::computeInteractionMatrixError(), vpCircle::computeIntersectionPoint(), vpMeterPixelConversion::convertEllipse(), vpFeatureBuilder::create(), vpSphere::display(), vpPoint::display(), vpCircle::display(), vpLine::display(), vpProjectionDisplay::display(), vpCylinder::display(), vpProjectionDisplay::displayCamera(), vpFeatureDisplay::displayEllipse(), vpPose::displayModel(), vpImageDraw::drawFrame(), vpPoint::get_w(), vpPoint::get_x(), vpPoint::get_y(), vpSphere::init(), vpMeTracker::init(), vpCircle::init(), vpPoint::init(), vpLine::init(), vpCylinder::init(), vpTracker::operator=(), vpForwardProjection::print(), vpPose::printPoint(), vpForwardProjection::project(), vpSphere::projection(), vpCircle::projection(), vpPoint::projection(), vpLine::projection(), vpCylinder::projection(), vpPoint::set_w(), vpPoint::set_x(), and vpPoint::set_y().
|
inherited |
Definition at line 192 of file vpMeTracker.h.
Referenced by vpMeTracker::operator=(), and vpMeTracker::vpMeTracker().
|
protected |
Value of sin(e).
Definition at line 394 of file vpMeEllipse.h.
Referenced by computeAbeFromNij(), computeAngleOnEllipse(), computeNijFromAbe(), computePointOnEllipse(), and initTracking().
|
protectedinherited |
Definition at line 90 of file vpMeTracker.h.
Referenced by vpMeTracker::init(), vpMeNurbs::localReSample(), vpMeTracker::operator=(), plugHoles(), vpMeLine::sample(), vpMeNurbs::sample(), sample(), vpMeLine::seekExtremities(), vpMeNurbs::seekExtremities(), vpMeNurbs::seekExtremitiesCanny(), and vpMeTracker::vpMeTracker().
|
protected |
Threshold on the weights for the robust least square.
Definition at line 409 of file vpMeEllipse.h.
Referenced by leastSquareRobust().