150 const unsigned int index_0 = 0;
151 const unsigned int index_1 = 1;
152 const unsigned int index_2 = 2;
161 double getArea()
const;
172 bbox.
setRect(m_bbox_u_min, m_bbox_v_min, (m_bbox_u_max - m_bbox_u_min) + 1,
173 (m_bbox_v_max - m_bbox_v_min) + 1);
185 double getDistance(
const vpDot2 &distantDot)
const;
193 void getEdges(std::list<vpImagePoint> &edges_list)
const { edges_list = m_ip_edges_list; }
202 std::list<vpImagePoint>
getEdges()
const {
return m_ip_edges_list; }
212 double getEllipsoidShapePrecision()
const;
213 void getFreemanChain(std::list<unsigned int> &freeman_chain)
const;
228 double getGrayLevelPrecision()
const;
230 double getHeight()
const;
231 double getMaxSizeSearchDistPrecision()
const;
242 double getSizePrecision()
const;
243 double getWidth()
const;
248 unsigned int gray_lvl_max,
unsigned int size = 0);
251 friend VISP_EXPORT std::ostream &operator<<(std::ostream &os,
vpDot2 &d);
253 void print(std::ostream &os) { os << *
this << std::endl; }
255 unsigned int area_h, std::list<vpDot2> &niceDots);
259 void setArea(
const double &area);
294 if (percentage < 0.) {
295 m_allowedBadPointsPercentage = 0.;
297 else if (percentage > 1.) {
298 m_allowedBadPointsPercentage = 1.;
301 m_allowedBadPointsPercentage = percentage;
305 void setEllipsoidShapePrecision(
const double &ellipsoidShapePrecision);
342 const unsigned int val_max = 255;
344 m_gray_level_min = val_max;
347 m_gray_level_min = min;
361 const unsigned int val_max = 255;
363 m_gray_level_max = val_max;
366 m_gray_level_max = max;
370 void setGrayLevelPrecision(
const double &grayLevelPrecision);
371 void setHeight(
const double &height);
372 void setMaxSizeSearchDistPrecision(
const double &maxSizeSearchDistancePrecision);
373 void setSizePrecision(
const double &sizePrecision);
374 void setWidth(
const double &width);
380 std::vector<vpImagePoint> &cogs,
vpImagePoint *cogStar =
nullptr);
385 unsigned int thickness = 1);
389#ifdef VISP_BUILD_DEPRECATED_FUNCTIONS
462 virtual bool hasGoodLevel(
const vpImage<unsigned char> &I,
const unsigned int &u,
const unsigned int &v)
const;
463 virtual bool hasReverseLevel(
const vpImage<unsigned char> &I,
const unsigned int &u,
const unsigned int &v)
const;
465 virtual vpDot2 *getInstance();
472 unsigned int &border_u,
unsigned int &border_v);
481 unsigned int getFirstBorder_u()
const {
return m_firstBorder_u; }
489 unsigned int getFirstBorder_v()
const {
return m_firstBorder_v; }
491 bool computeFreemanChainElement(
const vpImage<unsigned char> &I,
const unsigned int &u,
const unsigned int &v,
492 unsigned int &element);
493 void computeFreemanParameters(
const int &u_p,
const int &v_p,
unsigned int &element,
int &du,
int &dv,
float &dS,
494 float &dMu,
float &dMv,
float &dMuv,
float &dMu2,
float &dMv2);
495 void updateFreemanPosition(
unsigned int &u,
unsigned int &v,
const unsigned int &dir);
497 bool isInImage(
const vpImage<unsigned char> &I)
const;
498 bool isInImage(
const vpImage<unsigned char> &I,
const vpImagePoint &ip)
const;
500 bool isInArea(
const unsigned int &u,
const unsigned int &v)
const;
502 void getGridSize(
unsigned int &gridWidth,
unsigned int &gridHeight);
503 void setArea(
const vpImage<unsigned char> &I,
int u,
int v,
unsigned int w,
unsigned int h);
504 void setArea(
const vpImage<unsigned char> &I);
505 void setArea(
const vpRect &a);
507 unsigned char getMeanGrayLevel(vpImage<unsigned char> &I)
const;
509 typedef struct vpSearchDotsInAreaGoodGermData
511 const vpImage<unsigned char> &m_I;
512 const vpRect &m_area;
515 std::list<vpDot2> &m_niceDots;
516 std::list<vpDot2> &m_badDotsVector;
518 vpSearchDotsInAreaGoodGermData(
const vpImage<unsigned char> &I,
const vpRect &area,
519 unsigned int &u,
unsigned int &v,
520 std::list<vpDot2> &niceDots, std::list<vpDot2> &badDotsVector)
525 , m_niceDots(niceDots)
526 , m_badDotsVector(badDotsVector)
530 } vpSearchDotsInAreaGoodGermData;
532 void searchDotsAreaGoodGerm(vpSearchDotsInAreaGoodGermData &data);
539 unsigned int m_gray_level_min;
541 unsigned int m_gray_level_max;
542 double m_mean_gray_level;
543 double m_grayLevelPrecision;
545 double m_sizePrecision;
546 double m_ellipsoidShapePrecision;
547 double m_maxSizeSearchDistPrecision;
548 double m_allowedBadPointsPercentage;
553 std::list<unsigned int> m_direction_list;
554 std::list<vpImagePoint> m_ip_edges_list;
557 bool m_compute_moment;
560 unsigned int m_thickness;
563 int m_bbox_u_min, m_bbox_u_max, m_bbox_v_min, m_bbox_v_max;
566 unsigned int m_firstBorder_u;
567 unsigned int m_firstBorder_v;
static vpMatrix defineDots(vpDot2 dot[], const unsigned int &n, const std::string &dotFile, vpImage< unsigned char > &I, vpColor col=vpColor::blue, bool trackDot=true)