-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathVideoFlow.h
48 lines (41 loc) · 1.02 KB
/
VideoFlow.h
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
41
42
43
44
45
46
47
48
#pragma once
#include <opencv2\opencv.hpp>
#include <opencv2/imgproc/types_c.h>
#include <QThread>
#include <QTextStream>
#include <QFile>
//#include "dependentFile\Delegate/DelegateLib.h"
//#include "dependentFile\Delegate/ThreadWin.h"
//判断初始化硬件是否连接
class VideoFlow:public QThread
{
public:
static VideoFlow &GetInstance() {
static VideoFlow _video;
return _video;
}
void Start();
void End();
bool isStarted=false;
bool GetImage(cv::Mat &frame);
void separetImage(cv::Mat &upImage,cv::Mat &downImage);
void separetImage(cv::Mat &Image, cv::Mat& upImage, cv::Mat& downImage);
bool interlaceImage(cv::Mat &overlapImage);
bool interlaceImage(cv::Mat& Image, cv::Mat& overlapImage);
cv::Mat frame;
public slots:
void runThread();
signals:
private:
cv::VideoCapture cap;
cv::Mat upImage;
cv::Mat downImage;
cv::Mat overlapImage;
VideoFlow() : QThread() {
}
VideoFlow(const VideoFlow &) = delete;
~VideoFlow() {
frame.release();
cap.release();
}
};