Skip to content

Commit 8a48372

Browse files
committed
fixed the linting issue
1 parent f5583cd commit 8a48372

File tree

1 file changed

+6
-6
lines changed

1 file changed

+6
-6
lines changed

face_recognition/face_recognition.py

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -37,8 +37,8 @@ def classify_face(im):
3737
cam.saveSnapshot('~/faces/image.jpg')
3838
time.sleep(5)
3939
img = cv2.imread(im, 1)
40-
#img = cv2.resize(img, (0, 0), fx=0.5, fy=0.5)
41-
#img = img[:,:,::-1]
40+
# img = cv2.resize(img, (0, 0), fx=0.5, fy=0.5)
41+
# img = img[:,:,::-1]
4242

4343
face_locations = fr.face_locations(img)
4444
unknown_face_encodings = fr.face_encodings(img, face_locations)
@@ -59,12 +59,12 @@ def classify_face(im):
5959

6060
for (top, right, bottom, left), name in zip(face_locations, face_names):
6161
# Draw a box around the face
62-
cv2.rectangle(img, (left-20, top-20),
63-
(right+20, bottom+20), (255, 0, 0), 2)
62+
cv2.rectangle(img, (left - 20, top - 20),
63+
(right + 20, bottom + 20), (255, 0, 0), 2)
6464

6565
# Draw a label with a name below the face
66-
cv2.rectangle(img, (left-20, bottom - 15),
67-
(right+20, bottom+20), (255, 0, 0), cv2.FILLED)
66+
cv2.rectangle(img, (left - 20, bottom - 15),
67+
(right + 20, bottom + 20), (255, 0, 0), cv2.FILLED)
6868
font = cv2.FONT_HERSHEY_DUPLEX
6969
cv2.putText(img, name, (left - 20, bottom + 15),
7070
font, 1.0, (255, 255, 255), 2)

0 commit comments

Comments
 (0)