1

I have a camera and I want to identify specific points in the world with it. I want it to be the more precise as it can be. I tried to convert to (x, y, z) using the answer in this: Lat Long to X Y Z position in JS .. not working. But the thing is, I don't know how to affect the camera angles (yaw, pitch, roll) with the curvature of the earth, so it gets kind of weird. So I was thinking of converting it to a flat 3D representation and convert altitude, latitude, and altitude without the curvature of the earth to (x, y, z) so that I can see all the points in front.

Is this a good idea? If not, how can I affect the angles of the camera depending on the position in the world so that I always have the right perspective from the camera?

Jonathan Leffler
  • 730,956
  • 141
  • 904
  • 1,278
Gonçalo
  • 144
  • 11
  • This looks more like a mathematical/geodetical problem, rather than a programming problem, doesn't it? If you do not track camera movement (yaw, pitch, roll) you will have to assume that it always looks down in nadir (oberservation zenith angle = 0°). Also I do not quite get what you want to convert exactly. What does the camera deliver as output? – offeltoffel Jul 10 '17 at 09:31
  • It is a programming question, I need help in a python environment using opencv. I do track the angles of the camera but relative to the camera, not to the entire world. The camera is always tangent to the world and presents the points in screen, as accurate as they can be. – Gonçalo Jul 10 '17 at 09:36
  • The camera should always be tangent to the world* – Gonçalo Jul 10 '17 at 10:00

1 Answers1

0

You can use this python library https://pypi.python.org/pypi/nvector, which also adheres to the WGS84 standard. It will convert lat long to x,y,z coordinates.

wgs84 = nv.FrameE(name='WGS84')
wgs84.GeoPoint(latitude=latitude, longitude=longitude, z=1, degrees=True)