detector_base.h
Go to the documentation of this file.
00001 #ifndef __DETECTOR_BASE_H__
00002 #define __DETECTOR_BASE_H__
00003 #include "cv.h"
00004 
00005 #include <vector>
00006 #include <utility>
00007 #include <string>
00008 
00009 namespace detectors{
00010   class DetectorBase{
00011   protected:
00012     std::vector<std::pair<cv::Point,cv::Point> > lines_;
00013     std::vector<cv::Point> polygon_;
00014     std::string message_;
00015   public:
00016     /*
00017      * detect pattern in image
00018      * image: image where to detect pattern
00019      * timeout: maximum time for pattern detection
00020      * offset: offset container box by that much pixels
00021      * */
00022     virtual bool detect(cv::Mat& image, int timeout=1000, unsigned int offsetx=0, unsigned int offsety=0) = 0;
00023     //returns pattern container box as a vector of lines
00024     std::vector<std::pair<cv::Point,cv::Point> >& get_lines();
00025     //returns the contained message if there is one
00026     std::string& get_message();
00027     //returns pattern container box as a vector of points
00028     std::vector<cv::Point>& get_polygon();
00029   };
00030 }
00031 #endif


visp_auto_tracker
Author(s): Filip Novotny
autogenerated on Fri Aug 28 2015 13:36:44