From 36d32999cb115e3881d91b86fc66b51ca884209d Mon Sep 17 00:00:00 2001 From: Ravi Gupta <61700885+ravi9607@users.noreply.github.com> Date: Sun, 17 May 2020 22:24:28 +0530 Subject: [PATCH] Update faceRecognition.py --- faceRecognition.py | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/faceRecognition.py b/faceRecognition.py index 80450a6..667b3bc 100644 --- a/faceRecognition.py +++ b/faceRecognition.py @@ -51,11 +51,13 @@ def train_classifier(faces,faceID): #Below function draws bounding boxes around detected face in image def draw_rect(test_img,face): (x,y,w,h)=face - cv2.rectangle(test_img,(x,y),(x+w,y+h),(255,0,0),thickness=5) + color = (255, 0, 0) + cv2.rectangle(test_img,(x,y),(x+w,y+h),color,thickness=5) #Below function writes name of person for detected label def put_text(test_img,text,x,y): - cv2.putText(test_img,text,(x,y),cv2.FONT_HERSHEY_DUPLEX,2,(255,0,0),4) + color = (255, 0, 0) + cv2.putText(test_img,text,(x,y),cv2.FONT_HERSHEY_DUPLEX,2,color,4)