Here are the results so far for my color/motion tracking project. Turns out that you don’t have to use a difference filter when tracking colors. All you basically have to do is isolate a color range using multiple thresholds. Then run getColorBounds to get the coordinates of the color blob. The one thing I do have to add is blob detection, but with vibrant colors I don’t seem to need it.
Click on the image below to launch the swf. You can use the sliders to adjust the image for your lighting conditions. Click on one of the boxes to assign the colors to the channel. Check out my blog post prior to this one to see where I did most of my research. I’ll release abstracted code after the project is complete.
UPDATE: Source code now available here!

6 Responses
By Og2t on Oct 14, 2009 | Reply
Wow, nice approach! Works really well, never thought that increasing saturation and contrast would give such results for skin tones. Well done, I would use your approach in my HiSlope toolkit if you don’t mind.
By admin on Oct 15, 2009 | Reply
Thanks Og2t. Go ahead! I’d love to check it out when your done.
I’ll post the source code for a simpler version of this in a bit.
By sthorson on Oct 27, 2009 | Reply
Hey, this is great, I’ve been looking around for examples of good color tracking apps, and this is the best I’ve seen. I’d love to see the source.
By admin on Nov 19, 2009 | Reply
Source is now available. See blog post for link.
By theoN on Mar 2, 2010 | Reply
Man you’re my hero! I’ve been looking for ages, I’ve been struggling with thresholds and blendmodes for atleast 2 days now. Only things I found were in AS2 and I’m definately not going back to that. Really awesome job, just what I was looking for. I’m going to try and include simple gestures into this so I can control the interface with webcam.