Items with no label
Announcements
FPGA community forums and blogs on community.intel.com are migrating to the new Altera Community and are read-only. For urgent support needs during this transition, please visit the FPGA Design Resources page or contact an Altera Authorized Distributor.
3338 Discussions

How to get depth raw data and into OPENCV matrix

fHsu9
Beginner
1,774 Views

Hi,

I'm using a D435 camera. Is there a way to get the raw data (16-bit depth value) into OPENCV Mat?

Thanks!

0 Kudos
1 Reply
MartyG
Honored Contributor III
723 Views

There is a sample program for creating a .mat file from a colorized stream.

https://github.com/IntelRealSense/librealsense/tree/master/wrappers/opencv/imshow librealsense/wrappers/opencv/imshow at master · IntelRealSense/librealsense · GitHub

In this line mentioned in the article:

Mat image(Size(w, h), CV_8UC3, (void*)depth.get_data(), Mat::AUTO_STEP);

I think that if you wanted a non-colorized 8-bit stream, you would probably change the CV_8UC3 (an 8-bit colorized stream with 3 channels) to CV_16U

0 Kudos
Reply