120106 ch 5_basic image compositing_re

75
The Art and Science of Digital Compositing 김김김

Upload: carrotcg

Post on 25-Jan-2015

1.092 views

Category:

Documents


3 download

DESCRIPTION

 

TRANSCRIPT

Page 1: 120106 ch 5_basic image compositing_re

The Art and Science of Digital Compositing

김정근

Page 2: 120106 ch 5_basic image compositing_re

Chapter 5

Basic Image Compositing

Page 3: 120106 ch 5_basic image compositing_re

3

Agenda

Multisource Operators

The Matte Image

The Integrated Matte Channel

Additional Operators

Masks

Compositing with Premultiplied Images

Morphing

Page 4: 120106 ch 5_basic image compositing_re

Multisource Operators

Page 5: 120106 ch 5_basic image compositing_re

5

Multisource Operators

A B

Page 6: 120106 ch 5_basic image compositing_re

6

Add

O = A + B

Page 7: 120106 ch 5_basic image compositing_re

7

Subtract

O = A - B

Page 8: 120106 ch 5_basic image compositing_re

8

Subtract

Subtract 는 대칭되는 Operator 가 아님

(B + A) equals (A + B), but (A - B) does lot equal (B - A).

Page 9: 120106 ch 5_basic image compositing_re

9

Multisource Operators

A - B B - A

Page 10: 120106 ch 5_basic image compositing_re

10

Subtract

Subtract 는 대칭되는 Operator 가 아님

모든 0 이하 또는 음수 값을 클립

Subtract Operator 의 절대값을 반환하도록 지정하는 것은 유용 (Chapter 6)

절대값을 반환한 Subtract Operator 은 대칭 연산

(B + A) equals (A + B), but (A - B) does lot equal (B - A)

Page 11: 120106 ch 5_basic image compositing_re

11

Subtract

O = |A – B|

Page 12: 120106 ch 5_basic image compositing_re

12

Mix

O = (MV * A) + [(1 - MV) * B)

MV = mix value

이미지 B 의 25 % 와 이미지 A 의 75 % 를 혼합의 결과 소스이미지는 처음에는 이미지 A 의 100% 를

표현하기 위해서 단순히 mix 값을 애니메이트 한 뒤 마지막으로는 이미지 B 의 100% 를 표현

Page 13: 120106 ch 5_basic image compositing_re

The Matte Image

Page 14: 120106 ch 5_basic image compositing_re

14

The Matte Image

Page 15: 120106 ch 5_basic image compositing_re

15

The Matte Image

Page 16: 120106 ch 5_basic image compositing_re

16

The Matte Image

Matte Mask

Alpha Key

Page 17: 120106 ch 5_basic image compositing_re

17

The Matte Image

Matte Out

Mask off

배경을 들어나 보이기 위해 전경의 섹션을

어떤 영역에 영향을 주지 않기 위해 3 번째 이미지로

Page 18: 120106 ch 5_basic image compositing_re

18

The Matte Image

Matte Mask

Alpha Key비디오 세계에서 일반적인 다른 용어

컨트롤할 때 이미지를 참고하는 것 혹은 오퍼레이션에서 어떤 특정 파라미터들을

제한하는 용도 (ex : Color Correction) 로 사용

Page 19: 120106 ch 5_basic image compositing_re

19

The Matte Image

일반적인 이미지와 데이터에 관해서는 다르지 않음– 일반적인 이미지와 같은 방식으로 조작이 가능

Scene 의 시각적 표현을 제공 합성작업을 제어하는데 사용되는 유틸리티 이미지로써 사용

일반적으로 Single Channel 이며 흑백이미지– 세 개의 별도 채널이 필요치 않으며 지정된 컬러로 주어진 픽셀에 대한 투명도는 범위 0~1 에서 하나의 숫자값으로 표현

많은 시스템 파일 포맷이 싱글 채널이미지를 서포트 / 단순히 RGB 이미지의 세채널에 동일한 정보의 사본을 배치함– 중복되며 디스크 공간을 차지

매트 이미지가 네번째 채널 이미지의 파트일때 매트 채널 또는 알파채널

Page 20: 120106 ch 5_basic image compositing_re

20

Keymix

A B Matte

Page 21: 120106 ch 5_basic image compositing_re

21

Keymix

O = (A * M) + [(1 - M) * B]Mix operator 와 비슷하지만 고정된 Mix 값 대신

매트이미지에 의해 결정되어 각 픽셀에 대한 구체적인 혼합 값이 있음

Page 22: 120106 ch 5_basic image compositing_re

The Integrated Matte Channel

Page 23: 120106 ch 5_basic image compositing_re

23

The Integrated Matte Channel

R channel

G channel

B channel

A chan-nel

Color * al-pha

Page 24: 120106 ch 5_basic image compositing_re

24

The Integrated Matte Channel

Premultiplied Image

알파채널로 멀티플라이된 RGB 채널 이미지

tga, png, iff

Page 25: 120106 ch 5_basic image compositing_re

25

The Integrated Matte Channel

Premultiplied Image

*

Page 26: 120106 ch 5_basic image compositing_re

26

The Integrated Matte Channel

어떠한 이미지 A 는

Argb = The RGB channels only.

Aa = The alpha, or matte channel, only.

A = All the channels (be there three or more) of the

image

M = matte channel 을 독점적으로 사용되는 이미지 (Grayscale, Single

Channel)

Orgb = Argb + Brgb or Oa = Aa + Ba

Page 27: 120106 ch 5_basic image compositing_re

Over

27

O = (A * M) + [(1 - M) * B]

+

* *

-

=

Keymix 와 유사함 단 통합매트 채널을 활용하여 단순화함 (4 채널 )

Page 28: 120106 ch 5_basic image compositing_re

28

Over

Orgb = Argb + [ (1 - Aa) * Brgb ]

Oa = Aa + [ (1 - Aa) * Ba ]

Orgba = Argba + [ (1 - Aa) * Brgba ]

보조 알파채널로 완벽하게 Premultiplied 이미지가 됐을때 Over 의 방정식

출력이미지의 매트 채널의 방정식

4 채널에 대한 단순 방정식

전경에 대한 Premultiplied 이미지임을 가정하기 때문에 이것은 잘 작동함

Premultiplied 가 없을때나 다른 연산자를 함께 작업하는 경우에 혼란이 있을수 있음

Page 29: 120106 ch 5_basic image compositing_re

Additional Operators

Page 30: 120106 ch 5_basic image compositing_re

30

Additional Operators

A B Matte

Page 31: 120106 ch 5_basic image compositing_re

31

Multiply

O = A * B고정범위 0 ~ 1 를 가진 같은 픽셀을 곱하는 두개의

값은 원래의 값보다 항상 더 작은 값을 생성하기 때문에 항상 이미지가 어두운 결과를 생산함

Page 32: 120106 ch 5_basic image compositing_re

32

Screen

A B Matte

Page 33: 120106 ch 5_basic image compositing_re

33

Screen

O = 1 - (1 - A) * (1 - B)Screen 이펙트는 빛나는 물체 ( 유리잔과 같은

투명한 표면 ) 위에서 반사되는 성질을 정확하게 모방

Page 34: 120106 ch 5_basic image compositing_re

34

Screen

원본 Screen Operator

Page 35: 120106 ch 5_basic image compositing_re

35

Screen

원본 Screen Operator

Page 36: 120106 ch 5_basic image compositing_re

36

Maximum and Minimum

A B A Matte

Page 37: 120106 ch 5_basic image compositing_re

37

Maximum and Minimum

Maximum Minimum

Page 38: 120106 ch 5_basic image compositing_re

38

Maximum and Minimum

Foreground Image

MaximumBackground Image

Page 39: 120106 ch 5_basic image compositing_re

39

In

A B A Matte

Page 40: 120106 ch 5_basic image compositing_re

40

In

A in B B in A

O = A * Ba

Page 41: 120106 ch 5_basic image compositing_re

41

Out

A B A Matte

Page 42: 120106 ch 5_basic image compositing_re

42

Out

A outside of B B outside of A

O = A * (1 - Ba)

Page 43: 120106 ch 5_basic image compositing_re

43

Atop

A B A Matte

Page 44: 120106 ch 5_basic image compositing_re

44

Atop

A Atop B B Atop A

O = (A In B) Over B

Page 45: 120106 ch 5_basic image compositing_re

Masks

Page 46: 120106 ch 5_basic image compositing_re

46

Mask

어떤 Operator 효과의 범위를 제한하고자 할 때

분리된 매트를 사용 = Mask

Page 47: 120106 ch 5_basic image compositing_re

47

Mask

Mask Image with saturation(value : 0) controlled by the mask

Page 48: 120106 ch 5_basic image compositing_re

48

Mask

어떤 Operator 효과의 범위를 제한하고자 할 때

분리된 매트를 사용 = Mask

어떠한 소프트웨어 패키지는 특별한 경우 이미지로써 Mask 를 다루기도 하지만 대부분은

전체 프레임에 효과를 적용하고 Mask 를 사용하여 적당한 영역을 분리시키고 효과의 영향을

받지 않은 원본과 Mask 를 합성

0~1 사이의 range( 레인지 , 범위 ) 에서 이미지가 만들어졌다고 일반적으로 가정함으로

효과의 제한을 위해 Mask 를 사용하기 전에 범위를 0 ~ 1 로 Clamp 해줘야함

Page 49: 120106 ch 5_basic image compositing_re

Compositing with Premultiplied Images

Page 50: 120106 ch 5_basic image compositing_re

50

Compositing with Premultiplied Images

합성 Operator 가 원하는 Image Type 을 정확하게 이해하는 것은 매우 중요

Operator 에 따라 Premultiplied Image 를 다루고 있거나 혹은 Matte 와 분리해서

가져오도록 요구함

적절한 이미지 타입을 사용하지 않으면 다양한 Artifact 를 경험할 수 있음

Page 51: 120106 ch 5_basic image compositing_re

51

Compositing with Premultiplied Images

A background elementA foreground element

Page 52: 120106 ch 5_basic image compositing_re

52

Compositing with Premultiplied Images

foreground 를 위한 Soft-edge matte

Page 53: 120106 ch 5_basic image compositing_re

53

Compositing with Premultiplied Images

Foreground multiplied by the matte

Page 54: 120106 ch 5_basic image compositing_re

54

Compositing with Premultiplied Images

합성 시스템에서 모든 image 들이 다 premultiplied 되어 있을 때

Page 55: 120106 ch 5_basic image compositing_re

55

Compositing with Premultiplied Images

모든 이미지가 premultiplied 되어있다고 고려하는 시스템에서 , background image 위에 premultiplied 하지 않은 image 를 위치시켰을 경우- matte 가 0 인 지점에서도 여전히 결과물에 영향을 줌

- 수학적으로 두개의 이미지를 함께 더한것과 동일 - matte 만 갖고 있는 이미지를 합성하는 operator 를 이용해서 premultiplied image 에 적용한다면 역시 문제가 발생

Page 56: 120106 ch 5_basic image compositing_re

56

Compositing with Premultiplied Images

background 위에 두번 premultiplied 된 이미지가 있음 matte 가장자리를 따라 어두운 후광

가장자리 (edge) 가 너무 밝거나 너무 어두우면 대게 premultiply 문제와 관련되었다는 신호

Page 57: 120106 ch 5_basic image compositing_re

57

Compositing with Premultiplied Images

background 위에 두 번 premultiplied 된 이미지가 있음보다 일반적인 matte 를 가지고 합성했을때

operator 가 지원하는 이미지 type(premultiply 여부 ) 과 완전히 동기화시키더라도 , 좀 더 심도 있게 이미지 처리하다 보면 artifact 들이 또 생김

Page 58: 120106 ch 5_basic image compositing_re

58

Color Correcting and Combining Premultipied Images

Premultiplied image

Image 와 Matte 관계에 의존

Page 59: 120106 ch 5_basic image compositing_re

59

Color Correcting and Combining Premultipied Images

Page 60: 120106 ch 5_basic image compositing_re

60

Color Correcting and Combining Premultipied Images

Page 61: 120106 ch 5_basic image compositing_re

61

Color Correcting and Combining Premultipied Images

Page 62: 120106 ch 5_basic image compositing_re

62

Color Correcting and Combining Premultipied Images

Unpremultiplied image

Page 63: 120106 ch 5_basic image compositing_re

63

Color Correcting and Combining Premultipied Images

matte 로 다시 나눈 후에 premultiply

Page 64: 120106 ch 5_basic image compositing_re

64

Luminosity and the Image-Matte Rela-tionship

Alpha 채널 값을 줄임으로써 오브젝트가 결과적으로 더 밝아짐

– background 는 foreground element 를 관통하여 보여지게 될 것

– matte 채널값이 0 으로 줄어들수록 Over 대신 Add operator 를 사용한 것처럼 보일것

Background 위에 놓기 전에 Premultiplied Foreground image 의 Matte 채널 값에 0.6 을 곱한 이미지

Page 65: 120106 ch 5_basic image compositing_re

65

Luminosity and the Image-Matte Rela-tionship

이미지의 alpha 채널을 조작하여 이미지와 matte 와의 관계를 수정– Luminosity Operator / Opacity Operator

많은 시스템이 Addmix Operator 를 제공– 부분적으로 Transparent Matte 영역에서 Image – Matte 관계를 수정하기 위해 Lookup Curve 를 제공

Addmix 를 위한 source foreground image( 와 그것의 matte 채널 )

Page 66: 120106 ch 5_basic image compositing_re

66

Luminosity and the Image-Matte Rela-tionship

몇가지 Addmix variations( 바리에이션들 )

Page 67: 120106 ch 5_basic image compositing_re

67

Luminosity and the Image-Matte Relationship

image 들을 서로 layering 할 때 , 이미지와 Matte 관계의 선별적인 조작은 어떤

상황이 되어도 사용

– matte 채널을 살짝 수정하여 부분적으로 투명한 경계 (edge) 의 밝기에 영향을 주는 것도 대중적으로 사용

(ex : 밝은 background 에 금발 머리카락을 보다 잘 합치도록 할때 )

Page 68: 120106 ch 5_basic image compositing_re

Morphing

Page 69: 120106 ch 5_basic image compositing_re

69

The Matte Image

Warp Blending

Over

Page 70: 120106 ch 5_basic image compositing_re

70

Morphing

Page 71: 120106 ch 5_basic image compositing_re

71

Morphing

목적으로 하는 Image 와 Match 하기 위해 , Source 이미지가 Warp 되는 것을 보여주는 하나의 시퀀스

Page 72: 120106 ch 5_basic image compositing_re

72

Morphing

단순히 일정 시간 동안 이 둘을 dissolve

Page 73: 120106 ch 5_basic image compositing_re

73

Morphing

동일한 프레임에서 나란히 비교한 것 코 / 주둥이 영역은 좀 더 빨리 dissolve 함 : 아트적인 이유

(warp 결합지점을 숨기기에도 또한 유용 )

Page 74: 120106 ch 5_basic image compositing_re

Q & A

Page 75: 120106 ch 5_basic image compositing_re

감사합니다