Open Cv Face, Eyes & Smile Detection With Raspberry Pi

About the project

Using Python and haarcascades with OpenCV, you can create a device which does facial detection. Video here; https://youtu.be/XrscQwNC524

Project info

Difficulty: Easy

Platforms: Raspberry Pi

Estimated time: 1 hour

License: Apache License 2.0 (Apache-2.0)

Items used in this project

Hardware components

6010602  ARM Raspberry Pi 3 (RPi3) Board 6010602 ARM Raspberry Pi 3 (RPi3) Board One Raspberry Pi x 1
Webcam Webcam x 1
1593HAMPIBK Enclosures, Boxes & Cases For Raspberry Pi B 4.1x2.58x1.18" ... 1593HAMPIBK Enclosures, Boxes & Cases For Raspberry Pi B 4.1x2.58x1.18" ... x 1

Software apps and online services

Raspbian OS Raspbian OS
OpenCV OpenCV

Story

Using OpenCV & Python installed on a Raspberry pi with haarcascades and an ordinary usb webcam, you too can create a simple device for face, eyes and smile detection.



Schematics, diagrams and documents

Raspberry Pi and webcam

This project can be done with either a picamera specifically for the raspberry pi or with an ordinary usb webcamera.

Code

Python Code

Make sure to have OpenCV installed onto your device first. Then also make sure haarcascade files are stored into the same folder as the Python code.

haarcascade_frontalface_default.xml

haarcascade_eye.xml

haarcascade_smile.xml

Credits

Leave your feedback...