Saving all point clouds from an .svo


I’m wondering if anyone knows of any existing code for saving a point cloud from all frames in an .svo file as .ply files rather than just saving them through depth viewer.

I’ve only seen codes that can save point clouds from a live camera feed and I’ve been unable to successfully modify any of them to be able to do what I need. Any advice or info from anyone would be really appreciated!


Hi @UOAiden
you can use the sl::Mat::write function after each grabretrieveMeasure call:
C++: Mat Class Reference | API Reference | Stereolabs
Python: Mat Class Reference | API Reference | Stereolabs

Hi @Myzhar

Just coming back to this after a bit of a break & still haven’t quite figured this out. I am trying to save a large number of point clouds from a recorded svo file. I’ve wrote this python code but have been unable to get any results. From what I understand I don’t need the lines for opening the camera because I’m trying to use an already recorded svo but I’m not sure I’m setting the path correctly?

I also wanted to check if I’m using the retrieve measure function correctly?

Thanks in advance

import as sl

zed = sl.Camera()

#Set configuration parameters
svo_input_path = “C:/050523Bridge.svo”
init_params = sl.InitParameters()
init_params.coordinate_units = sl.UNIT.METER # Set units in meters
init_params.depth_mode = sl.DEPTH_MODE.ULTRA
init_params.depth_maximum_distance = 21

#open camera
err =

point_cloud = sl.Mat()
timer = 0
while timer < 600:
if zed.grab() == sl.ERROR_CODE.SUCCESS:
zed.retrieve_measure(point_cloud, MEASURE.XYZBGRA)

timer += 1