10/12/2010

Motion tracking using Java

Motion Tracking
Motion tracking is the process of locating a moving object (or several ones) in time. An algorithm analyses the video frames and outputs the location of moving targets within the video frame.
The main difficulty in video tracking is to associate target locations in consecutive video frames, especially when the objects are moving fast relative to the frame rate. Here, video tracking systems usually employ a motion model which describes how the image of the target might change for different possible motions of the object to track.
The role of the tracking algorithm is to analyze the video frames in order to estimate the motion parameters. These parameters characterize the location of the target.

Libraries to Implement Motion tracking
OpenCV
It’s a relatively easy thing for computers to “see” video, but “computer vision” goes a step further, applying a wide range of techniques by which computers can begin to understand and process the content of a video input. These techniques tend toward the primitive, but they can also produce aesthetically beautiful results. The best place to start with computer vision has long been the standard library, OpenCV. A free (as in beer and freedom) library developed by Intel and with ongoing use in a variety of applications, OpenCV is a terrific, C/C++-based tool not just for things like motion tracking, but video processing in general. OpenCV gets a lot of support in the C++-based OpenFrameWorks, but that doesn’t mean Java and Processing have to be left out of the fun. (In fact, I’d still recommend starting with Processing for OpenCV, because other tasks remain easier in Java.)
For details, refer -
• http://createdigitalmotion.com/2009/02/06/processing-tutorials-getting-started-with-video-processing-via-opencv/
• http://en.wikipedia.org/wiki/OpenCV

JMyron
JMyron (aka WebcamXtra) is an external library for Processing that allows image manipulation without having to hard code everything. This is great because we can extend what we saw in the Video Library tutorial and add other aspects to it like motion tracking and color tracking. To use JMyron, you have to download the JAR and put them in the path/to/Processing/libraries folder. You must then import the library in each Processing sketch where JMyron objects will be used.
For details, refer –
• http://webcamxtra.sourceforge.net/
• http://www.silentlycrashing.net/p5/libs/jmyron/

Using JMF
The Java Media Framework API (JMF) enables audio, video and other time-based media to be added to applications and applets built on Java technology. This optional package, which can capture, playback, stream, and transcode multiple media formats, extends the Java 2 Platform, Standard Edition (J2SE) for multimedia developers by providing a powerful toolkit to develop scalable, cross-platform technology.
Java with JMF can be used to implement a motion detection engine.
For details, refer –
• http://java.sun.com/javase/technologies/desktop/media/jmf/2.1.1/solutions/JVidCap.html
• http://www.darnok.org/programming/motion-detection/

0 comments:

Post a Comment