Commit 150f3ee8 authored by oscar's avatar oscar

提交更新

parent 286acf27
...@@ -445,10 +445,16 @@ if __name__ == '__main__': ...@@ -445,10 +445,16 @@ if __name__ == '__main__':
xyz = np.array(pcd.points) xyz = np.array(pcd.points)
drawpointcloud = []
merge_geos = [pcd] merge_geos = [pcd]
for bbox in bboxes: for bbox in bboxes:
flag = in_hull(xyz,bbox[1]) flag = in_hull(xyz,bbox[1])
print(xyz[flag]) point_cloud = o3d.geometry.PointCloud()
color_ = [[0, 1, 1]]
point_cloud.colors = o3d.utility.Vector3dVector(color_)
point_cloud.points = o3d.utility.Vector3dVector(xyz[flag])
drawpointcloud += [point_cloud]
drawpointcloud += [gen_o3d_3dbboxes(bbox[1])]
#渲染bbox #渲染bbox
merge_geos += [gen_o3d_3dbboxes(bbox[1])] merge_geos += [gen_o3d_3dbboxes(bbox[1])]
heading_point = (bbox[3][0] + bbox[3][2]) / 2 heading_point = (bbox[3][0] + bbox[3][2]) / 2
...@@ -464,7 +470,8 @@ if __name__ == '__main__': ...@@ -464,7 +470,8 @@ if __name__ == '__main__':
merge_geos += [axis_pcd] merge_geos += [axis_pcd]
#pcd.paint_uniform_color([1.00, 0, 0]) #pcd.paint_uniform_color([1.00, 0, 0])
custom_draw_geometry_with_key_callback(merge_geos, file_path) # custom_draw_geometry_with_key_callback(merge_geos, file_path)
custom_draw_geometry_with_key_callback(drawpointcloud, file_path)
# pcd_list = glob.glob("D:/work/git_workspace/jfxmap_python/script/data_aug_samples/10-1_pcds/*.pcd") # pcd_list = glob.glob("D:/work/git_workspace/jfxmap_python/script/data_aug_samples/10-1_pcds/*.pcd")
# print(pcd_list) # print(pcd_list)
\ 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