I am trying to access camera yaw pitch and roll estimated values (as appear in GUI reference pane)
To get the transformed camera position I am using the following code:
chunk = Metashape.app.document.chunk
camera = chunk.cameras[2]
transform = chunk.transform.matrix * camera.transform
# this works as expected, values are matching those in reference pane
pos = transform.translation()
rot = transform.rotation()
# this is not working, expected values are 93.583, -0.937, -44.785, outputted values are 273.58297001960716, 1.784351814162492, -135.21509554607456
ypr = Metashape.Utils.mat2ypr(rot)
I can do this using external libraries, but thought there would be a way to do this inside of metashape. This issue is persistent over different documents