How to run : open file and run on IDE that supports python
How to quit : press 'q' on pop-up frame to close window and exit program
- Loads specified image into the program
- Converts image to grayscale
- Uses haar cascades algorithm to detect faces
- Window will open with frame around the face detected
The script uses openCV and the haarcascade algorithm
- Make sure the image file is in the same directory as the faceDetection.py script
- If the image file is corrupted or not in the correct format, the program will be unable to read it
- Even if the file extension is valid, the image itself might not be. You might need to convert it again (try : image.online-convert.com)
How to run : open file and run on IDE that supports python
How to quit : press 'q' on live webcam window to close window and exit program
How it works :
- Loads images from a specified directory
- Encodes images from step 1
- Opens webcam and encodes the current live feed
- Checks if there is a match between the encoded images and the live frames encoded
The script uses openCV and the face_recognition api
- Make sure the images loaded to train the program are in the correct folder specified by the script. In this script, the image path is set to a folder named 'faces', in the same directory where the 'faceRecognition.py' script resides
- Do not remove code lines that remove '.DS_Store' from image path. See the following post on stackoverflow for reference