From 4633e624fdc4e61928b8c7743d9bbd50c5d75a6a Mon Sep 17 00:00:00 2001 From: Saumit Dinesan Date: Sat, 22 Apr 2023 23:23:31 +0530 Subject: face-detection cleanup+Adding .gitignore --- face-detection/03_face_recogition.py | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) (limited to 'face-detection/03_face_recogition.py') diff --git a/face-detection/03_face_recogition.py b/face-detection/03_face_recogition.py index e0da838..d5b18cc 100644 --- a/face-detection/03_face_recogition.py +++ b/face-detection/03_face_recogition.py @@ -9,7 +9,7 @@ font = cv2.FONT_HERSHEY_COMPLEX #font = cv2.FONT_HERSHEY_TRIPLEX id = 0 # names related to id -names = ['None', 'Obamna', 'Soda', 'Orange'] +names = ['None', 'Junaid', 'Bikram', 'Saumit'] # Initialize and start realtime video capture cam = cv2.VideoCapture(0) cam.set(3, 640) # set video widht @@ -17,6 +17,7 @@ cam.set(4, 480) # set video height # Define min window size to be recognized as a face minW = 0.1*cam.get(3) minH = 0.1*cam.get(4) +#reads frame, converts to grayscale, for each detected face it while True: ret, img =cam.read() gray = cv2.cvtColor(img,cv2.COLOR_BGR2GRAY) -- cgit v1.2.3