Xavier Hinault recently released a new computer vision library for Processing, based on JavaCV and OpenCV 2: JavacvPro. This is a great contribution to the community, since it appears that the development of the original OpenCV library for Processing has stalled, without moving beyond OpenCV 1.0 support. JavacvPro is based on the very solid JavaCV wrappers by Samuel Audet, which provide access to the latest version of OpenCV (2.3.1 at the time of writing this), and in fact also allows to use other computer vision frameworks like OpenKinect, and ARToolKit. I did some testing of JavacvPro (version 0.3) on Windows, Mac and Linux, and the results are very promising as I was able to use the library on the three platforms. Xavier has also included many examples in the library package that show how to use it various features.
The basic requirement to use JavacvPro is to install OpenCV 2.3.1. The installation process depends on the platform, fortunately there are several online resources to figure this out. What I found is the following:
- Windows installation from pre-compiled binaries: http://code.google.com/p/javacv/wiki/Windows7AndOpenCV
- Linux install from source: http://www.mon-club-elec.fr/mes_docs/docs_opencv/ma_doc_opencv_install_opencv_ubuntu.pdf
- MacOSX (also from source): http://opencv.willowgarage.com/wiki/MacosxInstallGuide
On Windows and Linux, I used the latest stable version of Processing, 1.5.1. However, on MacOSX the library only works with Java in 64-bit mode, which is supported in the latest alphas of Processing 2.0. I tested it on 2.0.a4, changing the “Launch programs in” option to 64-bit in the Preferences menu:
The homepage of JavacvPro also has several videos (in French) demonstrating different use examples, like this one for finger detection: