Commit 264b8663 authored by oscar's avatar oscar

提交保存

parent ff7752cf
......@@ -463,16 +463,17 @@ def Save_Cloud_File(cloud):
axis_pcd = o3d.geometry.TriangleMesh.create_coordinate_frame(size=5, origin=[0, 0, 0])
drawpointcloud += [axis_pcd]
savefile = os.path.join(cloud.path,cloud.pcdName)
savefile = os.path.join(cloud["path"],cloud["pcdName"])
o3d.io.write_point_cloud(savefile,pcd_save)
custom_draw_geometry_with_key_callback(drawpointcloud, savefile)
def Add_Cloud_box(save_cloud,add_idx,bbox,pickcloud):
save_cloud[add_idx].boxes.append(bbox)
save_cloud[add_idx].np_pcd += pickcloud
if save_cloud[0].isSave == 1:
save_cloud[add_idx]["boxes"].append(bbox)
tmp = np.vstack((save_cloud[add_idx]["np_pcd"],pickcloud))
save_cloud[add_idx]["np_pcd"] = tmp
if save_cloud[0]["isSave"] == 1:
Save_Cloud_File(save_cloud[0])
save_cloud.pop(0)
......@@ -487,12 +488,12 @@ def Check_Add_Cloud_box(save_cloud,bbox,pcd,child_dir,pcdName,path):
save_cloud[0].isSave = 1
elif add_idx == -1:
new_cloud = {}
new_cloud.np_pcd = np.array(pcd.points)
new_cloud.boxes = []
new_cloud.isSave = 0
new_cloud.child_dir = child_dir
new_cloud.pcdName = pcdName
new_cloud.path = path
new_cloud["np_pcd"] = np.array(pcd.points)
new_cloud["boxes"] = []
new_cloud["isSave"] = 0
new_cloud["child_dir"] = child_dir
new_cloud["pcdName"] = pcdName
new_cloud["path"] = path
save_cloud.append(new_cloud)
add_idx = 0;
return add_idx
......
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