MCPcopy
hub / github.com/cvg/Hierarchical-Localization / import_features

Function import_features

hloc/triangulation.py:57–69  ·  view source on GitHub ↗
(image_ids: Dict[str, int],
                    database_path: Path,
                    features_path: Path)

Source from the content-addressed store, hash-verified

55
56
57def import_features(image_ids: Dict[str, int],
58 database_path: Path,
59 features_path: Path):
60 logger.info('Importing features into the database...')
61 db = COLMAPDatabase.connect(database_path)
62
63 for image_name, image_id in tqdm(image_ids.items()):
64 keypoints = get_keypoints(features_path, image_name)
65 keypoints += 0.5 # COLMAP origin
66 db.add_keypoints(image_id, keypoints)
67
68 db.commit()
69 db.close()
70
71
72def import_matches(image_ids: Dict[str, int],

Callers 2

mainFunction · 0.85
mainFunction · 0.85

Calls 3

get_keypointsFunction · 0.85
connectMethod · 0.80
add_keypointsMethod · 0.80

Tested by

no test coverage detected