Commit 32af3c98 authored by oscar's avatar oscar

提交保存文件

parent c2bd2aab
......@@ -15,6 +15,12 @@ import scipy
if __name__ == '__main__':
str = "10_1/pcd/1629734723.170913000.pcd"
print(str.split('/'))
str1 = str.split('/')[-1]
print(str1[0:str1.find('.pcd')])
file_path = "D:/pointcloud1.pcd"
pcd = o3d.io.read_point_cloud(file_path)
print(pcd)
......
......@@ -434,6 +434,7 @@ if __name__ == '__main__':
origin_root_path = "/home/oscar/ros/git/jfxmap_python/script/data/10-1/"
generate_root_path = "/home/oscar/ros/git/jfxmap_python/script/data/5-3/"
save_root_path = "/home/oscar/ros/git/jfxmap_python/script/"
origin_child_dir = "N10_1"
generate_child_dir = "N5_3"
......@@ -453,6 +454,7 @@ if __name__ == '__main__':
#读标注的json文件
anno = {}
saveName = {}
jsn_file = os.path.join(origin_root_path, "origin/" + origin_child_dir + ".json")
print(jsn_file)
......@@ -475,10 +477,13 @@ if __name__ == '__main__':
if os.path.isfile(fileuri_path):
print(fileuri_path," ",fileuri)
anno[fileuri_path] = an['labels_box3D']
pcdname = an['fileuri'].split("/")[-1]
saveName[fileuri_path] = pcdname[0:pcdname.find('.pcd')]
num = 1
for file_path,boxx in anno.items():
f1 = open('test1.txt', 'w')
svaeFile = save_root_path + saveName[file_path] + ".csv"
f1 = open(svaeFile, 'w')
f1.write('lat,lon,x,y,z,l,w,h,rot_y')
# print(file_path)
# print(boxx)
......
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