How to export all the depth maps in a video at once

I found that in the Depth Viewer, I can only manually click to save the image, how to automatically export the depth map of all frames in the video

Hi @flower
Welcome to the Stereolabs community.

You can use these samples. You can modify them to save all the depth maps:

Thank you for your reply! @Myzhar
I’ve used this samples, but I’ve found a problem that I can’t solve:the depth map I exported using the Depth Viewer is very different from the depth map I exported using this sample!! Obviously, the Depth Viewer exports the depth map better. Is Depth Viewer using advanced algorithms?
Or, in which direction should I try to get a depth map that is as good as the Depth Viewer?


The image above is the depth map exported by DepthViewer

The image above is a depth map exported using my code
They are all 8-bit depth maps.


This is a normal image

This support guide explains what you are getting: