3

We have a 10x5 rectangle than match a 1000m x 500m field in real life. The field's orientation is horizontal (floor).

So we get a quadrilateral where 1 virtual unit = 100 units in real world and four 2D corner positions (A,B,C,D)

How can I find the XYZ plane's position and rotation if :

camera.position:(0,10,0) and

camera.rotation(0,0,0) ?

The goal is to place the plane in 3D space as the perspective matches exactly the 2D image.

I think it's related to pnp problem (additional informations here)

(You can imagine the use case of a soccer field, if I have the four xy position of the four corner, ABCD, how can I place a plane in an AR app to match and track the field)

enter image description here

enter image description here

  • 2
    Is your camera calibrated, i.e., do you know it's focal length, radial distortion, principal point? If so, take a look at Camera Pose Estimation, you should find a solution to your problem. You are right, PnP is a family of methods that achieves what you want. – Gilles-Philippe Paillé May 03 '19 at 15:36
  • see [Transformation of 3D objects related to vanishing points and horizon line](https://stackoverflow.com/a/53303948/2521214) you can use field+lamps as one plane and the Lamps as another one ... and rail behind rail as another – Spektre May 04 '19 at 06:38
  • Have you figured this out? Are the coordinates of the camera (camera center I am assuming) at the point (0, 10 , 0) in a 3D coordinate system XYZ? Does "rotation (0,0,0)" mean that the Euler rotation angles of the camera with respect to the 3D coordinate system are all zeros (i.e. the coordinate systems of the camera and the XYZ have parallel axes)? This problem has a solution, but it is a bit lengthy and based on a bit of fun 3D geometry. Would you need just a recipe or would you need explanations too? I just want to be sure if I decide to write an answer, it is not going to be in vain. – Futurologist May 06 '19 at 18:45
  • Thanks Gilles-PhilippePaillé and Spektre for your advices. In my problem I have only one rectangle, not two, because it has to be applied on different football pitch (but all same size). @Futurologist Thanks for your proposition however I finally decide to take an other approach for the specific use case I have, you can still write an answer for the next ones in the same problem For the camera yes I meant (0,0,0) from Euler, default settings from A-Frame and Three.js. Have you checked the link in the first post "additional information", is it the direction you would take to resolve it ? – bastiensarolea May 07 '19 at 21:01

0 Answers0