pymccrgb.pointutils module¶
Utilties for common point cloud operations
-
pymccrgb.pointutils.
equal_sample
(X, y, size=100, seed=None)[source]¶ Takes a sample of equal number of feature vectors from each input class
Assumes y contains discrete labels 0, …, ymax
Raises: - A ValueError if there are insufficient data in a particular class
-
pymccrgb.pointutils.
intersect_rows
(arr1, arr2)[source]¶ Returns a binary mask of the rows in arr1 that are in arr2
-
pymccrgb.pointutils.
point_grid
(x_min, x_max, y_min, y_max, dx, dy=None)[source]¶ Generates a grid of points within a bounding box
-
pymccrgb.pointutils.
sample_point_cloud
(source, target, sample_indices=[2])[source]¶ Resamples a source point cloud at the coordinates of a target points
Uses the nearest point in the target point cloud to the source pointParameters: - source: array
Input point cloud
- target: array
Target point cloud for sample locations
- sample_indices: list
List of indices to sample from source. Defaults to 2 (z or height dimension)
Returns: - An array of sampled points