Face Detection on the Raspberry Pi – Getting it working

Firstly for this section of the project I’d like to give a quick thanks to two enthusasts  without whom I probably wouldnt have gotten this far. They are:

Pierre Raufast

Emil Valkov

Both of these individuals have provided work for face detection on the raspberry pi using the camera board and whose work has been incredibly helpful in producing the system for this project.

Following on from my last post git should be installed on the pi and a new folder called “git” should have been made in the home directory. Firstly navigate to the new folder

cd ~/git

Now we need to install some libaries, first up is the userland libary – this is used to control the camera.

mkdir -p raspberrypi

cd raspberrypi

git clone https://github.com/raspberrypi/userland.git

cd userland

./buildme

That should have installed all of the userland libaries, next we need to install the raspicam libary which allows us to control the camera in C++.

cd ~/git

git clone https://github.com/robidouille/robidouille.git

cd robidouille/raspicam_cv

mkdir objs

make

With that we should now be able to control the raspberry pi’s camera board from C++. Now we need to add my code to allow us to detect faces and what not.

cd ~/git

git clone https://github.com/NeoMopp/emobot.git

cd ~/git/emobot/libfacerec0.04

cmake.

make

Now with that done we just need to build and run my code to let us detect faces.

cd ~/git/emobot/core_prog

make

./emobot_test

 

2 thoughts on “Face Detection on the Raspberry Pi – Getting it working

  1. David McAhren says:

    Hi,

    First of all, thanks so much for this tutorial.

    I’m running into a problem after ./emobot_test, with the error “/dev/ttyACM0: no such file or directory. Failed to connectConnect Keepon.”

    Also, the red camera light is on.

    I was hoping you could offer some guidance with this matter. I’m trying to incorporate this feature into a robot I’m building for school, and the deadline is fast approaching.

    • Profile photo of saw11239411 saw11239411 says:

      Hey there, Firstly I’m surprised someone is using my tutorials! I will be updating it soon with some additional information.

      Assuming your using the most up to date version of my code your going to have a do a little tweaking as the program is trying to connect to a Keepon Robot. Inside the Main.cpp file line 230 you need to comment out the following line.
      “thread action(sendAction); //start the Keepon Control thread”
      and you will also need to comment out:
      “action.join();”

      I think that should work. Lettme know if it doesn’t and I will take a look.
      Hope that helps :)

Leave a Reply

Your email address will not be published. Required fields are marked *

You may use these HTML tags and attributes: <a href="" title=""> <abbr title=""> <acronym title=""> <b> <blockquote cite=""> <cite> <code> <del datetime=""> <em> <i> <q cite=""> <strike> <strong>