How to infer depth from server with zed sdk

hello
I currently capture cows with a zed camera connected to a pc located on the farm and send RGB data (.png) and depth data (.pgm) to the central server.

However, this would require 1 pc with gpu for each zed camera.

So the price is a bit daunting.

Is there any way to capture images from the left and right lenses with zed camera one by one, send them to the central server, and infer the depth through the zed sdk api in the central server?

regards,

Yoon

Hi @dohyeonYoon
this is possible by using the ZED Local Streaming feature:
https://www.stereolabs.com/docs/video/streaming/

Hi @dohyeonYoon
this is possible by using the ZED Local Streaming feature:
https://www.stereolabs.com/docs/video/streaming/

Best regards,

[Discourse post]

Walter

Walter Lucetti
Senior Developer
SDK / Robotics / HW
Stereolabs Support

Currently, the central server is located on an external network (a different Internet network from the farm).

So, as you said, the streaming method that only works on the local network with zed sdk seems impossible.

My final goal is:

  1. Connect the zed camera to a PC without gpu and take left and right RGB images
  2. Transmitting the two captured RGB images to the central server in the external network
  3. The central server (with gpu) receives two RGB images and creates a depth map using zed sdk

Is there any way to infer the depth by calling the api with zed sdk from the external central server after streaming to the external network?

or If there is any other good method, please recommend.

Best regards,

Yoon

There are two possible solutions:

  • use a VPN to use the local streaming module
  • record a short SVO instead of saving two RGB images

The ZED SDK cannot accept a pair of stereo images as an input.

Hello @Myzhar ,
first of all, thanks for the quick reply.

as your advice, I tested in the following environment.

OS: windows 10
CPU: Intel Core i7-9700
GPU: Intel UHD Graphics 630
(The external graphic card is removed, so there is only the built-in graphic card.)

  1. install zed sdk without cuda intsall in the above environment.
    (https://download.stereolabs.com/zedsdk/3.8/cu117/win)

  2. After installing zed sdk, python api was installed in the virtual environment.

  3. I ran the code below in the virtual environment where the python api was installed.
    (zed-examples/svo_recording.py at master · stereolabs/zed-examples · GitHub)

At this time, I faced the following error.

in void __cdecl sl::Mat::alloc(unsigned __int64,unsigned __int64,enum sl::MAT_TYPE,enum sl::MEM) : Err [999]: unknown error.
NO GPU DETECTED
CUDA error at Camera.cpp:121 code=999(cudaErrorUnknown) “void __cdecl sl::camera::close(void)”
CUDA error at Camera.cpp:149 code=999(cudaErrorUnknown) “void __cdecl sl::camera::close(void)”
CUDA error at Camera.cpp:174 code=999(cudaErrorUnknown) “void __cdecl sl::camera::close(void)”
CUDA error at Camera.cpp:214 code=999(cudaErrorUnknown) “void __cdecl sl::camera::close(void)”
CUDA error at Camera.cpp:219 code=999(cudaErrorUnknown) “void __cdecl sl::camera::close(void)”
CUDA error at sl_zed/CameraUtils.hpp:773 code=999(cudaErrorUnknown) “void __cdecl sl::ObjectsDetectorHandler::clear(void)”
CUDA error at sl_zed/CameraUtils.hpp:789 code=999(cudaErrorUnknown) “void __cdecl sl::ObjectsDetectorHandler::clear(void)”
CUDA error at sl_zed/CameraUtils.hpp:795 code=999(cudaErrorUnknown) “void __cdecl sl::ObjectsDetectorHandler::clear(void)”
CUDA error at sl_zed/CameraUtils.hpp:798 code=999(cudaErrorUnknown) “void __cdecl sl::ObjectsDetectorHandler::clear(void)”
CUDA error at sl_zed/CameraUtils.hpp:800 code=999(cudaErrorUnknown) “void __cdecl sl::ObjectsDetectorHandler::clear(void)”
CUDA error at sl_zed/CameraUtils.hpp:809 code=999(cudaErrorUnknown) “void __cdecl sl::ObjectsDetectorHandler::clear(void)”
CUDA error at Camera.cpp:234 code=999(cudaErrorUnknown) “void __cdecl sl::camera::close(void)”

It was not possible to save svo file with python api in virtual environment.

However, if I connect the camera through the zed explorer program, it works without any problems, and I can save the svo file.

may i know what is the problem?

As per your advice, I would like to save only one frame as an svo file with python code and send it to the central server.