Evaluate w.r.t. a Point Cloud

class limap.evaluation.PointCloudEvaluator

The evaluator for line maps with respect to a GT point cloud (using a K-D Tree).

Build(self: limap._limap._evaluation.PointCloudEvaluator) None

Build the indexes of the K-D Tree

ComputeDistLine(self: limap._limap._evaluation.PointCloudEvaluator, line: limap._limap._geometry.Line3d, n_samples: SupportsInt | SupportsIndex = 1000) float

Compute the distance for a set of uniformly sampled points along the line

Parameters:
  • line (Line3d) – Line3d: instance

  • n_samples (int, optional) – number of samples (default = 1000)

Returns:

the computed distances

Return type:

np.array of shape (n_samples,)

ComputeDistPoint(self: limap._limap._evaluation.PointCloudEvaluator, arg0: Annotated[numpy.typing.ArrayLike, numpy.float64, '[3, 1]']) float

Compute the distance from a query point to the point cloud

:param np.array of shape: The query point :type np.array of shape: 3,

Returns:

The distance from the point to the GT point cloud

Return type:

float

ComputeDistsforEachPoint(self: limap._limap._evaluation.PointCloudEvaluator, arg0: collections.abc.Sequence[limap._limap._geometry.Line3d]) list[float]
ComputeDistsforEachPoint_KDTree(self: limap._limap._evaluation.PointCloudEvaluator, arg0: collections.abc.Sequence[limap._limap._geometry.Line3d]) list[float]
ComputeInlierRatio(self: limap._limap._evaluation.PointCloudEvaluator, line: limap._limap._geometry.Line3d, threshold: SupportsFloat | SupportsIndex, n_samples: SupportsInt | SupportsIndex = 1000) float

Compute the percentage of the line lying with a certain threshold to the point cloud

Parameters:
  • line (Line3d) – Line3d: instance

  • threshold (float) – threshold

  • n_samples (int, optional) – number of samples (default = 1000)

Returns:

The computed percentage

Return type:

float

ComputeInlierSegs(self: limap._limap._evaluation.PointCloudEvaluator, lines: collections.abc.Sequence[limap._limap._geometry.Line3d], threshold: SupportsFloat | SupportsIndex, n_samples: SupportsInt | SupportsIndex = 1000) list[limap._limap._geometry.Line3d]

Compute the inlier parts of the lines that are within a certain threshold to the point cloud, for visualization.

Parameters:
  • lines (list[limap.geometry.Line3d]) – Input 3D line segments

  • threshold (float) – threshold

  • n_samples (int) – number of samples (default = 1000)

Returns:

Inlier parts of all the lines, useful for visualization

Return type:

list[limap.geometry.Line3d]

ComputeOutlierSegs(self: limap._limap._evaluation.PointCloudEvaluator, lines: collections.abc.Sequence[limap._limap._geometry.Line3d], threshold: SupportsFloat | SupportsIndex, n_samples: SupportsInt | SupportsIndex = 1000) list[limap._limap._geometry.Line3d]

Compute the outlier parts of the lines that are at least a certain threshold far away from the point cloud, for visualization.

Parameters:
  • lines (list[limap.geometry.Line3d]) – Input 3D line segments

  • threshold (float) – threshold

  • n_samples (int) – number of samples (default = 1000)

Returns:

Outlier parts of all the lines, useful for visualization

Return type:

list[limap.geometry.Line3d]

Load(self: limap._limap._evaluation.PointCloudEvaluator, arg0: str) None

Read the pre-built K-D Tree from a file

Parameters:

filename (str) – The file to read from

Save(self: limap._limap._evaluation.PointCloudEvaluator, arg0: str) None

Save the built K-D Tree into a file

Parameters:

filename (str) – The file to write to

__init__(*args, **kwargs)

Overloaded function.

  1. __init__(self: limap._limap._evaluation.PointCloudEvaluator) -> None

    Default constructor

  2. __init__(self: limap._limap._evaluation.PointCloudEvaluator, arg0: collections.abc.Sequence[typing.Annotated[numpy.typing.ArrayLike, numpy.float64, “[3, 1]”]]) -> None

    Constructor from list[np.array] of shape (3,)

  3. __init__(self: limap._limap._evaluation.PointCloudEvaluator, arg0: typing.Annotated[numpy.typing.ArrayLike, numpy.float64, “[m, n]”]) -> None

    Constructor from np.array of shape (N, 3)