00001 #ifndef MMVL_HOUGH_TRACKING_PLUGIN_HH
00002 #define MMVL_HOUGH_TRACKING_PLUGIN_HH
00003
00004 #ifndef NDEBUG
00005 #include <mimas/mm_image_qtoutput.h>
00006 #endif
00007 #include <mimas/mm_xml_node_reference_list.h>
00008 #include <mimas/mm_xml_reference.h>
00009 #include <string>
00010 #include "hough_tracking.hh"
00011 #include "units.h"
00012 #include "recognition_method_4dof.hh"
00013
00014
00015 class hough_tracking_plugin: public recognition_method_4dof
00016 {
00017 public:
00023 hough_tracking_plugin( const calibration_ptr &_calib,
00024 const mimas::mm_xml_reference< XalanElement >
00025 &configuration, bool _verbose );
00030 virtual std::vector< match > recognise
00031 ( const mimas::mm_image< unsigned char > &image,
00032 double timestamp,
00033 mi_scene_ptr scene ) const;
00034
00035 protected:
00036
00037 std::vector< std::vector< Feature> >
00038 create_model( int sampling_rate, int model_width, int model_height,
00039 int center_x, int center_y,
00040 double theta, int min_gradient,
00041 mimas::mm_xml_node_reference_list &file_names );
00042
00044
00045 class Tracker{
00046 public:
00047 float thresh;
00048 int nb_fail;
00049
00050
00051 int min_gradient;
00052 float z_resolution;
00053 int sampling_rate;
00054 hough_tracking_ptr tracker;
00055 };
00056
00057 std::map<std::string, Tracker> trackers;
00058
00059 #ifndef NDEBUG
00060
00061 mutable mimas::mm_image_qtoutput< mimas::mm_rgba< unsigned char > > display;
00062 #endif
00063 };
00064
00065 #endif