Software Project Face Detection System Using Open CV Final Report
Software Project Face Detection System Using Open CV Final Report
|--------------------|---------------------------------------------------------------------------------------------------------------
---|-----------------------------------------------|
| `cv2` (OpenCV) | Computer vision library for image and video processing. Used for capturing
video frames, image resizing, and drawing on frames. | `pip3 install opencv-python` |
| `face_recognition` | Face recognition library for recognizing and manipulating faces from Python.
Used for face detection and recognition in the video stream. | `pip3 install face_recognition` |
| `numpy` | Numerical computing library, used for array operations. Used internally by
`face_recognition` for efficient numerical calculations. | `pip3 install numpy` |
| `xlwt`, `xlrd`, `xlutils` | Libraries for reading and writing Excel files (`.xls`). Used for managing
attendance data in an Excel sheet. | `pip3 install xlwt xlrd xlutils` |
The project uses computer vision techniques to perform face recognition in a live video stream
captured from a webcam. It marks attendance by comparing detected faces with known faces and
records the results in an Excel sheet. The main components and their functionalities are as follows:
1. **OpenCV (`cv2`):**
- Determines the best match for each face based on the smallest distance.
- Adds a new sheet for each lecture with date and student names.
1. **Initialization:**
- Initializes OpenCV for video capture and sets up face recognition for known faces.
2. **Main Loop:**
- Resizes frames and converts them to RGB format for face recognition.
3. **Face Recognition:**
- Compares face encodings with known face encodings using `face_recognition.compare_faces` and
`face_recognition.face_distance`.
4. **Display:**
5. **Termination:**
- Exits the main loop and releases the webcam when the 'q' key is pressed.
OpenCV is an open-source computer vision and machine learning software library. It provides various
tools and functions for image and video processing. In this project, OpenCV is used for capturing
video frames, resizing images, drawing on frames, and displaying the video stream.
The face_recognition library is built on top of OpenCV and dlib. It simplifies face recognition tasks by
providing a high-level interface for working with facial features and matching faces. It uses pre-
trained models to detect and recognize faces in images and video streams.