Forum

Author Topic: Export camera calibration parameters of 400 chunks  (Read 2296 times)

Lore Steyaert

  • Newbie
  • *
  • Posts: 1
    • View Profile
Export camera calibration parameters of 400 chunks
« on: March 20, 2018, 11:57:31 AM »
Hello,

I'm looking for a way to export my camera calibration parameters. I have 400 chunks and I don't want to save it one by one. Is there a script or way to batch process this?

Thanks

Lore

Alexey Pasumansky

  • Agisoft Technical Support
  • Hero Member
  • *****
  • Posts: 14816
    • View Profile
Re: Export camera calibration parameters of 400 chunks
« Reply #1 on: March 21, 2018, 01:38:37 PM »
Hello Lore,

You can use the following script as a reference:
Code: [Select]
import PhotoScan, so

doc = PhotoScan.app.document
export_dir  = PhotoScan.app.getExistingDirectory("Specify the export folder:")

for chunk in doc.chunks:
for sensor in chunk.sensors:
filename = "calib_chunk{0:03d}_sensor{0:02d}.txt".format(doc.chunks.index(chunk),chunk.sensors.index(sensor))
if sensor.calibration:
sensor.calibration.save(os.path.join(export_dir, filename), format = "australis")
print("Script finished")

You may need to adjust the export path and filename and the export format.
Best regards,
Alexey Pasumansky,
Agisoft LLC