Hi Alexey
Thanks for your answer. I was able to set the exterior orientation of the cameras this way.
But this leads to my next issue:
I try to set the internal orientation of the camera using this snippet:
cam = chunk.addSensor()
cam.type = Metashape.Sensor.Frame
cam.pixel_width = float(values['SensorSizeMMX'])/float(values['SensorSizePIXX'])
cam.pixel_height = float(values['SensorSizeMMY'])/float(values['SensorSizePIXY'])
cam.focal_length = float(values['FocalLenghtMM'])
cam.calibration = Metashape.Calibration()
cam.calibration.height = int(values['SensorSizePIXY'])
cam.calibration.width = int(values['SensorSizePIXX'])
cam.calibration.f = float(values['FocalLengthPIX'])
cam.calibration.cx = float(values['PPX'])
cam.calibration.cy = float(values['PPY'])
cam.fixed = True
cam.label = values['label']
Followed by assigning the previously defined sensor to the cameras:
for camera in chunk.cameras:
camera.sensor = cam
When running the script, this works fine. Even if I query some parameters of the calibration after assigning, they are outputted as expected. But when I open the created PSZ file in the normal MetaShape GUI, the camera calibration values have disappeared, as shown in the attached screenshot. The labels are displayed, showing that the assingment of two different cameras has worked. But all the value fields in the calibration dialog contain no value or 0.
Am I doing something completely wrong or are there just some mandatory values I haven't set, that need tp be set for correctly reloading the calibration?
Thanks in advance,
Daniel