forked from tiendan/OpenGazer
-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathVideo.h
More file actions
executable file
·41 lines (33 loc) · 747 Bytes
/
Copy pathVideo.h
File metadata and controls
executable file
·41 lines (33 loc) · 747 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
37
38
39
40
#pragma once
#include <opencv2/highgui/highgui.hpp>
class VideoInput {
private:
cv::VideoCapture _capture;
long _lastFrameTime;
void prepareDebugFrame();
void copyToDebugFrame();
public:
int frameCount;
double frameRate;
cv::Mat frame;
cv::Mat frameGrey;
cv::Mat debugFrame;
cv::Size size;
bool captureFromVideo;
std::string resolutionParameter;
double videoResolution;
VideoInput();
VideoInput(std::string resolution);
VideoInput(std::string resolution, std::string filename, bool dummy);
~VideoInput();
void updateFrame();
double getResolution();
};
class VideoWriter {
public:
VideoWriter(cv::Size, std::string filename);
~VideoWriter();
void write(const cv::Mat &image);
private:
cv::VideoWriter _video;
};