diff --git a/epipolar_geometry.py b/epipolar_geometry.py index 1c6cc0f..31614e0 100644 --- a/epipolar_geometry.py +++ b/epipolar_geometry.py @@ -170,16 +170,15 @@ def main(): print("e1: " , e1) print("e2: " , e2) - # if True: - # this is wrong - # t = D[:3, 3] - # t_2d = apply_intrinsics(K, t) - # # can we find e1's epipol by projecting p2 into p1 (which is effectively projecting t into p1) - # print("t: ", t) - # print("t_2d: ", t_2d) - # print("e1: ", e1) - # print("F.T @ t_2d: ", F.T @ t_2d) - # return + if True: + t = D[:3, 3] + t_2d = apply_intrinsics(K, t) + # can we find e1's epipol by projecting p2 into p1 (which is effectively projecting t into p1) + print("t: ", t) + print("t_2d: ", t_2d) + print("e1: ", e1) + print("F.T @ t_2d: ", F.T @ t_2d) + return img1_with_lines, img2_with_lines = draw_epipolar_lines(img1, img2, pts1, pts2, F)