none
Eliminating Depth Image "shadows" by Infilling RRS feed

  • General discussion

  • I thought I'd post this technique to help people working with the depth image.  I don't think I'm the first to figure it out, but I know plenty of people are concerned about this issue.

    The issue is that when you're close to the sensor, there is often a "shadow" in the depth image.  This is a result of the offset between the IR lens and IR light.  

    Basically, as a technique, I'm doing a simple 'in-fill': after I create a grayscale image (based on distance) from the depth stream, I perform a simple test for each pixel.

    1. Is the pixel blank (0,0,0)? If so, continue.

    2. Average the non-(0,0,0) adjacent cells, and put that value in instead of the blank pixel.

    (at the same time, I modify the values to set (255,255,255) to (0,0,0) too).

    You can see a demonstration here: http://mattharvest.com/?p=27

    • Changed type Eddy Escardo-Raffo [MSFT] Thursday, September 15, 2011 7:58 PM sharing a tip rather than asking a question with a specific answer
    Wednesday, September 14, 2011 2:30 AM