Community
cancel
Showing results for 
Search instead for 
Did you mean: 
Highlighted
New Contributor I
1,028 Views

Colorize Depth Frame in MATLAB

How do you colorize a depth frame in MATLAB? Simply using "colormap jet" doesn't work.

I came across https://github.com/IntelRealSense/librealsense/blob/c8ee8fa1912b9297df13bfe097d527667fe0afba/src/pro... this and https://github.com/IntelRealSense/librealsense/blob/efe67a9e7b69c7a8c3657456543b1a220095d08b/src/pro... this in the source code, but is there an easier way to do it in MATLAB?

Tags (1)
0 Kudos
4 Replies
Highlighted
Honored Contributor III
1 View

Re: Colorize Depth Frame in MATLAB

Are you trying to align the color and depth frames to create a combined RGBD image in MATLAB, please?

If so, the discussion linked to below about creating such a MATLAB setup with Pyrealsense2 and an SR300 may be of interest.

https://github.com/IntelRealSense/librealsense/issues/1231 Pyrealsense2: Question about 3D reconstruction problem · Issue # 1231 · IntelRealSense/librealsense · GitHub

0 Kudos
Highlighted
New Contributor I
1 View

Re: Colorize Depth Frame in MATLAB

No, I'm just trying to display the depth raw data in the coloured form shown by RealSense Viewer.

0 Kudos
Highlighted
Honored Contributor III
1 View

Re: Colorize Depth Frame in MATLAB

You are trying to color-code the depth image with MATLAB, like the colorized speckled depth image with the number scale beside it in the RealSense Viewer? That would be a Disparity Map.

MATLAB documentation on disparity mapping

https://uk.mathworks.com/help/vision/ref/disparity.html Disparity map between stereo images - MATLAB disparity- MathWorks United Kingdom

Example tutorial (others can be found by googling for 'disparity map matlab')

http://mccormickml.com/assets/StereoVision/Stereo%20Vision%20-%20Mathworks%20Example%20Article.pdf http://mccormickml.com/assets/StereoVision/Stereo%20Vision%20-%20Mathworks%20Example%20Article.pdf

0 Kudos
Highlighted
Beginner
1 View

Re: Colorize Depth Frame in MATLAB

Hi Leponzo,

Could you share with us how did you import the Depth image to MATLAB environment? In which format did you record the Depth image and how (which tool)?

0 Kudos