-
Notifications
You must be signed in to change notification settings - Fork 1.9k
Closed
Description
How does one set max_num_iterations & max_linear_solver_iterations when calling pycolmap.bundle_adjustment?
options = pycolmap.BundleAdjustmentOptions()
pycolmap.bundle_adjustment(reconstruction, options)
As per the documentation the BundleAdjustmentOptions should hold these values, but not anymore in the latest commit.
Context:
#prior: reconstruction folder sfm_path with images.bin, cameras.bin, points3D.bin
os.makedirs(sfm_path,exist_ok=True)
rec.write(sfm_path)
for _ in range(50):
# Step 3: Perform triangulation using the existing camera poses
triangulation.main(
reference_model=sfm_path,
sfm_dir = sfm_path,
image_dir=Path(output_dir),
pairs=sfm_pairs,
features=features_path,
matches=matches_path,
verbose = False,
skip_geometric_verification = True
)
# # Load the final reconstruction
reconstruction = pycolmap.Reconstruction(sfm_path)
# Define bundle adjustment options
options = pycolmap.BundleAdjustmentOptions()
options.refine_focal_length = False # Do not refine focal length
options.refine_principal_point = False # Do not refine principal point
options.refine_extra_params = False # Do not refine extra parameters
options.refine_extrinsics = True # Refine extrinsics
options.use_gpu = True
pycolmap.bundle_adjustment(reconstruction, options)
reconstruction.write(sfm_path)
Metadata
Metadata
Assignees
Labels
No labels