recognition_method.hh

00001 #ifndef __RECOGNITION_METHOD_H
00002 #define __RECOGNITION_METHOD_H
00003 
00004 #include <boost/smart_ptr.hpp>
00005 #include <map>
00006 #include <mimas/mm_image.h>
00007 #include <mimas/mm_object.h>
00008 #include <mimas/mm_xml_reference.h>
00009 #include "calibration.hh"
00010 #include "match.hh"
00011 #include "mi_scene.hh"
00012 #include "vision_type.hh"
00013 
00018 class recognition_method: public mimas::mm_object
00019 {
00020  public:
00031   recognition_method( const calibration_ptr &_calib,
00032                       vision_type _type,
00033                       const mimas::mm_xml_reference< XalanElement >
00034                       &configuration, bool _verbose );
00042   virtual std::vector< match > recognise
00043     ( const mimas::mm_image< unsigned char > &image,
00044       double timestamp,
00045       mi_scene_ptr scene ) const = 0;
00049   mi_pose convert_pose_to_external( const std::string &type,
00050                                     const mi_pose &pose ) const
00051     throw (mimas::mm_exception);
00055   mi_pose convert_pose_to_internal( const std::string &type,
00056                                     const mi_pose &pose ) const
00057     throw (mimas::mm_exception);
00059   vision_type get_type(void) const { return type; }
00060  protected:
00062   void custom_offset( const std::string &type,
00063                       const mi_pose &pose );
00065   calibration_ptr calib;
00067   std::map< std::string, mi_pose > offset;
00069   vision_type type;
00071   bool verbose;
00072 };
00073 
00075 typedef boost::shared_ptr< recognition_method > recognition_method_ptr;
00076 
00077 #endif

doxygen-1.4.5 documentation for micron-vision - Tue Jan 17 15:29:15 2006