Commit 50288f13 authored by berak's avatar berak

rebased commits

parent 926d6876
...@@ -104,7 +104,7 @@ This tutorial code's is shown lines below. You can also download it from `here < ...@@ -104,7 +104,7 @@ This tutorial code's is shown lines below. You can also download it from `here <
{ {
Point eye_center( faces[i].x + eyes[j].x + eyes[j].width/2, faces[i].y + eyes[j].y + eyes[j].height/2 ); Point eye_center( faces[i].x + eyes[j].x + eyes[j].width/2, faces[i].y + eyes[j].y + eyes[j].height/2 );
int radius = cvRound( (eyes[j].width + eyes[j].height)*0.25 ); int radius = cvRound( (eyes[j].width + eyes[j].height)*0.25 );
circle( frame, center, radius, Scalar( 255, 0, 0 ), 4, 8, 0 ); circle( frame, eye_center, radius, Scalar( 255, 0, 0 ), 4, 8, 0 );
} }
} }
//-- Show what you got //-- Show what you got
......
...@@ -64,7 +64,7 @@ void detectAndDisplay( Mat frame ) ...@@ -64,7 +64,7 @@ void detectAndDisplay( Mat frame )
for ( size_t i = 0; i < faces.size(); i++ ) for ( size_t i = 0; i < faces.size(); i++ )
{ {
Point center( faces[i].x + faces[i].width/2, faces[i].y + faces[i].height/2 ); Point center( faces[i].x + faces[i].width/2, faces[i].y + faces[i].height/2 );
ellipse( frame, center, Size( faces[i].width/2, faces[i].height/2), 0, 0, 360, Scalar( 255, 0, 255 ), 4, 8, 0 ); ellipse( frame, center, Size( faces[i].width/2, faces[i].height/2 ), 0, 0, 360, Scalar( 255, 0, 255 ), 4, 8, 0 );
Mat faceROI = frame_gray( faces[i] ); Mat faceROI = frame_gray( faces[i] );
std::vector<Rect> eyes; std::vector<Rect> eyes;
...@@ -76,7 +76,7 @@ void detectAndDisplay( Mat frame ) ...@@ -76,7 +76,7 @@ void detectAndDisplay( Mat frame )
{ {
Point eye_center( faces[i].x + eyes[j].x + eyes[j].width/2, faces[i].y + eyes[j].y + eyes[j].height/2 ); Point eye_center( faces[i].x + eyes[j].x + eyes[j].width/2, faces[i].y + eyes[j].y + eyes[j].height/2 );
int radius = cvRound( (eyes[j].width + eyes[j].height)*0.25 ); int radius = cvRound( (eyes[j].width + eyes[j].height)*0.25 );
circle( frame, center, radius, Scalar( 255, 0, 0 ), 4, 8, 0 ); circle( frame, eye_center, radius, Scalar( 255, 0, 0 ), 4, 8, 0 );
} }
} }
//-- Show what you got //-- Show what you got
......
...@@ -81,7 +81,7 @@ void detectAndDisplay( Mat frame ) ...@@ -81,7 +81,7 @@ void detectAndDisplay( Mat frame )
{ {
//-- Draw the face //-- Draw the face
Point center( faces[i].x + faces[i].width/2, faces[i].y + faces[i].height/2 ); Point center( faces[i].x + faces[i].width/2, faces[i].y + faces[i].height/2 );
ellipse( frame, center, Size( faces[i].width/2, faces[i].height/2), 0, 0, 360, Scalar( 255, 0, 0 ), 2, 8, 0 ); ellipse( frame, center, Size( faces[i].width/2, faces[i].height/2 ), 0, 0, 360, Scalar( 255, 0, 0 ), 2, 8, 0 );
for( size_t j = 0; j < eyes.size(); j++ ) for( size_t j = 0; j < eyes.size(); j++ )
{ //-- Draw the eyes { //-- Draw the eyes
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment