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