Hello.
After i calibrated cameras with multiple frames I use this script to save calibration:
def exportCalibration(self, path, filename):
self.superChunk.exportCameras(path + filename, format=PhotoScan.CamerasFormatXML)
i = 0
for camera in self.superChunk.cameras:
camera.sensor.calibration.save(path +str(i)+ ".xml")
i = i + 1
To load Calibration i use this script:
def loadCalibration(self, calibrationPath, calibName, calibFilesPrefix):
for frame in self.superChunk.frames:
frame.importCameras(calibrationPath + "\\" + calibName, format=PhotoScan.CamerasFormatXML)
cameraId = 0
for camera in frame.cameras:
camera.open(self.cameraFolders[0] + self.fileVec[0][cameraId])
sensor = frame.addSensor()
calibration = PhotoScan.Calibration()
calibration.load(calibrationPath +"\\" + calibFilesPrefix + str(cameraId) + ".xml")
sensor.calibration = calibration
sensor.width = camera.sensor.width
sensor.height = camera.sensor.height
sensor.focal_length = calibration.f
sensor.pixel_width = 0.0055
sensor.pixel_height = 0.0055
sensor.type = camera.sensor.type
sensor.fixed = False
camera.label = sensor.label
camera.sensor = sensor
cameraId = cameraId + 1
So my question:
When I don't see aligned cameras as on the screenshot,
,
does it mean, that cameras were not loaded correctly?
What is the correct way to load cameras? Shall I rename images first?