SLIDE 3 3
Bayesian Matting
“ “Video Matting of Complex Scenes Video Matting of Complex Scenes” ”, SIGGRAPH 2002 , SIGGRAPH 2002 “ “A Bayesian Approach to Digital Matting A Bayesian Approach to Digital Matting” ”, CVPR 2001 , CVPR 2001 Chuang Chuang, , Agarwala Agarwala, , Curless Curless, , Salesin Salesin, , Szeliski Szeliski
Bayesian Matting Overview Bayesian Matting Overview
- 1. Start with a user
- 1. Start with a user trimap
trimap
- 2. Solve for boundaries of the unknown region
Estimate F,B,α using probabilistic framework, relying
- n nearest pixels from trimap
- 3. Refine trimap
- 4. Back to (2)
- Find most likely
Find most likely (F, B, (F, B, α α) values for each ) values for each pixel. pixel.
Apply Bayes Bayes’ ’ Rule Rule
P(C) is constant with F,B, F,B, α α
Use log-
likelihood
) | , , ( max arg ) , , (
, ,
C B F P B F
B F
α α
α
= ) ( / ) ( ) ( ) ( ) , , | ( max arg
, ,
C P P B P F P B F C P
B F
α α
α
= ) ( ) ( ) ( ) , , | ( max arg
, ,
α α
α
P B P F P B F C P
B F
= ) ( ) ( ) ( ) , , | ( max arg
, ,
α α
α
L B L F L B F C L
B F
+ + + =
Bayesian Matting Bayesian Matting – Details
Estimating L(C| C|F,B, F,B,α α) )
This log-likelihood models error in the measurement
- f C and corresponds to a gaussian probability
distribution centered at μ=αF+(1- α)B with standard deviation σC
Estimating Color Correspondence
- The probability that color c agree with
The probability that color c agree with gaussian gaussian color model, parameterized with color model, parameterized with μ μ, , Σ Σ
- Taking the maximum logarithm (in respect to c)
Taking the maximum logarithm (in respect to c) ( ) ( ) ( )
1
1 ( , ) exp 2 2 det( )
T d
c c f c μ μ μ π
−
⎛ ⎞ − Σ − Σ = − ⎜ ⎟ ⎜ ⎟ Σ ⎝ ⎠
( ) ( )
1
( , )
T
L c c c μ μ μ
−
Σ = − − Σ −
Bayesian Matting – Details
Estimating L(F),L(B)
How well estimated F,B correspond to F/B color correspond to F/B color model model
L(F) Nearest known F points (weighted)