-1

I would like to know if there is an option for getting a perspective for points that not inside the zone of the points I chose, for example - This is the src image with the selected 4 points B, O, T, U: enter image description here

This is the dst image: enter image description here

Now this is the wrap perspective: enter image description here

So we can see that points B, O, T, U are in the correct position, but the entire image is not, for example the ball. Any ideas of how to find the right perspective for the entire image?

Eliko
  • 1,137
  • 4
  • 16
  • 26
  • 1
    you have tp undistort the camera image to overcome lens distortion. It is better to choose four points which are further away from each other, to not extrapolate subpixel inaccuracies too much. – Micka Dec 05 '20 at 13:15
  • the problem here isn't lens distortion. the points are wrong. – Christoph Rackwitz Dec 05 '20 at 18:43

1 Answers1

-1

yes: correct your points.

your two fields don't match. look closely. they have the wrong proportions. that's what caused the distortion.

transformed from guessed points points where they should be

Christoph Rackwitz
  • 11,317
  • 4
  • 27
  • 36
  • What do you mean? correct me if I didn't understand you - the images the same sizes and I put the B, O, T, U (x,y) points manualy, so what did you do different? By the way - 1 different point, if it matters – Eliko Dec 06 '20 at 16:01
  • I placed two points elsewhere because the fields DO NOT have the same proportions. see the red dots in the model field I posted. – Christoph Rackwitz Dec 06 '20 at 17:37
  • Still don't fully understand why it's not the same proportions and how your points corrected it, is there an option you will post you code here? – Eliko Dec 06 '20 at 17:47
  • I mean the field marking are different. not the SAME field. different. – Christoph Rackwitz Dec 06 '20 at 18:01
  • What is the difference (except the x,y coordinates) between your dots to my? I will really appreciate if you will post you code here :) – Eliko Dec 06 '20 at 18:03
  • THAT is the difference. and it is the reason. and it needs to be matching. otherwise you get bad results. the code is just getPerspectiveTransform. I didn't use code, I used a GUI program that wraps OpenCV functions. it makes no difference. your camera view is NOT of the same field as that topdown picture. the scenes are DIFFERENT. they must be the same if this is supposed to work. it WILL NOT work if you give points that aren't in the same scene. – Christoph Rackwitz Dec 06 '20 at 18:07
  • Why your points are in the scene and mine are not? – Eliko Dec 06 '20 at 18:24
  • Let us [continue this discussion in chat](https://chat.stackoverflow.com/rooms/225591/discussion-between-eliko-and-christoph-rackwitz). – Eliko Dec 06 '20 at 19:19