BinFinder.H

00001 #include "Component/ModelManager.H"
00002 #include "Component/OptionManager.H"
00003 
00004 #include "Component/ModelComponent.H"
00005 #include "Component/ModelParam.H"
00006 #include "Media/FrameSeries.H"
00007 #include "Transport/FrameInfo.H"
00008 #include "Raster/GenericFrame.H"
00009 #include "Image/Image.H"
00010 #include "GUI/XWinManaged.H"
00011 #include "GUI/ImageDisplayStream.H"
00012 #include "Image/Image.H"
00013 #include "Image/Pixels.H"
00014 #include "Robots/SeaBeeIII/VisionBrainComponentI.H"
00015 
00016 #include "Ice/RobotBrainObjects.ice.H"
00017 #include "Ice/RobotSimEvents.ice.H"
00018 #include "Ice/IceImageUtils.H"
00019 #include <opencv/cv.h>
00020 #include <IceUtil/Thread.h>
00021 
00022 #ifndef BINFINDER_H
00023 #define BINFINDER_H
00024 
00025 
00026 class BinFinder : public VisionBrainComponentI
00027 {
00028 public:
00029 
00030   BinFinder(OptionManager& mgr,
00031       const std::string& descrName = "BinFinder",
00032       const std::string& tagName = "BinFinder");
00033 
00034   ~BinFinder();
00035 
00036   virtual void updateFrame(Image<PixRGB<byte> > img, std::string cameraId);
00037 
00038   //!Get a message
00039   //virtual void updateMessage(const RobotSimEvents::EventMessagePtr& eMsg,
00040   //const Ice::Current&);
00041 
00042   virtual void registerTopics();
00043 
00044 private:
00045   CvSeq* findSquares4( IplImage* img, CvMemStorage* storage );
00046   double angle( CvPoint* pt1, CvPoint* pt2, CvPoint* pt0 );
00047 
00048   bool inCorner(CvSeq* result);
00049 
00050 
00051   rutz::shared_ptr<XWinManaged>   itsMwin;       // display window
00052   Image<PixRGB<byte> >            itsDisp;       // display image
00053   uint itsWidth;
00054   uint itsHeight;
00055 };
00056 
00057 #endif
Generated on Sun May 8 08:41:32 2011 for iLab Neuromorphic Vision Toolkit by  doxygen 1.6.3