-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathobjectDetection.h
More file actions
30 lines (21 loc) · 872 Bytes
/
objectDetection.h
File metadata and controls
30 lines (21 loc) · 872 Bytes
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
#ifndef DETECTFACE_H
#define DETECTFACE_H
#include <QObject>
#include "opencv2/core/core.hpp"
#include "opencv2/objdetect/objdetect.hpp"
using namespace cv;
class detectObject : public QObject
{
Q_OBJECT
public:
detectObject();
~detectObject();
void detectLargestObject();
void initCascades(CascadeClassifier& faceCascade, CascadeClassifier& eyeCascade, CascadeClassifier& eyeGlassesCascade);
void equalizeLeftAndRightHalves(Mat &faceImg);
Rect findObject(Mat &image, CascadeClassifier &cascade, int scaledWidth = 320);
Mat detectEyes(Mat& face, CascadeClassifier &eyeCascade1, CascadeClassifier &eyeCascade2, Point &leftEye, Point &rightEye);
Mat processImage(Mat &img, CascadeClassifier& faceCascade, CascadeClassifier& eyeCascade, CascadeClassifier& eyeGlassCascade);
Mat emitSignal(Mat& img);
};
#endif // DETECTFACE_H