41 #include <visp3/core/vpColor.h>
42 #include <visp3/core/vpDisplay.h>
43 #include <visp3/me/vpMeTracker.h>
46 #include <visp3/core/vpDebug.h>
47 #include <visp3/core/vpTrackingException.h>
49 #define DEBUG_LEVEL1 0
50 #define DEBUG_LEVEL2 0
60 : list(), me(NULL), init_range(1), nGoodElement(0), m_mask(NULL), selectDisplay(
vpMeSite::NONE)
61 #ifdef VISP_BUILD_DEPRECATED_FUNCTIONS
63 query_range(0), display_point(false)
70 :
vpTracker(meTracker), list(), me(NULL), init_range(1), nGoodElement(0), m_mask(NULL), selectDisplay(
vpMeSite::NONE)
71 #ifdef VISP_BUILD_DEPRECATED_FUNCTIONS
73 query_range(0), display_point(false)
84 #ifdef VISP_BUILD_DEPRECATED_FUNCTIONS
108 #ifdef VISP_BUILD_DEPRECATED_FUNCTIONS
119 unsigned int number_signal = 0;
122 number_signal =
static_cast<unsigned int>(std::count_if(
list.begin(),
list.end(), isSuppressZero));
123 return number_signal;
140 return (mask == NULL || mask->
getValue(i, j));
148 return (!((i > half + 2) && (i < rows - (half + 2)) && (j > half + 2) && (j < cols - (half + 2))));
155 return (!((i > half + 2) && (i < rows - (half + 2)) && (j > half + 2) && (j < cols - (half + 2))));
168 vpDERROR_TRACE(2,
"Tracking error: Moving edges not initialized");
179 for (std::list<vpMeSite>::iterator it =
list.begin(); it !=
list.end(); ++it) {
199 a = refp.
i_1 - refp.
i;
200 b = refp.
j_1 - refp.
j;
227 vpDERROR_TRACE(2,
"Tracking error: Moving edges not initialized");
239 std::list<vpMeSite>::iterator it =
list.begin();
240 while (it !=
list.end()) {
264 ip2.set_i(s.
i + a * 5);
265 ip2.set_j(s.
j + b * 5);
302 std::cout <<
"begin vpMeTracker::displayList() " << std::endl;
303 std::cout <<
" There are " <<
list.size() <<
" sites in the list " << std::endl;
306 for (std::list<vpMeSite>::const_iterator it =
list.begin(); it !=
list.end(); ++it) {
314 for (std::list<vpMeSite>::const_iterator it =
list.begin(); it !=
list.end(); ++it) {
328 for (std::list<vpMeSite>::iterator it =
list.begin(); it !=
list.end(); ++it) {
Implementation of column vector and the associated operations.
void resize(unsigned int i, bool flagNullify=true)
static const vpColor black
static const vpColor green
static void displayArrow(const vpImage< unsigned char > &I, const vpImagePoint &ip1, const vpImagePoint &ip2, const vpColor &color=vpColor::white, unsigned int w=4, unsigned int h=2, unsigned int thickness=1)
error that can be emited by ViSP classes.
Class that defines a 2D point in an image. This class is useful for image processing and stores only ...
Type getValue(unsigned int i, unsigned int j) const
static int round(double x)
Performs search in a given direction(normal) for a given distance(pixels) for a given 'site'....
@ THRESHOLD
Point removed due to a threshold problem.
@ NO_SUPPRESSION
Point used by the tracker.
void display(const vpImage< unsigned char > &I)
vpMeSiteState getState() const
void track(const vpImage< unsigned char > &im, const vpMe *me, 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 selectDisplay
int outOfImage(int i, int j, int half, int row, int cols)
void track(const vpImage< unsigned char > &I)
Track sampled pixels.
unsigned int totalNumberOfSignal()
std::list< vpMeSite > list
static bool inMask(const vpImage< bool > *mask, unsigned int i, unsigned int j)
vpMeTracker & operator=(vpMeTracker &f)
virtual void display(const vpImage< unsigned char > &I, const vpColor &col, unsigned int thickness)=0
vpMe * me
Moving edges initialisation parameters.
void setRange(const unsigned int &r)
unsigned int getRange() const
Class that defines what is a feature generic tracker.
void init()
Default initialization.
Error that can be emited by the vpTracker class and its derivates.