-
Notifications
You must be signed in to change notification settings - Fork 0
/
find_face_and_eyes.h
46 lines (38 loc) · 1.15 KB
/
find_face_and_eyes.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
#ifndef FIND_FACE_AND_EYES_H
#define FIND_FACE_AND_EYES_H
//#include <iostream>
#include "mainwindow.h"
#include "opencv2/objdetect.hpp"
#include "opencv2/videoio.hpp"
#include <QVector>
#include <QImage>
using namespace std;
using namespace cv;
class face
{
public:
Point get_coord_face() { return coord_face;}
QVector<Point> get_coord_eyes() {return coord_eyes;}
QVector<int> get_radius_eyes() {return radius_eyes;}
void set_coord_face(Point set){coord_face = set;}
void set_coord_eyes(QVector<Point> set){coord_eyes = set;}
void set_radius_eyes(QVector<int> set){radius_eyes = set;}
int number_eyes(){return coord_eyes.size();}
private:
Point coord_face;
QVector <Point> coord_eyes;
QVector <int> radius_eyes;
};
class cascades
{
public:
cascades();
CascadeClassifier cascade, nestedCascade;
};
QVector <face> center_faces(QImage, QImage* ResultImg, float);
Mat detect_Face_and_eyes( Mat& img, double scale, QVector <face> &find_faces);
QImage convert_lpl_qimg(IplImage*);
IplImage convert_qimg_to_lpl(QImage );
Mat qimage2mat(QImage& qimage);
QImage Mat2QImage(cv::Mat const& src);
#endif // FIND_FACE_AND_EYES_H