Incorrect world-to-camera matrix with euler angles (yaw, pitch, roll)

16 Views Asked by At

I have a DJI Mavic 3M drone where I shoot images of the ground. For further processing, I need to obtain the world-to-camera transformation matrix. The drone saves the yaw, pitch and roll angles for both the drone and the gimbal. Since the camera is attached to the gimbal, I only use the euler angles of the gimbal.

However, using scipy's Rotation object, I obtain an incorrect rotation. The way how I checked that the rotation is incorrect is by feeding all the drone images to OpenDroneMap and obtain the world-to-camera rotation from the reconstruction.json file.

In scipy then I just call Rotation.from_euler("zyx", [yaw, pitch, roll]) to obtain the Rotation object.

The euler angles I obtained from OpenDroneMap are: z: -2.25155729 y: -0.30835846 x: -179.96534315. The euler angles of the gimbal that the image data shows me are: z: 0.70 y: -89.90 x: 0.00.

What is the usual way of constructing the world-to-camera matrix when I have the origin point of the camera in world coordinates and the yaw, pitch and roll angles?

0

There are 0 best solutions below