pyFM.mesh.geometry.farthest_point_sampling_call_sub¶
- pyFM.mesh.geometry.farthest_point_sampling_call_sub(d_func, k, sub_points, return_sub_inds=False, random_init=True, verbose=False)¶
Sample points using farthest point sampling on a mesh, restricted to a set of samples.
- Parameters:
d_func (callable) – For index i, d_func(i) is a (n_points,) array of geodesic distances to other points.
k (int) – Number of points to sample.
sub_points ((m,) np.ndarray) – Indices of vertices in the subsample.
return_sub_inds (bool, optional) – Whether to return indices of the fps inside the subsample.
random_init (bool, optional) – Whether to sample the first point randomly or to take the one furthest away.
verbose (bool, optional) – Whether to display a progress bar.
- Returns:
fps ((k,) np.ndarray) – Array of indices of sampled points (as seen from the full set of points).
fps_sub ((k,) np.ndarray, optional) – Returned only if return_sub_inds is True. Array of indices of sampled points (as seen from inside sub_points).