pointcloudset.diff.plane module

Functions to calculate distances of points in pointcloud and a plane.

pointcloudset.diff.plane.calculate_distance_to_plane(pointcloud, target: ndarray, absolute_values: bool = True, normal_dist: bool = True)

Calculate the distance of each point to a plane.

Note

Adds the result as a new column to the data of the pointcloud. Uses the plane equation a x + b y + c z + d = 0.

Parameters
  • pointcloud (PointCloud) – PointCloud for which the distance to the plane is calculated.

  • target (numpy.ndarray) – [a, b, c, d] as parameters for the target plane, could be provided by plane_segmentation.

  • absolute_values (bool, optional) – Calculate absolute distances if True. Defaults to True.

  • normal_dist (bool, optional) – Calculate normal distance if True, calculate distance in direction of line of sight if False. Defaults to True.

Returns

PointCloud including distances to a plane for each point.

Return type

PointCloud