-
Notifications
You must be signed in to change notification settings - Fork 2
Expand file tree
/
Copy pathVideoReader.h
More file actions
36 lines (28 loc) · 770 Bytes
/
VideoReader.h
File metadata and controls
36 lines (28 loc) · 770 Bytes
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
#ifndef __VIDEOREADER__H__
#define __VIDEOREADER__H__
#include <string> // for strings
#include <opencv2/core/core.hpp> // Basic OpenCV structures (cv::Mat, Scalar)
#include <opencv2/highgui/highgui.hpp> // OpenCV window I/O
using namespace std;
using namespace cv;
class VideoReader
{
public:
string mFileName;
VideoCapture mVideoCapture;
Size mVideoSize;
int mNumFrames;
int mCurFrame;
public:
VideoReader(void);
~VideoReader(void);
int Open(const string FileName);
int GetNextFrame(Mat& Frame);
int GetPrevFrame(Mat& Frame);
int GoToFrame(int FrameNo, Mat& Frame);
int GoToFirstFrame(Mat& Frame);
int GoToLastFrame(Mat& Frame);
int GetFrame(int FrameNo, Mat& Frame);
int Close();
};
#endif