Skip to content

How to view and access 'depth' information #52

@hcv1027

Description

@hcv1027

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

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions