A quick update on my recent discoveries.
I now have a Raspberry Pi Camera Board (Raspicam)!
There is a brilliant combo deal on at the moment allowing you to buy a Raspicam, Model A + 4GB SD card for about £35 (including VAT + shipping!)! That’s £35 for a device that can run OpenCV with a camera capable of 30fps at HD resolutions. I will leave you to think about that for a moment.
The downside is that the software is still not quite there. The Raspicam couples directly to the Raspberry Pi; this means it is not (at the moment) available as a standard USB video device (e.g. /dev/video0 on Linux). Now most Linux software and packages like SimpleCV work based on a standard USB video device. This means as of 24 October 2013 you cannot use SimpleCV with the Raspicam.
However, not to fret! The Internet is on it. I imagine that we will see better drivers for the Raspicam from the official development communities very soon. While we wait:
- There is an unofficial Linux Driver that maps the Raspicam to a USB video device. It can be found here: uv4l. A guide to using this and SimpleCV can be found here: link.
- I had trouble getting SimpleCV to work with this driver – I only got a 64×64 image that was taken when the Camera() object in SimpleCV was initialised. It may work better with Motion and other Linux applications.
- Hurray for ingenious Frenchmen!
- Pierre Raufast has done a brilliant job hacking the open source code for the official Raspicam tools to allow OpenCV to have direct access to the video feed from the camera. Not only that he wrote it up in a great 7 part guide that even I could follow.
- Building on Pierre’s work, Emil Valkov has produced a library of C functions that allows you to capture images from the camera in a similar way to the standard OpenCV functions. It is thus easy to start building machine vision projects, using the OpenCV framework, on the Pi and with the Raspicam. Simply follow the instructions in the ReadMe file from the source to set up, grab a book on OpenCV and off you go.
- [Plus Emil has a robot called Danger Monkey – I am in awe.]
WeMo and Python
As you will see from the previous posts I have been using IFTTT as a make-shift interface between my Raspberry Pi and my WeMo Motion detector and switch. This morning though I found a Python module that appears to enable you to control the Switch and listen to motion events via Python. Hurray!
The module is called ouimeaux (there is a French theme this week). Details can be found here: link.
Very soon I hope to adapt my existing code to control my Hue lights based on motion events (e.g. turn on when someone walks in the room, turn off when no motion). Watch this space.
One thought on “Hacker News Update: Raspicam & WeMo”