-
Notifications
You must be signed in to change notification settings - Fork 0
/
cprocessthread.h
74 lines (53 loc) · 1.49 KB
/
cprocessthread.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
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
#ifndef CPROCESSTHREAD_H
#define CPROCESSTHREAD_H
#include "QThread"
#include "QDateTime"
#include "opencv2/opencv.hpp"
#include "QSettings"
#include "QList"
using namespace cv;
class CProcessThread : public QThread
{
Q_OBJECT
public:
CProcessThread();
~CProcessThread();
QString getConfigValue(int propId);
const double PI = 3.1415926;
bool isROI; //默认处理线程接收到的第一幅帧画面为ROI, 接收后立马置 false
QString ROIThreshold;
QString locator_offset;
QString isShowDebugFrame;
QString isWriteROI;
QString roi_x; //ROI单纯的指定位块部分
QString roi_y;
QString roi_width;
QString roi_heigth;
QString yIndeForLocate;
//const int distantArea = 120;
int distantArea;
QString lastHeigth;
double rotateTheta;
int xIndexForUse;
int yIndexForUse;
QList<cv::Mat>ROIList;
int ROICount;
Mat frameCropped;
Mat frameBinarized;
Mat lastROI;
QList<int> distantPixel;
std::vector<cv::Point> points;
cv::Vec4f line;
std::vector<cv::Point> getPoints(cv::Mat &image, int value);
void drawLine(cv::Mat &image, double theta, double rho, cv::Scalar color);
//计算最终的结果函数
void findFirstPeaks(QList<int>& listData);
public slots:
bool receiveDataOrNot(Mat liveFrame);
void setROISlot();
void slot_waveCheck();
signals:
void sendDistDataToGrabThread(QList<int>& listData);
void sendErrMsg();
};
#endif // CPROCESSTHREAD_H