Introductory project to learn basic OpenCV and image processing.
Created a program that detects faces, eyes and smiles and outlines them. After detecting faces, each face is sharpened using a common image sharpening convolution kernel and the background is smoothed using a Gaussian Blur.
(Not the best picture of my Mom and I)To install and run this Project on CLion:
- Clone the repository
- Install the latest version of OpenCV
- Open CLion, and select "Open or Import" and select the cloned repository
- Right click "CMakeLists.txt" and select "Reload CMake project" to ensure OpenCV is found
- Go to Run > Edit Configurations > Ensure Working Directory is selected as the current directory so the program can find the three Haar Cascade files included in the repository
- The three Haar Cascade files were taken from OpenCV's collection of Haar Cascade files so if you wish to use a different Haar Cascade from there such as "haarcascade_frontalface_alt.xml" then include the file path when you load the Haar Cascade
- Run project
When the project is run, it will open your web-cam, start detecting faces and filtering the image
To quit the program press any key and it will terminate.
[1] OpenCV C++ Face Detection
[2] Image Filtering
[3] Cascade Classifier
[4] Drawing Functions
[5] OpenCV: Filters & Arithmetic Operations
[6] Verify Rect Object is Inside Mat Object (used in line 105)