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>
160 allowedBadPointsPercentage_ = 0.;
161 else if (percentage > 1.)
162 allowedBadPointsPercentage_ = 1.;
164 allowedBadPointsPercentage_ = percentage;
167 void setEllipsoidShapePrecision(
const double & ellipsoidShapePrecision);
193 this->gray_level_min = 255;
195 this->gray_level_min = min;
209 this->gray_level_max = 255;
211 this->gray_level_max = max;
213 void setGrayLevelPrecision(
const double & grayLevelPrecision );
214 void setHeight(
const double & height );
215 void setMaxSizeSearchDistancePrecision(
const double & maxSizeSearchDistancePrecision);
216 void setSizePrecision(
const double & sizePrecision );
217 void setSurface(
const double & surface );
218 void setWidth(
const double & width );
222 unsigned int size = 0);
224 unsigned int gray_level_min,
unsigned int gray_level_max,
225 unsigned int size = 0 );
230 unsigned int thickness=1);
244 this->bbox_u_max - this->bbox_u_min + 1,
245 this->bbox_v_max - this->bbox_v_min + 1);
258 double getDistance(
const vpDot2& distantDot )
const;
268 void getEdges(std::list<vpImagePoint> &edges_list) {
269 edges_list = this->ip_edges_list;
279 return allowedBadPointsPercentage_;
282 double getEllipsoidShapePrecision()
const;
283 void getFreemanChain(std::list<unsigned int> &freeman_chain) ;
292 return gray_level_min;
300 return gray_level_max;
302 double getGrayLevelPrecision()
const;
304 double getHeight()
const;
305 double getMaxSizeSearchDistancePrecision()
const;
312 return (this->mean_gray_level);
314 double getSizePrecision()
const;
315 double getSurface()
const;
316 double getWidth()
const;
318 void print(std::ostream& os) { os << *
this << std::endl ; }
320 int area_u,
int area_v,
321 unsigned int area_w,
unsigned int area_h, std::list<vpDot2> &niceDots );
334 friend VISP_EXPORT std::ostream& operator<< (std::ostream& os,
vpDot2& d) {
335 return (os <<
"(" << d.
getCog() <<
")" ) ;
404 #ifdef VISP_BUILD_DEPRECATED_FUNCTIONS
423 std::list<vpImagePoint>::const_iterator it;
424 for (it = ip_edges_list.begin(); it != ip_edges_list.end(); ++it) {
430 int area_u,
int area_v,
431 unsigned int area_w,
unsigned int area_h );
440 const unsigned int &u,
441 const unsigned int &v)
const;
443 const unsigned int &u,
444 const unsigned int &v)
const;
446 virtual vpDot2* getInstance();
451 const double &u = -1.0,
452 const double &v = -1.0);
457 const unsigned int &v,
unsigned int &border_u,
458 unsigned int &border_v);
469 unsigned int getFirstBorder_u()
const {
470 return this->firstBorder_u;
480 unsigned int getFirstBorder_v()
const {
481 return this->firstBorder_v;
485 const unsigned int &u,
486 const unsigned int &v,
487 unsigned int &element);
488 void computeFreemanParameters(
const int &u_p,
489 const int &v_p,
unsigned int &element,
490 int &du,
int &dv,
float &dS,
491 float &dMu,
float &dMv,
493 float &dMu2,
float &dMv2);
494 void updateFreemanPosition(
unsigned int& u,
unsigned int& v,
495 const unsigned int &dir );
501 bool isInArea(
const unsigned int &u,
const unsigned int &v)
const;
503 void getGridSize(
unsigned int &gridWidth,
unsigned int &gridHeight );
505 int u,
int v,
unsigned int w,
unsigned int h);
507 void setArea(
const vpRect & a);
516 unsigned int gray_level_min;
520 unsigned int gray_level_max;
523 double mean_gray_level;
524 double grayLevelPrecision ;
526 double sizePrecision ;
527 double ellipsoidShapePrecision;
528 double maxSizeSearchDistancePrecision;
529 double allowedBadPointsPercentage_;
534 std::list<unsigned int> direction_list;
535 std::list<vpImagePoint> ip_edges_list;
538 bool compute_moment ;
542 int bbox_u_min, bbox_u_max, bbox_v_min, bbox_v_max;
545 unsigned int firstBorder_u;
546 unsigned int firstBorder_v;
552 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 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)