Difference between revisions of "ECE 497 Project - Fun Face Cam"

From eLinux.org
Jump to: navigation, search
Line 98: Line 98:
  
 
== Highlights ==
 
== Highlights ==
[[File:UserFunFaceCam.jpg|tl|POTD|The user having fun with the Fun Face Cam ]]
+
[[File:UserFunFaceCam.jpg|thumb|left|The user having fun with the Fun Face Cam ]]
  
  

Revision as of 23:32, 10 November 2016

thumb‎ Embedded Linux Class by Mark A. Yoder


This picture shows what our program can do.

Team members: Joe Militello, Tim Smith

Grading Template

Draft Feedback

Draft is a bit thin right now. Consider adding pictures to tell your story. I look forward to the finished project.

I'm using the following template to grade. Each slot is 10 points. 0 = Missing, 5=OK, 10=Wow!

00 Executive Summary
00 Installation Instructions 
00 User Instructions
00 Highlights
00 Theory of Operation
00 Work Breakdown
00 Future Work
00 Conclusions
00 Demo
00 Late
Comments: I'm looking forward to seeing this.

Score:  10/100

(Inline Comment)

Executive Summary

Using the PSEye, a user can take a picture of himself or herself. He or she is able to edit the picture to put fun things on their face such as sunglasses, mustaches, and a hat.


We initially did lots of research on different types of of sample code to do face recognition. We found that the easiest was to do to it was through OpenCV. We were able to get OpenCV working and we were able to take pictures with it. We also used OpenCV to do the face recognition.

We also build a server on the bone to display the images as well as give the user options. We coded the pages in HTML and in JavaScript.

Our web server was based on code from Mark A. Yoder, which we modified for our uses. We also combined together OpenCV examples from Derek Molloy and the OpenCV website to make our facial recognition application

Packaging

There is no packaging for this. Just attach the PSEye onto the beagle bone and connect the beagle bone to a computer.

Installation Instructions

Here are the instructions on how to install the Fun Face Cam

Beagle$ sudo apt-get update
Beagle$ sudo apt-get upgrade
  • Install the OpenCV prerequisites
Beagle$ sudo apt-get install build-essential cmake pkg-config
Beagle$ sudo apt-get install libtiff4-dev libjpeg-dev libjasper-dev libpng12-dev
Beagle$ sudo apt-get install libavcodec-dev libavformat-dev libswscale-dev libv4l-dev
  • Download the lastest OpenCV from GitHub:
Beagle$ git clone https://github.com/Itseez/opencv.git
  • Now you can start building OpenCV, WARNING this could take a couple hours!!!
Beagle$ cd opencv
Beagle$ mkdir build && cd build
Beagle$ cmake -D CMAKE_BUILD_TYPE=RELEASE -D CMAKE_INSTALL_PREFIX=/usr/local -D WITH_CUDA=OFF -D WITH_CUFFT=OFF 
  -D WITH_CUBLAS=OFF -D WITH_NVCUVID=OFF -D WITH_OPENCL=OFF -D WITH_OPENCLAMDFFT=OFF -D WITH_OPENCLAMDBLAS=OFF 
  -D BUILD_opencv_apps=OFF -D BUILD_DOCS=OFF -D BUILD_PERF_TESTS=OFF -D BUILD_TESTS=OFF -D ENABLE_NEON=on ..
Beagle$ make
Beagle$ sudo make install
Beagle$ sudo ldconfig
  • If that finalized without error, then OpenCV has been installed on your BeagleBone
  • Now switch back into the project folder
Beagle$ cd
Beagle$ cd embeddedLinux/Project
  • Now you must compile the boneCV.cpp file
Beagle$ ./Build

User Instructions

The hardware components of the Fun Face Cam
  • First, make sure the Beagle Bone is off. Plug in the PSEye camera into the USB port on the bone. Now turn on the bone by plugging it in to a PC.
  • To run the program, run the following command. It will take a bit before the Listening on 9090 appears.
beagle$ node boneServer.js
Listening on 9090

The following message will pop up as well, but this is just a side not. Ignore it.

Option log level is not valid. Please refer to the README.

Your bone is now running a sever. To view it, on your web browser go to the following.

192.168.7.2:9090
  • From there you can have a picture taken, and can start placing FUN images on your picture. Start by pressing the take a picture button. A a few seconds, a new picture will pop up on the screen. Press the hat, sunglasses, and mustache buttons to add the corresponding features to the face.

Highlights

The user having fun with the Fun Face Cam


Watch our youtube video https://www.youtube.com/watch?v=nO4rIyi-xgw&app=desktop

Theory of Operation

We are using OpenCV to take and analyze pictures. This is running as a C++ application. We are also running a web server on the bone, which serves an HTML page to a web browser.

The HTML page and web server are connected together through sockets. Through these sockets commands are sent from the HTML page to take a picture which runs the C++ application, and through the same sockets data containing the location of the face is sent to the HTML page for place of our funny additions.

Work Breakdown

Completed: Setting up web page hosted on Beaglebone: Joe Militello

Pictures and Placement: Joe Militello

Setting up facial feature recognition: Tim Smith

Setting up sockets: Tim Smith

Sending Data from OpenCV to Sever: Tim Smith/Joe Militello

Documentation: Tim Smith/Joe Militello

Future Work

This project could be changed so that live stream video can be added. Instead of it taking a picture, it would live stream the video to the web browser.

Furthermore, the program could do live tracking, so when the face moves, the fun face elements would move along with it.

It is also possible to try and write a custom picture grabber, so that the pictures could be taken at 640x480, which is the maximum the Playstation Eye allows

Conclusions

Overall we are happy with the results of our project. We are able to take pictures from the Beagle Bone, upload them to a web sever hosted by the Beagle Bone, do facial recognition, and finally add funny elements to the picture.

If we were to do this again, we would try to add live video streaming to it. Furthermore we would add more fun elements to add to the picture.




thumb‎ Embedded Linux Class by Mark A. Yoder