Skip to content

Commit

Permalink
Adapt to the new pycolmap inteface
Browse files Browse the repository at this point in the history
  • Loading branch information
B1ueber2y committed Dec 12, 2024
1 parent abb2520 commit 9f5155b
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 2 deletions.
2 changes: 1 addition & 1 deletion hloc/localize_sfm.py
Original file line number Diff line number Diff line change
Expand Up @@ -58,7 +58,7 @@ def __init__(self, reconstruction, config=None):
def localize(self, points2D_all, points2D_idxs, points3D_id, query_camera):
points2D = points2D_all[points2D_idxs]
points3D = [self.reconstruction.points3D[j].xyz for j in points3D_id]
ret = pycolmap.absolute_pose_estimation(
ret = pycolmap.estimate_and_refine_absolute_pose(
points2D,
points3D,
query_camera,
Expand Down
2 changes: 1 addition & 1 deletion hloc/utils/geometry.py
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@ def to_homogeneous(p):


def compute_epipolar_errors(j_from_i: pycolmap.Rigid3d, p2d_i, p2d_j):
j_E_i = j_from_i.essential_matrix()
j_E_i = pycolmap.essential_matrix_from_pose(j_from_i)
l2d_j = to_homogeneous(p2d_i) @ j_E_i.T
l2d_i = to_homogeneous(p2d_j) @ j_E_i
dist = np.abs(np.sum(to_homogeneous(p2d_i) * l2d_i, axis=1))
Expand Down

0 comments on commit 9f5155b

Please sign in to comment.