VAT  3.0
Video Analysis Tool
AcquisitionModule.h
1 #ifndef __ACQUISITION_MODULE_H__
2 #define __ACQUISITION_MODULE_H__
3 
4 #include <map>
5 #include <string>
6 #include <QImage>
7 #include "Datapool.h"
8 #include <QDir>
9 #include "string.h"
10 #include "ModuleInterface.h"
11 
12 
13 #include <opencv2/core/core.hpp>
14 #include <opencv2/highgui/highgui.hpp>
15 #include <iostream>
16 #include <opencv2/core/mat.hpp>
17 
23 class AcquisitionModule: public ModuleInterface {
24 public:
29  AcquisitionModule(Datapool *i_data);
31 
37  bool setParameters(QDomNode& config);
38 
44  bool init();
45 
52  bool run();
53 
58  bool updateParameters();
59 
63  cv::Mat opencvImage;
64  //opencv2::Mat opencvImage;
65  //Mat opencvImage;
66 
67  static int m_defaultMillisecs;
68  bool m_saveCurrent;
69 
74  QImage *getNextFrame();
75 
81  QImage *getFrame(int i_numFrame);
82 
87  int getNumFrame();
88 
93  bool goToFirstFrame();
94 
98  void openDir();
99 
103  void openFiles();
104 
113  bool readImageOnDisk(QImage **);
114 
120  void readTimeStamp(QString&);
121 
126  void setDirectory(QString dir);
127 
132  void setDirectory();
133 
138  void initialFrame();
139 
140 
141 private:
142  //Internal data:
143  int m_startFrame;
144  QString m_seqDir;
145  bool m_parseDirectory;
146  bool firstTime;
147  int m_currentImageIndex;
148  int m_firstFrameIndex;
149  int m_currentDirIndex;
150  QDir directory;
151  QDir subdirectory;
152  QStringList directories;
153  QStringList currentFiles;
154  int m_numberOfDirs;
155  int m_numberOfFiles;
156  int m_imageType;
157  int m_NumFrame;
158  QString m_videoDirectory;
159  QString m_fileName;
160  bool doReset;
161  bool m_withFramesToCycle;
162  int m_framesToCycle;
163  int m_cycleCounter;
164  int m_cycleStartFrame;
165 
166 };
167 
168 
169 #endif
Definition: ModuleInterface.h:43
cv::Mat opencvImage
Stores current read image.
Definition: AcquisitionModule.h:61
An object of this class is instantiated at main code, and this object is used by every class to push ...
Definition: Datapool.h:39
void setDirectory()
Definition: AcquisitionModule.cpp:398
The AcquisitionModule class is a module designed to be in charge of reading a sequence of frames that...
Definition: AcquisitionModule.h:44