36 #ifndef _vpMeEllipse_h_
37 #define _vpMeEllipse_h_
39 #include <visp3/core/vpColVector.h>
40 #include <visp3/core/vpMatrix.h>
42 #include <visp3/core/vpImagePoint.h>
43 #include <visp3/me/vpMeSite.h>
44 #include <visp3/me/vpMeTracker.h>
46 #include <visp3/core/vpColor.h>
47 #include <visp3/core/vpImage.h>
52 #if (VISP_CXX_STANDARD >= VISP_CXX_STANDARD_17)
169 inline double getArea()
const {
return m_m00; }
254 #if (VISP_CXX_STANDARD >= VISP_CXX_STANDARD_17)
278 bool trackArc =
false);
295 const vpImagePoint *pt2 =
nullptr,
bool trackCircle =
false);
301 void printParameters()
const;
324 m_thresholdWeight = 0;
326 else if (threshold > 1) {
327 m_thresholdWeight = 1;
330 m_thresholdWeight = threshold;
357 const double &E,
const double &smallalpha,
const double &highalpha,
377 const double &E,
const double &smallalpha,
const double &highalpha,
380 #ifdef VISP_BUILD_DEPRECATED_FUNCTIONS
386 const double &E,
const double &smallalpha,
const double &highalpha,
393 const double &E,
const double &smallalpha,
const double &highalpha,
477 void computeAbeFromNij();
484 double computeAngleOnEllipse(
const vpImagePoint &pt)
const;
492 void computeKiFromNij();
499 void computeNijFromAbe();
508 void computePointOnEllipse(
const double angle,
vpImagePoint &iP);
526 double computeTheta(
double u,
double v)
const;
537 void getParameters();
Implementation of column vector and the associated operations.
Class to define RGB colors available for display functionalities.
static const vpColor green
Class that defines a 2D point in an image. This class is useful for image processing and stores only ...
Class that tracks an ellipse using moving edges.
double m_n20
Second order centered and normalized moments .
double m_arcEpsilon
Epsilon value used to check if arc angles are the same.
double getHighestAngle() const
vpImagePoint m_iPc
The coordinates of the ellipse center.
double getSmallestAngle() const
double m_vc
Value of v coordinate of iPc.
unsigned int m_numberOfGoodPoints
Number of correct points tracked along the ellipse.
double m_uc
Value of u coordinate of iPc.
bool m_trackCircle
Track a circle (true) or an ellipse (false).
void setEndpoints(const vpImagePoint &pt1, const vpImagePoint &pt2)
double m_m00
Ellipse area.
vpImagePoint getSecondEndpoint() const
vpImagePoint getFirstEndpoint() const
void setThresholdRobust(double threshold)
vpColVector get_ABE() const
unsigned int getNumberOfGoodPoints() const
std::list< double > m_angleList
Stores the value in increasing order of the angle on the ellipse for each vpMeSite.
bool m_trackArc
Track an arc of ellipse/circle (true) or a complete one (false).
double m_a
is the semi major axis of the ellipse.
vpImagePoint getCenter() const
double m_b
is the semi minor axis of the ellipse.
vpColVector get_nij() const
double m_se
Value of sin(e).
double m_n02
Second order centered and normalized moments .
unsigned int getExpectedDensity() const
unsigned int m_expectedDensity
Expected number of points to track along the ellipse.
double m_n11
Second order centered and normalized moments .
double m_ce
Value of cos(e).
double m_thresholdWeight
Threshold on the weights for the robust least square.
Contains abstract elements for a Distance to Feature type feature.
void initTracking(const vpImage< unsigned char > &I)
virtual void sample(const vpImage< unsigned char > &image, bool doNotTrack=false)=0
void track(const vpImage< unsigned char > &I)
void display(const vpImage< unsigned char > &I)