dgp icon indicating copy to clipboard operation
dgp copied to clipboard

How to view and access 'depth' information

Open hcv1027 opened this issue 3 years ago • 2 comments

I'm trying to use the 'depth' information, but the visualization result looks very strange. I follow DDAD.ipynb example to draw depth image, but it looks like an empty image.

from matplotlib.cm import get_cmap
plasma_color_map = get_cmap('plasma')

ddad_train = SynchronizedSceneDataset(
    json_path,
    split='train',
    datum_names=['lidar', 'CAMERA_01', 'CAMERA_05', 'CAMERA_06', 'CAMERA_07', 'CAMERA_08', 'CAMERA_09'],
    generate_depth_from_datum='lidar'
)

sample_0 = ddad_train[0]
camera_01 = sample_0[0][0]

depth_map = plasma_color_map(camera_01['depth'])[:, :, :3]
plt.imshow((camera_01['depth']*255).astype(np.uint8))
)

This is what it looks like: depth

Is there a way to get DDAD depth information and show it like below image? 000007

hcv1027 avatar Nov 09 '21 03:11 hcv1027

Hi I am facing same issue, have you solved it?

yuchen2580 avatar Sep 04 '22 13:09 yuchen2580

Hi, @hcv1027 and @yuchen2580! Please find the following snippet in order to load the lidar Point Cloud onto the image. Data loading: grafik grafik

Relevant cell: grafik

Please do let me know if this helped!

kis-balazs avatar Jun 12 '24 14:06 kis-balazs