1 / 39

SOFT SCISSORS: AN INTERACTIVE TOOL FOR REALTIME HIGH QUALITY MATTING

JUE WANG, MANEESH ARGAWALA, MICHAEL F. COHEN. SOFT SCISSORS: AN INTERACTIVE TOOL FOR REALTIME HIGH QUALITY MATTING. International Conference on Computer Graphics and Interactive Techniques ACM SIGGRAPH 2007. Outline. Introduction Related Work Algorithms Results and Evaluation Conclusion.

cain
Download Presentation

SOFT SCISSORS: AN INTERACTIVE TOOL FOR REALTIME HIGH QUALITY MATTING

An Image/Link below is provided (as is) to download presentation Download Policy: Content on the Website is provided to you AS IS for your information and personal use and may not be sold / licensed / shared on other websites without getting consent from its author. Content is provided to you AS IS for your information and personal use only. Download presentation by click this link. While downloading, if for some reason you are not able to download a presentation, the publisher may have deleted the file from their server. During download, if you can't get a presentation, the file might be deleted by the publisher.

E N D

Presentation Transcript


  1. JUE WANG, MANEESH ARGAWALA, MICHAEL F. COHEN SOFT SCISSORS: AN INTERACTIVE TOOL FOR REALTIME HIGH QUALITY MATTING International Conference on Computer Graphics and Interactive TechniquesACM SIGGRAPH 2007

  2. Outline • Introduction • Related Work • Algorithms • Results and Evaluation • Conclusion

  3. Introduction • Cp =αpFp + (1 − αp)Bp • C → input image • F → foreground image • B → background image • αp → the foreground opacity of the pixel

  4. Introduction • Previous matting algorithm • Require the user to roughly segment the image into a trimap. • Problem? trimap Very Inefficient If the initial results are not satisfactory, the user must the refine the trimap and run the algorithm again until the process converges.

  5. Introduction – The Aim • To Provide a tool that can generate high quality mattes in realtime. The user roughly specifies the foreground boundary using an intelligent paint stroke. The system automatically updates the matte and foreground colors according to the newly-add information along the stroke to instantly reveal a local region of the final composite.

  6. Related Work • GRADY, L. 2006. Random walks for image segmentation. IEEE Trans. Pattern Analysis and Machine Intelligence. • WANG, J., AND COHEN, M. F. 2007. Optimized color sampling for robust matting. In Proceedings of IEEE CVPR.

  7. The Soft Scissors Algorithms - Overview • Flowchart: • Assume that the scissor stroke implicitly defines a trimap. (left : background, right : foreground, middle : unknown)

  8. The Soft Scissors Algorithms - Overview • The boundary conditions and the width of the scissor stroke can be set manually by the user or dynamically adjusted by the system base on an analysis of the image statistics. Mt affects the alpha values of surrounding pixels The matting region Ωt

  9. The Soft Scissors Algorithms - Overview • 1. Estimate the alpha values for pixels in Ωt using a robust matte solver. • 2. The foreground colors of pixels in Ωt are updated by a foreground color solver that uses the newly computed alpha values.

  10. Solving for the Matte • Central component →robust matting algorithm ★Solving for α in the region as a soft graph-labeling problem. • For a pair of foreground and background colors and , the estimated alpha value is

  11. Solving for the Matte • We have to compute nonparametric models of the foreground and background color distributions. Virtual node representing pure foreground Virtual node representing pure background Represent unknown pixels

  12. Solving for the Matte • A data weight is defined between each pixel and a virtual node to enforce the data constraint. 1. γ is a free parameter. 2. δ is boolean function returning 0 or 1. 3. α and f are estimated alpha and confidence values.

  13. Solving for the Matte • Confidence value for a sample pair as • is a distance ratio. • , are two weights.

  14. Solving for the Matte • An edge weight is defined between two neighboring pixels to enforce the neighborhood constraint. • The edge weights constrain nearby pixels to have similar alpha values. Original algorithm : 3×3 windows Here is a different!! In this paper, each pixel is connected to its 25 spatial neighbors in this formulation.

  15. Solving for the Matte – Random Walk • Once the graph is constructed, we solve the graph-labeling problem as a Random Walk, which minimizes the total graph energy over real values. • How Random Walk solver work? • 1. The Random Walk solver determines the alpha values by placing a random walker at pixel i that can walk to any neighboring node j with probability .

  16. Solving for the Matte – Random Walk • 2. The walker then moves from j to another neighbor k in the same manner. • 3. Do this process iterates until the walker reaches one of the boundary nodes. • Alpha value of pixel i : the probability that the walker ends up at the foreground virtual node.

  17. Solving for the Foreground Colors • In addition to computing alpha values we also estimate the true foreground color F for each pixel in the unknown region. • This allows the foreground to be composed onto a new background without bringing the colors of the old background into the new composite. • In the matte estimation step, we just select a few foreground samples for each pixel, these samples are chosen individually without enforcing smoothness constraints.

  18. Solving for the Foreground Colors • After the matte estimation step, the composite may contain visual artifacts. • Left:Initial estimates of foreground colors after the matte estimation step. Right: Final foreground colors after optimization.

  19. Solving for the Foreground Colors • To achieve higher quality composites: ★Refine the estimated foreground colors by solving a second graph-labeling problem using Random Walk. Define a color edge weight between two neighbors as Unknown pixels : Those pixels in Ωt whose alpha values are strictly between 0 and 1 Each unknown pixel is connected to its 4 spatial neighbors.

  20. Solving for the Foreground Colors • The edge weight encodes explicit smoothness prior on F, which are stronger in the presence of matte edges. For background pixels, we use their initially estimated foreground colors in the matte estimation step as boundary conditions. For foreground pixels, we use their true colors as boundary conditions.

  21. Solving the Update Region • This system only update the alpha and foreground colors for small portion of the image on each iteration. • Given a new input region we compute the set of pixels that might be affected by the new information as the update region Ωt. • To determine the update region Ωt → solve a graph-labeling problem.

  22. Solving the Update Region • Newly marked pixels are treated as boundary pixels. (assigned label of 1) • The label represents the impact of the new input region on the pixel. • All other pixels that were marked in previous iterations are treated as unknown pixels.

  23. Solving the Update Region • We solve the problem using the way similar to the alpha estimation. • Each pixel is assigned a label measuring how much impact it receives from the new input region. • A smoother local image region will result in a large Ωt, since the weight between neighboring pixels are high, and vice versa.

  24. Choosing the scissor brush width • Wider scissors are appropriate for object edges that are very fuzzy. • Narrower scissors are better for sharper edges as they provide tighter bounds on the solution and greatly improve computation efficiency.

  25. Choosing the scissor brush width • At each time t, • 1. Compute the current scissor path direction • 2. Crete a side “look-ahead” region by extending the current path of the scissor along that direction. Look-ahead region

  26. Choosing the scissor brush width • Then, • 1. Treat all pixels in this region as unknowns and include them in Ωtfor alpha estimation. • 2. To estimate the matte profile we sample a group of pixels sparsely distributed along lines perpendicular to the current scissor path direction.

  27. Choosing the scissor brush width • For each sampled point on a line compute a weight as αp is the estimated alpha value of the point • The center of the 1D distribution along the line is computed as xpis the distance form a sampling point to the extended scissor path • The width of the alpha profile:

  28. Determining the boundary conditions • Initially, assume that the user orients the scissor brush strokes. • This system dynamically adjust the scissor boundary conditions by building color models of the foreground and background colors. • Once the user has created a short stroke and marked enough foreground/background pixels under the initial assumptions →Gaussian Mixture Models (GMM) Background region Foreground region

  29. Determining the boundary conditions • Use GMM models to solve the problem. • How? • 1. Sample a group of pixels along the newly added left edge. • 2. Compute a foreground and background probability and by fitting samples with foreground and background GMMs, and normalize them so they sum to 1.

  30. Determining the boundary conditions • 3. If , set the left edge to be foreground. If , set the left edge to be background. is a difference threshold • If the difference between the two probabilities is smaller than → keep the current boundary condition unchanged. • Re-compute the GMMs using the new samples after a set number of new foreground and background samples are marked by the user.

  31. Automatic vs. Manual Parameter Selection • If , we discard the automatically determined boundary conditions. • At any time the user can disable either automatic algorithm to regain full control over the brush parameters.

  32. Results and Evaluation

  33. Results and Evaluation • Higher quality results • Using Bayesian matting. (a). Original image. (b). Ground-truth matte. (c). Target image on which we apply matting algorithms.

  34. Results and Evaluation • Compare with other mattes:

  35. Results and Evaluation • Two visual examples: • Soft Scissors extracts mattes with the highest quality. (even better than Robust Matting)

  36. Results and Evaluation • Work well with more solid foreground objects. • Compare with binary cutout tools.

  37. Preliminary User Study These results clearly suggest that soft scissors provides an effective interface for foreground matting.

  38. Conclusion • The first realtime tool for generating high quality mattes and composites as the user roughly paints along the foreground boundary. • The scissor brush width and boundary conditions adjust automatically.

  39. References • CHUANG, Y.-Y., CURLESS, B., SALESIN, D. H., AND SZELISKI, R. 2001. A bayesian approach to digital matting. In Proceedings of IEEE CVPR, 264–271. • GRADY, L. 2006. Random walks for image segmentation. IEEE Trans. Pattern Analysis and Machine Intelligence. • LEVIN, A., LISCHINSKI, D., AND WEISS, Y. 2006. A closed form solution to natural image matting. In Proceedings of IEEE CVPR. • LI, Y., SUN, J., TANG, C.-K., AND SHUM, H.-Y. 2004. Lazy snapping. In Proceedings of ACM SIGGRAPH, 303–308. • LISCHINSKI, D., FARBMAN, Z., UYTTENDAELE, M., AND SZELISKI, R. 2006. Interactive local adjustment of tonal values. In Proceedings of ACM SIGGRAPH. • MORTENSEN, E., AND BARRETT, W. 1995. Intelligent scissors for image composition. In Proceedings of ACM SIGGRAPH. • ROTHER, C., KOLMOGOROV, V., AND BLAKE, A. 2004. Grabcut - interactive foreground extraction using iterated graph cut. In Proceedings of ACM SIGGRAPH, 309–314. • SUN, J., JIA, J., TANG, C.-K., AND SHUM, H.-Y. 2004. Poisson matting. In Proceedings of ACM SIGGRAPH, 315–321. • WANG, J., AND COHEN, M. 2005. An iterative optimization approach for unified image segmentation and matting. In Proceedings of ICCV 2005, 936–943. • WANG, J., AND COHEN, M. F. 2007. Optimized color sampling for robust matting. In Proceedings of IEEE CVPR.

More Related