points_sampler
PointsSampler
__init__()
group_points(sample_coords, all_coords, point_ids=None)
staticmethod
Select regular points and group other points using Voronoi tessellation.
Parameters:
| Name | Type | Description | Default |
|---|---|---|---|
sample_coords |
ndarray[N, 3]
|
Coords of point selection. |
required |
all_coords |
ndarray[N, 3]
|
Coords of all points. |
required |
point_ids |
ndarray
|
Points ids of sample_coords. |
None
|
Returns:
| Name | Type | Description |
|---|---|---|
voronoi_ids |
tuple
|
Indices of the selected points and group labels (selected point ids) for each input points. |
select_random_points(point_ids, sample_size, seed=568)
staticmethod
Select random points from point cloud.
Parameters:
| Name | Type | Description | Default |
|---|---|---|---|
point_ids |
ndarray[N]
|
Indices of the points. |
required |
sample_size |
int
|
Number of points to select. |
required |
seed |
int
|
Seed for random number generator. |
568
|
Returns:
| Type | Description |
|---|---|
ndarray
|
np.ndarray[M,]: Indices of the selected points. |
select_regular_points(coords, distance)
staticmethod
Select regular points from point cloud by removing points within a given distance.
Parameters:
| Name | Type | Description | Default |
|---|---|---|---|
coords |
ndarray[N, 3]
|
Coordinates of points. |
required |
distance |
float
|
Minimal distance between points. |
required |
Returns:
| Type | Description |
|---|---|
ndarray
|
np.ndarray[M,]: Indices of the selected points. |