35 #include <visp3/core/vpDebug.h>
36 #include <visp3/core/vpMatrixException.h>
37 #include <visp3/core/vpTrackingException.h>
38 #include <visp3/core/vpImagePoint.h>
39 #include <visp3/core/vpRobust.h>
40 #include <visp3/me/vpMe.h>
41 #include <visp3/me/vpMeEllipse.h>
44 #ifndef VP_ME_ELLIPSE_REGULAR_SAMPLING
45 #define VP_ME_ELLIPSE_TWO_CONCENTRIC_CIRCLES
49 : m_K(), m_iPc(), m_a(0.), m_b(0.), m_e(0.), m_iP1(), m_iP2(), m_alpha1(0), m_alpha2(2 * M_PI), m_ce(0.), m_se(0.), m_angleList(), m_m00(0.),
50 m_thresholdWeight(0.2), m_alphamin(0.), m_alphamax(0.), m_uc(0.), m_vc(0.), m_n20(0.), m_n11(0.), m_n02(0.),
51 m_expectedDensity(0), m_numberOfGoodPoints(0), m_trackCircle(false), m_trackArc(false), m_arcEpsilon(1e-6)
61 :
vpMeTracker(me_ellipse), m_K(me_ellipse.m_K), m_iPc(me_ellipse.m_iPc), m_a(me_ellipse.m_a), m_b(me_ellipse.m_b), m_e(me_ellipse.m_e),
62 m_iP1(me_ellipse.m_iP1), m_iP2(me_ellipse.m_iP2), m_alpha1(me_ellipse.m_alpha1), m_alpha2(me_ellipse.m_alpha2), m_ce(me_ellipse.m_ce),
63 m_se(me_ellipse.m_se), m_angleList(me_ellipse.m_angleList), m_m00(me_ellipse.m_m00),
64 m_thresholdWeight(me_ellipse.m_thresholdWeight),
65 m_alphamin(me_ellipse.m_alphamin), m_alphamax(me_ellipse.m_alphamax), m_uc(me_ellipse.m_uc), m_vc(me_ellipse.m_vc),
66 m_n20(me_ellipse.m_n20), m_n11(me_ellipse.m_n11), m_n02(me_ellipse.m_n02),
67 m_expectedDensity(me_ellipse.m_expectedDensity), m_numberOfGoodPoints(me_ellipse.m_numberOfGoodPoints),
68 m_trackCircle(me_ellipse.m_trackCircle), m_trackArc(me_ellipse.m_trackArc), m_arcEpsilon(me_ellipse.m_arcEpsilon)
79 double u = iP.
get_u();
80 double v = iP.
get_v();
87 double A = (
m_K[0] * u) + (
m_K[2] * v) +
m_K[3];
88 double B = (
m_K[1] * v) + (
m_K[2] * u) +
m_K[4];
90 double theta = atan2(B, A);
101 std::list<vpMeSite>::iterator end =
m_meList.end();
102 for (std::list<vpMeSite>::iterator it =
m_meList.begin(); it != end; ++it) {
119 #ifdef VP_ME_ELLIPSE_REGULAR_SAMPLING
122 double co = cos(angle);
123 double si = sin(angle);
125 double u = co * coef;
126 double v = si * coef;
129 #elif defined(VP_ME_ELLIPSE_TWO_CONCENTRIC_CIRCLES)
135 double u =
m_a * cos(angle);
136 double v =
m_b * sin(angle);
150 #ifdef VP_ME_ELLIPSE_REGULAR_SAMPLING
152 double du = pt.
get_u() - uc;
153 double dv = pt.
get_v() - vc;
154 double ang = atan2(dv, du) -
m_e;
158 else if (ang < -M_PI) {
161 #ifdef VP_ME_ELLIPSE_TWO_CONCENTRIC_CIRCLES
166 double co = cos(ang);
167 double si = sin(ang);
168 double coeff = 1.0 / sqrt((
m_b *
m_b * co * co) + (
m_a *
m_a * si * si));
173 #elif defined(VP_ME_ELLIPSE_TWO_CONCENTRIC_CIRCLES)
179 double angle = atan2(si, co);
188 double d = (num * num) + (4.0 *
m_n11 *
m_n11);
189 if (d <= std::numeric_limits<double>::epsilon()) {
196 m_e = atan2(2.0 *
m_n11, num) / 2.0;
202 m_a = sqrt(2.0 * (num + d));
203 m_b = sqrt(2.0 * (num - d));
245 unsigned int Ksize =
m_K.
size();
246 for (
unsigned int i = 0; i < Ksize; ++i) {
256 std::cout <<
"K :" <<
m_K.
t() << std::endl;
257 std::cout <<
"xc = " <<
m_uc <<
", yc = " <<
m_vc << std::endl;
258 std::cout <<
"n20 = " <<
m_n20 <<
", n11 = " <<
m_n11 <<
", n02 = " <<
m_n02 << std::endl;
272 int nbrows =
static_cast<int>(I.
getHeight());
273 int nbcols =
static_cast<int>(I.
getWidth());
275 if (std::fabs(
m_me->
getSampleStep()) <= std::numeric_limits<double>::epsilon()) {
276 std::cout <<
"Warning: In vpMeEllipse::sample() ";
277 std::cout <<
"function called with sample step = 0. We set it rather to 10 pixels";
282 double perim = M_PI * ((3.0 * (
m_a +
m_b)) - sqrt(((3.0 *
m_a) +
m_b) * (
m_a + (3.0 *
m_b))));
284 unsigned int nb_pt =
static_cast<unsigned int>(floor(perim /
m_me->
getSampleStep()));
285 double incr = (2.0 * M_PI) / nb_pt;
295 double ang =
m_alpha1 + (incr / 2.0);
303 unsigned int is_uint =
static_cast<unsigned int>(iP.
get_i());
304 unsigned int js_uint =
static_cast<unsigned int>(iP.
get_j());
307 const unsigned int crossSize = 5;
318 double contrastThreshold = fabs(convolution) * marginRatio;
336 unsigned int nb_pts_added = 0;
337 int nbrows =
static_cast<int>(I.
getHeight());
338 int nbcols =
static_cast<int>(I.
getWidth());
344 double perim = M_PI * ((3.0 * (
m_a +
m_b)) - sqrt(((3.0 *
m_a) +
m_b) * (
m_a + (3.0 *
m_b))));
346 unsigned int nb_pt =
static_cast<unsigned int>(floor(perim /
m_me->
getSampleStep()));
347 double incr = (2.0 * M_PI) / nb_pt;
351 std::list<double>::iterator angleList =
m_angleList.begin();
352 std::list<vpMeSite>::iterator meList =
m_meList.begin();
354 double ang = *angleList;
359 double nextang = *angleList;
360 if ((nextang - ang) > (2.0 * incr)) {
363 while (ang < (nextang - incr)) {
366 unsigned int is_uint =
static_cast<unsigned int>(iP.
get_i());
367 unsigned int js_uint =
static_cast<unsigned int>(iP.
get_j());
375 double contrastThreshold = fabs(convolution) * marginRatio;
382 if ((new_ang - ang) > M_PI) {
383 new_ang -= 2.0 * M_PI;
385 else if ((ang - new_ang) > M_PI) {
386 new_ang += 2.0 * M_PI;
391 const unsigned int crossSize = 5;
405 if (nb_pts_added > 0) {
406 std::cout <<
"Number of added points from holes with angles: " << nb_pts_added << std::endl;
418 double nextang = *angleList;
424 ang = (nextang + ang) / 2.0;
427 unsigned int is_uint =
static_cast<unsigned int>(iP.
get_i());
428 unsigned int js_uint =
static_cast<unsigned int>(iP.
get_j());
436 double contrastThreshold = fabs(convolution) * marginRatio;
443 if ((new_ang - ang) > M_PI) {
444 new_ang -= 2.0 * M_PI;
446 else if ((ang - new_ang) > M_PI) {
447 new_ang += 2.0 * M_PI;
452 const unsigned int crossSize = 5;
465 if (nb_pts_added > 0) {
466 std::cout <<
"Number of added points from holes : " << nb_pts_added << std::endl;
470 std::cout <<
"ang = " <<
vpMath::deg(ang) << std::endl;
479 unsigned int nbpts = 0;
482 nbpts =
static_cast<unsigned int>(floor((
m_alphamin -
m_alpha1 - (incr / 2.0)) / incr));
485 for (
unsigned int i = 0; i < nbpts; ++i) {
488 unsigned int is_uint =
static_cast<unsigned int>(iP.
get_i());
489 unsigned int js_uint =
static_cast<unsigned int>(iP.
get_j());
498 double contrastThreshold = fabs(convolution) * marginRatio;
505 if ((new_ang - ang) > M_PI) {
506 new_ang -= 2.0 * M_PI;
508 else if ((ang - new_ang) > M_PI) {
509 new_ang += 2.0 * M_PI;
514 const unsigned int crossSize = 5;
516 std::cout <<
"Add extremity 1, ang = " <<
vpMath::deg(new_ang) << std::endl;
524 if (nb_pts_added > 0) {
525 std::cout <<
"Number of added points from holes and first extremity : " << nb_pts_added << std::endl;
533 nbpts =
static_cast<unsigned int>(floor((
m_alpha2 - (incr / 2.0) -
m_alphamax) / incr));
537 for (
unsigned int i = 0; i < nbpts; ++i) {
540 unsigned int is_uint =
static_cast<unsigned int>(iP.
get_i());
541 unsigned int js_uint =
static_cast<unsigned int>(iP.
get_j());
549 double contrastThreshold = fabs(convolution) * marginRatio;
556 if ((new_ang - ang) > M_PI) {
557 new_ang -= 2.0 * M_PI;
559 else if ((ang - new_ang) > M_PI) {
560 new_ang += 2.0 * M_PI;
565 const unsigned int crossSize = 5;
567 std::cout <<
"Add extremity 2, ang = " <<
vpMath::deg(new_ang) << std::endl;
582 if (nb_pts_added > 0) {
583 std::cout <<
"In plugHoles(): nb of added points : " << nb_pts_added << std::endl;
593 unsigned int n =
static_cast<unsigned int>(iP.size());
596 const unsigned int circleDims = 3;
597 if (n < circleDims) {
606 for (
unsigned int k = 0; k < n; ++k) {
608 double u = (iP[k].get_u() - um) / um;
609 double v = (iP[k].get_v() - vm) / um;
613 b[k] = (u * u) + (v * v);
619 double ratio = vm / um;
620 m_K[0] = (
m_K[1] = 1.0 / (um * um));
622 m_K[3] = -(1.0 + (x[0] / 2.0)) / um;
623 m_K[4] = -(ratio + (x[1] / 2.0)) / um;
624 m_K[5] = -x[2] + 1.0 + (ratio * ratio) + x[0] + (ratio * x[1]);
643 for (
unsigned int k = 0; k < n; ++k) {
645 double u = (iP[k].get_u() - um) / um;
646 double v = (iP[k].get_v() - vm) / vm;
649 A[k][2] = 2.0 * u * v;
660 for (
unsigned int i = 0; i < nbRows; ++i) {
669 m_K[5] = (
m_K[5] * um * vm) - (
m_K[0] * um * um) - (
m_K[1] * vm * vm) - (2.0 *
m_K[2] * um * vm) - (2.0 *
m_K[3] * um) - (2.0 *
m_K[4] * vm);
697 std::list<vpMeSite>::const_iterator end =
m_meList.end();
699 for (std::list<vpMeSite>::const_iterator it =
m_meList.begin(); it != end; ++it) {
708 b[k] = (u * u) + (v * v);
717 const unsigned int minRequiredNbMe = 3;
718 if (k < minRequiredNbMe) {
726 unsigned int iter = 0;
735 const unsigned int maxNbIter = 4;
736 const unsigned int widthDA = DA.
getCols();
737 while ((iter < maxNbIter) && (var > 0.1)) {
738 for (
unsigned int i = 0; i < k; ++i) {
739 for (
unsigned int j = 0; j < widthDA; ++j) {
740 DA[i][j] = w[i] * A[i][j];
748 double ratio = vm / um;
749 m_K[0] = (
m_K[1] = 1.0 / (um * um));
751 m_K[3] = -(1.0 + (x[0] / 2.0)) / um;
752 m_K[4] = -(ratio + (x[1] / 2.0)) / um;
753 m_K[5] = -x[2] + 1.0 + (ratio * ratio) + x[0] + (ratio * x[1]);
759 var = (xg - xg_prev).frobeniusNorm();
763 for (
unsigned int i = 0; i < k; ++i) {
766 double sign = (
m_K[0] * x * x) + (
m_K[1] * y * y) + (2. *
m_K[2] * x * y) + (2. *
m_K[3] * x) + (2. *
m_K[4] * y) +
m_K[5];
800 std::list<vpMeSite>::const_iterator end =
m_meList.end();
802 for (std::list<vpMeSite>::const_iterator it =
m_meList.begin(); it != end; ++it) {
810 A[k][2] = 2.0 * u * v;
822 const unsigned int minRequiredMe = 5;
823 if (k < minRequiredMe) {
830 unsigned int iter = 0;
838 const unsigned int maxIter = 4;
839 const unsigned int widthDA = DA.
getCols();
840 while ((iter < maxIter) && (var > 0.1)) {
841 for (
unsigned int i = 0; i < k; ++i) {
842 for (
unsigned int j = 0; j < widthDA; ++j) {
843 DA[i][j] = w[i] * A[i][j];
846 unsigned int dim = DA.
nullSpace(KerDA, 1);
852 for (
unsigned int i = 0; i < 6; ++i) {
853 m_K[i] = KerDA[i][0];
861 m_K[5] = (
m_K[5] * um * vm) - (
m_K[0] * um * um) - (
m_K[1] * vm * vm) - (2.0 *
m_K[2] * um * vm) - (2.0 *
m_K[3] * um) - (2.0 *
m_K[4] * vm);
867 var = (xg - xg_prev).frobeniusNorm();
871 for (
unsigned int i = 0; i < k; ++i) {
874 double sign = (
m_K[0] * x * x) + (
m_K[1] * y * y) + (2. *
m_K[2] * x * y) + (2. *
m_K[3] * x) + (2. *
m_K[4] * y) +
m_K[5];
895 double previous_ang = -4.0 * M_PI;
897 std::list<double>::iterator angleList =
m_angleList.begin();
898 std::list<vpMeSite>::iterator end =
m_meList.end();
899 std::list<vpMeSite>::iterator meList =
m_meList.begin();
900 while (meList != end) {
904 double ang = *angleList;
911 const unsigned int crossSize = 10;
917 double ang = *angleList;
923 printf(
"point %d outlier i : %.0f , j : %0.f, ang = %lf, poids : %lf\n",
925 const unsigned int crossSize = 10;
930 double ang = *angleList;
934 if ((new_ang - ang) > M_PI) {
935 new_ang -= 2.0 * M_PI;
937 else if ((ang - new_ang) > M_PI) {
938 new_ang += 2.0 * M_PI;
940 previous_ang = new_ang;
941 *angleList = new_ang;
945 printf(
"point %d inlier i : %.0f , j : %0.f, poids : %lf\n", k, p_me.
get_ifloat(), p_me.
get_jfloat(), w[k]);
946 const unsigned int crossSize = 10;
962 std::list<double> finAngle;
964 std::list<vpMeSite> finMe;
966 std::list<double>::iterator debutAngleList;
967 std::list<vpMeSite>::iterator debutMeList;
971 while (meList != end) {
973 double ang = *angleList;
979 finAngle.push_back(ang);
981 finMe.push_back(p_me);
1000 debutAngleList =
m_angleList.insert(debutAngleList, ang);
1002 debutMeList =
m_meList.insert(debutMeList, p_me);
1017 unsigned int numberOfGoodPoints = 0;
1018 previous_ang = -4.0 * M_PI;
1021 double perim = M_PI * ((3.0 * (
m_a +
m_b)) - sqrt(((3.0 *
m_a) +
m_b) * (
m_a + (3.0 *
m_b))));
1022 unsigned int nb_pt =
static_cast<unsigned int>(floor(perim /
m_me->
getSampleStep()));
1023 double incr = (2.0 * M_PI) / nb_pt;
1037 while (meList != end) {
1039 double new_ang = *angleList;
1041 if ((new_ang - previous_ang) >= (0.6 * incr)) {
1042 previous_ang = new_ang;
1043 ++numberOfGoodPoints;
1049 const unsigned int crossSize = 10;
1051 printf(
"In LQR: angle : %lf, i = %.0lf, j = %.0lf\n",
vpMath::deg(new_ang), iP.
get_i(), iP.
get_j());
1060 const unsigned int crossSize = 10;
1072 const unsigned int crossSize = 10;
1079 if ((
m_meList.size() != numberOfGoodPoints) || (
m_angleList.size() != numberOfGoodPoints)) {
1091 printf(
"Fin leastSquareRobust : nb pts ok = %d \n", numberOfGoodPoints);
1094 return numberOfGoodPoints;
1105 const unsigned int nForCircle = 3;
1110 std::vector<vpImagePoint> iP(n);
1117 std::cout <<
"First and third points specify the extremities of the arc of circle (clockwise)" << std::endl;
1119 for (
unsigned int k = 0; k < n; ++k) {
1120 std::cout <<
"Click point " << (k + 1) <<
"/" << n <<
" on the circle " << std::endl;
1122 const unsigned int crossSize = 10;
1125 std::cout << iP[k] << std::endl;
1130 std::cout <<
"First and fifth points specify the extremities of the arc of ellipse (clockwise)" << std::endl;
1132 for (
unsigned int k = 0; k < n; ++k) {
1133 std::cout <<
"Click point " << (k + 1) <<
"/" << n <<
" on the ellipse " << std::endl;
1135 const unsigned int crossSize = 10;
1138 std::cout << iP[k] << std::endl;
1144 #if (VISP_CXX_STANDARD >= VISP_CXX_STANDARD_17)
1150 #if (VISP_CXX_STANDARD >= VISP_CXX_STANDARD_17)
1151 if (!opt_ips.has_value())
1153 if (opt_ips ==
nullptr)
1156 initTracking(I, trackCircle, trackArc);
1160 if (opt_ips->size() != 0) {
1161 initTracking(I, *opt_ips, trackCircle, trackArc);
1166 const unsigned int nForCircle = 3;
1167 m_trackCircle = trackCircle;
1172 m_trackArc = trackArc;
1176 if (m_trackCircle) {
1178 std::cout <<
"First and third points specify the extremities of the arc of circle (clockwise)" << std::endl;
1180 for (
unsigned int k = 0; k < n; ++k) {
1181 std::cout <<
"Click point " << (k + 1) <<
"/" << n <<
" on the circle " << std::endl;
1183 const unsigned int crossSize = 10;
1186 std::cout << (*opt_ips)[k] << std::endl;
1191 std::cout <<
"First and fifth points specify the extremities of the arc of ellipse (clockwise)" << std::endl;
1193 for (
unsigned int k = 0; k < n; ++k) {
1194 std::cout <<
"Click point " << (k + 1) <<
"/" << n <<
" on the ellipse " << std::endl;
1196 const unsigned int crossSize = 10;
1199 std::cout << (*opt_ips)[k] << std::endl;
1202 initTracking(I, *opt_ips, trackCircle, trackArc);
1206 bool trackCircle,
bool trackArc)
1242 if ((pt1 !=
nullptr) && (pt2 !=
nullptr)) {
1302 printf(
"1st step: nb of Good points %u, density %d, alphamin %lf, alphamax %lf\n",
1315 const unsigned int minNbGoodPoints = 5;
1319 printf(
"A click to continue \n");
1328 printf(
"nb of Good points %u, density %d %lf, alphamin %lf, alphamax\n",
1359 #ifdef VISP_BUILD_DEPRECATED_FUNCTIONS
1386 const double &B,
const double &E,
const double &smallalpha,
const double &highalpha,
1387 const vpColor &color,
unsigned int thickness)
1420 const double &E,
const double &smallalpha,
const double &highalpha,
1421 const vpColor &color,
unsigned int thickness)
1429 const double &B,
const double &E,
const double &smallalpha,
const double &highalpha,
1430 const vpColor &color,
unsigned int thickness)
1432 vpDisplay::displayEllipse(I, center, A, B, E, smallalpha, highalpha,
false, color, thickness,
true,
true);
1436 const double &E,
const double &smallalpha,
const double &highalpha,
1437 const vpColor &color,
unsigned int thickness)
1439 vpDisplay::displayEllipse(I, center, A, B, E, smallalpha, highalpha,
false, color, thickness,
true,
true);
unsigned int getCols() const
unsigned int size() const
Return the number of elements of the 2D array.
unsigned int getRows() const
Implementation of column vector and the associated operations.
void resize(unsigned int i, bool flagNullify=true)
Class to define RGB colors available for display functionalities.
static const vpColor cyan
static const vpColor orange
static const vpColor blue
static const vpColor green
static bool getClick(const vpImage< unsigned char > &I, bool blocking=true)
static void display(const vpImage< unsigned char > &I)
static void displayEllipse(const vpImage< unsigned char > &I, const vpImagePoint ¢er, const double &coef1, const double &coef2, const double &coef3, bool use_normalized_centered_moments, const vpColor &color, unsigned int thickness=1, bool display_center=false, bool display_arc=false)
static void displayCross(const vpImage< unsigned char > &I, const vpImagePoint &ip, unsigned int size, const vpColor &color, unsigned int thickness=1)
static void flush(const vpImage< unsigned char > &I)
error that can be emitted by ViSP classes.
@ dimensionError
Bad dimension.
Class that defines a 2D point in an image. This class is useful for image processing and stores only ...
static double distance(const vpImagePoint &iP1, const vpImagePoint &iP2)
void set_ij(double ii, double jj)
void set_uv(double u, double v)
unsigned int getWidth() const
unsigned int getHeight() const
static double deg(double rad)
error that can be emitted by the vpMatrix class and its derivatives
@ rankDeficient
Rank deficient.
Implementation of a matrix and operations on matrices.
void solveBySVD(const vpColVector &B, vpColVector &x) const
unsigned int nullSpace(vpMatrix &kerA, double svThreshold=1e-6) const
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.
void computePointOnEllipse(const double angle, vpImagePoint &iP)
void display(const vpImage< unsigned char > &I, const vpColor &col, unsigned int thickness=1)
void leastSquare(const vpImage< unsigned char > &I, const std::vector< vpImagePoint > &iP)
virtual ~vpMeEllipse() vp_override
vpImagePoint m_iPc
The coordinates of the ellipse center.
double m_vc
Value of v coordinate of iPc.
unsigned int m_numberOfGoodPoints
Number of correct points tracked along the ellipse.
unsigned int plugHoles(const vpImage< unsigned char > &I)
void printParameters() const
double m_uc
Value of u coordinate of iPc.
bool m_trackCircle
Track a circle (true) or an ellipse (false).
double m_m00
Ellipse area.
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).
void initTracking(const vpImage< unsigned char > &I, bool trackCircle=false, bool trackArc=false)
double m_a
is the semi major axis of the ellipse.
unsigned int leastSquareRobust(const vpImage< unsigned char > &I)
double m_b
is the semi minor axis of the ellipse.
double computeTheta(const vpImagePoint &iP) const
double m_se
Value of sin(e).
double m_n02
Second order centered and normalized moments .
unsigned int m_expectedDensity
Expected number of points to track along the ellipse.
virtual void sample(const vpImage< unsigned char > &I, bool doNotTrack=false) vp_override
double m_n11
Second order centered and normalized moments .
void track(const vpImage< unsigned char > &I)
double m_ce
Value of cos(e).
static void displayEllipse(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)
double m_thresholdWeight
Threshold on the weights for the robust least square.
double computeAngleOnEllipse(const vpImagePoint &pt) const
Performs search in a given direction(normal) for a given distance(pixels) for a given 'site'....
@ NO_SUPPRESSION
Point successfully tracked.
void setDisplay(vpMeSiteDisplayType select)
double m_ifloat
Subpixel coordinates along i of a site.
double convolution(const vpImage< unsigned char > &ima, const vpMe *me)
double m_alpha
Angle of tangent at site.
vpMeSiteState getState() const
double get_ifloat() const
double m_jfloat
Subpixel coordinates along j of a site.
double get_jfloat() const
void setContrastThreshold(const double &thresh, const vpMe &me)
void track(const vpImage< unsigned char > &I, const vpMe *me, const bool &test_contrast=true)
void setState(const vpMeSiteState &flag)
Contains abstract elements for a Distance to Feature type feature.
void initTracking(const vpImage< unsigned char > &I)
const vpImage< bool > * m_mask
Mask used to disable tracking on a part of image.
unsigned int numberOfSignal()
vpMeSite::vpMeSiteDisplayType m_selectDisplay
Moving-edges display type.
void track(const vpImage< unsigned char > &I)
vpMe * m_me
Moving edges initialisation parameters.
static bool inRoiMask(const vpImage< bool > *mask, unsigned int i, unsigned int j)
void display(const vpImage< unsigned char > &I)
bool outOfImage(int i, int j, int border, int nrows, int ncols)
const vpImage< bool > * m_maskCandidates
Mask used to determine candidate points for initialization in an image.
std::list< vpMeSite > m_meList
static bool inMeMaskCandidates(const vpImage< bool > *meMaskCandidates, unsigned int i, unsigned int j)
void setRange(const unsigned int &range)
double getThresholdMarginRatio() const
void setSampleStep(const double &sample_step)
double getSampleStep() const
unsigned int getRange() const
Contains an M-estimator and various influence function.
@ TUKEY
Tukey influence function.
void MEstimator(const vpRobustEstimatorType method, const vpColVector &residues, vpColVector &weights)
void setMinMedianAbsoluteDeviation(double mad_min)
Error that can be emitted by the vpTracker class and its derivatives.
@ notEnoughPointError
Not enough point to track.
@ fatalError
Tracker fatal error.
#define vpDEBUG_ENABLE(level)