Here is an update to my machine vision pursuit:
There are a open source java classes to do various grunt work, but I didn’t find anything to fit directly into my application. I didn’t even find compelling demos.
One night I discovered an Apple app called “Quartz Composer.” It’s a gem hidden in the 10.4 Developer tools. If you have a Mac you definitely want to look into this.
Quartz Composer (QC) is a graphic based programming environment, so you drag an image source and a filter and connect them graphically, and then drag that output to somthing else. No coding. Ridiculously simple.
I was quickly able to take the input from my iSight camera and run it through a decolorizing filter, and then add color back to the object I wanted to track (a blue ball). Changing the parameters of some filters is pretty straight forward.
What you save is a .qtz file.
If qtz files ran only under “Quartz Composer” they would be a novelty at best. However, these qtz files are used for Quicktime movies, Screen Savers, iMovie filters, web page motion graphics, etc… The Mac OS is using them with the interchangability you’d expect from a jpeg.
I was also able to use the qtz file as a resource in my own custom Application (like you would any picture resource) and also direct numbers from the qtz processing into fields. Those numbers could then be used to position servos and constitute the basis for Robotic Vision Tracking.
Below is a simulation demonstrating where I want to go with this.
http://www.gravitypublishing.com/movies/Blob_Trac_Sim.png
Blob Tracking Simulation
This simulation actually uses my iSight and a Quartz Composer filter to change everything to B&W except the blue ball. I then overlayed the text, tracking brackets and numerics in Motion.
I turns out that the QC “Filters” themselves can’t return numerics since they render on the GPU. QC “Patches” are the components that return numbers. The trick is to make a custom patch for Quartz Composer that will return an X,Y value, based on center of the colored blob.
I have found a tutorial on how to create a custom QC patches in Apple’s X Code, which can use modules programmed in Java. So now
I’m boning up on Java, so I can try to utilize some of the open source code and hopefully get my Robot to track a visual object.