Forum

Author Topic: Get all calibration parameters when saving to xml using exportCameras  (Read 1097 times)

sergio

  • Newbie
  • *
  • Posts: 17
    • View Profile
Hi,

When I use
Code: [Select]
chunk.exportCameras I notice only the focal length is exported under the sensor element of the xml file  How to get the rest of the calibration parameters? (e.g. cx, cy, k1, etc...)
The same applies when I use
Code: [Select]
calibration.save().

I noticed that when I export from the GUI, all the parameters are written....

Best,

Sergio

Alexey Pasumansky

  • Agisoft Technical Support
  • Hero Member
  • *****
  • Posts: 14813
    • View Profile
Re: Get all calibration parameters when saving to xml using exportCameras
« Reply #1 on: December 14, 2022, 12:55:35 PM »
Hello Sergio,

What Metashape version you are using and whether the export is performed from the aligned project?

Can you give the screenshots of Initial and Adjusted tabs from the Camera Calibration dialog and the result of exportCameras command to XML format? Additionally please post the export line with all the arguments used for the export.
Best regards,
Alexey Pasumansky,
Agisoft LLC

sergio

  • Newbie
  • *
  • Posts: 17
    • View Profile
Re: Get all calibration parameters when saving to xml using exportCameras
« Reply #2 on: December 15, 2022, 06:55:27 AM »
Thank you.

In our workflow we have 2 chunks
Your questions allowed me to understand where the problem was. In our workflow we make 2 alignments (with 2 chunks). We use the first one to compute camera parameters. We then undistort the images and compute a second alignment forcing a pinhole model. Therefore, in this chunk the camera parameters are fixed (I attach the screenshot).

I assume that if these parameters are zero and they are fixed, Metashape will not export them in the calibration or camera files?

This is the output xml calibration data:
Code: [Select]
<?xml version="1.0" encoding="UTF-8"?>
<calibration>
  <projection>frame</projection>
  <width>2160</width>
  <height>3840</height>
  <f>2801.295081040385</f>
  <date>2022-12-15T02:18:21Z</date>
</calibration>

I am using Metashape 1.8.4 GUI and python API
« Last Edit: December 15, 2022, 06:57:48 AM by sergio »