From 81a6ae791b991d387d1ad97b1b75a97bc5d94d91 Mon Sep 17 00:00:00 2001 From: Nghia Ho Date: Sat, 31 Aug 2013 23:35:03 +1000 Subject: [PATCH] changed int -> size_t when accessing std::vector --- .../objdetect/cascade_classifier/cascade_classifier.rst | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/doc/tutorials/objdetect/cascade_classifier/cascade_classifier.rst b/doc/tutorials/objdetect/cascade_classifier/cascade_classifier.rst index 03080fec50..8a4f25cc2b 100644 --- a/doc/tutorials/objdetect/cascade_classifier/cascade_classifier.rst +++ b/doc/tutorials/objdetect/cascade_classifier/cascade_classifier.rst @@ -90,7 +90,7 @@ This tutorial code's is shown lines below. You can also download it from `here < //-- Detect faces face_cascade.detectMultiScale( frame_gray, faces, 1.1, 2, 0|CV_HAAR_SCALE_IMAGE, Size(30, 30) ); - for( int i = 0; i < faces.size(); i++ ) + for( size_t i = 0; i < faces.size(); i++ ) { Point center( faces[i].x + faces[i].width*0.5, faces[i].y + faces[i].height*0.5 ); ellipse( frame, center, Size( faces[i].width*0.5, faces[i].height*0.5), 0, 0, 360, Scalar( 255, 0, 255 ), 4, 8, 0 ); @@ -101,7 +101,7 @@ This tutorial code's is shown lines below. You can also download it from `here < //-- In each face, detect eyes eyes_cascade.detectMultiScale( faceROI, eyes, 1.1, 2, 0 |CV_HAAR_SCALE_IMAGE, Size(30, 30) ); - for( int j = 0; j < eyes.size(); j++ ) + for( size_t j = 0; j < eyes.size(); j++ ) { Point center( faces[i].x + eyes[j].x + eyes[j].width*0.5, faces[i].y + eyes[j].y + eyes[j].height*0.5 ); int radius = cvRound( (eyes[j].width + eyes[j].height)*0.25 );