-
Notifications
You must be signed in to change notification settings - Fork 0
/
qtopencv.h
84 lines (68 loc) · 1.68 KB
/
qtopencv.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
#ifndef QTOPENCV_H
#define QTOPENCV_H
#include <QtGui/QWidget>
#include <QtCore/QTimer>
#include "ui_qtopencv.h"
#include "Image_Processing.h"
class qtopencv : public QWidget
{
Q_OBJECT
friend class MainWindow;
public:
qtopencv(QWidget *parent = 0);
~qtopencv();
inline QImage* getImage() const {
return const_cast<QImage *>(&qimage);
}
void openVideo(QString);
void openCam();
void openImage(QString);
public slots:
inline void setWidth( int w ) {
if(w>0)
width = w;
}
inline void setHeight( int h ) {
if(h>0)
height = h;
}
inline void toggleDrawCalib(bool t) {
ip->toggleDrawCalib(t);
}
inline void toggleDrawFeatures(bool t) {
ip->toggleDrawFeatures(t);
}
inline void toggleDrawPose(bool t) {
ip->toggleDrawPose(t);
}
signals:
void autoCalib();
void featureExtraction();
void poseEstimation();
private:
Ui::qtopencvClass ui;
Image_Processing *ip;
QTimer *timer;
QPixmap *pixmap;
Mat ocv_image;
QImage qimage;
bool normal_mode;
bool autocalib_mode;
bool pose_mode;
bool extract_mode;
int width;
int height;
private slots:
void captureStarted();
void captureStopped();
void ocv2qt();
void doCalib();
void doAutoCalib();
void doUndistort(bool);
void activateAutoCalib(bool);
void activateNormal(bool);
void activatePose(bool);
void activateExtract(bool);
void setThreshold(int t);
};
#endif // QTOPENCV_H