-
Notifications
You must be signed in to change notification settings - Fork 1
/
Copy pathLeptonThread.h
92 lines (67 loc) · 1.6 KB
/
LeptonThread.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
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
#ifndef TEXTTHREAD
#define TEXTTHREAD
#include "Processing.h"
#include <ctime>
#include <stdint.h>
#include <iostream>
#include <ctime>
#include <string>
#include <QThread>
#include <QtCore>
#include <QPixmap>
#include <QImage>
#include <QSlider>
#include <opencv2/opencv.hpp>
using namespace cv;
#define PACKET_SIZE 164
#define PACKET_SIZE_UINT16 (PACKET_SIZE/2)
#define PACKETS_PER_FRAME 60
#define FRAME_SIZE_UINT16 (PACKET_SIZE_UINT16*PACKETS_PER_FRAME)
class LeptonThread : public QThread
{
Q_OBJECT;
public:
LeptonThread(Mat image, Processing *prrr);
~LeptonThread();
void run();
bool return_mode();//for enabling slider
public slots:
void performFFC();
void enableAGC();
void disableAGC();
void change_colormap_rainbow();
void change_colormap_gray();
void change_colormap_iron();
void set_normal_mode();
void set_binary_mode();
void change_slider_value(int value);
void switchon_dilatation();
void switchon_erosion();
void switchon_open();
void switchon_close();
void switchon_sobel();
void switchon_skeleton();
void switchon_learn();
void switchoff_learn();
void switchon_mediane();
void make_snapshot();
signals:
void updateText(QString);
void updateImage(QImage);
private:
Mat opencvmat;
int width;
int height;
const int *colormap;
int mode;//0-normal , 1- binary
int slider_value;
int ppmode;
bool learn;
bool mediane_on;
void postprocessing();
void mr_skeleton(Mat input, Mat &output);
void finding_edges(Mat input, Mat &output);
uint8_t result[PACKET_SIZE*PACKETS_PER_FRAME];
uint16_t *frameBuffer;
};
#endif