Sad to say I'm having terrible trouble getting my python script working in the new 1.1 API. I'm using multiple frames per camera and this is what I had that was working nicely in 1.0.4
initial_calibration = PhotoScan.Calibration()
initial_calibration.fx = pixel_focal_length
initial_calibration.fy = pixel_focal_length
#Loading images:
for iframe in range(0, nframes):
for icamera in range(0, ncameras):
if iframe == 0:
chunk.cameras.add(os.path.join(input_folder, folders[icamera], image_folders[icamera][iframe]))
chunk.cameras[icamera].user_calib = initial_calibration
chunk.cameras[icamera].label = folders[icamera]
else:
f = PhotoScan.Frame()
f.open(os.path.join(input_folder, folders[icamera], image_folders[icamera][iframe]), 0)
chunk.cameras[icamera].frames.append(f)
doc.activeChunk = chunk
print('matchPhotos')
chunk.matchPhotos(accuracy='high', preselection='disabled', filter_mask=False, point_limit=100000)
print('alignPhotos')
chunk.alignPhotos()
I can change the cameras.add to addCamera easily enough but then the user_calib doesn't work. When I try and access the sensor element on the new camera, it tells me that it doesn't exist. If I just skip the user_calib stage it then fails on the frames. I can convert PhotoScan.Frame() to chunk.addFrame() but that doesn't associate the frame with the camera and actually doesn't seem to create a Frame object anyway. According to the documentation Frame has been removed but it doesn't tell me what it has been replaced with and there are still plenty of references to frames...
Any help appreciated. For now I've gone back to 1.0.4 but I would like to use the new API. It looks a lot cleaner and there are some nice new features in 1.1.
Cheers
Bill