VAT  3.0
Video Analysis Tool
StreamAcquisitionInterface.h
1 #ifndef __STREAM_ACQUISITION_MODULE_H__
2 #define __STREAM_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 
19  public:
22 
23  //Set module configuration parameters
24  bool setParameters(QDomNode& config);
25 
26  //Initialization after reading parameters
27  bool init();
28 
29  //Function executed at each frame
30  bool run();
31 
32  //update parameters at runtime.
33  bool updateParameters();
34 
35 
36 protected:
37 
38  //opencv2::Mat opencvImage;
39  //Mat opencvImage;
40  cv::Mat opencvImage;
41 
42  static int m_defaultMillisecs;
43  bool m_saveCurrent;
44  QImage *getNextFrame();
45  QImage *getFrame(int i_numFrame);
46  int getNumFrame();
47  bool goToFirstFrame();
48  void openDir();
49  void openFiles();
50  bool readImageOnDisk(QImage **);
51  void readTimeStamp(QString&);
52  void setDirectory(QString dir);
53  void setDirectory();
54  void initialFrame();
55 
56 
57  private:
58  //Internal data:
59  int m_startFrame;
60  QString m_seqDir;
61  bool m_parseDirectory;
62  bool firstTime;
63  int m_currentImageIndex;
64  int m_firstFrameIndex;
65  int m_currentDirIndex;
66  QDir directory;
67  QDir subdirectory;
68  QStringList directories;
69  QStringList currentFiles;
70  int m_numberOfDirs;
71  int m_numberOfFiles;
72  int m_imageType;
73  int m_NumFrame;
74  QString m_videoDirectory;
75  QString m_fileName;
76  bool doReset;
77  bool m_withFramesToCycle;
78  int m_framesToCycle;
79  int m_cycleCounter;
80  int m_cycleStartFrame;
81 
82 };
83 
84 
85 #endif
Definition: StreamAcquisitionInterface.h:18
Definition: ModuleInterface.h:43
An object of this class is instantiated at main code, and this object is used by every class to push ...
Definition: Datapool.h:39