Agisoft Metashape

Agisoft Metashape => Python and Java API => Topic started by: MHFR on November 08, 2018, 05:40:56 PM

Title: Change Reference Settings - rotation angels from YPR to OPK
Post 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:
Code: [Select]
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?:
Code: [Select]
chunk.loadReference(orientations, PhotoScan.ReferenceFormatCSV, columns= 'nxyzXYZabc', delimiter=',', skip_rows=1)
Title: Re: Change Reference Settings - rotation angels from YPR to OPK
Post by: Alexey Pasumansky on November 08, 2018, 06:02:42 PM
Hello MHFR,

After importing the information from the file you can switch to OPK convention for the chunk:
Code: [Select]
chunk.euler_angles = PhotoScan.EulerAnglesOPK
Title: Re: Change Reference Settings - rotation angels from YPR to OPK
Post by: MHFR on November 09, 2018, 09:53:36 AM
Fantastic - thanks for the quick reply