Forum

f and k1 value in calibration xml data of equirectangular image

Started by masamasace, August 18, 2024, 11:55:51 AM

Previous topic - Next topic

masamasace

I am currently working with 3D reconstruction using a set of equirectangular images and trying to see the calibration result.
Fortunately, I managed to export the calibration xml file using Python api

chunk = Metashape.app.document.chunk
cameras = chunk.cameras

for camera in cameras:
    if camera.sensor:
        calibration = camera.sensor.calibration
        calibration_path = f"DIR_PATH\\calibration_{camera.label}.xml"
        calibration.save(calibration_path)


and I got this xml file for example;

<?xml version="1.0" encoding="UTF-8"?>
<calibration>
  <projection>spherical</projection>
  <width>2560</width>
  <height>1440</height>
  <f>407.4366543152521</f>
  <k1>-3.5572726500569751e-322</k1>
  <date>2024-08-18T08:15:02Z</date>
</calibration>


I have two questions regarding this output.

1. Are the output values of f and k1 meaningful or just random?
2. If they are meaningful, how are these parameters used during projection? What do focal length and radial distortion mean in an equirectangular image?

I would like to know if there are any academic papers or blogs that can help me.

Alexey Pasumansky

Hello masamasace,

You can ignore those values for Spherical sensor type. But we will check, why some values are saved when export is performed via Python API.

You can find information regarding camera models (including Spherical sensor type) used in Metashape in Appendix D of Metashape manual:
https://www.agisoft.com/pdf/metashape-pro_2_1_en.pdf

Best regards,
Alexey Pasumansky,
Agisoft LLC