Triangulation
- limap.triangulation.triangulation.compute_epipolar_IoU(l1, view1, l2, view2)
Get the IoU between two lines from different views by intersecting the epipolar lines
- Parameters:
l1 (
limap.base.Line2d
) –view1 (
limap.base.CameraView
) –l2 (
limap.base.Line2d
) –view2 (
limap.base.CameraView
) –
- Returns:
The calculated epipolar IoU
- Return type:
IoU (float)
- limap.triangulation.triangulation.compute_essential_matrix(view1, view2)
Get the essential matrix between two views
- Parameters:
view1 (
limap.base.CameraView
) –view2 (
limap.base.CameraView
) –
- Returns:
essential_matrix (
np.array
of shape (3, 3))
- limap.triangulation.triangulation.compute_fundamental_matrix(view1, view2)
Get the essential matrix between two views
- Parameters:
view1 (
limap.base.CameraView
) –view2 (
limap.base.CameraView
) –
- Returns:
fundamental_matrix (
np.array
of shape (3, 3))
- limap.triangulation.triangulation.get_direction_from_VP(vp, view)
Get the 3d direction from a 2D vanishing point
- Parameters:
vp (
np.array
of shape (3,)) –view (
limap.base.CameraView
) –
- Returns:
direction (
np.array
of shape (3,))
- limap.triangulation.triangulation.point_triangulation(p1, view1, p2, view2)
Two-view point triangulation (mid-point)
- Parameters:
p1 (
np.array
of shape (2,)) –view1 (
limap.base.CameraView
) –p2 (
np.array
of shape (2,)) –view2 (
limap.base.CameraView
) –
- Returns:
point3d (
np.array
of shape (3,))
- limap.triangulation.triangulation.triangulate(l1, view1, l2, view2)
Two-view triangulation of lines by ray-plane intersection
- Parameters:
l1 (
limap.base.Line2d
) –view1 (
limap.base.CameraView
) –l2 (
limap.base.Line2d
) –view2 (
limap.base.CameraView
) –
- Returns:
line3d (
limap.base.Line3d
)
- limap.triangulation.triangulation.triangulate_endpoints(l1, view1, l2, view2)
Two-view triangulation of lines with point triangulation on both endpoints (assuming correspondences)
- Parameters:
l1 (
limap.base.Line2d
) –view1 (
limap.base.CameraView
) –l2 (
limap.base.Line2d
) –view2 (
limap.base.CameraView
) –
- Returns:
line3d (
limap.base.Line3d
)
- limap.triangulation.triangulation.triangulate_with_direction(l1, view1, l2, view2, direc)
Two-view triangulation of lines with known 3D line direction
- Parameters:
l1 (
limap.base.Line2d
) –view1 (
limap.base.CameraView
) –l2 (
limap.base.Line2d
) –view2 (
limap.base.CameraView
) –direction (
np.array
of shape (3,)) –
- Returns:
line3d (
limap.base.Line3d
)
- limap.triangulation.triangulation.triangulate_with_one_point(l1, view1, l2, view2, p)
Two-view triangulation of lines with a known 3D point on the line
- Parameters:
l1 (
limap.base.Line2d
) –view1 (
limap.base.CameraView
) –l2 (
limap.base.Line2d
) –view2 (
limap.base.CameraView
) –point (
np.array
of shape (3,)) –
- Returns:
line3d (
limap.base.Line3d
)