This is a project on applying computer vision related techniques such as image stiching, blending, motion tracking and mapping to the problem set up of a football game, where a football game is taken from three cameras side by side with almost pure rotation between the cameras. This application accomplishes the task of stiching the three videos together and tracking of each single players in the field, and finally, a top-down view of the entire game is presented with statistic analysis and digital annotation of player performance (instant speed, distance run, average speed etc).
Homography mapping from one camera plane image to another camera plane image is established and used to stich the image frames together.
The final stiched football background after background extraction using moving average:
1. Lucas-Canade: Fails here since football players are not rigid objects and feature matching would be difficult and inaccurate here from frame to frame.
2. Background subtraction and find contours of the player, take the lowest point as tracking point: Fails as this approach could not handle well the case where the two players collide/overlap.
3. Camshift: Success! A color patch on the body of the football player is cut out and used to obtain the back projection image of the football field, which is further used as input for Camshift Tracker. Further, Camshift Tracker is compensated with a search window based on a maximum connected component of white intensity points in the current track window of the back projection image.
Take a look at an example tracker video (the tracked player is marked using the blue rectangle):
Top down view mapping:
Still, Homography is found to map the football plane from the camera image to a top down view. With this achieved, football player statistics are easy to calculate:
The final combined top down view and stiched video with offside lines: