Ask Your Question

Camshift Tracking Tuning

asked 2013-07-07 03:58:48 -0500

sachin_rt gravatar image

Can anybody help me understand the Vmin , Vmax and S min thresholds in the camshift Demo ?

edit retag flag offensive close merge delete

1 answer

Sort by ยป oldest newest most voted

answered 2013-07-08 02:51:54 -0500

updated 2013-07-08 02:55:51 -0500

Take a look at this post:

Camshift uses a combination of colors to track faces. In the representation that Camshift uses, color is undefined for pixels that have a neutral shade (white, gray, or black). Color can be computed for pixels that are almost neutral, but their color values are unstable, and these pixels contribute noise that interferes with tracking.Camshift uses two parameters - smin and vmin - to screen out this noise. These parameters define thresholds for ignoring pixels that are too close to neutral. vmin sets the threshold for "almost black," and smin for "almost gray." These two threshold levels will need to be adjusted for your setup to get good results with Camshift. Camshift also uses a third parameter, called vmax, to set a threshold for pixels that are too bright. But smin has the side effect of also eliminating pixels that are close to white, so you shouldn't need to tweak vmax to get good results.

The easiest way to select good values for your setup is with sliders and see what is happening with the backprojection view image

And take a look at: How OpenCV's Face Tracker Works

edit flag offensive delete link more


I have seen that but didn't understand it If a pixel is not too close to neutral or its color is well defined , How should my S min , V min be to ignore such a color ?

sachin_rt gravatar imagesachin_rt ( 2013-07-08 03:26:27 -0500 )edit

Question Tools


Asked: 2013-07-07 03:58:48 -0500

Seen: 765 times

Last updated: Jul 08 '13