Tracking an Object Based on Color in OpenCV

In this lesson I describe how to track an object in OpenCV based on color. We use the HSV color space to make it simpler to train the model. Below, for your convenience, we include the code we develop in this lesson.