Open3D Intrinsic shape signatures (ISS) 固有形状特征码
原创
©著作权归作者所有:来自51CTO博客作者一只大鸽子的原创作品,请联系作者获取转载授权,否则将追究法律责任
Intrinsic shape signatures (ISS) 固有形状特征码
在本教程中,我们将展示如何检测 3D 形状的 ISS 关键点。该实现基于于忠提出的关键点检测模块,“内在形状特征:用于3D对象识别的形状描述符”,2009年。( Yu Zhong , “Intrinsic Shape Signatures: A Shape Descriptor for 3D Object Recognition)
ISS Keypoints
ISS 显著性测度基于属于的点的散射矩阵的特征值分解(EVD)。
给定,其数量级数量级递减的特征值在这里表示为 λ1、λ2、λ3。在修剪阶段,保留两个连续特征值之间比率低于阈值的点:
其基本原理是避免在沿主要方向表现出类似扩散的点上检测关键点,在这些点上无法建立可重复的规范参考系,因此,随后的描述阶段很难变得有效。在其余点中,显著性由最小特征值的大小决定
以便仅包括沿每个主方向变化较大的点。
在检测步骤之后,如果某个点在给定邻域上具有最大显著性值,则该点将被视为关键点。
注意:有关更多详细信息,请参考原始出版物或Tombari et.al 的“3D关键点探测器的性能评估”(Performance Evaluation of 3D Keypoint Detectors)。
ISS keypoint detection example ISS 关键点检测示例
#Intrinsic shape siqnatures
import open3d as o3d
import time
# Compute ISS Keypoints on ArmadilloMesh
armadillo_path = r'../data/ArmadilloMesh.ply'
mesh = o3d.io.read_triangle_mesh(armadillo_path)
mesh.compute_vertex_normals()
pcd = o3d.geometry.PointCloud()
pcd.points = mesh.vertices
tic = time.time()
keypoints = o3d.geometry.keypoint.compute_iss_keypoints(pcd)
toc = 1000 * (time.time() - tic)
print("ISS Computation took {:.0f} [ms]".format(toc))
mesh.compute_vertex_normals()
mesh.paint_uniform_color([0.5, 0.5, 0.5])
keypoints.paint_uniform_color([1.0, 0.75, 0.0])
o3d.visualization.draw_geometries([keypoints, mesh])
# This function is only used to make the keypoints look better on the rendering
def keypoints_to_spheres(keypoints):
spheres = o3d.geometry.TriangleMesh()
for keypoint in keypoints.points:
sphere = o3d.geometry.TriangleMesh.create_sphere(radius=0.001)
sphere.translate(keypoint)
spheres += sphere
spheres.paint_uniform_color([1.0, 0.75, 0.0])
return spheres
# Compute ISS Keypoints on Standford BunnyMesh, changing the default parameters
bunny_path = r'../data/BunnyMesh.ply'
mesh = o3d.io.read_triangle_mesh(bunny_path)
mesh.compute_vertex_normals()
pcd = o3d.geometry.PointCloud()
pcd.points = mesh.vertices
tic = time.time()
keypoints = o3d.geometry.keypoint.compute_iss_keypoints(pcd,
salient_radius=0.005,
non_max_radius=0.005,
gamma_21=0.5,
gamma_32=0.5)
toc = 1000 * (time.time() - tic)
print("ISS Computation took {:.0f} [ms]".format(toc))
mesh.compute_vertex_normals()
mesh.paint_uniform_color([0.5, 0.5, 0.5])
o3d.visualization.draw_geometries([keypoints_to_spheres(keypoints), mesh])