OpenSfM
OpenSfM copied to clipboard
it seems a bug in align_two_reconstruction
It seems a bug here:
def align_two_reconstruction(r1, r2, common_tracks, threshold): """Estimate similarity transform between two reconstructions.""" t1, t2 = r1.points, r2.points
if len(common_tracks) > 6:
<<<<<<<<<<<<< p1 = np.array([t1[t[0]].coordinates for t in common_tracks]) p2 = np.array([t2[t[1]].coordinates for t in common_tracks]) <<<<<<<<<<<<<
I think it should be: p1 = np.array([t1[t].coordinates for t in common_tracks]) p2 = np.array([t2[t].coordinates for t in common_tracks]) here, t stands for the common shot id
# 3 samples / 100 trials / 50% outliers = 0.99 probability
# with probability = 1-(1-(1-outlier)^model)^trial
T, inliers = multiview.fit_similarity_transform(
p1, p2, max_iterations=100, threshold=threshold)
if len(inliers) > 0:
return True, T, inliers
return False, None, None
Hi @gaosanyuan , this is a bug that we're going to address, thank you for reporting.
Has this bug been addressed?