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

Class QueryLocalizer

hloc/localize_sfm.py:51–64  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

49
50
51class QueryLocalizer:
52 def __init__(self, reconstruction, config=None):
53 self.reconstruction = reconstruction
54 self.config = config or {}
55
56 def localize(self, points2D_all, points2D_idxs, points3D_id, query_camera):
57 points2D = points2D_all[points2D_idxs]
58 points3D = [self.reconstruction.points3D[j].xyz for j in points3D_id]
59 ret = pycolmap.absolute_pose_estimation(
60 points2D, points3D, query_camera,
61 estimation_options=self.config.get('estimation', {}),
62 refinement_options=self.config.get('refinement', {}),
63 )
64 return ret
65
66
67def pose_from_cluster(

Callers 1

mainFunction · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected