From b91ea6a77cebb8bbdc6b6689476c3301723f37bf Mon Sep 17 00:00:00 2001 From: omedkane <48337233+omedkane@users.noreply.github.com> Date: Thu, 7 Jul 2022 08:02:14 +0000 Subject: [PATCH] Update tutorial8.py --- tutorial8.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/tutorial8.py b/tutorial8.py index e24ca36..36fbaa3 100644 --- a/tutorial8.py +++ b/tutorial8.py @@ -12,7 +12,7 @@ faces = face_cascade.detectMultiScale(gray, 1.3, 5) for (x, y, w, h) in faces: cv2.rectangle(frame, (x, y), (x + w, y + h), (255, 0, 0), 5) - roi_gray = gray[y:y+w, x:x+w] + roi_gray = gray[y:y+h, x:x+w] roi_color = frame[y:y+h, x:x+w] eyes = eye_cascade.detectMultiScale(roi_gray, 1.3, 5) for (ex, ey, ew, eh) in eyes: @@ -24,4 +24,4 @@ break cap.release() -cv2.destroyAllWindows() \ No newline at end of file +cv2.destroyAllWindows()