Back in the day, if one wanted to do a computer vision or diy home surveillance project which involved taking pictures from a custom software program (or from the command line), there were relatively few options. One the low end, you could use a consumer webcam. On the high end, you could use a DSLR camera coupled to a Linux program like gphoto2.
The low end was maddening, as consumer webcams routinely lie about their resolution. That Logitech webcam which promises 12mp still images? Surprise! The sensor is actually only 2 megapixels. The extra ten are added through some trickery called “software interpolation”, where the camera’s software basically makes up extra pixels and adds them into the image to boost its resolution. That works fine when you’re Skyping home to see your cat, but for computer vision projects and diy home surveillance systems, it makes the images basically useless. I did one computer vision project where I had to buy 5 different webcams before I found one with a halfway decent native resolution, and even then the best model maxed out at 3mp.
On the high end, things were just crazily expensive. Gphoto2 does a fantastic job of controlling a DSLR camera like the Canon Digital Rebel over USB, but who wants to spend $320 just to tinker with remote camera control? And while DSLRs are great for some applications, they’re not exactly easy to mount on a robot or outside your door for diy surveillance.
That’s why I was really excited to discover the Raspberry Pi camera module. The module has a native 5 megapixel CMOS camera (ie one that doesn’t lie about its optical resolution) mounted on a bare circuit board. It connects directly to the Raspberry Pi via its built-in camera interface. Once you connect it up, you can easily take still photos and even 1080p video via the command line, or from within your own software. Raspberry Pi has a great page about the module here. And the best part? It costs about $30 bucks on Amazon.
I ordered one today. Once it arrives, I’ll put it through its paces and post about the results.