I'm doing a project with depth image. But I have problems with noise and failed pixel reading with my depth camera. There are some spots and contours (especially edges) that have zero value. How to just ignore this zero value and blend it with surrounding values? I have tried dilation and erosion (morph image processing), but I still can't get the right combination. It indeed removed some of the noise, but I just need to get rid of zeros at all points


Depth Image




I want to get rid the black spot (for example black value is 0 or certain value), and blend it with its surround. Yes, I'm able to localized the spot using np.where or the similar function, but I have no idea how to blend it. Maybe a filter to be applied? I need to do this in a stream, so I need a fairly fast process, maybe 10-20 fps will do. Thank you in advance!


除了修补以外,还有其他方法吗?我一直在寻找各种喷绘,但是我不需要像喷绘这样的复杂技术。我只需要将其与简单的直线,曲线或形状以及1D混合即可。我认为上漆太过分了。此外,我需要它们足够快以用于10-20 fps的视频流,甚至更好。