Presentation is loading. Please wait.

Presentation is loading. Please wait.

Matting and Transparency 15-463: Computational Photography Alexei Efros, CMU, Spring 2010.

Similar presentations


Presentation on theme: "Matting and Transparency 15-463: Computational Photography Alexei Efros, CMU, Spring 2010."— Presentation transcript:

1 Matting and Transparency 15-463: Computational Photography Alexei Efros, CMU, Spring 2010

2 How does Superman fly? Super-human powers? OR Image Matting?

3 Physics of Alpha Matting Semi-transparent objects Pixels too large

4 alpha channel Add one more channel: Image(R,G,B,alpha) Sprite! Encodes transparency (or pixel coverage): Alpha = 1:opaque object (complete coverage) Alpha = 0:transparent object (no coverage) 0<Alpha<1:semi-transparent (partial coverage) Example: alpha = 0.7 Partial coverage or semi-transparency

5 Multiple Alpha Blending So far we assumed that one image (background) is opaque. If blending semi-transparent sprites (the “A over B” operation): I comp =  a I a + (1-  a )  b I b  comp =  a + (1-  a )  b Note: sometimes alpha is premultiplied: im(  R,  G,  B,  ): I comp = I a + (1-  a )I b (same for alpha!)

6 “Pulling a Matte” Problem Definition: The separation of an image C into –A foreground object image C o, –a background image C b, –and an alpha matte  C o and  can then be used to composite the foreground object into a different image Hard problem Even if alpha is binary, this is hard to do automatically (background subtraction problem) For movies/TV, manual segmentation of each frame is infeasible Need to make a simplifying assumption…

7 Average/Median Image What can we do with this?

8 Background Subtraction - =

9 Crowd Synthesis (with Pooja Nath) 1.Do background subtraction in each frame 2.Find and record “blobs” 3.For synthesis, randomly sample the blobs, taking care not to overlap them

10 Background Subtraction A largely unsolved problem… Estimated background Difference Image Thresholded Foreground on blue One video frame

11 Blue Screen

12 Blue Screen matting Most common form of matting in TV studios & movies Petros Vlahos invented blue screen matting in the 50s. His Ultimatte ® is still the most popular equipment. He won an Oscar for lifetime achievement. A form of background subtraction: Need a known background Compute alpha as SSD(C,Cb) > threshold –Or use Vlahos’ formula:  = 1-p 1 (B-p 2 G) Hope that foreground object doesn’t look like background –no blue ties! Why blue? Why uniform?

13 The Ultimatte p 1 and p 2

14 Blue screen for superman?

15 Semi-transparent mattes What we really want is to obtain a true alpha matte, which involves semi-transparency Alpha between 0 and 1

16 Matting Problem: Mathematical Definition

17 Why is general matting hard?

18 Solution #1: No Blue!

19 Solution #2: Gray or Flesh

20 Triangulation Matting (Smith & Blinn) How many equations? How many unknowns? Does the background need to be constant color?

21 The Algorithm

22 Triangulation Matting Examples

23 More Examples

24 More examples

25 Problems with Matting Images do not look realistic Lack of Refracted Light Lack of Reflected Light Solution: Modify the Matting Equation

26 Environment Matting and Compositing slides by Jay Hetler Douglas E. Zongker ~ Dawn M. Werner ~ Brian Curless ~ David H. Salsin

27 Environment Matting Equation C = F + (1-  )B +  C ~ Color F ~ Foreground color B ~ Background color  ~ Amount of light that passes through the foreground  ~ Contribution of light from Environment that travels through the object

28 Explanation of  R – reflectance image T – Texture image

29 Environment Mattes

30 Performance Calibration Matting: 10-20 minutes extraction time for each texture map (Pentium II 400Mhz) Compositing: 4-40 frames per second Real-Time?

31 How much better is Environment Matting? Alpha Matte Environment Matte Photograph

32 How much better is Environment Matting? Alpha Matte Environment Matte Photograph

33 Movies!

34 Fast Separation of Direct and Global Images Using High Frequency Illumination Shree K. Nayar Gurunandan G. Krishnan Columbia University SIGGRAPH Conference Boston, July 2006 Support: ONR, NSF, MERL Michael D. Grossberg City College of New York Ramesh Raskar MERL

35 source surface P Direct and Global Illumination A A : Direct B B : Interrelection C C : Subsurface D participating medium D : Volumetric translucent surface E E : Diffusion camera

36 direct global radiance Direct and Global Components: Interreflections surface i camera source j BRDF and geometry

37 High Frequency Illumination Pattern surface camera source fraction of activated source elements + i

38 High Frequency Illumination Pattern surface fraction of activated source elements camera source + - i

39 Separation from Two Images directglobal

40 Other Global Effects: Subsurface Scattering translucent surface camera source i j

41 Other Global Effects: Volumetric Scattering surface camera source participating medium i j

42 Diffuse Interreflections Specular Interreflections Volumetric Scattering Subsurface Scattering Diffusion

43 Scene

44 DirectGlobal

45 Real World Examples: Can You Guess the Images?

46 Eggs: Diffuse Interreflections DirectGlobal

47 Wooden Blocks: Specular Interreflections DirectGlobal

48 Kitchen Sink: Volumetric Scattering Volumetric Scattering: Chandrasekar 50, Ishimaru 78 DirectGlobal

49 Peppers: Subsurface Scattering DirectGlobal

50 Hand DirectGlobal Skin: Hanrahan and Krueger 93, Uchida 96, Haro 01, Jensen et al. 01, Cula and Dana 02, Igarashi et al. 05, Weyrich et al. 05

51 Face: Without and With Makeup GlobalDirect GlobalDirect Without Makeup With Makeup

52 Blonde Hair Hair Scattering: Stamm et al. 77, Bustard and Smith 91, Lu et al. 00 Marschner et al. 03 DirectGlobal

53 www.cs.columbia.edu/CAVE


Download ppt "Matting and Transparency 15-463: Computational Photography Alexei Efros, CMU, Spring 2010."

Similar presentations


Ads by Google