The example below shows how to calculate the exterior orientation parameters (location and orientation angles) for the camera in the georeferenced chunk:


import Metashape

chunk = Metashape.app.document.chunk #active chunk


camera = chunk.cameras[0] #example for the first camera in the chunk.

estimated_coord = chunk.crs.project(chunk.transform.matrix.mulp(camera.center)) #estimated XYZ in coordinate system units

T = chunk.transform.matrix
m = chunk.crs.localframe(T.mulp(camera.center)) #transformation matrix to the LSE coordinates in the given point
R = (m * T * camera.transform * Metashape.Matrix().Diag([1, -1, -1, 1])).rotation()
estimated_ypr = Metashape.utils.mat2ypr(R) #estimated orientation angles - yaw, pitch, roll

estimated_opk = Metashape.utils.mat2opk(R) #estimated orientation angles - omega, phi, kappa