Thresholded Tennis Ball Detector Python