Mercurial Hosting > traffic-intelligence
comparison include/InputFrameListModule.h @ 400:7ef1071e3cc3
clean up of input classes for list of images and video files
author | Nicolas Saunier <nicolas.saunier@polymtl.ca> |
---|---|
date | Mon, 29 Jul 2013 18:06:55 -0400 |
parents | c389fae9689a |
children | b829ebdc18e6 |
comparison
equal
deleted
inserted
replaced
399:c389fae9689a | 400:7ef1071e3cc3 |
---|---|
5 #include <string> | 5 #include <string> |
6 #include <vector> | 6 #include <vector> |
7 | 7 |
8 class InputFrameListModule : public InputFrameProviderIface | 8 class InputFrameListModule : public InputFrameProviderIface |
9 { | 9 { |
10 public: | 10 public: |
11 InputFrameListModule(const std::string& basePath,const std::string& pictureList); | 11 InputFrameListModule(const std::string& basePath,const std::string& pictureList); |
12 ~InputFrameListModule(); | 12 ~InputFrameListModule(); |
13 | 13 |
14 | 14 |
15 | 15 |
16 bool getNextFrame(cv::Mat&); | 16 bool getNextFrame(cv::Mat&); |
17 unsigned int getNbFrames(); | 17 unsigned int getNbFrames(); |
18 bool isOpen() const { return mInit;} | 18 bool isOpen() const { return mInit;} |
19 void setFrameNumber(const int& frameNumber) {} // does nothing for now | |
19 | 20 |
20 | 21 virtual const cv::Size& getSize() const { return mSize;} |
21 | 22 private: |
22 | 23 void loadFileList(const std::string& path); |
23 | 24 std::vector<std::string> mFileList; |
24 | 25 unsigned int mCurrentIdx; |
25 | 26 bool mInit; |
26 | 27 std::string mBasePath; |
27 | 28 cv::Mat mCurrentFrame; |
28 | 29 cv::Size mSize; |
29 virtual const cv::Size& getSize() const { return mSize;} | |
30 private: | |
31 void loadFileList(const std::string& path); | |
32 std::vector<std::string> mFileList; | |
33 int mCurrentIdx; | |
34 bool mInit; | |
35 std::string mBasePath; | |
36 cv::Mat mCurrentFrame; | |
37 cv::Size mSize; | |
38 | 30 |
39 }; | 31 }; |
40 | 32 |
41 #endif | 33 #endif |