MeanShift and CamShift
What we learned until now in this chapter, apart from the use cases that we already saw, was meant to prepare us for correctly using the and CamShift algorithms, since they extensively benefit from histograms and back-projection images. But what are the and CAMShift algorithms?
Let's start with the MeanShift and then move on to CamShift, which is basically the enhanced version of the same algorithm. So, a very practical definition for MeanShift (as it is stated in the current OpenCV documentation) is the following:
Finds an object on a back projection image
That's quite a simple yet practical definition of the MeanShift algorithm, and we are going to stick to that more or less when we work with it. However, it's worth noting the underlying algorithm, since it helps with using it easily and much more efficiently. To start describing how MeanShift works, first, we need to think about the white pixels in a back-projection image (or binary images in general) as scattered...