This project is based on face detection using OpenCV with a webcam. It continuously captures frames, detects faces, and displays the frames with rectangles around the detected faces. Pressing the 'n' key terminates the program.
- import cv2: Necessary libraries imported.
- cap = cv2.VideoCapture(0): Creates a video capture object to capture frames from webcam
- Haar Cascade Classifier is used for face detection.
- The detectMultiScale function detects objects (faces in this case) in the grayscale frame. The second and third arguments are the scale factor and minimum number of neighbors, respectively. Adjusting these parameters can affect the performance and accuracy of the face detection.
- The infinite loop breaks when 'n' key is pressed
- Written by Sakshi
- Written by Naaz