Converting world coordinates of detected objects to GPS coordinates (UTM)?


In my project, the goal is to get the GPS coordinates of the objects detected by the camera. For this, I have integrated a GPS with the Zed 2 camera. The GPS and camera are mounted and fixed on a rugged base where there is a fixed/known distance (only in the Z direction in the image coordinate system) between the GPS antenna and the left lens of the camera. The GPS reads the coordinates in UTM, so it’s already cartesian. I can also get the word coordinates of the object detected using the ZED SDK.

I was wondering given this camera-GPS setup, what is the most logical way I can use to convert the world coordinates of the detected objects to GPS coordinates?

Thank you

Hi Thomas,
the coordinates of the objects are in a reference system having the origin in the center of the left camera sensor.
If you know the “bias” transformation between the left sensor and the GPS sensor antenna, then you must simply apply that transformation to the objects’ coordinates to obtain their cartesian coordinates.

I suggest you set the COORDINATE_SYSTEM value in InitParameters to the same system used by the GPS:

1 Like


I am working in a similar issue, we know the geographical position of the camera and we would like to test the ZED localization feature to geolocate objects.

As I mentioned here, I think this operation involves a linear transformation and then a vector translation applied on the detected points. The linear transformation handles the difference between the x and y axis of the camera (world frame reference) and the x - y geographical axis. Then a vector translation needs to be applied to handle the change of origin, from the original location of the camera when launched to the actual GPS location at that time.

Myzhar I do not understand what you mean by using the same CRS as the one of the GPS, as this is not an available option in the ZED SDK, and i think it would not be available anyway because the camera cannot locate the north direction

this would be done in a UTM CRS to make things more simple (similar cartesian coordinates).

The zed sdk can compute the north orientation (magnetic_heading, its not super accurate though), but i dont think its used to determine the axis.

The positional tracking module can be initialized with a known position/orientation.
If you set it by using the Cartesian reference system (XY) then you can retrieve the camera position in that reference system step-by-step.

Here the problem is that the camera returns the orientation with respect to the MAGNETIC North, that you know is not the same as the GEOGRAPHICAL North.
Since you know the GPS coordinates of the system you can manually fix that information: