Secure your code as it's written. Use Snyk Code to scan source code in minutes - no build needed - and fix issues immediately.
pcd_np[:,3] = sigma_value
edge_np = np.delete(pcd_np, np.where(pcd_np[:,3] == 0), axis=0)
clmns = ['x','y','z','red','green','blue']
pcd_pd = pd.DataFrame(data=pcd_np,columns=clmns)
pcd_pd['red'] = sigma_value.astype(np.uint8)
#pcd_points = PyntCloud(pd.DataFrame(data=pcd_np,columns=clmns))
pcd_points = PyntCloud(pcd_pd)
edge_points = PyntCloud(pd.DataFrame(data=edge_np,columns=clmns))
# pcd_points.plot()
# edge_points.plot()
PyntCloud.to_file(pcd_points,output_dir+'pointcloud_edges.ply') # Save the whole point cloud by painting the edge points
PyntCloud.to_file(edge_points,output_dir+'edges.ply') # Save just the edge points
edge_np = np.delete(pcd_np, np.where(pcd_np[:,3] == 0), axis=0)
clmns = ['x','y','z','red','green','blue']
pcd_pd = pd.DataFrame(data=pcd_np,columns=clmns)
pcd_pd['red'] = sigma_value.astype(np.uint8)
#pcd_points = PyntCloud(pd.DataFrame(data=pcd_np,columns=clmns))
pcd_points = PyntCloud(pcd_pd)
edge_points = PyntCloud(pd.DataFrame(data=edge_np,columns=clmns))
# pcd_points.plot()
# edge_points.plot()
PyntCloud.to_file(pcd_points,output_dir+'pointcloud_edges.ply') # Save the whole point cloud by painting the edge points
PyntCloud.to_file(edge_points,output_dir+'edges.ply') # Save just the edge points