48 #include <visp3/core/vpConfig.h>
49 #include <visp3/core/vpDisplay.h>
50 #include <visp3/core/vpImage.h>
51 #include <visp3/core/vpImagePoint.h>
52 #include <visp3/core/vpPolygon.h>
53 #include <visp3/core/vpRect.h>
54 #include <visp3/core/vpTracker.h>
62 #pragma comment(linker, "/STACK:256000000") // Increase max recursion depth
130 static const unsigned int SPIRAL_SEARCH_SIZE;
210 inline vpRect getBBox()
const
214 bbox.
setRect(this->u_min, this->v_min, this->u_max - this->u_min + 1, this->v_max - this->v_min + 1);
231 inline std::list<vpImagePoint> getEdges()
const {
return this->ip_edges_list; };
241 inline std::list<vpImagePoint> getConnexities()
const {
return this->ip_connexities_list; };
243 inline double getGamma()
const {
return this->gamma; };
251 double getGrayLevelPrecision()
const {
return grayLevelPrecision; }
252 double getMaxDotSize()
const {
return this->maxDotSizePercentage; }
256 double getMeanGrayLevel()
const {
return (this->mean_gray_level); };
270 inline unsigned int getWidth()
const {
return (this->u_max - this->u_min + 1); };
279 inline unsigned int getHeight()
const {
return (this->v_max - this->v_min + 1); };
284 unsigned int gray_level_max);
287 bool operator==(
const vpDot &d)
const;
288 bool operator!=(
const vpDot &d)
const;
289 friend VISP_EXPORT std::ostream &operator<<(std::ostream &os,
vpDot &d);
291 void print(std::ostream &os) { os << *
this << std::endl; }
296 inline void setCog(
const vpImagePoint &ip) { this->cog = ip; }
312 void setComputeMoments(
const bool activate) { compute_moment = activate; }
317 void setConnexity(vpConnexityType type) { this->connexityType = type; };
318 void setMaxDotSize(
double percentage);
319 void setGrayLevelMin(
const unsigned int &level_min) { this->gray_level_min = level_min; };
320 void setGrayLevelMax(
const unsigned int &level_max) { this->gray_level_max = level_max; };
321 void setGrayLevelPrecision(
const double &grayLevelPrecision);
336 void setGraphics(
const bool activate) { graphics = activate; }
343 void setGraphicsThickness(
unsigned int t) { this->thickness = t; };
350 std::list<vpImagePoint> ip_connexities_list;
353 std::list<vpImagePoint> ip_edges_list;
359 vpConnexityType connexityType;
365 unsigned int u_min, u_max, v_min, v_max;
370 unsigned int thickness;
372 double maxDotSizePercentage;
373 unsigned char gray_level_out;
375 double mean_gray_level;
376 unsigned int gray_level_min;
377 unsigned int gray_level_max;
378 double grayLevelPrecision;
388 void setGrayLevelOut();
389 bool connexe(
const vpImage<unsigned char> &I,
unsigned int u,
unsigned int v,
double &mean_value,
double &u_cog,
390 double &v_cog,
double &n);
391 bool connexe(
const vpImage<unsigned char> &I,
unsigned int u,
unsigned int v,
double &mean_value,
double &u_cog,
392 double &v_cog,
double &n, std::vector<bool> &checkTab);
399 unsigned int thickness = 1);