Back Projecting the Histogram

To get my Camshift implementation working properly, I needed to use a method called "back projecting a histogram" to create a probability map of skin pixels. Bradski's Camshift paper [1] doesn't describe this method. He included what I now believe is the original paper that presented it ([2]) among his references, but then didn't refer to that paper in the section on using the color histogram to create a probability image. In fact, his description implies that he does something quite different, namely use the model histogram directly as a probability lookup table. Doing that gave me poor results, however.

Using the method presented by Swain and Ballard, in [2], to create the probability image significantly improved tracking quality in my Camshift implementation. In this method, first the model and a search region the same size as the model are represented by their color histograms, M and I respectively. The next step is to compute a ratio histogram, R, defined as

It's this ratio histogram, not the model histogram, that's backprojected to create the probability image. Each pixel in the search region is assigned its histogram bin, i. Then, the value in the corresponding bin of the ratio histogram is taken as the probability that this pixel is an object pixel.

This method is a heuristic for emphasizing colors that have a large representation in the target object while demphasizing colors in objects other than the target. Conceptually, image pixels that correspond to a zero-count bin in the model histogram will be assigned a zero probability. If colors in the model's histogram tend to fall into just a few bins, any corresponding pixels in the image will have a probability at or near one. In between these extremes, the link to probability becomes rather murky, but in general bins with a higher count in the model will at least tend to give a higher assignment than model bins with a lower count.

 

References

  1. G.R. Bradski, Computer video face tracking for use in a perceptual user interface, Intel Technology Journal, Q2 1998.
  2. M.J. Swain and D.H. Ballard, Color Indexing, International Journal of Computer Vision, vol. 7:1, 1991.

 

Home | Face Tracking