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).
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 🙂