LibCV - alternative video capture for Processing
About
Reliable support for video capture in Processing seems to be still problematic due to the combined shakiness introduced by QT4Java, WinVDIG and QuickTime 7. Urgently needing a reliable capture facility and not having had time to dive into the depths of the QT4Java API myself, trying to figure out where things are going wrong in combination with Processing, I decided to get my head around Sun's Java Media Framework (JMF), in order to get live video into my project.
Features
- JMFSimpleCapture object is JMF based (should be x-platform, but only tested on Windows). It allows listing available capture devices and their supported formats. It doesn't support bringing up a device's control panel though, nor does it handle auto-detection of a default device (yet).
- LibCV is a semi-independent library for handling basic computer vision tasks, like background learning, background subtraction, difference images and keystoning (perspective correction). In future there'll be also a few useful filters thrown in, which are already written but I need to restructure my packages first. Technically, LibCV is not dependent on JMF since it only requires an implementation of a generic java interface for which one could write very simple wrappers. On the other hand JMFSimpleCapture is the only such implementation existing at current! ;)
Documentation
Relatively detailed Javadocs for most methods are included in the download, but please remember this is the initial release, so there's not that much to see yet and some concepts probably need far more explanation.
Examples
Even though applets using this library could be exported and run online on user machines with JMF installed, there's currently one major issue being it's quite involved figuring out the default video capture device and its best capture format, all on-the-fly... So I don't expect these examples to run on your machine, but at least you get to look at the source to get a feel for the library.
I also admit these examples don't really do any justice to some of the features, but due to time constraints this is as good as it gets at the moment. Please see the javadocs for descriptions of some more interesting features.
Important: In any case you'll need to have Sun's JMF installed to run those applets. See below...
Downloads
- version 0.1: initial release - link (49KB)
To install, simply unzip the archive into the "libraries" folder of your Processing installation and restart Processing. The distribution contains all source code and Javadocs.
Requirements
The library requires the Sun Java Media Framework to be installed prior to using. The library has only been tested with Java1.5.0_06 under Windows XP in both Processing-0115 and Eclipse 3.1. Cameras tested: Philips ToUCam, Creative Vista Plus
Troubleshooting
Make sure your camera is connected to your machine when installing JMF. You'll need a device descriptor string for each capture device. Sometimes (on some machines) JMF doesn't seem to recognize your device even though the correct descriptor is used. In these case, try to unplug and replug your device and/or launch the JMFRegistry application and choose "Detect capture devices" to revalidate.Credits / License
Copyright © Karsten Schmidt 2006 < contact >This library is Free software and is released under the GNU Lesser General Public License.