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.png
andhaarcascade_frontalface_default.xml
in your IDE if necessary. - Run the
main.java
file to start the application. - Click on the
openCameraButton
to start the camera. - Click on the
detectButton
to start face detection. - Click on the
back
button to stop the camera or detection. - Click on the
exitButton
to close the application.
- Navigate to
out/artifacts/Face_Recognition_System_jar
and double click on the.jar
file.
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.