Access ZED Gstreamer distance values in OpenCV SHMSink


I’m working on a fairly specific use case where I’m trying to stream the ZED camera from Gstreamer into shmsink and then read it into OpenCV for speed purposes. The issue I’m having is that I can’t seem to figure out how to read the depth map frame into any actually usable data within OpenCV. The SDK doesn’t seem to support it, and I’ve gotten everything working from the gstreamer sdk into OpenCV besides distance processing.

Is this possible, and if so are there any suggestions to how I may go about it?

Hi @ianmcvann
as explained in this post, the depth data are in 16 bit format, so the sink that you are using and the cv::Mat that you are creating must support this format

Thank you for the reply. I’ve managed to get the frame loaded into opencv, and I see what you mean with the 0 arrays. They do have values, but is there any way to get an actual usable distance from that?

Note that this is with depth mode 3.