Skip to content

Detects various facial features, sharpens each face and blurs background.

Notifications You must be signed in to change notification settings

krishna-kalavadia/OpenCV-Face-Detection

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

7 Commits
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Face Detection and Image Processing

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.

Screenshots

Sample Path Found

(Not the best picture of my Mom and I)

Installation on CLion

To install and run this Project on CLion:

  1. Clone the repository
  2. Install the latest version of OpenCV
  3. Open CLion, and select "Open or Import" and select the cloned repository
  4. Right click "CMakeLists.txt" and select "Reload CMake project" to ensure OpenCV is found
  5. 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
  6. Run project

Usage

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.

References and Acknowledgment

[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)

About

Detects various facial features, sharpens each face and blurs background.

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published