This project is a Java-based face recognition system developed using OpenCV. It utilizes a webcam to capture live video, effectively detecting and highlighting faces in the streaming video feed. With applications spanning from surveillance to various industries, this system employs OpenCV's VideoCapture functionality and Haar cascades classifiers to proficiently recognize and outline faces in real-time video streams.
- Java JDK 21
- OpenCV 4.9.0
- Clone the repository:
git clone https://github.com/YashPatel04/Face-Detection-System.git - Navigate to the project directory:
cd Face Detection System - Make sure you have the required JDK and OpenCV installed.
- Update the paths of the file,
icon.jpg,icons8-npc-face-32.pngandhaarcascade_frontalface_default.xmlin your IDE if necessary. - Run the
main.javafile to start the application. - Click on the
openCameraButtonto start the camera. - Click on the
detectButtonto start face detection. - Click on the
backbutton to stop the camera or detection. - Click on the
exitButtonto close the application.
- Navigate to
out/artifacts/Face_Recognition_System_jarand double click on the.jarfile.
NOTE: If you are having any problems with executing the jar file kindly open src/detect.java in your IDE and change the path of the haar cascade classifier to the absolute path of the file in your system
Pull requests and improvements are always welcome.For major changes, please open an issue first to discuss what you would like to change.

