Ball Tracking with OpenCV
14/09/2015 · Figure 2: Generating a mask for the green ball using the function. As we can see, we have successfully detected the green ball in the image. A series of erosions and dilations (Lines 60 and 61) remove any small blobs that may be left on the, time to perform compute the contour ( outline) of the green ball and draw it on our frame: