I'm trying to calibrate images with our metadata coming from the camera with following script.
for eye in self.m_fisheyes:
c = PhotoScan.app.document.addChunk()
c.label = eye.m_name
for p in eye.m_files:
c.addPhotos([p])
sensor = c.sensors[0]
sensor.width = 2048
sensor.height = 2048
sensor.calibration.type = PhotoScan.Sensor.Type.Fisheye
cal = sensor.calibration
cal.cx = eye.m_metadata.m_center[0]
cal.cy = eye.m_metadata.m_center[1]
cal.f = eye.m_metadata.m_focal
cal.k1 = eye.m_metadata.m_distortions[0]
cal.k2 = eye.m_metadata.m_distortions[1]
cal.k3 = eye.m_metadata.m_distortions[2]
cal.k4 = eye.m_metadata.m_distortions[3]
I get chunks and images there nicely, but when I check those calibrations with Tools->Camera Calibration nothing have gone in. What am I doing wrong?