Geometric operations and conversions

Projection and unprojection

limap.geometry.projection_line3d(line3d: limap._limap._geometry.Line3d, image: pycolmap._core.Image) limap._limap._geometry.Line2d | None
limap.geometry.unprojection_line2d(line2d: limap._limap._geometry.Line2d, image: pycolmap._core.Image, depths: tuple[SupportsFloat | SupportsIndex, SupportsFloat | SupportsIndex]) limap._limap._geometry.Line3d
limap.geometry.intersect_infinite_line2d(l1: limap._limap._geometry.InfiniteLine2d, l2: limap._limap._geometry.InfiniteLine2d) Eigen::Matrix<double, 2, 1, 0, 2, 1> | None
limap.geometry.get_line_segment_from_infinite_line3d(*args, **kwargs)

Overloaded function.

  1. get_line_segment_from_infinite_line3d(inf_line: limap._limap._geometry.InfiniteLine3d, images: collections.abc.Sequence[pycolmap._core.Image], line2ds: collections.abc.Sequence[limap._limap._geometry.Line2d], num_outliers: typing.SupportsInt | typing.SupportsIndex = 2) -> limap._limap._geometry.Line3d

  2. get_line_segment_from_infinite_line3d(inf_line: limap._limap._geometry.InfiniteLine3d, line3ds: collections.abc.Sequence[limap._limap._geometry.Line3d], num_outliers: typing.SupportsInt | typing.SupportsIndex = 2) -> limap._limap._geometry.Line3d

Array conversions

limap.geometry.get_line2d_vector_from_array(segs2d: Annotated[numpy.typing.ArrayLike, numpy.float64, '[m, n]']) list[limap._limap._geometry.Line2d]
limap.geometry.get_line3d_vector_from_array(segs3d: collections.abc.Sequence[Annotated[numpy.typing.ArrayLike, numpy.float64, '[m, n]']]) list[limap._limap._geometry.Line3d]
limap.geometry.get_all_lines_2d(all_2d_segs: dict[int, ndarray]) dict[int, list[Line2d]]

Convert np.array representations of 2D line segments to dict of Line2d.

Parameters:

all_2d_segs (dict[int -> np.array]) – Map image IDs to np.array of shape (N, 4), each row (4 numbers) is concatenated by the start and end of a 2D line segment.

Returns:

Map image IDs to list of Line2d.

Return type:

dict[int -> list[Line2d]]

limap.geometry.get_all_lines_3d(all_3d_segs: dict[int, ndarray]) dict[int, list[Line3d]]

Convert np.array representations of 3D line segments to dict of Line3d.

Parameters:

all_3d_segs (dict[int -> np.array]) – Map image IDs to np.array of shape (N, 2, 3), each 2*3 matrix is stacked from the two endpoints of a 3D line segment.

Returns:

Map image IDs to list of Line3d.

Return type:

dict[int -> list[Line3d]]