Agisoft Metashape
Agisoft Metashape => Python and Java API => Topic started by: MHFR on November 08, 2018, 05:40:56 PM
-
Hi - I'm looking for a snip of python code equivalent to changing Reference Settings > Rotation angels from YPR to OPK
I'm able to control "location_accuracy" and "rotation_accuracy" by the following code:
chunk.camera_location_accuracy = (0.03, 0.03, 0.05)
chunk.camera_rotation_accuracy = (1, 1, 1)
..but can't figure out how to define the rotation angels as OPK... what am I missing?
Alternatively... is it possible to specify OPK when importing image positions by?:
chunk.loadReference(orientations, PhotoScan.ReferenceFormatCSV, columns= 'nxyzXYZabc', delimiter=',', skip_rows=1)
-
Hello MHFR,
After importing the information from the file you can switch to OPK convention for the chunk:
chunk.euler_angles = PhotoScan.EulerAnglesOPK
-
Fantastic - thanks for the quick reply