poisson matting - image system laboratory...2016/02/03  · alpha channel matting 2019-04-10 7 -...

18
2019-04-10 Poisson Matting ISL 안재원 Sun, Jian, et al. "Poisson matting." ACM Transactions on Graphics (ToG) 23.3 (2004): 315-321.

Upload: others

Post on 28-Jun-2020

4 views

Category:

Documents


0 download

TRANSCRIPT

Page 1: Poisson Matting - Image System Laboratory...2016/02/03  · Alpha channel Matting 2019-04-10 7 - Problem Poisson Equation 2019-04-10 8 - Usage  1. Shadow

2019-04-10

Poisson Matting

ISL

안재원

※ Sun, Jian, et al. "Poisson matting." ACM Transactions on Graphics (ToG) 23.3 (2004): 315-321.

Page 2: Poisson Matting - Image System Laboratory...2016/02/03  · Alpha channel Matting 2019-04-10 7 - Problem Poisson Equation 2019-04-10 8 - Usage  1. Shadow

Matting

Poisson Equation

Poisson Matting

Result

2019-04-10

2

Page 3: Poisson Matting - Image System Laboratory...2016/02/03  · Alpha channel Matting 2019-04-10 7 - Problem Poisson Equation 2019-04-10 8 - Usage  1. Shadow

Matting2019-04-10

3

- Intro

3

I : 획득 영상J : 원본 영상t : 전달량A : 대기광Matting equation

))(1()()()( xtAxtxJxI

※ Haze Image Model

Page 4: Poisson Matting - Image System Laboratory...2016/02/03  · Alpha channel Matting 2019-04-10 7 - Problem Poisson Equation 2019-04-10 8 - Usage  1. Shadow

Matting2019-04-10

4

- Matting example

Page 5: Poisson Matting - Image System Laboratory...2016/02/03  · Alpha channel Matting 2019-04-10 7 - Problem Poisson Equation 2019-04-10 8 - Usage  1. Shadow

Matting2019-04-10

5

- Matting equation

I : 획득 영상F : Foreground

B : BackGround

𝛼 : Alpha channel

))(1()()()( xtAxtxJxI

※ Haze Image Model

BαFαI )1(

※ Matting equation

Page 6: Poisson Matting - Image System Laboratory...2016/02/03  · Alpha channel Matting 2019-04-10 7 - Problem Poisson Equation 2019-04-10 8 - Usage  1. Shadow

Matting2019-04-10

6

- Matting

Input Image User Trimap

Unknown

Background

Foreground

Probabilistic Model

Bayesian Model

Poisson Model

Closed Form Model

Alpha channel

Page 7: Poisson Matting - Image System Laboratory...2016/02/03  · Alpha channel Matting 2019-04-10 7 - Problem Poisson Equation 2019-04-10 8 - Usage  1. Shadow

Matting2019-04-10

7

- Problem

Page 8: Poisson Matting - Image System Laboratory...2016/02/03  · Alpha channel Matting 2019-04-10 7 - Problem Poisson Equation 2019-04-10 8 - Usage  1. Shadow

Poisson Equation2019-04-10

8

- Usage

<The Poisson Equation>

1. Shadow removal

2. Tone mapping

3. Image editing

4. Surface reconstruction

Page 9: Poisson Matting - Image System Laboratory...2016/02/03  · Alpha channel Matting 2019-04-10 7 - Problem Poisson Equation 2019-04-10 8 - Usage  1. Shadow

Poisson Equation2019-04-10

9

- Equation

T

nx

f

x

ff ),,(

1

- Gradient

nx

f

x

ff

1

- Divergence

f 2

),(),()(2

2

2

2

yxfyxyx

- The Poisson Equation

Second order PDE(Partial Differential Equation)

)( BF

Idiv

- Estimate Alpha channel

Page 10: Poisson Matting - Image System Laboratory...2016/02/03  · Alpha channel Matting 2019-04-10 7 - Problem Poisson Equation 2019-04-10 8 - Usage  1. Shadow

Poisson Matting2019-04-10

10

- Intro

<Assumption>

- Locally smooth(foreground, background)

<Overview>

1. Start with a user trimap

2. Estimate alpha values in unknown area.

3. Refine trimap

4. Back to ‘2.’

0F

0B

Background ForegroundUnknown Background ForegroundUnknown

Page 11: Poisson Matting - Image System Laboratory...2016/02/03  · Alpha channel Matting 2019-04-10 7 - Problem Poisson Equation 2019-04-10 8 - Usage  1. Shadow

Poisson Matting2019-04-10

11

- Calculating 𝛼

BαFαI )1(

※ Matting equation

BαFααBFI )1()(

Background ForegroundUnknown

αBFI )(

)( BF

1. Alpha channel 과 image의 gradient는 비례함.

2. 적분을 통해 Alpha channel을 구할 수 있음.

Page 12: Poisson Matting - Image System Laboratory...2016/02/03  · Alpha channel Matting 2019-04-10 7 - Problem Poisson Equation 2019-04-10 8 - Usage  1. Shadow

Poisson Matting2019-04-10

12

- Calculating 𝛼

ppp

p

p dpBF

I2

*

)(minarg

pB

pF : Nearest foreground pixel

: Nearest background pixel

- Variational problem(Guided interpolation)

- Poisson Equation

BF

Idiv

※ Pérez, Patrick, Michel Gangnet, and Andrew Blake. "Poisson image editing."ACM Transactions on Graphics (TOG). Vol. 22. No. 3. ACM, 2003.

Page 13: Poisson Matting - Image System Laboratory...2016/02/03  · Alpha channel Matting 2019-04-10 7 - Problem Poisson Equation 2019-04-10 8 - Usage  1. Shadow

Poisson Matting2019-04-10

13

- Calculating 𝛼

- Poisson Equation

BF

Idiv ),(

2

2

2

2

yxfyx

h

h

h

h

),(),(4),(),(),(),(

2yxf

h

yxhyxhyxyhxyhx

),(

),(

),(

),(

),(

),(

11411 yxf

hyx

hyx

yx

yhx

yhx

Page 14: Poisson Matting - Image System Laboratory...2016/02/03  · Alpha channel Matting 2019-04-10 7 - Problem Poisson Equation 2019-04-10 8 - Usage  1. Shadow

Poisson Matting2019-04-10

14

- Calculating 𝛼

6

52

4

8

7

93

1

410

141

014

410

141

014

410

141

014

100

010

001

000

000

000

000

000

000

100

010

001

100

010

001

100

010

001

),(

),(

),(

),(

),(

),(

),(

),(

),(

),(

),(

),(

),(

),(

),(

),(

),(

),(

99

88

77

66

55

44

33

22

11

99

88

77

66

55

44

33

22

11

yxf

yxf

yxf

yxf

yxf

yxf

yxf

yxf

yxf

yx

yx

yx

yx

yx

yx

yx

yx

yx

연립방정식을 풀어 Unknown영역의 Alpha channel값을 구한다.

),(

),(

),(

),(

),(

11411

hyx

hyx

yx

yhx

yhx

Page 15: Poisson Matting - Image System Laboratory...2016/02/03  · Alpha channel Matting 2019-04-10 7 - Problem Poisson Equation 2019-04-10 8 - Usage  1. Shadow

Poisson Matting2019-04-10

15

- Optimization

FFF BBB

- New trimap

pppF FIinp ,95.0|

pppB BIinp ,05.0|

- Refinement

- 2~3회 반복.

Page 16: Poisson Matting - Image System Laboratory...2016/02/03  · Alpha channel Matting 2019-04-10 7 - Problem Poisson Equation 2019-04-10 8 - Usage  1. Shadow

Result2019-04-10

16

- Intro

Page 17: Poisson Matting - Image System Laboratory...2016/02/03  · Alpha channel Matting 2019-04-10 7 - Problem Poisson Equation 2019-04-10 8 - Usage  1. Shadow

Result2019-04-10

17

- Intro

Page 18: Poisson Matting - Image System Laboratory...2016/02/03  · Alpha channel Matting 2019-04-10 7 - Problem Poisson Equation 2019-04-10 8 - Usage  1. Shadow

Q & A

2019-04-10