Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Homography of soccer field

Okay so i am trying to find homography of a soccer match. What i have till now is

  1. Read images from a folder which is basically many cropped images of a template soccer field. Basically this has images for center circle and penalty lines etc.
  2. Read video stream from a file and crop it into many smaller segments.
  3. Loop inside the images in video stream and inside that another loop for images that i read from folder.
  4. Now in the two images that i get through iteration , i applied a green filter because of my assumption that field is green
  5. Use orb to find points and then find matches.

Now the Problem is that because of players and some noise from croud, i am unable to find proper matches for homography. Also removing them is a problem because that also tends to hide the soccer field lines that i need to calculate the homography on.

Any suggestions on this is greatly appreciated. Also below are some sample code and images that i am using.

"Code being used"

Sample images

Output that i am getting

The image on right of output is a frame from video and that on left is the same sample image that i uploaded after filterGreen function as can be seen from the code.

Finally what i want is for the image to properly map to center circle so i can draw a cube in center, Somewhat similar to "This example" . Thanks in advance for helping me out.

like image 670
georoot Avatar asked Apr 11 '16 06:04

georoot


People also ask

What is a soccer venue called?

The entire soccer field is also called the pitch.

What are the parts of a soccer game?

A football match consists of two halves and each half is 45 minutes long. Between the two halves, there is an interval, which is not more than 15 minutes long. Stoppage time (also called injury time) is the time added on at the end of each half at the discretion of the referee.


1 Answers

An interesting technique to throw at this problem is RASL. It computes homographies that align stacks of related images. It does not require that you specify corresponding points on the images, but operates directly on the image pixels. It is robust against image occlusions (eg, players moving in the foreground).

I've just released a Python implementation here: https://github.com/welch/rasl (there are also links there to the original RASL paper, MATLAB implementation, and data).

I am unsure if you'd want to crop the input images to that center circle, or if the entire frames can be aligned. Try both and see.

like image 162
welch Avatar answered Sep 30 '22 13:09

welch