upsample points by random choice :param points: (n, 3) :param n_pts: int, > n :return:
(points, n_pts)
| 66 | |
| 67 | |
| 68 | def upsample_point_cloud(points, n_pts): |
| 69 | """upsample points by random choice |
| 70 | :param points: (n, 3) |
| 71 | :param n_pts: int, > n |
| 72 | :return: |
| 73 | """ |
| 74 | p_idx = random.choices(list(range(points.shape[0])), k=n_pts - points.shape[0]) |
| 75 | dup_points = points[p_idx] |
| 76 | points = np.concatenate([points, dup_points], axis=0) |
| 77 | return points |
| 78 | |
| 79 | |
| 80 | def sample_point_cloud_by_n(points, n_pts): |
no outgoing calls
no test coverage detected