Move C API of opencv_objdetect to separate file
Also move cv::linemod to own header
This commit is contained in:
@@ -79,7 +79,7 @@ int main(int , char** )
|
||||
|
||||
for (size_t i = 0; i < Faces.size(); i++)
|
||||
{
|
||||
rectangle(ReferenceFrame, Faces[i], CV_RGB(0,255,0));
|
||||
rectangle(ReferenceFrame, Faces[i], Scalar(0,255,0));
|
||||
}
|
||||
|
||||
imshow(WindowName, ReferenceFrame);
|
||||
|
@@ -141,7 +141,7 @@ int main(int argc, char** argv)
|
||||
conf << d.confidence;
|
||||
|
||||
cv::rectangle(frame, cv::Rect((int)d.x, (int)d.y, (int)d.w, (int)d.h), cv::Scalar(b, 0, 255 - b, 255), 2);
|
||||
cv::putText(frame, conf.str() , cv::Point((int)d.x + 10, (int)d.y - 5),1, 1.1, cv::Scalar(25, 133, 255, 0), 1, CV_AA);
|
||||
cv::putText(frame, conf.str() , cv::Point((int)d.x + 10, (int)d.y - 5),1, 1.1, cv::Scalar(25, 133, 255, 0), 1, cv::LINE_AA);
|
||||
|
||||
if (wf)
|
||||
myfile << d.x << "," << d.y << "," << d.w << "," << d.h << "," << d.confidence << "\n";
|
||||
|
@@ -73,7 +73,7 @@ void detectAndDisplay( Mat frame )
|
||||
cvtColor( frame, frame_gray, COLOR_BGR2GRAY );
|
||||
equalizeHist( frame_gray, frame_gray );
|
||||
//-- Detect faces
|
||||
face_cascade.detectMultiScale( frame_gray, faces, 1.1, 2, 0|CV_HAAR_SCALE_IMAGE, Size(30, 30) );
|
||||
face_cascade.detectMultiScale( frame_gray, faces, 1.1, 2, 0|CASCADE_SCALE_IMAGE, Size(30, 30) );
|
||||
|
||||
for( size_t i = 0; i < faces.size(); i++ )
|
||||
{
|
||||
@@ -84,7 +84,7 @@ void detectAndDisplay( Mat frame )
|
||||
std::vector<Rect> eyes;
|
||||
|
||||
//-- In each face, detect eyes
|
||||
eyes_cascade.detectMultiScale( faceROI, eyes, 1.1, 2, 0 |CV_HAAR_SCALE_IMAGE, Size(30, 30) );
|
||||
eyes_cascade.detectMultiScale( faceROI, eyes, 1.1, 2, 0 |CASCADE_SCALE_IMAGE, Size(30, 30) );
|
||||
|
||||
for( size_t j = 0; j < eyes.size(); j++ )
|
||||
{
|
||||
|
@@ -82,7 +82,7 @@ void detectAndDisplay( Mat frame )
|
||||
std::vector<Rect> eyes;
|
||||
|
||||
//-- In each face, detect eyes
|
||||
eyes_cascade.detectMultiScale( faceROI, eyes, 1.1, 2, 0 |CV_HAAR_SCALE_IMAGE, Size(30, 30) );
|
||||
eyes_cascade.detectMultiScale( faceROI, eyes, 1.1, 2, 0 |CASCADE_SCALE_IMAGE, Size(30, 30) );
|
||||
if( eyes.size() == 2)
|
||||
{
|
||||
//-- Draw the face
|
||||
|
Reference in New Issue
Block a user