Vector about depth frame
The color data used in Matlab's "depth_example" and "depth_view_example" examples arrive as [R, G, B, R, G, B, ...] vectors, but "pipe.wait_for_frames (pipe.wait_for_frames) ); ”, Is it possible to obtain the depth frame obtained in the form of a vector from what is obtained by coloring the depth frame?
Also, what is the principle of calculating the vector of the depth frame obtained by realsense?
-
Does the MATLAB wrapper script in the link below that contains depth vector retrieval code help to answer your questions, please?
https://github.com/IntelRealSense/librealsense/issues/4245
Whilst that particular script does not use a colorizer, it may provide useful insights that you can adapt for the depth_example.m MATLAB example script.

-
I want to know what the principle is for the depth frame data before the depth camera is colored, which is obtained by the code "pipe.wait_for_frames ();".
Since the color data arrives as a [R, G, B, R, G, B, ...] vector, I think that the depth frame can also be obtained as a vector. -
The data sheet document for the 400 Series depth cameras provides the following explanation for how depth is calculated.
*********
The Intel RealSense D400 series depth camera uses stereo vision to calculate depth. The stereo vision implementation consists of a left imager, right imager, and an optional infrared projector. The infrared projector projects non-visible static IR pattern to improve depth accuracy in scenes with low texture.
The left and right imagers capture the scene and sends imager data to the depth imaging (vision) processor, which calculates depth values for each pixel in the image by correlating points on the left image to the right image and via shift between a point on the Left image and the Right image. The depth pixel values are processed to generate a depth frame. Subsequent depth frames create a depth video stream.
**********
Depth is calculated as a 16-bit uint16_t pixel depth value that can be converted to real-world meters by multiplying the 16-bit value by the Depth Unit Scale value of the camera (which is 0.001 by default on the 400 Series camera models). For example, if the uint16_t value was 65535 then multiplying it by 0.001 gives a real-world distance of 65.535 meters.
https://github.com/IntelRealSense/librealsense/issues/2348#issuecomment-418152047
The section of Intel's Projection documentation linked to below provides more information about this subject.
https://dev.intelrealsense.com/docs/projection-in-intel-realsense-sdk-20#section-depth-image-formats
Please sign in to leave a comment.
Comments
6 comments