Lines 10-15
Link Here
|
10 |
#include "opencv2/objdetect/objdetect.hpp" |
10 |
#include "opencv2/objdetect/objdetect.hpp" |
11 |
#include "opencv2/highgui/highgui.hpp" |
11 |
#include "opencv2/highgui/highgui.hpp" |
12 |
#include "opencv2/imgproc/imgproc.hpp" |
12 |
#include "opencv2/imgproc/imgproc.hpp" |
|
|
13 |
#include "opencv2/imgproc/types_c.h" |
13 |
|
14 |
|
14 |
#include <iostream> |
15 |
#include <iostream> |
15 |
#include <stdio.h> |
16 |
#include <stdio.h> |
Lines 43-49
Link Here
|
43 |
equalizeHist(smallImg, smallImg); |
44 |
equalizeHist(smallImg, smallImg); |
44 |
|
45 |
|
45 |
vector<Rect> faces; |
46 |
vector<Rect> faces; |
46 |
cascade.detectMultiScale(smallImg, faces, 1.1, 2, CV_HAAR_SCALE_IMAGE, Size(30, 30)); |
47 |
cascade.detectMultiScale(smallImg, faces, 1.1, 2, cv::CASCADE_SCALE_IMAGE, cv::Size(30, 30)); |
47 |
|
48 |
|
48 |
int i = 0; |
49 |
int i = 0; |
49 |
for (vector<Rect>::const_iterator r = faces.begin(); r != faces.end(); r++, i++) { |
50 |
for (vector<Rect>::const_iterator r = faces.begin(); r != faces.end(); r++, i++) { |
Lines 117-123
Link Here
|
117 |
|
118 |
|
118 |
} |
119 |
} |
119 |
|
120 |
|
120 |
Mat image = imread(inputName, 1); |
121 |
cv::Mat image = cv::imread(inputName, 1); |
121 |
|
122 |
|
122 |
if (image.empty()) { |
123 |
if (image.empty()) { |
123 |
|
124 |
|