49 #include <visp/vpMeTracker.h>
50 #include <visp/vpDisplay.h>
51 #include <visp/vpColor.h>
53 #include <visp/vpTrackingException.h>
54 #include <visp/vpDebug.h>
57 #define DEBUG_LEVEL1 0
58 #define DEBUG_LEVEL2 0
69 : list(), me(NULL), init_range(1), nGoodElement(0), selectDisplay(
vpMeSite::NONE)
70 #ifdef VISP_BUILD_DEPRECATED_FUNCTIONS
71 , query_range (0), display_point(false)
79 list(), me(NULL), init_range(1), nGoodElement(0), selectDisplay(
vpMeSite::NONE)
80 #ifdef VISP_BUILD_DEPRECATED_FUNCTIONS
81 , query_range (0), display_point(false)
92 #ifdef VISP_BUILD_DEPRECATED_FUNCTIONS
113 static bool isSuppressZero(
const vpMeSite& P){
120 unsigned int number_signal=0;
123 number_signal =
static_cast<unsigned int>(std::count_if(
list.begin(),
list.end(), isSuppressZero));
124 return number_signal;
130 return (
unsigned int)
list.size();
136 return (! ((i> half+2) &&
137 (i< rows -(half+2)) &&
148 return (! ((i> half+2) &&
149 (i< rows -(half+2)) &&
166 vpDERROR_TRACE(2,
"Tracking error: Moving edges not initialized");
168 "Moving edges not initialized")) ;
181 for(std::list<vpMeSite>::iterator it=
list.begin(); it!=
list.end(); ++it){
204 a = refp.
i_1 - refp.
i ;
205 b = refp.
j_1 - refp.
j ;
252 vpDERROR_TRACE(2,
"Tracking error: Moving edges not initialized");
254 "Moving edges not initialized")) ;
261 "too few pixel to track")) ;
269 for(std::list<vpMeSite>::iterator it=
list.begin(); it!=
list.end(); ++it){
330 std::cout <<
"begin vpMeTracker::displayList() " << std::endl ;
331 std::cout<<
" There are "<<
list.size()<<
" sites in the list " << std::endl ;
334 for(std::list<vpMeSite>::const_iterator it=
list.begin(); it!=
list.end(); ++it){
349 for(std::list<vpMeSite>::iterator it=
list.begin(); it!=
list.end(); ++it){
unsigned int getRange() const
virtual void displayArrow(const vpImagePoint &ip1, const vpImagePoint &ip2, const vpColor &color=vpColor::white, unsigned int w=4, unsigned int h=2, unsigned int thickness=1)=0
void display(const vpImage< unsigned char > &I)
unsigned int numberOfSignal()
unsigned int totalNumberOfSignal()
Performs search in a given direction(normal) for a given distance(pixels) for a given 'site'...
int outOfImage(int i, int j, int half, int rows, int cols)
static const vpColor green
static int round(const double x)
Class that defines what is a feature generic tracker.
vpMeSiteState getState() const
void set_i(const double ii)
std::list< vpMeSite > list
Error that can be emited by the vpTracker class and its derivates.
vpMeTracker & operator=(vpMeTracker &f)
void track(const vpImage< unsigned char > &I)
Track sampled pixels.
Contains abstract elements for a Distance to Feature type feature.
void setState(const vpMeSiteState &flag)
void set_j(const double jj)
Class that provides a data structure for the column vectors as well as a set of operations on these v...
void track(const vpImage< unsigned char > &im, const vpMe *me, const bool test_contraste=true)
vpMe * me
Moving edges initialisation parameters.
void initTracking(const vpImage< unsigned char > &I)
void init()
Default initialization.
Class that defines a 2D point in an image. This class is useful for image processing and stores only ...
void setRange(const unsigned int &r)
vpMeSite::vpMeSiteDisplayType selectDisplay
virtual void display(const vpImage< unsigned char > &I, vpColor col)=0
void resize(const unsigned int i, const bool flagNullify=true)