Here’s a first version for another webcam blob tracker in Java. It exports blobs as AWT Polygons and/or Areas (it detects dark spots in the blobs and extracts them).
I am planning on expanding it with shape, gesture and handwriting detection and interaction with Windows. For now, it’s just a nice example for when you want to develop your own multitouch code and it’s a lot more comprehensible than the other libraries.
There is a delay when there are lots of blobs, but that’s because of the Polygon drawing code, not the detection itself. The algorithm appears to be optimal for multitouch (although the implementation would of course be faster in machine code). It finds a transition from dark to bright or vice versa and walks around the blob in a clockwise fashion while gathering the coordinates of the edge. There is no CPU intensive blur involved to soften the edges; instead, pixels with 3 dark surrounding pixels are ignored.
You need Java 5 and JMF installed.
