50 #include <visp/vpImage.h>
51 #include <visp/vpRect.h>
52 #include <visp/vpTracker.h>
53 #include <visp/vpColor.h>
54 #include <visp/vpImagePoint.h>
56 #ifdef VISP_BUILD_DEPRECATED_FUNCTIONS
57 # include <visp/vpList.h>
161 unsigned int thickness=1);
175 this->bbox_u_max - this->bbox_u_min + 1,
176 this->bbox_v_max - this->bbox_v_min + 1);
189 double getDistance(
const vpDot2& distantDot )
const;
199 void getEdges(std::list<vpImagePoint> &edges_list) {
200 edges_list = this->ip_edges_list;
210 return allowedBadPointsPercentage_;
213 double getEllipsoidShapePrecision()
const;
214 void getFreemanChain(std::list<unsigned int> &freeman_chain) ;
223 return gray_level_min;
231 return gray_level_max;
233 double getGrayLevelPrecision()
const;
235 double getHeight()
const;
236 double getMaxSizeSearchDistancePrecision()
const;
241 return (this->mean_gray_level);
243 double getSizePrecision()
const;
244 double getSurface()
const;
245 double getWidth()
const;
249 unsigned int size = 0);
251 unsigned int gray_level_min,
unsigned int gray_level_max,
252 unsigned int size = 0 );
260 friend VISP_EXPORT std::ostream& operator<< (std::ostream& os,
vpDot2& d) {
261 return (os <<
"(" << d.
getCog() <<
")" ) ;
264 void print(std::ostream& os) { os << *
this << std::endl ; }
266 int area_u,
int area_v,
267 unsigned int area_w,
unsigned int area_h, std::list<vpDot2> &niceDots );
308 allowedBadPointsPercentage_ = 0.;
309 else if (percentage > 1.)
310 allowedBadPointsPercentage_ = 1.;
312 allowedBadPointsPercentage_ = percentage;
315 void setEllipsoidShapePrecision(
const double & ellipsoidShapePrecision);
350 this->gray_level_min = 255;
352 this->gray_level_min = min;
366 this->gray_level_max = 255;
368 this->gray_level_max = max;
370 void setGrayLevelPrecision(
const double & grayLevelPrecision );
371 void setHeight(
const double & height );
372 void setMaxSizeSearchDistancePrecision(
const double & maxSizeSearchDistancePrecision);
373 void setSizePrecision(
const double & sizePrecision );
374 void setSurface(
const double & surface );
375 void setWidth(
const double & width );
381 std::vector<vpImagePoint> &cogs,
vpImagePoint* cogStar = NULL);
449 #ifdef VISP_BUILD_DEPRECATED_FUNCTIONS
467 std::list<vpImagePoint>::const_iterator it;
468 for (it = ip_edges_list.begin(); it != ip_edges_list.end(); ++it) {
474 int area_u,
int area_v,
475 unsigned int area_w,
unsigned int area_h );
484 const unsigned int &u,
485 const unsigned int &v)
const;
487 const unsigned int &u,
488 const unsigned int &v)
const;
490 virtual vpDot2* getInstance();
495 const double &u = -1.0,
496 const double &v = -1.0);
501 const unsigned int &v,
unsigned int &border_u,
502 unsigned int &border_v);
513 unsigned int getFirstBorder_u()
const {
514 return this->firstBorder_u;
524 unsigned int getFirstBorder_v()
const {
525 return this->firstBorder_v;
529 const unsigned int &u,
530 const unsigned int &v,
531 unsigned int &element);
532 void computeFreemanParameters(
const int &u_p,
533 const int &v_p,
unsigned int &element,
534 int &du,
int &dv,
float &dS,
535 float &dMu,
float &dMv,
537 float &dMu2,
float &dMv2);
538 void updateFreemanPosition(
unsigned int& u,
unsigned int& v,
539 const unsigned int &dir );
545 bool isInArea(
const unsigned int &u,
const unsigned int &v)
const;
547 void getGridSize(
unsigned int &gridWidth,
unsigned int &gridHeight );
549 int u,
int v,
unsigned int w,
unsigned int h);
551 void setArea(
const vpRect & a);
560 unsigned int gray_level_min;
564 unsigned int gray_level_max;
567 double mean_gray_level;
568 double grayLevelPrecision ;
570 double sizePrecision ;
571 double ellipsoidShapePrecision;
572 double maxSizeSearchDistancePrecision;
573 double allowedBadPointsPercentage_;
578 std::list<unsigned int> direction_list;
579 std::list<vpImagePoint> ip_edges_list;
582 bool compute_moment ;
585 unsigned int thickness;
588 int bbox_u_min, bbox_u_max, bbox_v_min, bbox_v_max;
591 unsigned int firstBorder_u;
592 unsigned int firstBorder_v;
598 unsigned int thickness=1);
601 unsigned int thickness=1);
vpTracker & operator=(const vpTracker &tracker)
Copy operator.
Definition of the vpMatrix class.
void setGrayLevelMax(const unsigned int &max)
void setCog(const vpImagePoint &cog)
Provide simple list management.
Class to define colors available for display functionnalities.
void setEllipsoidBadPointsPercentage(const double &percentage=0.0)
void print(std::ostream &os)
void kill()
Destroy the list.
This tracker is meant to track a blob (connex pixels with same gray level) on a vpImage.
Class that defines what is a feature generic tracker.
double getEllipsoidBadPointsPercentage()
vpImagePoint getCog() const
void setRect(double left, double top, double width, double height)
unsigned int getGrayLevelMin() const
void setComputeMoments(const bool activate)
void setGraphicsThickness(unsigned int thickness)
void setGrayLevelMin(const unsigned int &min)
void getEdges(std::list< vpImagePoint > &edges_list)
double getMeanGrayLevel()
void init()
Default initialization.
Defines a rectangle in the plane.
Class that defines a 2D point in an image. This class is useful for image processing and stores only ...
unsigned int getGrayLevelMax() const
void setGraphics(const bool activate)
static const vpColor blue
vp_deprecated void getEdges(vpList< vpImagePoint > &edges_list)