Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

How to view and access 'depth' information #52

Open
hcv1027 opened this issue Nov 9, 2021 · 2 comments
Open

How to view and access 'depth' information #52

hcv1027 opened this issue Nov 9, 2021 · 2 comments

Comments

@hcv1027
Copy link

hcv1027 commented Nov 9, 2021

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

@yuchen2580
Copy link

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

@kis-balazs
Copy link

kis-balazs commented Jun 12, 2024

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!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants