1 | initial version |
For line detection, try adaptiveThreshold and then find lines with HoughLines. For perspective correction, you need to mark 4 points which relative real-world location you know and calculate homography. Finding 4 corners of half of the football field or the goal area would be good enough, but with this angle of view it will be quite unreliable.