comparison include/InputFrameListModule.h @ 401:b829ebdc18e6

simplified input of directories of video frames (simply use the video filename parameter to point at the directory)
author Nicolas Saunier <nicolas.saunier@polymtl.ca>
date Mon, 29 Jul 2013 18:58:05 -0400
parents 7ef1071e3cc3
children
comparison
equal deleted inserted replaced
400:7ef1071e3cc3 401:b829ebdc18e6
1 #ifndef INPUT_FRAME_LIST_MODULE_H 1 #ifndef INPUT_FRAME_LIST_MODULE_H
2 #define INPUT_FRAME_LIST_MODULE_H 2 #define INPUT_FRAME_LIST_MODULE_H
3 3
4 #include "InputFrameProviderIface.h" 4 #include "InputFrameProviderIface.h"
5
5 #include <string> 6 #include <string>
6 #include <vector> 7 #include <vector>
7 8
8 class InputFrameListModule : public InputFrameProviderIface 9 class InputFrameListModule : public InputFrameProviderIface
9 { 10 {
10 public: 11 public:
11 InputFrameListModule(const std::string& basePath,const std::string& pictureList); 12 InputFrameListModule(const std::string& _dirname);
12 ~InputFrameListModule(); 13 ~InputFrameListModule();
13
14
15 14
16 bool getNextFrame(cv::Mat&); 15 bool getNextFrame(cv::Mat&);
17 unsigned int getNbFrames(); 16 unsigned int getNbFrames();
18 bool isOpen() const { return mInit;} 17 bool isOpen() const { return mInit;}
19 void setFrameNumber(const int& frameNumber) {} // does nothing for now 18 void setFrameNumber(const unsigned int& frameNumber);
20 19
21 virtual const cv::Size& getSize() const { return mSize;} 20 virtual const cv::Size& getSize() const { return mSize;}
22 private: 21 private:
23 void loadFileList(const std::string& path); 22 void loadImageList(void);
24 std::vector<std::string> mFileList; 23 std::vector<std::string> filenames;
25 unsigned int mCurrentIdx; 24 unsigned int mCurrentIdx;
26 bool mInit; 25 bool mInit;
27 std::string mBasePath; 26 std::string dirname;
28 cv::Mat mCurrentFrame;
29 cv::Size mSize; 27 cv::Size mSize;
30
31 }; 28 };
32 29
33 #endif 30 #endif