feat: initial commit - massive-cloud point cloud processing system
This commit is contained in:
16
alg/point_porj/archive/relative_code/FPFH.py
Normal file
16
alg/point_porj/archive/relative_code/FPFH.py
Normal file
@@ -0,0 +1,16 @@
|
||||
import open3d as o3d
|
||||
import numpy as np
|
||||
|
||||
pcd = o3d.io.read_point_cloud("pointcloud.pcd")
|
||||
|
||||
# 1. 计算法线
|
||||
pcd.estimate_normals(search_param=o3d.geometry.KDTreeSearchParamKNN(k=30))
|
||||
|
||||
# 2. 提取FPFH特征
|
||||
fpfh = o3d.pipelines.registration.compute_fpfh_feature(
|
||||
pcd,
|
||||
o3d.geometry.KDTreeSearchParamKNN(k=50)
|
||||
)
|
||||
|
||||
# fpfh.data 是 (33, N) 的矩阵,每列是一个点的33维FPFH描述子
|
||||
print(fpfh.data.shape) # (33, N)
|
||||
Reference in New Issue
Block a user