This is the fourth iteration of this project. The first iteration was manual entry, where ball locations were collected with mouse clicks. The second iteration used Hough Circle Transform to find all circular objects. The third iteration used contours and thresholding.
I have achieved perfect tracking accuracy with 5 balls; but, I used several bright lights, bright tennis balls, black clothes, and a black bedsheet to achieve maximum contrast. The video was shot in 480p120fps with a vertical frame.
High throws and ball in hand detection still present problems. Upgrading from 480p30fps to 720p60fps has helped tremendously, I expect similar effects as (not so much resolution) frame rate increases. I used a $100 Garmin Virb action camera, but $400-range action cameras are capable of 1080p240fps which is absolutely amazing.
Work will continue forever. Plans include tracking the balls on multiple features, like color, shape, and contrast, in effect, combining all previous iterations of my ball tracking program into one super robust one.
by Stephen Meschke, in response to this post 2015-07-28 13:41:35