Ask Your Question

Revision history [back]

Detect presence of moving ball in a time block

How to detect position of a moving ball in a video?
Camera position is steady for the duration of the video.

Looking for algorithm or approach. Currently tried:

  1. substracting frames from each other to find difference. (ball is present together with a bunch of other moving parts)
  2. Blur, canny, find contours, make convex hulls
  3. Assume anything with more than 5 points on the convex is a ball
  4. Doesn't work: too many other objects qualify (ie, people moving, birds, trees, w/e
  5. Ball is not round on video. It's a squashed ellipse in motion
  6. Ball movement leaves a trail of 'changed pixels' which are the background that's being uncovered
  7. Ball is not of a single color and not always present / visible