Skip to content

Commit

Permalink
avoid cyclic import
Browse files Browse the repository at this point in the history
  • Loading branch information
B1ueber2y committed Jan 6, 2025
1 parent 02959ab commit e2d29e5
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions limap/base/align.py
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
import limap
import _limap._base as _base
import numpy as np

def umeyama_alignment(x, y, with_scale=True):
Expand Down Expand Up @@ -60,7 +60,7 @@ def align_imagecols_umeyama(imagecols_src, imagecols_dst):
xyz_dst = np.array(imagecols_dst.get_locations()).transpose()
r, t, c = umeyama_alignment(xyz_src, xyz_dst, with_scale=True)
matrix = np.concatenate([c * r, t[:, None]], 1)
transform = limap.base.pycolmap.Sim3d(matrix)
transform = _base.pycolmap.Sim3d(matrix)
imagecols_aligned = imagecols_src.apply_similarity_transform(transform)
return transform, imagecols_aligned

Expand Down Expand Up @@ -143,7 +143,7 @@ def read_trans(fname):
R = transform[:3, :3] / scale
t = transform[:3, 3]
matrix = np.concatenate([scale * R, t[:, None]], 1)
transform = limap.base.pycolmap.Sim3d(matrix)
transform = _base.pycolmap.Sim3d(matrix)
imagecols_aligned = imagecols_src.apply_similarity_transform(transform)

# delete tmp folder
Expand Down

0 comments on commit e2d29e5

Please sign in to comment.