- Given video, track the ping pong ball across the screen.
- Build a robust algorithm capable of overcoming motion blur and adverse lighting conditions.
- From just one camera, estimate the ball's position in 3D space to allow for analysis of ball velocity and shot placement.
- Provide replay features and statistics.
(SwingVision provides similar functionality for tennis, we're building something similar for ping pong)
-
Filter location proposals
PingPongDemoVideo.mp4
To determine the position of the ball in 3 dimmensional space we count the height of the ball in pixels, then use the known size of a ping pong ball along with the focal length of the camera to apply the following formula:

While this theoretically allows us to calculate the distance to the ball to within a couple of inches, it also introduces a lot of noise into our data as a result of motion blur and variation in the tracking quality. As a result we need to apply robust smoothing and filtering in order to effecively use the data.
First points with distnaces with greater than 1.5 standard deviations from the mean are thrown out, as these generally are eroneous detections. Further data is filtered out with a hampel filter. Finally the data is smoothed.
Looking at the 2D data, we can identify when the ball flips direction on the x-axis (representing a hit) or changes direction on the y-axis (representing a bounce).
Red and green dots show where hits took place
Then curves are fitted to the remaining data to extract speeds from the hits (not the bounces).




