Items with no label
3335 Discussions

To get depth value from Realsense

SKim60
Novice
1,686 Views

Hi all.

Today, I tried getting depth data from RealSense depth image for estimating error range.

I refer to this sample code https://software.intel.com/en-us/articles/using-librealsense-and-opencv-to-stream-rgb-and-depth-data RealSense - Using LibRealSense and OpenCV to stream RGB and Depth Data | Intel® Software

and added below code for save pixel data

cv::FileStorage fs("data_capture.xml", cv::FileStorage::WRITE);

fs << "depth" << ir ;

finally got .xml file

number of data is matched with number of pixels.

but I printed contour graph using MATLAB but it got this one different from real scene

/servlet/JiveServlet/showImage/2-467003-357629/pastedImage_1.png

So I searched and found out this documentation and RSDataCollector.git

https://software.intel.com/en-us/articles/realsense-depth-data RealSense - Getting started with the Depth Data provided by Intel® RealSense™ Technology | Intel® Software

https://github.com/IntelRealSense/rssdk-capture-xdm/blob/master/RSDataCollector.cpp rssdk-capture-xdm/RSDataCollector.cpp at master · IntelRealSense/rssdk-capture-xdm · GitHub

I think it can get depth value. however this script includes pxcsensemanager.h in Realsense SDK

It's not included librealsense.on Aero

So I want to get depth data of each pixels without Realsense SDK

please give me your help

0 Kudos
4 Replies
MartyG
Honored Contributor III
705 Views

I saw your post on the Aero drone forum, which said that you want to clarify if the RealSense SDK can be applied to the Intel Aero drone compute board in order to use the PXCImage function. So if you are using Aero, you want to find the depth using Librealsense running in the Yocto Project branch of Linux, yes? So when you say you want to do it without the RealSense SDK, you mean you want to do it in the Librealsense SDK?

I will begin by asking if you have seen this article on streaming depth data in Aero, which includes a script for doing so.

https://software.intel.com/en-us/articles/intel-aero-realsense-streaming-rgb-depth-data Intel® Aero Compute Board and Intel® RealSense™ Technology for Wi-Fi* Streaming of RGB and Depth Data | Intel® Software

0 Kudos
SKim60
Novice
705 Views

Hi MartyG I'm so sorry to reply late.

As Intel said on Aero forum, I can't use RealSense SDK on Aero board. and I want to use library package of realsense.

I already read that article you gave.but i couldn't get any information about this.

pixel data what I got consists of 0~255, 8bit unsigned integer format

how can I convert this to image and distance value?

0 Kudos
MartyG
Honored Contributor III
705 Views

To convert pixels to distance (depth) and image (color) for use with an Aero board, I would guess that in Librealsense you would need to use its version of the Projection function.

https://github.com/IntelRealSense/librealsense/blob/master/doc/projection.md librealsense/projection.md at master · IntelRealSense/librealsense · GitHub

0 Kudos
idata
Employee
705 Views

Hi greiny,

 

 

Do you still need assistance with this thread?

 

 

-Sergio A

 

0 Kudos
Reply