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._evaluation.PointCloudEvaluator) None

Build the indexes of the K-D Tree

ComputeDistLine(self: _limap._evaluation.PointCloudEvaluator, line: _limap._base.Line3d, n_samples: int = 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._evaluation.PointCloudEvaluator, arg0: numpy.ndarray[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._evaluation.PointCloudEvaluator, arg0: List[_limap._base.Line3d]) List[float]
ComputeDistsforEachPoint_KDTree(self: _limap._evaluation.PointCloudEvaluator, arg0: List[_limap._base.Line3d]) List[float]
ComputeInlierRatio(self: _limap._evaluation.PointCloudEvaluator, line: _limap._base.Line3d, threshold: float, n_samples: int = 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._evaluation.PointCloudEvaluator, lines: List[_limap._base.Line3d], threshold: float, n_samples: int = 1000) List[_limap._base.Line3d]

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

Parameters:
  • lines (list[limap.base.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.base.Line3d]

ComputeOutlierSegs(self: _limap._evaluation.PointCloudEvaluator, lines: List[_limap._base.Line3d], threshold: float, n_samples: int = 1000) List[_limap._base.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.base.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.base.Line3d]

Load(self: _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._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._evaluation.PointCloudEvaluator) -> None

    Default constructor

  2. __init__(self: _limap._evaluation.PointCloudEvaluator, arg0: List[numpy.ndarray[numpy.float64[3, 1]]]) -> None

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

  3. __init__(self: _limap._evaluation.PointCloudEvaluator, arg0: numpy.ndarray[numpy.float64[m, n]]) -> None

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