-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathImageProcessThread.h
More file actions
45 lines (33 loc) · 1.03 KB
/
ImageProcessThread.h
File metadata and controls
45 lines (33 loc) · 1.03 KB
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
#ifndef IMAGEPROCESSTHREAD_H
#define IMAGEPROCESSTHREAD_H
#include <QThread>
#include<QDebug>
#include<QMutex>
#include<QWaitCondition>
#include<QVideoFrame>
#include<opencv2/highgui/highgui.hpp>
#include<opencv2/videoio/videoio_c.h>
#include<opencv2/imgproc/imgproc.hpp>
#include<opencv2/imgproc/types_c.h>
#include "LaneDetection.h"
using namespace cv;
class ImageProcessThread : public QThread
{
Q_OBJECT
public:
explicit ImageProcessThread(QObject *parent = nullptr);
void setParameters(QMutex* lock, QWaitCondition* conImageReady, cv::Mat srcImage, QVideoFrame* videoFrame, int width, int height);
private:
QMutex* lock;
QWaitCondition* conImageReady;
cv::Mat srcImage; ///< Place to export camera image to
int width;
int height;
QVideoFrame* videoFrame; ///< Place to draw camera image to QML
LaneDetection* processor;
protected:
void run() override;
signals:
void imageReady();
};
#endif // IMAGEPROCESSTHREAD_H