import numpy as npimport pclimport randomcloud = pcl.load('bunny.pcd')print('cloud(size) = '+str(cloud.size))# Create a KD-Treetree = cloud.make_kdtree()# Output has the PointNormal type in order to store the normals calculated by MLSmls = cloud.make_moving_least_squares()mls.set_Compute_Normals (True)mls.set_polynomial_fit (True)mls.set_Search_Method (tree)mls.set_search_radius (0.03)# Use all neighbors in a radius of 3cm.# // Reconstructmls_points = mls.process ()print('cloud(size) = '+str(mls_points.size))pcl.save_PointNormal(mls_points, 'bunny-mls.pcd')