librealsense icon indicating copy to clipboard operation
librealsense copied to clipboard

Align color to depth without holes in the resulting image

Open EmmanuelCos opened this issue 7 years ago • 4 comments

Required Info
Camera Model D435
Operating System & Version Win10
Language C++

Hello, I am trying to extract the depth and color separatly. To do so, I first aligne color to depth (and not the opposite), as I want to have a 1280 * 720 resolution at the end. I've manage to do that, but the RGB image I get have black holes when there are holes in the depth image (I attach one example)

Is there a way to have the same image, but without these holes?

colorfl

Thanks and regards

EmmanuelCos avatar Feb 19 '19 16:02 EmmanuelCos

Most likely black pixels correspond to pixels in depth camera viewport that are occluded from RGB sensor by objects in the scene.

dorodnic avatar Feb 19 '19 17:02 dorodnic

Yes I know but my will is to have an aligned RGB pictures without holes... Do we know what transformation is made on the original RGB? Is there a resize or something that I could apply to the original one, and in this way I wouldn't have these holes and the RGB would be aligned to the depth?

EmmanuelCos avatar Feb 20 '19 10:02 EmmanuelCos

This is the transformation but I don't see how it can help. You are asking to get RGB values for pixels that the RGB sensor did not see.

dorodnic avatar Feb 20 '19 11:02 dorodnic

If you use the realsense ros driver and rviz you can fill in the occluded pixels with data from previous frames. You would have to move the mouse out of the way and then put it back while holding the camera still. I don't know if it works with a moving camera I have not tried.

https://github.com/intel-ros/realsense

darrell-rg avatar Feb 21 '19 00:02 darrell-rg