First Approach:Region Growing



This approach implements a priority search algorithm to identify the connected depth component associated to the FG object. Then, the contour of the component is expanded to a band, and GrabCut is applied over the band in order to refine the result.



Single Pixel Selection

First Phase:

  1. We select an intial pixel (p) in the interior of the FG object. The depth value of this pixel (d0) is stored.
  2. We fix a parameter for global depth tolerance (ed) and a parameter for depth continuity (ec). 
  3. Breadth First Search is implemented to identify the connected component of pixels that contains p and satisfies global depth constraint ||d-d0||<ed  and depth continuity constraint ||dparent-dpixel||<ec.

Second Phase:

  1. Once the connected-depth component is identified, the pixels in the perimeter of this component are marked as contour pixels.
  2. We fix a parameter of width (w) and build a band around the contour pixels.
  3. The pixels in the perimeter of the band which belongs to the connected-depth component are marked as FG seeds, and those in the perimeter of the band that do not belong to the connected component are marked as BG seeds.
  4. From the FG and BG seeds we build the Color Models of Foreground and Background (using Gaussian Mixtures), and we construct the 8-connected graph associated to the band.
  5. Finally we apply Grabcut,we add the pixels labeled as FG to the connected connected-depth component, and we remove those labeled as BG.

Results

RGB Image Depth Image Graph Final Result
Fabian2 depthFabian2 graphFabian2SP resFabian2SingPix

Colour Based Depth Filter

DCSFabian2.png fabian2Mejorado.png cabezas.png

Remarks

Pros:

Cons: