How to fill the black patches in a kinect v1 depth image

倾然丶 夕夏残阳落幕 提交于 2020-01-07 02:44:08

问题


I am using Object segmentation dataset having following information:

Introduced: IROS 2012

Device: Kinect v1

Description: 111 RGBD images of stacked and occluding objects on table.

Labelling: Per-pixel segmentation into objects.

link for the page: http://www.acin.tuwien.ac.at/?id=289

I am trying to use the depth map provided by the dataset. However, it seems the depth map is completely black.

Original image for the above depth map

I tried to do some preprocessing and normalised the image so that the depth map could be visualised in the form of a gray image.

img_depth = cv2.imread("depth_map.png",-1) #depth_map.png has uint16 data type
depth_array = np.array(img_depth, dtype=np.float32)
frame = cv2.normalize(depth_array, depth_array, 0, 1, cv2.NORM_MINMAX)
cv2.imwrite('capture_depth.png',frame*255)

The result of doing this preprocessing is:

In one of the posts in stackoverflow, i read that these black patches are the regions where the depth map was not defined.

If i have to use this depth map, what is the best possible way to fill these undefined regions? (I am thinking of filling these regions with K-nearest neighbour but feel there could be better ways for this).

Are there any RGB-D datasets that do not have such problems or these kind of problems always exists? what are the best possible way to tackle such problems?

Thanks in Advance!


回答1:


Pretty much every 3d imaging technology will produce data with invalid or missing points. Lack of texture, too steep slopes, obscuration, transparency, reflections,... you name it.

There is no magic solution to filling these holes. You'll need some sort of interpolation or you maybe replace missing points based on some model.

The internet is full of methods for filling holes. Most techniques for intensity images can be successsfully applied to depth images.

It will depend on your application, your requirements and what you know about your objects.

Data quality in 3d is a question of time, money and the right combination of object and technology.




回答2:


Areas that absorb or scatter the Kinect IR (like glossy surfaces or sharp edges) are filled with zero pixel value (indicating non-calculated depth). A method to approximately fill the non-captured data around these areas is by using the statistical median of a 5x5 window. This method works just fine for Kinect depth images. An example implementation can be seen for Matlab and C# in the links.



来源:https://stackoverflow.com/questions/45352544/how-to-fill-the-black-patches-in-a-kinect-v1-depth-image

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!