def get_voxel_fun(points_, n): """ 体素栅格下采样 :param points_: 点云中的点序列 :param n: 体素大小 :return: 降采样之后的点 """ get_voxel = voxelgrid.VoxelGrid(points_, n_x=n, n_y=n, n_z=n) get_voxel.compute() points_voxel_ = get_voxel.voxel_centers[get_voxel.voxel_n] points_voxel_ = np.unique(points_voxel_, axis=0) return points_voxel_
def get_voxel_fun(points_, n): get_voxel = voxelgrid.VoxelGrid(points_, n_x=n, n_y=n, n_z=n) get_voxel.compute() points_voxel_ = get_voxel.voxel_centers[get_voxel.voxel_n] points_voxel_ = np.unique(points_voxel_, axis=0) return points_voxel_