Open3D 预处理:降采样,求法线,切割等

预处理:降采样,求法线,切割等

import open3d as o3d
 
def down_sample(pcd):
    downpcd = o3d.geometry.voxel_down_sample(pcd,voxel_size=0.05)
    return downpcd
 
def estimate_normal(downpcd):
    o3d.geometry.estimate_normals(downpcd, 
    search_param= o3d.geometry.KDTreeSearchParamHybrid(radius=0.1,max_nn=30))
    return downpcd
 
def crop_pcd(pcd,path_file):
    vol = o3d.visualization.read_selection_polygon_volume(path_file)#"*.json"
    roi = vol.crop_point_cloud(pcd)
    roi.paint_uniform_color([1,0.5,0.5])
    return pcd


你可能感兴趣的:(可视化,Alignment)