Work In Progress: Mean-shift tracker

2009 February 09

I've been trying to come up with an efficient visual tracking system to complement deface (I actually got deface based tracking to about 20fps on a 160x120 bitmap, but with occasional .7fps burps). I've been exploring the new histogram method of bitmapdata as a basis for a mean-shift tracker. I've still got to put in kalman filtering and proper kernel weighting (which will negate a lot of speed in favor of accuracy. :( ).

BitmapData.histogram does not give a true histogram. It gives 4 single channel histograms. It's still working remarkably well since the histogram method is so damn quick. To combat noise, I use a PixelBender filter to reduce the color depth, essentially turning 256 bins into 16. Histogram values are used as weights in a classic mean-shift algorithm, and I'm getting around 100fps (in some conditions) with decent accuracy, depending on the tracked object vs the background.

It actually seems to work very well with skin and faces, and when the target has more or less unique colors.

Anyway, here it is, have fun and play around. No source on this one yet, as there's a lot left to be done.

Related tags: deface, tracking, webcam

privacy policy
Sponsored links