Normal-PCL-Python (80%)
Jupyter ๋ฒ์ ผ์ [์ด๊ณณ]์์ ํ์ธ ๊ฐ๋ฅ ํฉ๋๋ค.
import pcl
def get_normals(cloud_path):
"""
The actual *compute* call from the NormalEstimation class does nothing internally but:
for each point p in cloud P
1. get the nearest neighbors of p
2. compute the surface normal n of p
3. check if n is consistently oriented towards the viewpoint and flip otherwise
# normals: pcl._pcl.PointCloud_Normal,size: 26475
# cloud: pcl._pcl.PointCloud
"""
cloud = pcl.load(cloud_path)
feature = cloud.make_NormalEstimation()
#feature.set_RadiusSearch(0.1) #Use all neighbors in a sphere of radius 3cm
feature.set_KSearch(3)
normals = feature.compute()
return normalsLast updated
Was this helpful?