Skip to content

Commit 0b56f0d

Browse files
committed
minor fix
1 parent ab3a66d commit 0b56f0d

File tree

1 file changed

+3
-1
lines changed

1 file changed

+3
-1
lines changed

code/smile_cascade.py

+3-1
Original file line numberDiff line numberDiff line change
@@ -76,7 +76,7 @@ def to_node(type, message):
7676
)
7777

7878
for (x, y, w, h) in faces:
79-
# cv2.rectangle(frame, (x, y), (x + w, y + h), (0, 0, 255), 2)
79+
cv2.rectangle(frame, (x, y), (x + w, y + h), (0, 0, 255), 1)
8080
roi_gray = gray[y:y + h, x:x + w]
8181
roi_color = frame[y:y + h, x:x + w]
8282

@@ -94,6 +94,8 @@ def to_node(type, message):
9494

9595
# log the smile test with a selfie
9696
if smileTime == (CONFIG['smileLength'] / 2):
97+
for (x, y, w, h) in smile:
98+
cv2.rectangle(roi_color, (x, y), (x + w, y + h), (255, 0, 0), 1)
9799
cv2.imwrite(log_path + datetime.now().isoformat("T") + '.jpg', frame)
98100

99101
# cv2.imshow('Smile Detector', frame)

0 commit comments

Comments
 (0)