def align_images(document, cameras_to_align):
if cameras_to_align:
chunk = document.chunk
unaligned_cameras = [cam for cam in cameras_to_align if cam.transform is None]
if not unaligned_cameras:
print("No cameras to align: all are already aligned.")
return
chunk.matchPhotos(cameras=unaligned_cameras, downscale=1,
generic_preselection=True, reference_preselection=True)
chunk.alignCameras(cameras=unaligned_cameras, reset_alignment=False)
Hi Alexey,
I am encountering an issue related to camera alignment in Metashape Professional, which appears to have been introduced in version 2.2.0. This issue was not present in version 2.1, where the same workflow functioned correctly.
Some cameras that were previously aligned in the project are being misaligned when new groups of cameras are processed. My workflow is designed to align only the unprocessed cameras while keeping the previously aligned ones intact, but this behavior is not being respected in version 2.2.0. I tried including reset align=False but that didn't work either.