420 likes | 707 Views
An Iterative Optimization Approach for Unified Image Segmentation and Matting. Jue Wang 1 and Michael F. Cohen 2 University of Washington Microsoft Research. Known. Unknown. Introduction. Image Matting. Observed Image. Alpha Matte. Introduction. Trimap-based Matting. Background.
E N D
An Iterative Optimization Approach for Unified Image Segmentation and Matting Jue Wang1 and Michael F. Cohen2 University of Washington Microsoft Research
Known Unknown Introduction • Image Matting Observed Image Alpha Matte
Introduction • Trimap-based Matting Background Unknown Foreground Original Trimap Matte
Introduction • Matting After Segmentation • Trimap generation can be erroneous Automatically Generated Trimap Original + User’s input Graph-cut Segmentation [GrabCut, Rother et al., LazySnapping, Li et al., SIGGRAPH 2004]
Introduction • Our Approach: Unified Segmentation and Matting • No explicit trimap is required Iterative Optimization Initial Input Final Matte
Related Work • Blue Screen Matting • Mishima et al. 93 • Smith et al. SIGGRAGPH96 • Problem is simplified by photographing foreground objects against a constant-colored background
Related Work • Bayesian Matting, Chuang et al. CVPR2001 • Bayesian framework + MAP solver • Extended to video in Chuang et al. SIGGRAPH 2002 Bayesian Image Matting Bayesian Video Matting
Related Work • Poisson Matting, Sun et al. SIGGRAPH 2004 • Formulate matting as solving Poisson equations • Assumption: intensity change in the foreground and background is smooth • User can interactively manipulate the matte
Limitations of A Trimap • Key requirement for A trimap • should be as accurate as possible • Automatically generated trimap • is not optimal • can be erroneous • User specified trimap • can be very tedious to create
Observation: Image Hidden Random Field: Matte Goal: maximize Our Approach • Iterative Matte Optimization • Solving a Conditional Random Field (CRF)
Conditional Random Field (CRF) Markov Random Field (MRF) Goal: maximize Assumption: ‘s are dependent Assumption: ‘s are independent Goal: maximize CRF vs. MRF • In our system we solve CRF by iteratively solving MRFs Observations Y Hidden Field X
Iterative Solver • Color Sampling : The “conditional” part. Background Samples Foreground Samples
+ Iterative Solver • Solve MRF
+ Iterative Solver Step 1: Color Sampling Step 2: Solve MRF by Belief Propagation
MRF Set Up • Attributes of a Pixel/Node Foreground samples Background samples Observed color Observations Hidden Node Quantized alpha level Likelihoods Estimated foreground color 1. Limit the size of the MRF Estimated background color 2. Guide foreground/background sampling Uncertainty 3. Setting weights for nodes
Iterative Solver • Matte is estimated in a front-propagation fashion Region of Consideration Modeled as MRF Definite Foreground Definite Background
MRF Set Up • Attributes of a Pixel/Node Foreground samples Background samples Observed color Observations Hidden Node Quantized alpha level Likelihoods Estimated foreground color Estimated background color Uncertainty
MRF Set Up Local Sampling Local samples from low uncertainty areas are given high weights. • Color Sampling • Global Sampling • Train a GMM model on all foreground samples • Assign each sample to a single Gaussian • For a given node, choose the nearest Gaussian in color space, and collect samples belonging to this Gaussian • Global samples are given lower weight.
MRF Set Up • Data Costs Foreground samples Background samples Observed color Observations Hidden Node Quantized alpha level Likelihoods Estimated foreground color Estimated background color Uncertainty
MRF Set Up • Data Cost Foreground samples Background samples Observed color Observations Hidden Node Quantized alpha level Likelihoods Estimated foreground color Estimated background color Uncertainty
MRF Set Up • Neighborhood Cost p q
Solving MRF by Belief Propagation • Minimize T(p) Msg(p, T(p)) Msg(T(p),p) Msg(p, R(p)) Msg(L(p), p) Msg(R(p),p) Msg(p,L(p)) L(p) p R(p) Msg(B(p),p) Msg(p,B(p)) B(p)
Solving MRF by Belief Propagation • Minimize T(p) Msg(p, R(p)) L(p) p R(p) B(p)
Solving MRF by Belief Propagation • Minimize T(p) L(p) p R(p) B(p)
i j CRF Update Foreground samples Background samples Observed color Observations Hidden Node Quantized alpha level Estimated foreground color Estimated background color Uncertainty
CRF Update • Defining Uncertainties • Each pixel is associated with an uncertainty value • Pixels with low uncertainties will contribute more for solving the MRF
Results 0 3 6 14 9
Results Original image with user input Extracted Matte
Results • Comparison with Bayesian Matting User specified trimap Extracted matte using Bayesian matting
Results Original image with user input Extracted matte User specified trimap Estimated matte by Bayesian Matting
Results Original image with user input Extracted matte User specified trimap Estimated matte by Bayesian Matting
Extension to Video Automatic initialization on frame 2 Frame 1 Matte1 Matte 2 Matte 20 Matte 5 Matte 15 Matte 10
Extension to Video Extracted Matte Original Video All User Inputs
Failure Mode Original image with user input Extracted matte
Solution Extracted matte using our system User specified rough trimap Extracted matte using Bayesian Matting
Timings • A brute force implementation is computational expensive • 15-20 min for a 640*480 input image • Speedups • Fast Belief Propagation ideas [Felzenszwalb et al., CVPR 04] • Hierarchical methods • Using gradient information • Current system: 20-30 seconds per image
Future Directions • Combining all visual information • Color, texture, shape…
Summary • Solve a CDF for unified segmentation and matting • CDF solved iteratively • each iteration solves an MRF using Belief Propagation • Advantages: • No accurate trimap is required • Efficient for large semi-transparent objects • Extends to video • Disadvantages: • Computational expensive • No real-time interaction • Based only on color information