-
Notifications
You must be signed in to change notification settings - Fork 4
Expand file tree
/
Copy pathmythread.h
More file actions
54 lines (43 loc) · 1.07 KB
/
mythread.h
File metadata and controls
54 lines (43 loc) · 1.07 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
46
47
48
49
50
51
52
53
54
#ifndef MYTHREAD_H
#define MYTHREAD_H
#include <QThread>
#include <QtCore>
#include <opencv/cv.h>
#include <opencv/cxcore.h>
#include <opencv/highgui.h>
#include <iostream>
#include <stdio.h>
#include <QtGui>
#include <QGraphicsPixmapItem>
#include <QGraphicsView>
class MyThread : public QThread
{
Q_OBJECT
public:
explicit MyThread(QObject *parent = 0);
bool game_window;
void run();
bool Stop;
signals:
void ImageChanged(int Number, QImage img);
public slots:
private:
static QMutex mutex;
//HAND GESTURE
double scale;
int result;
CvCapture *capture;
IplImage *frame;
CvMemStorage* storage;
CvHaarClassifierCascade* cascade_palm;
CvHaarClassifierCascade* cascade_fist;
CvHaarClassifierCascade* cascade_scissor;
const char* cascade_palm_name;
const char* cascade_fist_name;
const char* cascade_scissor_name;
IplImage* detectAndDraw(IplImage *img);
IplImage* img_resize(IplImage* src_img, float scale);
QImage getQImageFromIplImage(IplImage *frame);
bool loadFiles();
};
#endif // MYTHREAD_H