-
Notifications
You must be signed in to change notification settings - Fork 2
Open
Description
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)

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:

This doesn't look right to me, please let me know if I'm using the data correctly.
Thank you in advance
Reactions are currently unavailable
Metadata
Metadata
Assignees
Labels
No labels