Commit 143fbea0 authored by oscar's avatar oscar

提交,测试代码

parent c6a2943d
...@@ -17,10 +17,17 @@ if __name__ == '__main__': ...@@ -17,10 +17,17 @@ if __name__ == '__main__':
file_path = "D:/pointcloud1.pcd" file_path = "D:/pointcloud1.pcd"
pcd = o3d.io.read_point_cloud(file_path) pcd = o3d.io.read_point_cloud(file_path)
print(pcd)
print(pcd.dimension())
center = np.array([0,0,0])
scalepcd = pcd.scale(0.001,center)
print(scalepcd)
# downpcd = pcd.voxel_down_sample(0.01)
# print(downpcd)
def save_pcd(vis): def save_pcd(vis):
#io.write_point_cloud(file_path, pcd, write_ascii=True) #io.write_point_cloud(file_path, pcd, write_ascii=True)
#print(file_path) #print(file_path)
return False return False
key_to_callback = {} key_to_callback = {}
key_to_callback[ord("S")] = save_pcd key_to_callback[ord("S")] = save_pcd
o3d.visualization.draw_geometries_with_key_callbacks([pcd], key_to_callback) o3d.visualization.draw_geometries_with_key_callbacks([scalepcd], key_to_callback)
\ No newline at end of file \ No newline at end of file
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment