GSoC2011SfM  0.1
Google Summer of Code 2011: Structure from motion
D:/Travail/These/Determination caracteristiques camera/GSoC/SfM/src/MotionProcessor.h
00001 #ifndef _GSOC_SFM_MOTION_PROCESSOR_H
00002 #define _GSOC_SFM_MOTION_PROCESSOR_H 1
00003 
00004 #include "macro.h" //SFM_EXPORTS
00005 
00006 #include "opencv2/highgui/highgui.hpp"
00007 #include <vector>
00008 #include <string>
00009 
00010 
00011 namespace OpencvSfM{
00012   enum TypeOfMotionProcessor
00013   {
00014     IS_SINGLE_FILE,
00015     IS_LIST_FILES,
00016     IS_WEBCAM,
00017     IS_DIRECTORY,
00018     IS_VIDEO
00019   };
00020 
00028   class SFM_EXPORTS MotionProcessor
00029   {
00030   protected:
00031     TypeOfMotionProcessor type_of_input_;
00032     cv::VideoCapture capture_;
00033     std::vector<std::string> nameOfFiles_;
00034 
00038     std::string sourceName_;
00043     std::string suffix_;
00048     unsigned int pos_in_loading_process_;
00049 
00050     unsigned int numFrame_;
00051     int wantedWidth_;
00052     int wantedHeight_;
00053 
00058     uchar convertToRGB_;
00059   public:
00060     MotionProcessor( void );
00061     ~MotionProcessor( void );
00062 
00069     inline bool isBidirectional( )
00070     {
00071       return type_of_input_ != IS_WEBCAM;
00072     }
00079     bool setInputSource( int idWebCam );
00086     bool setInputSource( std::vector<std::string> list_images );
00094     bool setInputSource( std::string nameOfFile,TypeOfMotionProcessor inputType=IS_DIRECTORY );
00104     bool setInputSource( std::string prefix,std::string suffix,int startNumber=0 );
00109     cv::Mat getFrame( );
00116     bool setProperty( int idProp,double value );
00123     double getProperty( int idProp );
00124   };
00125 }
00126 
00127 #endif
 All Classes Functions Variables