MCPcopy Create free account
hub / github.com/colmap/colmap / solve_bundle_adjustment

Function solve_bundle_adjustment

python/examples/custom_bundle_adjustment.py:14–33  ·  view source on GitHub ↗
(
    reconstruction: pycolmap.Reconstruction,
    ba_options: pycolmap.BundleAdjustmentOptions,
    ba_config: pycolmap.BundleAdjustmentConfig,
)

Source from the content-addressed store, hash-verified

12
13
14def solve_bundle_adjustment(
15 reconstruction: pycolmap.Reconstruction,
16 ba_options: pycolmap.BundleAdjustmentOptions,
17 ba_config: pycolmap.BundleAdjustmentConfig,
18) -> pycolmap.BundleAdjustmentSummary:
19 bundle_adjuster = pycolmap.create_default_bundle_adjuster(
20 ba_options, ba_config, reconstruction
21 )
22 summary = bundle_adjuster.solve()
23 # Alternatively, you can customize the existing Ceres problem or options as:
24 # import pyceres # The minimal bindings in pycolmap aren't sufficient.
25 # bundle_adjuster = pycolmap.create_default_ceres_bundle_adjuster(
26 # ba_options, ba_config, reconstruction
27 # )
28 # solver_options = ba_options.ceres.create_solver_options(
29 # ba_config, bundle_adjuster.problem
30 # )
31 # summary = pyceres.SolverSummary()
32 # pyceres.solve(solver_options, bundle_adjuster.problem, summary)
33 return summary
34
35
36def adjust_global_bundle(

Callers 2

adjust_global_bundleFunction · 0.85
adjust_local_bundleFunction · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected