Converting .svo files to depth images with a greater max depth than default settings


I’m using a ZED2i camera and trying to get depth images at a distance greater than the 20m default. I know I can change the settings in depth viewer to 40m however when I use the ZED_SVO_Export sample to convert the video to get all of the depth images of the video it seems to use the default setting of 20m max depth and I lose a lot of the data in the images that I need. Is there a way to convert the .svo file to a sequence of depth images with the max depth of 40m?

Thanks in advance!

Hi @UOAiden
Welcome to the Stereolabs community.

The SVO does not contain depth information, it contains the RAW stereo images recorded from the camera stream.
The configuration of the application that you use to open the SVO sets the maximum depth, so you must modify the code of the ZED_SVO_Export application to set the correct required maximum depth in the InitParameters initialization.

Hi @Myzhar,

Thanks for the quick response! I’m a bit of a beginner with python so would you be able to provide a bit more detail? The ZED_SVO_Export application doesn’t open properly in a text editor so I’m guessing I should be modifying the svo_export python file?

Should I be adding a line of code to this section? i.e. def depth_maximum_distance = 40

# Specify SVO path parameter

  • init_params = sl.InitParameters()*
  • init_params.set_from_svo_file(str(svo_input_path))*

Thanks again,

Yes, exactly.

In C++:

init_params.coordinate_units = sl::UNIT::METER;
init_params.depth_maximum_distance = 40.0;

Hi @Myzhar,

I’ve modified the main.cpp code so it looks like this now. Do I need to compile the code for the application to reflect the new code?

// Specify SVO path parameter
InitParameters init_parameters;
init_params.coordinate_units = sl::UNIT::METER;
init_params.depth_maximum_distance = 40.0;


Yes, you must recompile it