(image_ids: Dict[str, int],
database_path: Path,
features_path: Path)
| 55 | |
| 56 | |
| 57 | def 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 | |
| 72 | def import_matches(image_ids: Dict[str, int], |
no test coverage detected