Multithreaded extraction of depths and images from SVO/SVO2

Hi guys, I am using ZED SDK 4.0.8 (In the process of migrating to 4.1.2 :slight_smile:) together with the Jetson AGX Orin running ZED X cam. Broadly speaking, my use case is in precision agriculture. I am using the ZEDX + AGXOrin to collect data in the farm, and I save the data as SVO Format (SVO2 for the later SDK version).

I have been feeding the SVO file into my pipeline to extract metrics from the farm. This requires me to parse through the entire SVO file to extract RGB Image and Depth Measure. The recordings do tend to get rather long, with close to 10,000 frames being recorded. I am looking at the possibility of multithreading this extraction.

For example, given that get_svo_number_of_frames() gives an output of 8000 frames, can I create 4 threads with their own sl.Camera() object but starting from different points on the SVO file to extract different chunks of data?
Thread 1: 0-2000
Thread 2: 2001-4000
… and so on. I have not tried this yet, but I wanted to check if it is possible for multiple sl.Camera() objects to access the same SVO file. Thanks!

Hi @mukundbala,

In terms of specifically opening the same file from multiple threads, there should not be any issues as you will only be reading the file.

The only thing to be aware of would be the RAM and CPU/GPU usage depending on what kind of algorithms each of your threads will be using :slight_smile:

1 Like