feat: initial commit - massive-cloud point cloud processing system
This commit is contained in:
17
alg/point_porj/archive/relative_code/NE.py
Normal file
17
alg/point_porj/archive/relative_code/NE.py
Normal file
@@ -0,0 +1,17 @@
|
||||
import open3d as o3d
|
||||
import numpy as np
|
||||
pcd = o3d.io.read_point_cloud("pointcloud.pcd")
|
||||
|
||||
# 估计法线
|
||||
pcd.estimate_normals(
|
||||
search_param=o3d.geometry.KDTreeSearchParamHybrid(
|
||||
radius=0.1, # 搜索半径
|
||||
max_nn=30 # 最大邻居数
|
||||
)
|
||||
)
|
||||
|
||||
# 可视化法线
|
||||
o3d.visualization.draw_geometries([pcd], point_show_normal=True)
|
||||
|
||||
# 获取法线数据
|
||||
normals = np.asarray(pcd.normals)
|
||||
Reference in New Issue
Block a user