compute_point_cloud_distance()
函数计算点云之间的最短距离和最近点的下标。
distance, indices = open3d.geometry.PointCloud.compute_point_cloud_distance(target, source)
target
: 目标点云。source
: 源点云。distance
: 目标点云中每个点的最短距离。indices
: 目标点云中每个点最近的源点的下标。import open3d
# 定义两个点云
target = open3d.geometry.PointCloud()
source = open3d.geometry.PointCloud()
# 计算点云之间的距离
distance, indices = target.compute_point_cloud_distance(source)
print(distance)
print(indices)
ValueError
错误。