I’m trying to extract the rotation of images around the z-axis of the camera.
I want to rotate the image in the other direction to get a level horizon.
I’ve fetched the field computed_rotation using the API and converted the rotation vector to Euler angles using SciPy:
from scipy.spatial.transform import Rotation as R
rotation = R.from_rotvec(computed_rotation)
rotation = rotation.as_euler("xyz", degrees=True)[2]
The resulting rotation is close to ±180 degrees for many images, turning the image upside down.