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?
連結已複製
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
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.
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
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
I want to do it use matlab code, because the above discussions is so confusing for me.
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
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.
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
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.
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.
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.
