How to save raw point cloud as .ply file in code?

A mesh can be saved as image
A fused point cloud can be saved as image
A raw point cloud within Depth Viewer Tool can be saved by image
Now how do I save a raw point cloud like the Depth Viewer Tool, but from using code (C++) instead of the tool?

Hi @Flocker,

You can use sl.Mat().write() (API documentation : Mat Class Reference | API Reference | Stereolabs ) function on your point cloud mat to save it to a .ply file. You just need to call the function after retrieving your point cloud as such:

zed.retrieveMeasure(point_cloud, MEASURE::XYZRGBA);

Hope this helps

This is what I was looking for and has helped me greatly! Thank you very much!

Can I save it as . bin file in code?


We don’t support .bin export. What format do you expect behind this extension ?