Okay so i am trying to find homography of a soccer match. What i have till now is
- 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.
- Read video stream from a file and crop it into many smaller segments.
- Loop inside the images in video stream and inside that another loop for images that i read from folder.
- Now in the two images that i get through iteration , i applied a green filter because of my assumption that field is green
- 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.
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.