• 沒有找到結果。

Matting and Compositing

N/A
N/A
Protected

Academic year: 2022

Share "Matting and Compositing"

Copied!
155
0
0

加載中.... (立即查看全文)

全文

(1)

Matting and Compositing

Digital Visual Effects, Spring 2008 Yung-Yu Chuang

2008/4/29

(2)

Outline

• Traditional matting and compositing

• The matting problem

• Bayesian matting and extensions

• Matting with less user inputs

• Matting with multiple observations

• Beyond the compositing equation*

• Conclusions

(3)

Outline

• Traditional matting and compositing

• The matting problem

• Bayesian matting and extensions

• Matting with less user inputs

• Matting with multiple observations

• Beyond the compositing equation*

• Conclusions

(4)

Photomontage

The Two Ways of Life, 1857, Oscar Gustav Rejlander Printed from the original 32 wet collodion negatives.

(5)

Photographic compositions

Lang Ching-shan

(6)

Use of mattes for compositing

The Great Train Robbery (1903) matte shot

(7)

Use of mattes for compositing

The Great Train Robbery (1903) matte shot

(8)

Optical compositing

King Kong (1933) Stop-motion + optical compositing

(9)

Digital matting and compositing

The lost world (1925) The lost world (1997)

Miniature, stop-motion Computer-generated images

(10)

Digital matting and composting

King Kong (1933) Jurassic Park III (2001)

Optical compositing

Blue-screen matting, digital composition, digital matte painting

(11)

Titanic

Matting and Compositing

(12)

Matting and Compositing

background replacement

background editing

(13)

Digital matting: bluescreen matting

Forrest Gump (1994)

• The most common approach for films.

• Expensive, studio setup.

• Not a simple one-step process.

(14)

Color difference method (Ultimatte)

Blue-screen photograph

C=F+αB

Spill suppression if B>G then B=G

F

Matte creation α=B-max(G,R)

α

demo with Paint Shop Pro (B=min(B,G))

(15)

Problems with color difference

Background color is usually not perfect! (lighting, shadowing…)

(16)

Chroma-keying (Primatte)

(17)

Chroma-keying (Primatte)

demo

(18)

Outline

• Traditional matting and compositing

• The matting problem

• Bayesian matting and extensions

• Matting with less user inputs

• Matting with multiple observations

• Beyond the compositing equation*

• Conclusions

(19)

Compositing

B F

C = α + (1 α)

F α B

C

foreground color alpha matte background plate composite

compositing equation

B

F C

α=0

(20)

Compositing

B F

C = α + (1 α)

F α B

C

composite

compositing equation

B

F

C α=1

(21)

Compositing

B F

C = α + (1 α)

F α B

C

composite

compositing equation

B

C F

α=0.6

(22)

Matting

C

observation

B F

C = α + (1 α)

compositing equation

F α B

(23)

Matting

C C = αF + (1 α)B

compositing equation

F α B

Three approaches:

1 reduce #unknowns 2 add observations 3 add priors

(24)

Matting (reduce #unknowns)

C

F BB

B F

C = α + (1 α)

difference matting

α

(25)

Matting (reduce #unknowns)

C F

B F

C = α + (1 α) B

blue screen matting

α

(26)

Matting (add observations)

F

B F

C = α + (1 α)

triangulation

α

B F

C = α + (1 α) B

C

(27)

Natural image matting

B C

Matting (add priors)

F

B F

C = α + (1 α)

α B

rotoscoping Ruzon-Tomasi

FG BG

unknown

(28)

Outline

• Traditional matting and compositing

• The matting problem

• Bayesian matting and extensions

• Matting with less user inputs

• Matting with multiple observations

• Beyond the compositing equation*

• Conclusions

(29)

Bayesian framework

f(z)+ε

z y

para- meters

observed signal )

| ( max

* P z y

z = z

) (

) ( )

| max (

y P

z P z

y P

= z

) ( )

| (

max L y z L z

z +

=

Example:

super-resolution de-blurring

de-blocking

(30)

Bayesian framework

) ( )

| (

max

* L y z L z

z

z +

=

2

) 2

(

σ

z f

data y −

evidence

a-priori knowledge

f(z)+ε

z y

para- meters

observed signal

(31)

Bayesian framework

likelihood priors posterior probability

(32)

Priors

(33)

Bayesian matting

(34)

Optimization

repeat

until converge 1. fix alpha

2. fix F and B

(35)
(36)
(37)
(38)
(39)
(40)
(41)
(42)
(43)
(44)
(45)
(46)
(47)
(48)
(49)
(50)
(51)
(52)

Demo

(53)

input trimapalpha

Results

(54)

input composite

Results

(55)

Comparisons

input imagetrimap

(56)

Comparisons

Bayesian Ruzon-Tomasi

(57)

Comparisons

Bayesian Ruzon-Tomasi

(58)

Comparisons

Mishima

(59)

Comparisons

Bayesian

(60)

Comparisons

input image

(61)

Comparisons

Bayesian Mishima

(62)

Comparisons

Bayesian Mishima

(63)

input video

Video matting

(64)

input key

trimaps input video

Video matting

(65)

interpo- lated trimaps

input video

Video matting

(66)

interpo- lated trimaps

input video

output alpha

Video matting

(67)

Compo- site

interpo- lated trimaps

input video

output alpha

Video matting

(68)
(69)

optical flow

(70)

optical flow

(71)
(72)
(73)
(74)
(75)
(76)
(77)
(78)
(79)

Sample composite

(80)

Garbage mattes

(81)

Garbage mattes

(82)

Background estimation

(83)

Background estimation

(84)

Alpha matte

(85)

Comparison

without background

with

background

(86)
(87)
(88)
(89)
(90)
(91)
(92)

C

B P(F)

(93)
(94)
(95)
(96)

Problems with Bayesian matting

• It requires fine trimaps for good results

• It is tedious to generate fine trimaps

• Its performance rapidly degrades when foreground and background patterns

become complex

• There is no direct and local control to the resulted mattes

(97)

Outline

• Traditional matting and compositing

• The matting problem

• Bayesian matting and extensions

• Matting with less user inputs

• Matting with multiple observations

• Beyond the compositing equation*

• Conclusions

(98)

Motivation

(99)

LazySnapping

(100)

LazySnapping

(101)

LazySnapping

(102)

LazySnapping

(103)

Matting approaches

• Sampling approaches: solve for each alpha separately by utilizing local

fg/bg samples, e.g. Ruzon/Tomasi, Knockout and Bayesian matting.

• Propagation approaches: solve the

whole matte together by optimizing, e.g. Poisson, BP, random walker,

closed-form and robust matting.

(104)

Poisson matting

(105)

Poisson matting

(106)

Robust matting

• Jue Wang and Michael Cohen, CVPR 2007

(107)

Robust matting

• Instead of fitting models, a non- parametric approach is used

Bayesian Robust

(108)

Robust matting

• We must evaluate hypothesized foreground/background pairs

Bj

Fi C

distance ratio

(109)

Robust matting

• To encourage pure fg/bg pixels, add weights

B F1

C

F2

(110)

Robust matting

• Combine them together. Pick up the best 3 pairs and average them

confidence

(111)

Robust matting

(112)

Robust matting

matte confidence

(113)

Matte optimization

Solved by Random Walk Algorithm

(114)

Matte optimization

data constraints

neighborhood constraints

(115)

Demo (EZ Mask)

(116)

Evaluation

• 8 images collected in 3 different ways

• Each has a “ground truth” matte

(117)
(118)

Evaluation

• Mean square error is used as the accuracy metric

• Try 8 trimaps with different accuracy for testing robustness

• 7 methods are tested: Bayesian,

Belief propagation, Poisson, Random Walk, KnockOut2, Closed-Form and Robust matting

(119)

Quantitative evaluation

(120)

Subjective evaluation

(121)

Subjective evaluation

(122)

Ranks of these algorithms

Poisson

Random walk Knockout2

Bayesian

Belief Propagation Close-form

Robust matting

accuracy 6.9

6.0 4.5 3.9 3.3 2.6 1.0

robustness 6.8

4.4 4.5 6.0 3.1 2.0 1.3

(123)

Summary

• Propagation-based methods are more robust

• Sampling-based methods often

generate more accurate mattes than propagation-based ones with fine

trimaps

• Robust matting combines strengths of both

(124)

Soft scissor

• Jue Wang et. al., SIGGRAPH 2007

• Users interact in a similar way to intelligent scissors

(125)

Flowchart

(126)

Flowchart

(127)

Soft scissor

(128)

Demo (Power Mask)

(129)

Outline

• Traditional matting and compositing

• The matting problem

• Bayesian matting and extensions

• Matting with less user inputs

• Matting with multiple observations

• Beyond the compositing equation*

• Conclusions

(130)

Matting with multiple observations

• Invisible lights

– Polarized lights – Infrared

• Thermo-key

• Depth Keying (ZCam)

• Flash matting

(131)

Invisible lights (Infared)

(132)

Invisible lights (Infared)

(133)

Invisible lights (Infared)

(134)

Invisible lights (Infared)

(135)

Invisible lights (Infared)

(136)

Invisible lights (Infared)

(137)

Invisible lights (Polarized)

(138)

Invisible lights (Polarized)

(139)

Thermo-Key

(140)

Thermo-Key

(141)

ZCam

(142)

Defocus matting

(143)

video

(144)

Matting with camera arrays

video

(145)

Flash matting

flash no flash matte

(146)

Flash matting

Background is much further than foreground and receives almost no flash light

(147)

Flash matting

Foreground flash matting equation

Generate a trimap and directly apply Bayesian matting.

(148)

Foreground flash matting

(149)

Joint Bayesian flash matting

(150)

Joint Bayesian flash matting

(151)

Comparison

flash no flash

(152)

Comparison

foreground flash matting

ioint Bayesian flash matting

(153)

Flash matting

(154)

Outline

• Traditional matting and compositing

• The matting problem

• Bayesian matting and extensions

• Matting with less user inputs

• Matting with multiple observations

• Beyond the compositing equation*

• Conclusions

(155)

Conclusions

• Matting algorithms improves a lot in these 10 years

• In production, it is still always

preferable to shoot against uniform backgrounds

• Algorithms for more complex backgrounds

• Devices or algorithms for automatic matting

參考文獻

相關文件

next_state。但是 state transition 卻寫在另一個 process 裡面,所以更新 current_state 的 delay 為影響到。但如果我們直接把 state transition 寫在和更新

Figure 1.9 illustrates a fractional-N modulator that achieves high spectral efficiency by using a digital transmit filter to obtain smooth transitions in the modulation data, and a

• The band-pass filter at the frontend filters out out-of-band signals and

Change Window Type to Video Sequence Editor. Add

– Change Window Type to Video Scene Editor – Select Add → Images and select all images – Drag the strip to the “1st Frame” in Layer

To support Test Project design and development, a rigorous quality assurance and design process is in place (Competition Rules sections 10.6-10.7 refer.) Once approved by

CeBIT is the world's largest trade fair showcasing digital IT and CeBIT is the world's largest trade fair showcasing digital IT and5. telecommunications solutions for home and work

• In Shutter-speed priority mode, photographers sets the shutter speed and the camera deduces the aperture. • In Program mode, the camera