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

Function incremental_mapping_with_pbar

python/examples/example.py:16–33  ·  view source on GitHub ↗
(
    database_path: Path, image_path: Path, sfm_path: Path
)

Source from the content-addressed store, hash-verified

14
15
16def incremental_mapping_with_pbar(
17 database_path: Path, image_path: Path, sfm_path: Path
18) -> dict[int, pycolmap.Reconstruction]:
19 with pycolmap.Database.open(database_path) as database:
20 num_images = database.num_images()
21 with enlighten.Manager() as manager:
22 with manager.counter(
23 total=num_images, desc="Images registered:"
24 ) as pbar:
25 pbar.update(0, force=True)
26 reconstructions = pycolmap.incremental_mapping(
27 database_path,
28 image_path,
29 sfm_path,
30 initial_image_pair_callback=lambda: pbar.update(2),
31 next_image_callback=lambda: pbar.update(1),
32 )
33 return reconstructions
34
35
36def run() -> None:

Callers 1

runFunction · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected