Forum

Author Topic: Calibration File Saving  (Read 2181 times)

Mert

  • Newbie
  • *
  • Posts: 4
    • View Profile
Calibration File Saving
« on: September 04, 2017, 09:43:57 PM »
 I recently started to use python scripting in photoscan, After completing basic workflow ı tried to save camera calibrations to a 'australis' file but ı couldnt manage to do it any one can help?

Code: [Select]
import PhotoScan
PhotoScan.Calibration.save("C:\\Users\\MERT\\Desktop\\Belgeler\\Staj\\İHA Proje\\U1\\ddd.txt",format='australis')("

but code gives an error that ı cant understand...

Code: [Select]
2017-09-04 21:41:17 Traceback (most recent call last):
2017-09-04 21:41:17   File "<console>", line 1, in <module>
2017-09-04 21:41:17 TypeError: descriptor 'save' requires a 'PhotoScan.Calibration' object but received a 'str'

how do you pull this out?

Alexey Pasumansky

  • Agisoft Technical Support
  • Hero Member
  • *****
  • Posts: 14813
    • View Profile
Re: Calibration File Saving
« Reply #1 on: September 04, 2017, 09:50:09 PM »
Hello Mert,

You need to specify, what calibration (for which chunk and which sensor) you need to save, for example, the following code saves the  calibration information for the first sensor (calibration group) of the active chunk:

Code: [Select]
import PhotoScan
calibration = PhotoScan.app.document.chunk.sensors[0].calibration
calibration.save("C:\\Users\\MERT\\Desktop\\Belgeler\\Staj\\İHA Proje\\U1\\ddd.txt",format='australis')

For Australis format export you may need to use pixel_size argument:
pixel_size = PhotoScan.app.document.chunk.sensors[0].pixel_size
Best regards,
Alexey Pasumansky,
Agisoft LLC

Mert

  • Newbie
  • *
  • Posts: 4
    • View Profile
Re: Calibration File Saving
« Reply #2 on: September 04, 2017, 09:55:28 PM »
Thank you very much Alexey now ı understand how to get required data, ı still need to learn where to get them as well