Hi,
by default the camera angles reference accuracy is set at 10 degrees for Yaw Pitch and roll which is very loose.
If you know your system YPR or just roll to be more precise you can change the default values by following ( for example first camera in chunk):
camera = chunk.cameras[0]
camera.reference.rotation_enabled = True
camera.reference.rotation_accuracy = Metashape.Vector( (10,10,0.1) )
In this case the roll will be constrained to 0.1 degree accuracy in alignment adjustment (its weight will then be 10 000 greater in Least Square adjustment)....
supposing your camera angles are defined as YPR
chunk.euler_angles
Out[12]: 2020-02-16 06:39:02 Metashape.EulerAngles.EulerAnglesYPR
By the way if you want to change all camera's reference roll accuracy to 0.1 degrees, just use :
chunk = Metashape.app.document.chunk
chunk.camera_rotation_accuracy
Out[8]: 2020-02-16 06:55:54 Vector([10.0, 10.0, 10.0])
chunk.camera_rotation_accuracy = Metashape.Vector( (10,10,0.1) )
chunk.camera_rotation_accuracy
Out[10]: 2020-02-16 06:56:02 Vector([10.0, 10.0, 0.1])
and do not forget to enable camera reference rotation in adjustment by using:
for camera in chunk.cameras:
if camera.type == Metashape.Camera.Type.Keyframe:
continue # skipping Keyframes
camera.reference.rotation_enabled = True
same can be done with camera reference location using chunk.camera_location_accuracy attribute