Partly from http://www.cse.psu.edu/~rtc12/CSE598G/introMeanShift.pdf
Mean shift is an algorithm by iteratively moving the region of interest to the density center.
It can be used as a clustering algorithm (points from the same cluster should have same or close final destinations)
It can also be used for object tracing.
Two approaches exist.
1. Create a color “likelihood” image, with pixels weighted by similarity to the desired color (best for unicolored objects)
Computation of likelihood can be based on • color • texture • shape (boundary) • predicted location
Perform standard mean-shift algorithm using this weighted set of points.
2. Represent color distribution with a histogram. Use mean-shift to find region that has most similar distribution of colors.
Choose a reference target model. Choose a feature space. Represent the model by its PDF in the feature space. Calculate similarity function of the reference and its neighbors. To allow the similarity function to be smooth, mask the target with an isotropic kernel in the spatial domain. Find best candidate by maximizing a similarity function.