-
Notifications
You must be signed in to change notification settings - Fork 2
Expand file tree
/
Copy pathMain.cpp
More file actions
57 lines (38 loc) · 1.29 KB
/
Main.cpp
File metadata and controls
57 lines (38 loc) · 1.29 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
55
56
57
#include <opencv2/opencv.hpp>
#include <dlib/image_processing.h>
#include <dlib/image_processing/frontal_face_detector.h>
#include <dlib/image_processing/render_face_detections.h>
#include <dlib/gui_widgets.h>
#include <dlib/image_io.h>
#include <iostream>
#include "FaceAligner.cpp"
#include <math.h> //para sacar el angulo
#include <dlib/gui_widgets.h>
#include <dlib/image_io.h>
#include <dlib/cmd_line_parser.h>
#include "opencv2/objdetect/objdetect.hpp"
#include "opencv2/highgui/highgui.hpp"
#include "opencv2/imgproc/imgproc.hpp"
#include <dlib/opencv.h>
#include <opencv2/core/core.hpp>
using namespace cv;
using namespace dlib;
using namespace std;
int main(int argc, char** argv) {
//frontal_face_detector detector = get_frontal_face_detector();
//deserialize(argv[1])>>sp;
FaceAligner faceA(250, 750 ,900, 700);
Mat image = imread(argv[1]);
//Mat gray, faceAligned;
//resize(image, image, Size(480, 640));
//cvtColor(image, gray, COLOR_BGR2GRAY);
namedWindow("Display window", WINDOW_AUTOSIZE);// Create a window for display.
imshow("Display window", image);
Mat output = faceA.align(argv[1]);
//vector<rectangle> dets = detector(img);
//faceAligned = faceA.align(image, gray, dets[0]);
//faceAligned = faceA.align(argv[2]);
imshow("Aligned", output);
waitKey(0);
return 0;
}