Skip to content

Commit 885be40

Browse files
authored
Made changes to pass linter checks
1 parent 21b54cf commit 885be40

File tree

1 file changed

+4
-5
lines changed

1 file changed

+4
-5
lines changed

eye_detection/eye_detector.py

Lines changed: 4 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,3 @@
1-
import numpy as np
21
import cv2
32
face_cascade = cv2.CascadeClassifier(
43
cv2.data.haarcascades + 'haarcascade_frontalface_default.xml')
@@ -10,12 +9,12 @@
109
gray = cv2.cvtColor(img, cv2.COLOR_BGR2GRAY)
1110
faces = face_cascade.detectMultiScale(gray, 1.3, 5)
1211
for (x, y, w, h) in faces:
13-
cv2.rectangle(img, (x, y), (x+w, y+h), (255, 0, 0), 2)
14-
roi_gray = gray[y:y+h, x:x+w]
15-
roi_color = img[y:y+h, x:x+w]
12+
cv2.rectangle(img, (x, y), (x + w, y + h), (255, 0, 0), 2)
13+
roi_gray = gray[y:y + h, x:x + w]
14+
roi_color = img[y:y + h, x:x + w]
1615
eyes = eye_cascade.detectMultiScale(roi_gray)
1716
for (ex, ey, ew, eh) in eyes:
18-
cv2.rectangle(roi_color, (ex, ey), (ex+ew, ey+eh), (0, 255, 0), 2)
17+
cv2.rectangle(roi_color, (ex, ey), (ex + ew, ey + eh), (0, 255, 0), 2)
1918
cv2.imshow('Web Cam Input', img)
2019
k = cv2.waitKey(30) & 0xff
2120
if k == 27:

0 commit comments

Comments
 (0)