2

enter image description here Given the similar soccer field image, First, I need to detect the midfield line (as I superimposed above) and more the merrier, I would like to learn the image projection for making the midfield line orthogonal evading the perfective distorion as if I am directly looking to the mid-field.

How can I apply those ideas? Any suggested method or code example is useful.

Currently I am detecting the sift features ans try to find a orthogonal line fitting best among the features assuming most of the feature detection coming from the field lines. This works good for some scenes but nor for all.

erogol
  • 13,156
  • 33
  • 101
  • 155
  • Is the camera moving around? What is the context of this? – Jiminion Jul 01 '14 at 19:01
  • Do you have lens information? I detect some distortion in far corner of field. – Jiminion Jul 01 '14 at 19:02
  • Camera is stationary and the image is still. I also have calibration parameters of the camera – erogol Jul 01 '14 at 19:05
  • I'd find the straight lines (as many as possible) and try to derive the affine transform to transform the image. The midline should come out of that. Advantage is that it uses much of the image to locate the midline, not just the midline itself, as you know the field is rectilinear. – Jiminion Jul 02 '14 at 06:33
  • Ok, fo instance I find the lines by HoughLine transform then what would you suggest to find that affine transform? – erogol Jul 02 '14 at 09:18
  • Well, that's the tricky part. Assuming you can find several lines and maybe a few intersections, that should be enough information to constrain the transform. (You also know the lines are mostly 90 degrees from each other.) Try to find a transform that fits with the least error possible. – Jiminion Jul 03 '14 at 07:25

1 Answers1

0

You can try to find lines and rounds with Hough transform, then find intersecting ones. Also may use some scene information, e.g this intersection should be approximately in the center of the image etc.

silver_rocket
  • 418
  • 1
  • 4
  • 15