- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
When I deal with the color images and depth images, I find the pixels are not consistence in the color and depth image. ,there is an offset between the color images and the corresponding depth images. So what should I do?
Link Copied
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
The physical RGB and IR imager sensors in the camera are in different positions. So I would recommend performing an Align operation.
In the link below is a tutorial for aligning color with depth.
https://github.com/IntelRealSense/librealsense/tree/master/examples/align
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
I want to know if there is a way to align an image in the viewer, or how to align a color image with its corresponding depth image use code because I have obtained the color and depth images
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
An alternative to using the Align example program is to refer to this guide on the Align processing block:
The RealSense Viewer can align color with depth in its 3D point cloud mode. I do not know of a way to do alignment in ithe Viewer's default 2D mode though. A point cloud can have color and depth aligned in 3D mode using the process below:
STEP ONE
Enable both the depth stream and the RGB stream whilst in the default 2D mode
STEP TWO
Click on the '3D' button in the top corner of the RealSense Viewer to enter 3D point cloud mode.
STEP THREE
Click on the drop-down menu called 'Texture Source' and select the 'Color' option. Do not change the 'Depth Source' menu above it.
RGB and depth should now be aligned in the point cloud.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
I've tried this before. The point cloud extracted from the.bag file is color - and depth-aligned, but in a two-dimensional image the color - and depth-aligned image is not。Is that true?
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Yes, it is usually recommended that 2D alignments are done with code, using scripting such as the Align processing block that I linked to in my previous message.
An alternate method to the rs-align sample program to align color and depth is in the sample program 'grabcuts'
https://github.com/IntelRealSense/librealsense/tree/master/wrappers/opencv/grabcuts?language=en_US
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
I wonder if alignment can only be done when sampling, there is no way to align the samples that have been collected.
If select the 'Color' option in the'Texture Source' , point cloud and color are pixel aligned?
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
It is possible to do processing on non real-time data that has already been recorded, such as .raw and .bag files or PNG images of color and depth.
Here are a couple of example discussions about doing so with images.
https://github.com/IntelRealSense/librealsense/issues/2231
https://github.com/IntelRealSense/librealsense/issues/2534
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
I want to do it use matlab code, because the above discussions is so confusing for me.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
If you have a Windows PC, there is a compatibility 'wrapper' for MATLAB in the RealSense SDK 2.0 that can do alignment with a function called 'align.m'.
https://github.com/IntelRealSense/librealsense/tree/master/wrappers/matlab
The discussion linked to below talks about using align.m to do alignment between color and depth images.
https://github.com/IntelRealSense/librealsense/issues/2455
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
I have seen the answer :
https://github.com/IntelRealSense/librealsense/issues/2455#issuecomment-439939852
but I think it aligns the images in real time.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
I tried this method to align color images and depth images, but the results were disappointing.
Another problem, when I extract the point cloud using convert, there are always errors in CMAKE.
I have tried some methods, but it still doesn't work. Can you tell me how to solve it? Thank you.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Another way to do alignment may be with a MATLAB product called the Image Processing Toolbox. It is not inexpensive, but it does have a free trial version.
https://uk.mathworks.com/products/image.html
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
I don't know if the above method works for aligning color and depth images,but I will try it . Thank you very much for your timely reply, which is very important to me.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
I tried this method to align color images and depth images, but the results were disappointing.
Another problem, when I extract the point cloud using convert, there are always errors in CMAKE.
I have tried some methods, but it still doesn't work. Can you tell me how to solve it? Thank you.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
I tracked down a further discussion on aligning non-live depth and color images.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
I want to use ‘rs-convert’ to get the point cloud, because I used to extract depth also for point clouds. But when I extract the point cloud, it's always terminated.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
The rs-convert tool is for converting bag files to other formats, such ans PNG (image) and ply (point cloud). Are you trying to convert a bag file, please?
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Yes, I want to convert .bag file into .ply file,but the 'rs-convert' always stops as above.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
If you need the point cloud to have color and depth aligned, doing a bag to ply conversion of 2D data is probably not the best way to do it. This is because 3D point clouds need to take the "extrinsic" values of the camera into account when doing alignment, otherwise the results will be inaccurate.
I will refer this case directly to an Intel support member in the hope that they can provide a quick answer.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
In fact, what I need is the color images and the point cloud. I used depth images to get the point cloud before, but found that the point cloud was not aligned with the color images in this way.
I asked you this question before. You said click on the '3D' button in the top corner of the RealSense Viewer to enter 3D point cloud mode. And click on the drop-down menu called 'Texture Source' and select the 'Color' option. Do not change the 'Depth Source' menu above it.
I did the same when collecting data. So I thin this should be color aligned with the point cloud.

- Subscribe to RSS Feed
- Mark Topic as New
- Mark Topic as Read
- Float this Topic for Current User
- Bookmark
- Subscribe
- Printer Friendly Page