detector_base.h
Go to the documentation of this file.
1 #ifndef __DETECTOR_BASE_H__
2 #define __DETECTOR_BASE_H__
3 #include "cv.h"
4 
5 #include <vector>
6 #include <utility>
7 #include <string>
8 
9 namespace detectors{
10  class DetectorBase{
11  protected:
12  std::vector<std::pair<cv::Point,cv::Point> > lines_;
13  std::vector<cv::Point> polygon_;
14  std::string message_;
15  public:
16  /*
17  * detect pattern in image
18  * image: image where to detect pattern
19  * timeout: maximum time for pattern detection
20  * offset: offset container box by that much pixels
21  * */
22  virtual bool detect(cv::Mat& image, int timeout=1000, unsigned int offsetx=0, unsigned int offsety=0) = 0;
23  //returns pattern container box as a vector of lines
24  std::vector<std::pair<cv::Point,cv::Point> >& get_lines();
25  //returns the contained message if there is one
26  std::string& get_message();
27  //returns pattern container box as a vector of points
28  std::vector<cv::Point>& get_polygon();
29  };
30 }
31 #endif
std::vector< std::pair< cv::Point, cv::Point > > & get_lines()
virtual bool detect(cv::Mat &image, int timeout=1000, unsigned int offsetx=0, unsigned int offsety=0)=0
std::vector< cv::Point > & get_polygon()
std::string & get_message()
std::vector< cv::Point > polygon_
Definition: detector_base.h:13
std::vector< std::pair< cv::Point, cv::Point > > lines_
Definition: detector_base.h:12


visp_auto_tracker
Author(s): Filip Novotny
autogenerated on Sat Mar 13 2021 03:20:08