OpenCV powers a multitouch interface, built in openFrameworks. Project by / photo (CC) Todd Vanderlin.

When Thanksgiving rolls around, OpenCV will be one of the gifts for which I’ll be thankful. OpenCV is a “computer vision” library, capable of tracking motion and analyzing images, but generally useful as a pixel-crunching video library for many tasks. It’s a native, C/C++ library, accessible from many other languages, including Java and Python. Experienced C++ programmers and artists dabbling in Processing alike can use it. (See our Processing tutorial.) It’s also a real success story for open source code, first developed by Intel but heavily developed by researchers and artists ever since. And it’s a success story for the permissive BSD License, used in everything from academic work to commercial projects.

I’m happy to have a few bits of really good news on the OpenCV front.

OpenCV 2.0: Vision improved. OpenCV itself has taken a massive leap forward this fall with version 2.0. The library is smarter, faster, leaner, and easier to use. You can program with Python instead of C++. And even if your programming skills are moderate, this should mean lots of new features that will filter into other OpenCV-based libraries. Among the 2.0 features already rolling out in pre-release versions:

  • Loads of new object detectors and descriptors, including a 3D feature descriptor, self-similarity, new abilities to detect objects and people
  • Faster and smater algorithms, and more samples to learn how to use them
  • A new Python interface
  • All-new, cleaner C++ interface
  • Easier installation, easier builds on different platforms, and easier integration with IDEs like Xcode, Eclipse, and CodeBlocks
  • Subversion for access to code
  • Stereo camera support on Linux

Check out the changelog. And to get started, learn how to use the thing, and download OpenCV, see the wiki:

http://opencv.willowgarage.com/wiki/

A video application for Android (this one’s actually doing live streaming, but you get the idea). Photo: tomsun.

Computer vision on Android: The other news is that, thanks to Google’s growing support for native code (finally), OpenCV is coming to Android. With OpenCV doing the geeky pixel crunching behind the scenes, you’re free to write some fairly straightforward Java to make vision-enabled mobile apps – or simply use OpenCV for high-performance pixel processing.

You can check out the project on GitHub:
http://github.com/billmccord/OpenCV-Android

This is an early build, so expect some wrinkles. But there are already some handy tools for getting started. There’s a video emulator, so if you don’t yet own an Android because you’re waiting for the better devices coming out in the next few months (smart), you can still get going. And there’s even some basic sample code for testing with face tracking.

If I’ve fired up your appetite, and you’re not sure where to begin, there is an excellent book on the topic, called – aptly enough – Learning OpenCV. It came out last fall, and so doesn’t include all the 2.0 features, but the basic functionality is the same.

So, would anyone like to start a little user group to work on this stuff? Say so in comments, leave your real email (it shows up for CDM admins, but not publicly), and we’ll get something rolling.

Tutorials from CDM on OpenCV:

Processing Tutorials: Getting Started with Video Processing via OpenCV
OpenCV Motion Tracking, Face Recognition with Processing: I’m Forever Popping Bubbles

…and because Linux is a terrific development platform you can boot into on any Mac, PC, or netbook, check out my rundown of getting OpenCV working on Ubuntu.