Guided Depth Image Filter-based Image Feathering

In this paper we propose a novel explicit image filter called guided alpha image filter for image feathering. Deferent from the traditional model, the guided imaged filter computes the filtering output by considering the content of a reference image. The guided depth image filter can be used as an edge-preserving smoothing operator like bilateral filter, but has better behaviors near edges. The proposed filter by using nonlocal neighborhoods, and contribute a simple and fast algorithm giving competitive results. Experimental results indicate that our matting results are comparable to the state of the art methods.


Introduction
Image matting or feathering refers to the problem of decomposing image into two parts, called foreground and background, which is a convex combination under the image compositing equation, where I i is the given pixel color, F i is the unknown foreground layer, B i is the unknown background layer, and α i is the unknown alpha matte.
This model enables compositing the extracted object over a novel background, and thus constitutes an invaluable tool in image editing, video production, and special effects in motion pictures.How to estimate the alpha matte in this model is the key point.
In recent decades, most matting techniques need a tri-map of the image before they can pull a matte.The tri-map specifies which regions of the image that is background, foreground, and an "unknown region" where matting must take place.Ruzon and Tomasi [1] describe a matting technique of using two un-orientated Guassian distributions to model the colors in the foreground and background region.All pixels in the unknown region are then said to fall within the color space between these two Gaussians.The alpha value of pixels in the unknown region can then calculated, as well as the unmixed colors for each pixel.The Poisson matting approach by Sun et al. [2] works directly on the gradient of the matte.This solves the effects of the wrong classification of colors in complex scenes in the statistical methods.The gradient of the matte is estimated in the image, and then recreated by solving Poisson equations.A smooth gradient is assumed between the foreground and background.This technique solves for a global matte gradient, and then allows the user to edit the gradient with various tools in a local manner.This technique produces better results than Bayesian techniques. A. Levin et al. [3] proposed closed-form matting, which avoids the estimating errors of background or foreground, derives a cost function from local smoothness assumptions on foreground and background.However, all of these methods need manually define the areas of matting.To solve this, A. Levin et al. [4] proposed spectral matting that can automatically computes a set of fundamental fuzzy matting components from the smallest eigen-vectors of a suitably defined Laplacian matrix.He et al. [5], [6] propose guided filter to speed up the computation complex instead the Laplacian matrix.This global sampling method utilized all samples available in the image.
In this paper, we introduce a guided depth image filter to matting.The guided depth image filter can be used as an edge-preserving smoothing operator like bilateral filter, but has better behaviors near edges.The organization of this paper is as follows.In Section 2, the bilateral filters, box filter and guided depth image filter will be discussed, and we will demonstrate an new image matting algorithm.We apply the novel model in image matting in Section 3. Finally, a conclusion is presented in Section 4.

Bilateral Filters
Tomasi et al. [7] proposed the bilateral filtering in 1998.The bilateral filtering smooths images while preserving edges, by means of a nonlinear combination of nearby image values.This method is noniterative, local, and simple.The traditional bilateral filter simultaneously weights pixels based on spatial distance from the centre pixel as well as distance in tone.The domain filter weights pixels based on their distance from the centre, where f(•) is image tonal values.The degree of tonal filter is set by σ R .The bilateral filter can be written as Note that kernels other than Gaussian kernels are not excluded.

Box Filter
The box image filter is in which each pixel in the resulting image has a value equal to the average value of its neighboring pixels in the input image.It is a form of low-pass filter and is a convolution.Due to its property of using equal weights it can be implemented using a much simpler accumulation algorithm which is significantly faster than using a sliding window algorithm.
In the frequency domain, the box filter has zeros and negative components.That is, a sine wave with a period equal to the size of the box will be blurred away entirely and wavelengths shorter than the size of the box may be phase reversed, as seen when two bokeh circles touch to form a bright spot where there would be a dark spot between two bright spots in the original image.

Guided Depth Image Filter
He et al. [5] proposed guided image filter (GIF) to overcome the gradient reversal artifacts occurring.The filtering process of GIF is firstly done under the guidance of the image G that can be another or the input image I itself.It is similar to the Joint Bilateral Filter [8] which is used to process the no-flash image I by using the flash image G. Let I p and G p be the intensity value at pixel p of the input and guided image, w k be the kernel window centered at pixel k, to be consistent with bilateral filter.GIF is then formulated by, where the kernel weights function where k µ and 2 k σ are the mean and variance of guided image G in local window w k , |w| is the number of pixels in this window.When both G p and G q are concurrently on the same side of an edge, the weight assigned to pixel q is large.When G p and G q are on different sides, a small weight will be assigned to pixel q.The GDIF also can be shortening as follows: The degree of smoothing GIF is adjusted by parameter ε.The larger the value of ε is, the smoother the filtered image will be.

Image Feathering
As mentioned before, the matting problem is severely underconstrained.We assume that, for gray-scale image, foreground F and background B are approximately constant in small patch around each pixel.We can rewrite Eq.( 1 where w j is a small patch around pixel j.
For color images, we can apply the gray-scale cost to each channel separately,

Experimental Results and Discussions
To estimate the effectiveness of the proposed method, we apply it to guided feathering.Firstly, a binary map is given (just like tri-map) in alpha matte near the object boundaries.The binary depth image can be obtained by active contour model-based segmentation methods [9], and is used as the filter input p.The input image I is the color image.Figure 1 shows the behaviors of two filters, In Fig. 1 we compare our results with the bilateral filtering-based matting method.Our result is visually comparable with the closed-form solution in this case.Both our method and Photoshop provide fast feedback (about 3s) for this image, while the closed-form solution [3] takes about five minutes to solve a huge linear system.

Conclusions
In this paper, we have presented a novel guided depth image filter for image matting.The guided depth image filter can be used as an edge-preserving smoothing operator like bilateral filter, but has better behaviors near edges.The proposed filter by using nonlocal neighborhoods, and contribute a simple and fast algorithm giving competitive results.
where x and y denote pixel spatial positions.The spatial scale is set by σ D , The range filter weights pixels based on the photometric difference, 2 ), expressing α as a linear function of the image I, where a = 1/(F-B), b = -B/(F-B), and w is a small image patch.α, a, and b can be gotten by minimize the cost function, over color channels.The cost function for the matting of RGB color images gray-scale case, a c and b can be eliminated from the cost function, yielding a quadratic cost in the α unknowns alone, where, G is guided depth image matrix.