Saturday, March 28, 2009

Video woes in a JVM world

To aid in the development of OpenJCV's streaming video display capability, I am using a few low-cost webcams. Initially, I planned to use Java's JMF library, but it turns out many webcams do nut work with the library. Next, I turned to a JMF third-party, open-source spin-off called FMJ (surpassed on Google only by Wikipedia's definition for "Full metal jacket"). Admittedly, I only spent a night trying the library with my two webcams, but it didn't work.

What's the solution? Here are the two with which I'm OK:
1) Require the user to add, as an argument, the command for capturing an image from the desired camera. This assumes the user has a program to grab individual frames, store them somewhere on their computer, and manage access between the frame grabber and OpenJCV.
2) Create my own C++ frame grabber to do all of the above. This takes the pressure off the user, but makes things a little less platform independent-- I'll have to find out which platform the user has and do different things for each...

For now, I'm going to implement option 1. Later (6 months to a year), I'll implement option 2.

No comments: