Save Point Cloud

Hey Guys,

Question regarding the Point Cloud.

Is there a way to save the point cloud or do I have to iterate over each pixel - as I do now - and save the array (X-Y-Z coordinates).
(For a project the data points should be saved in a .json file or a .png grayscale image hence this method).
At HD720 resolution this takes about 9 seconds per frame - so way too long.

Thanks for possible suggestions!

Best Regards,
David

Hi ,

Refer to this answer from Benjamin , in my Discussion thread, there is a function for this :slight_smile: !!

Please Note that below answer is from Benjamin on my Discussion ZED2/Spatial Mapping !!

[\Quote]
Hi,

The point cloud can be seen with difficulty on top of the camera image (naturally because it is the same color), however if you add a “classic” Unity cam, you may see more easily.

There is a SavePointClound() function in ZEDCamera.cs that you can use to save your fusedPointCloud (https://github.com/stereolabs/zed-unity/blob/master/ZEDCamera/Assets/ZED/SDK/NativeInterface/ZEDCamera.cs#L2249 ).
It can be saved as OBJ or PLY.

Best regards,
Benjamin Vallon [\Unquote]

Best
Ishan

1 Like

Hi,

Thx!

I saved this problem with the function: depth_map.get_data().
This returns an numpy array.

Best,
David