Congratulation !, you’ve got your new rasperry pi camera ! Isn’t-it cute ?
But after first try, you discover that it’s not an usb-webcam. 😦 Thus, OpenCV doesn’t work natively. (forget cvCaptureFromCAM for example and all your wonderful apps you’ve thought up !)
However, some nice apps (such as raspivid or raspistill) controls the pi camera using MMAL functions.
The idea is to modify source code of such apps, use buffer memory of the camera to feed OpenCV image objects. Pretty easy (said like that).
WARNING : Many people have problem installing software (step 3 below). TO PREPARE YOUR RPI, PLEASE FOLLOW STEP 2 and STEP 3 OF PREVIOUS ARTICLE (Magic Mirror) : https://thinkrpi.wordpress.com/magic-mirror/
This could be done in 7 steps, because of 7 :
- step 1 : install csi webcam
- step 2 : installation and compilation of userland-master (including mmal and raspicam tools)
- step 3 : create your own project
- step 4 : link with OpenCV libraries
- step 5 : basic use of OpenCV and Pi camera : display an image from camera
- step 5.5 : use many snapshots to emulate a video (slow)
- step 6 : capture video within OpenCV window !
- Step 7 : Face recognition (magic mirror release 2 🙂
- Step 8 : Use an API/library to make it easier !
- Step 9 : Use a collection of 40 male faces for better recognition
Enjoy !
As soon as the Camera Modules are back in stock, I am going to go through this code and tutorial! Thanks!
Thank you!!! I shall try it out soon! 😀
Pingback: OpenCV and Pi Camera Board | Raspberry Pi Wonderland
Remarkable grasp of the little Pi.
Could you please direct your piercing gaze to the seeingwithsound dot com site, wherein The vOICe provides rudimentary sight replacement for a great variety of blindness.
My quest is to enable The vOICe, or perhaps a useful portion of it, to run on the Pi.
At present, the Rikomagic 4.2 Android stick is the favourite for experiments.
The Pi has much lower price and lower power consumption, and could IMHO deliver a street- suitable, replaceable, wearable platform .
This is brilliant – I got the camera and model A but was stuck on how to access the image data. Without your hard work documenting the steps I would be lost. Now for some OpenCV fun!
Merci beaucoup!
Pingback: Hacker News Update: Raspicam & WeMo | Robotic Ape
Thanks for the brillant tutorial! Is there a way to use this solution in a python script (e.g. in python call a function which starts the cam with opencv and gives me some analysed data back?)
Pingback: week notes – (2/12) | geekyoto
Pingback: Smart Kegerator | Phil's Project Blog
Thanks for your code and tutorial! Using your guide I was able to integrate facial recognition into my “SmartKegerator” Qt app that log pours from my kegerator! Source available here: http://philsprojects.wordpress.com/2014/03/10/smart-kegerator/
Pingback: Jordan Reed's Capstone Blog
This error is appeared after updated my raspberry pi
/usr/bin/ld: CMakeFiles/camcv_0.dir/camcv_vid1.cpp.o: undefined reference to symbol ‘sem_init@@GLIBC_2.4’
//lib/arm-linux-gnueabihf/libpthread.so.0: error adding symbols: DSO missing from command line
collect2: ld returned 1 exit status
CMakeFiles/camcv_0.dir/build.make:169: recipe for target ‘camcv_0’ failed
make[2]: *** [camcv_0] Error 1
CMakeFiles/Makefile2:63: recipe for target ‘CMakeFiles/camcv_0.dir/all’ failed
make[1]: *** [CMakeFiles/camcv_0.dir/all] Error 2
Makefile:75: recipe for target ‘all’ failed
make: *** [all] Error 2
Can you please help? thanks
Hi, I am facing a problem while installing facerec library in install face recognition API step 3.2. when i try to install it showing
$sudo make
/home/pi/libfacerec-0.04/src/lbp.cpp:In function ‘void cv :: elbp_(cv :: InputArray, cv:;OutputArray, int , int)’;
regards,
ravishanakarkm
I am kind of doing the same but with python and larger eyes. How exactly did you figure or calculate how the eyes should move. Did you use center as reference?