3D点云的追踪
JulyLi2019 opened this issue · 3 comments
JulyLi2019 commented
你好,请问只有点云数据,如何只显示3D点云的追踪效果呢?
hailanyi commented
你可以初始化一个viewer,然后循环的往里面只加入点云和box就行了,以下是一个示例
from viewer.viewer import Viewer
import numpy as np
vi = Viewer() # set box_type='OpenPCDet' if you use OpenPCDet boxes
len_dataset = 1000
for i in range(len_dataset):
pseudo_boxes = np.array([[1+i*0.01, 1, 1, 1, 1, 1, 0]]) # your boxes
ids = np.array([i]) # your boxes ids (optional)
pseudo_points = np.random.randn(100, 3) # your points
vi.add_points(pseudo_points, radius=4)
vi.add_3D_boxes(pseudo_boxes, ids=ids)
vi.show_3D() # press the Enter key to view
JulyLi2019 commented
你可以初始化一个viewer,然后循环的往里面只加入点云和box就行了,以下是一个示例
from viewer.viewer import Viewer import numpy as np vi = Viewer() # set box_type='OpenPCDet' if you use OpenPCDet boxes len_dataset = 1000 for i in range(len_dataset): pseudo_boxes = np.array([[1+i*0.01, 1, 1, 1, 1, 1, 0]]) # your boxes ids = np.array([i]) # your boxes ids (optional) pseudo_points = np.random.randn(100, 3) # your points vi.add_points(pseudo_points, radius=4) vi.add_3D_boxes(pseudo_boxes, ids=ids) vi.show_3D() # press the Enter key to view
谢谢你的指导,目前已经可以连续播放点云数据了,但是每次按下回车总是会复原成初始化坐标系,我的数据集点云需要拉到上帝视觉才能看到点云与检测框,请问这个问题有什么好的解决办法吗?
hailanyi commented
Thank you for pointing out this problem, I have updated the viewer/ viewer.py. Now pressing Enter key will not reset the coordinate system.