Image Compositing and Matting. Introduction Matting and compositing are important operations in the production of special effects. These techniques enable.

Slides:



Advertisements
Similar presentations
SOFT SCISSORS: AN INTERACTIVE TOOL FOR REALTIME HIGH QUALITY MATTING International Conference on Computer Graphics and Interactive Techniques ACM SIGGRAPH.
Advertisements

Robust statistical method for background extraction in image segmentation Doug Keen March 29, 2001.
Keying and Green screen essential Pertemuan 06 Matakuliah : U0574 / DIGITAL COMPOSITING I Tahun : 2008.
Keying and Shot Manipulation Pertemuan 03 Matakuliah : U0584 / DIGITAL COMPOSITING II Tahun : 2009.
1 Computer Graphics Chapter 9 Rendering. [9]-2RM Rendering Three dimensional object rendering is the set of collective processes which make the object.
Computational Photography, Fall 2013
Video Matting from Depth Maps Jonathan Finger Oliver Wang University of California, Santa Cruz {jfinger,
Natural Video Matting using Camera Arrays Neel S. JoshiWojciech MatusikShai Avidan Mitsubishi Electric Research Laboratory University of California, San.
Green Screen. Objectives: 2. Understand what the difference is between a Luma key and a Chroma key. By the end of todays lesson students will: 3. Understand.
December 5, 2013Computer Vision Lecture 20: Hidden Markov Models/Depth 1 Stereo Vision Due to the limited resolution of images, increasing the baseline.
Boundary matting for view synthesis Samuel W. Hasinoff Sing Bing Kang Richard Szeliski Computer Vision and Image Understanding 103 (2006) 22–32.
Copyright  Pat Hanrahan Optical Printing From: “Special Optical Effects,” Zoran Perisic From: “Industrial Light and Magic,” Thomas Smith (p. 181)
Exchanging Faces in Images SIGGRAPH ’04 Blanz V., Scherbaum K., Vetter T., Seidel HP. Speaker: Alvin Date: 21 July 2004.
Matting and Transparency : Computational Photography Alexei Efros, CMU, Fall 2007.
 P Hanrahan & M Levoy “Pulling a Matte” - Matte Creation From digitized images o Blue-screen matting (Petro Vlahos) Separate blue background from foreground.
Efficient Moving Object Segmentation Algorithm Using Background Registration Technique Shao-Yi Chien, Shyh-Yih Ma, and Liang-Gee Chen, Fellow, IEEE Hsin-Hua.
1cs426-winter-2008 Notes  More papers to read: T. Duff, "Compositing 3-D rendered images", SIGGRAPH 1985 R. Cook, "Distributed ray tracing", SIGGRAPH.
Copyright  Pat Hanrahan Composing Two Elements Background ForegroundTraveling Matte Holdout Matte * *+ += =
Natural Video Matting with Depth Jonathan Finger Oliver Wang University of California, Santa Cruz {jfinger,
Advanced Computer Graphics (Spring 2005) COMS 4162, Lecture 6: Image Compositing, Morphing Ravi Ramamoorthi
Samuel W. Hasinoff Sing Bing Kang Richard Szeliski Interactive Visual Media Group Microsoft Research Dept. of Computer.
Abstract Extracting a matte by previous approaches require the input image to be pre-segmented into three regions (trimap). This pre-segmentation based.
Announcements Final project presentations on Wednesday Each group has 10 minutes Place.ppt talk in artifact directory Final reports due on Friday at 11:59pm.
Matting and Transparency : Computational Photography Alexei Efros, CMU, Fall 2006.
An Iterative Optimization Approach for Unified Image Segmentation and Matting Hello everyone, my name is Jue Wang, I’m glad to be here to present our paper.
Environment Matting and Compositing CS 395 – Advanced GraphicsPresented by Jay Hetler Douglas E. Zongker ~ Dawn M. Werner ~ Brian Curless ~ David H. Salsin.
Three-Dimensional Concepts
Copyright  Pat Hanrahan Composing Two Elements Background ForegroundTraveling Matte Holdout Matte * *+ += =
Matting : Rendering and Image Processing Alexei Efros …with many slides from Kyros Kutulakos.
Computer-Based Animation. ● To animate something – to bring it to life ● Animation covers all changes that have visual effects – Positon (motion dynamic)
02/14/02(c) University of Wisconsin 2002, CS 559 Last Time Filtering Image size reduction –Take the pixel you need in the output –Map it to the input –Place.
Film Terms. 24 Frames Per Second Backlighting Alternate Ending Motif Rear Projection Balance Hand Held Camera Blue / Green Screen.
Light and shading Source: A. Efros.
Supervisor : Mikael Fernstrom.  Story Telling  Script writing  Visual Effects - Practical / Digital / Optical  Foley Sound  Problem Solving  Visuals.
NEW MEDIA & CINEMA BY: MINNA YUNG SHAN PENG INFO 303 New Media Theory.
Integration Of CG & Live-Action For Cinematic Visual Effects by Amarnath Director, Octopus Media School.
Computer Vision Spring ,-685 Instructor: S. Narasimhan PH A18B T-R 10:30am – 11:50am Lecture #13.
1 Perception, Illusion and VR HNRS 299, Spring 2008 Lecture 14 Introduction to Computer Graphics.
Digital Face Replacement in Photographs CSC2530F Project Presentation By: Shahzad Malik January 28, 2003.
Cinematography in Augmented Reality Richard Shemaka.
Addison Wesley is an imprint of © 2010 Pearson Addison-Wesley. All rights reserved. Chapter 5 Working with Images Starting Out with Games & Graphics in.
Filtering and Color To filter a color image, simply filter each of R,G and B separately Re-scaling and truncating are more difficult to implement: –Adjusting.
Capturing light Source: A. Efros.
1. 2 What do these things have in common?
COMPOSITING USING BLUE AND GREEN SCREENS   Background filmed or.
Digital Image Compositing. Compositing for volume rendering c1 c2 c3 The initial pixel color = Black opaque Back-to-Front compositing: use ‘under’ operator.
RENDERING Introduction to Shading models – Flat and Smooth shading – Adding texture to faces – Adding shadows of objects – Building a camera in a program.
Enhance Your Classroom Video Projects
Multiple Light Source Optical Flow Multiple Light Source Optical Flow Robert J. Woodham ICCV’90.
Graphics Graphics Korea University cgvr.korea.ac.kr Image Processing 고려대학교 컴퓨터 그래픽스 연구실.
Visual Appearance Chapter 4 Tomas Akenine-Möller Department of Computer Engineering Chalmers University of Technology.
UniS CS297 Graphics with Java and OpenGL Blending.
Multimedia Programming 14: Matting Departments of Digital Contents Sang Il Park.
CISC 110 Day 3 Introduction to Computer Graphics.
Graphics III Image Processing II.
Improving Image Matting using Comprehensive Sampling Sets CVPR2013 Oral.
Matting and Transparency : Computational Photography Alexei Efros, CMU, Spring 2010.
Che-An Wu Background substitution. Background Substitution AlphaMa p Trimap Depth Map Extract the foreground object and put into another background Objective.
Green Screen Prof Oakes. Lecture Outline Intro Definition Terms History Process Lighting and Shooting Practice pulling Green Screen in FCP.
Computer Graphics Chapter 9 Rendering.
Multimedia Summer Camp
Images Presentation Name Course Name Unit # – Lesson #.# – Lesson Name
Three-Dimensional Concepts. Three Dimensional Graphics  It is the field of computer graphics that deals with generating and displaying three dimensional.
Composing Two Elements
Digital compositing Iwan Sonjaya,MT.
Common Classification Tasks
Matting, Transparency, and Illumination
© University of Wisconsin, CS559 Spring 2004
Images Presentation Name Course Name Unit # – Lesson #.# – Lesson Name
Computer Graphics Image processing 紀明德
Presentation transcript:

Image Compositing and Matting

Introduction Matting and compositing are important operations in the production of special effects. These techniques enable directors to embed actors in a world that exists only in imagination, or to revive creatures that have been extinct for millions of years. During matting, foreground elements are extracted from a film or video sequence. During compositing, the extracted foreground elements are placed over novel background images.

Traditional approaches to matting Traditional approaches to matting include blue-screen matting and rotoscoping. The former requires filming in front of an expensive blue screen under carefully controlled lighting The latter demands talent and intensive user interaction.

Rotoscoping Rotoscoping --- the process of tracking contours in a video sequence

Basic problem of blue screen matting Given an image of a foreground object shot in front of a backing color (blue screen or green screen or other colors) Obtain a matte of the foreground object so that the foreground object can be blended into a new background image using the matte to produce a new composite image.

Notations Let C = [R, G,B] denote a color with 0 ≤ R, G, B ≤ 1. Let  denotes a transparency value with 0 ≤  ≤ 1. Foreground image color: C f = [R f,G f,B f ],  f = 1 Backing (screen) color: C k = [0, 0,B k ],  k = 1 (assuming blue screen) Original foreground object color: C o = [R o,G o,B o ] Background image color: C b = [R b,G b,B b ],  b = 1 Composite image color: C c = [R c,G c,B c ]

Problem Statement Given C f and C b at corresponding pixels, and C k a known backing color, and assuming C f =  o C o + (1 −  o )C k Determine  o and C o, which then gives the composite color C c =  o C o + (1 −  o )C b at the corresponding point, for all points that C f and C b share in common.

Solution Since C f =  o C o + (1 −  o )C k, we have: 4 unknowns, 3 equations… R f =  o R o G f =  o G o B f =  o B o + (1 −  o )B k.

Case 1: No Blue There is no blue in C o, i.e., B o =0, and B k ≠0. Then This case is very restrictive. It rules out many colors, including grays because grays have blue.

Case 2: Gray and Skin Color Assume R o =aB o (or G o =aB o ) and B k ≠0 Then where

Example 1: Gray Then This case applies to science fiction movie in which the spaceships are mostly gray.

Example 2: Skin Color This case applies to human faces, hands, legs, etc.

Solution for General Cases To solve the matting problem in general: Need to take the same image with two different backing colors. This gives four equations for solving the four unknowns Case 1: Use Two Different Shades of Blue. Case 2: Use Two Different Backing Colors.

Case 1 Use two different shades of blue B k1 and B k2 as backing colors. Then so

Case 2 Use two different backing colors C k1 and C k2. Or Over-constrained, 1 unknowns, three equations

Case 2: Solution 1 Adding up 3 equations:

Case 2: Solution 2 Apply least squares method Define: Then Least-squares

Least-Squares Set

Case 1 Example

Case 2 Example

Other Developments in Matting Matting Without Blue Screen A method proposed by Ruzon and Tomasi User specify object region and boundary region. Alpha value of object region is set to 1. Alpha value of boundary region is computed by estimating the contributions of neighboring objects’ colors.

Example

Bayesian Approach

Shadow Matting Pull a matte of shadow. Acquire photometric and geometric properties of the target scene by sweeping oriented linear shadows across it. Then, composite the shadow onto the scene.

Example

Environmental Matting Left: alpha matte. Middle: environment matte. Right: photo.

References 1. Y.-Y. Chuang, B. Curless, D. H. Salesin, and R. Szeliski. A bayesian approach to digital matting. In Proc. IEEE CVPR, pages II–264–II–271, Y.-Y. Chuang, D. B. Goldman, B. Curless, D. H. Salesin, and R. Szeliski. Shadow matting and compositing. ACM Transactions on Graphics, 22(3):494–500, July M. A. Ruzon and C. Tomasi. Alpha estimation in natural images. In Proc. IEEE CVPR, pages 18–25, A. R. Smith and J. F. Blinn. Blue screen matting. In Proc. ACM SIGGRAPH, pages 259–268, D. E. Zongker, D. M. Werner, B. Curless, and D. H. Salesin. Environment matting and compositing. In Proc. SIGGRAPH, pages 205–214, 1999.

Digital Compositing Digital compositing means “digitally manipulated integration of at least two source images to produce a new image.” The new image must appear realistic. It must be completely and seamlessly integrated, as if it were actually photographed by a single camera.

Example 1

Example 2

More examples op.htm op.htm

Main Topics Alpha blending: blending foreground and background Keying: separating foreground and background Luma, chroma, difference keying Rig removal: removing unwanted elements

Alpha Blending C = [α F + (1 – α) B] If α = 1, then C = F, foreground is shown, i.e., foreground is opaque. If α = 0, then C = B, background is shown, i.e., foreground is transparent. 0 < α < 1: semi-transparent, e.g., shadow, smoke, etc. If α ranges from 0 to 255, then the formula becomes: C = [α F + (1 – α) B] / 255

Example: No Background

Example: With Background

Note For shadow,  must take fractional value (0 < α < 1). Otherwise, shadow looks unreal.

Boundary area  at boundary area should also be fractional. Otherwise, have dark fringes; unrealistic.

Summary A good matte has fractional  in shadow, and along object boundaries and shadow boundaries.

Keying Separating foreground from background, creating a matte of foreground. Also called pulling a matte (of foreground), or keying out (i.e., making transparent) background. Recall: A good matte has fractional a in shadow, and along object boundaries and shadow boundaries.

Basic methods Luma keying: based on luminance (i.e., intensity) Chroma keying: based on color (i.e., blue screen, green screen) Difference keying: requires a clean plate, i.e., a background image without the foreground element.

Basic Idea Compute difference between foreground and background (based on luma, chroma, or color) Very small diff   = 0. Very large diff   = 1. Intermediate diff  intermediate 

Luma Keying Key out the background based on luminance. Useful when background has a uniform luminance that is very different from foreground luminance.

Result

Chroma Keying Key out the background based on color. Useful when background has a uniform color that is very different from foreground color. Example: Image shot with blue screen.

Characteristics of blue screen image

Difference Keying More general than luma and chroma keying. Key out background based on pixel-wise color difference between foreground and background footage.

Final Composition

Rig Removals Rigs are equipment that support the actors or the props. Sometimes, rigs cannot be removed by keying alone. So, have to apply masking technique to remove rigs. Need clean plate of background footage. If camera moves, then need motion-controlled camera: Computer controls camera to move the same way twice: Without foreground objects; get clean plate. With foreground objects.

Basic Idea Apply a mask to mask out the rig. Then, replace pixels in masked area by corresponding pixels in clean plate background. If rig moves in footage, then have to animate the mask accordingly.