Raspberry Pi Camera: Face Recognition and Email Alert

Though Open CV installation is highly time consuming process on a Raspberry Pi A+, it has multiple uses when it comes to image recognition. Framework created by Tony in his face recognition treasure box project is modified here for a camera which sends messages whenever it finds someone is in the backyard.

How it works?

Camera records images constantly and then passes it to the Open CV for face recognition. Once it recognizes a face in the image, it sends alert to the email address with the image in the attachment. You can modify this code further to include any other object recognition such as cat etc.

Here is the email message I received whenever peeked into camera.

blog

You can download the code which uses OpenCV 2.4.9 from here. Before you use it, you need to generate a password for the app from Gmail.

Gmail provides the following guidelines to generate the app password for emailing directly from Raspberry Pi. Use “other” option to generate the password for the app to login to Gmail and send an email.

Advertisements

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Google+ photo

You are commenting using your Google+ account. Log Out / Change )

Connecting to %s