Skip to content

Depth image quality #4

@raoshashank

Description

@raoshashank

Hi, Thanks for the awesome dataset.
I am trying to extract the point cloud from the depth images from the zed2 data.
Here is an example image generated using the parser (uncropped)
image
I used the intrinsic matrix from the /zed2/zed_node/depth/camera_info topic,
specifically:

width = 1280
height = 720
focal_length_x = 523.3953857421875,
focal_length_y = 523.3953857421875,
cx = 648.6547241210938,
cy = 373.26031494140625,
z_min = 0.3
z_max = 20.0
z_scale = 255
z_filter = 5.0

and then calculated the point cloud as follows:

x, y = np.meshgrid(np.arange(width), np.arange(height))
x = (x - cx) / focal_length_x
y = (y - cy) / focal_length_y
z = z_min + depth*(z_max-z_min)/z_scale
pimg = np.stack((np.multiply(x, z), np.multiply(y, z),z), axis=-1)
points = pimg.reshape(-1, 3)
points = points[z.flatten() < z_filter]
colors = image.reshape(-1, 3) / 255.0 
colors = colors[z.flatten() < z_filter]

In open3d, I got the following:
Screenshot from 2024-11-06 20-01-51

This doesn't look right to me, please let me know if I'm using the data correctly.
Thank you in advance

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