Digital Image Compositing. Compositing for volume rendering c1 c2 c3 The initial pixel color = Black opaque Back-to-Front compositing: use ‘under’ operator.

Slides:



Advertisements
Similar presentations
Compositing and Blending Ed Angel Professor Emeritus of Computer Science University of New Mexico 1 E. Angel and D. Shreiner: Interactive Computer Graphics.
Advertisements

Introduction to compositing. What is compositing?  The combination of two images to produce a single image  Many ways we can do this, especially in.
Digital Logic Structures: Chapter 3 COMP 2610 Dr. James Money COMP
Point Processing Image Arithmetic. Arithmetic Image Operations (blending) 2  Two source images can be added, multiplied, one subtracted from the other.
Compositing and Blending Mohan Sridharan Based on slides created by Edward Angel 1 CS4395: Computer Graphics.
Compositing and Blending - Chapter 8 modified by Ray Wisman Ed Angel Professor of Computer Science, Electrical and Computer Engineering,
Image Compositing Angel 8.11 Angel: Interactive Computer Graphics5E © Addison-Wesley
Advanced Computer Graphics CSE 190 [Spring 2015], Lecture 5 Ravi Ramamoorthi
Video Matting from Depth Maps Jonathan Finger Oliver Wang University of California, Santa Cruz {jfinger,
Image Compositing and Matting. Introduction Matting and compositing are important operations in the production of special effects. These techniques enable.
Bit Depth and Spatial Resolution SIMG-201 Survey of Imaging Science © 2002 CIS/RIT.
CS248 Midterm Review. CS248 Midterm Mon, November 4, 7-9 pm, Terman Aud Mostly “short answer” questions – Keep your answers short and sweet! Covers lectures.
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 * *+ += =
1Notes. 2Atop  The simplest (useful) and most common form of compositing: put one image “atop” another  Image 1 (RGB) on top of image 2 (RGB)  For.
Advanced Computer Graphics (Spring 2005) COMS 4162, Lecture 6: Image Compositing, Morphing Ravi Ramamoorthi
Design Ideas Group 2 Timothy Kwan Tom Bolds Shang Yi Lin Manager Randal Hong Wed. Sep 3.
CS248 Midterm Review. CS248 Midterm Mon, November 5, 7-9 pm, Terman Aud Mon, November 5, 3-5 pm, Gates 392 Mostly “short answer” questions Covers through.
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.
V Obtained from a summer workshop in Guildford County July, 2014
Data starts with width and height of image Then an array of pixel values (colors) The number of elements in this array is width times height Colors can.
Digital Images The digital representation of visual information.
COMP Bitmapped and Vector Graphics Pages Using Qwizdom.
Basics of a Computer Graphics System Introduction to Computer Graphics CSE 470/598 Arizona State University Dianne Hansford.
Digital Images Chapter 8, Exploring the Digital Domain.
Binary Numbers.
I-1 Steps of Image Generation –Create a model of the objects –Create a model for the illumination of the objects –Create an image (render) the result I.
ITUppsala universitet Advanced Computer Graphics Filip Malmberg
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.
CSC Computing with Images
3D Graphics for Game Programming Chapter IV Fragment Processing and Output Merging.
3.2. G RAPHICS I Alpha blending within games. An exploration of the use of alpha blending within games.
Digital Media Lecture 3: Image Encoding Bitmapped images Georgia Gwinnett College School of Science and Technology Dr. Jim Rowan.
Hank Childs, University of Oregon Oct. 10, 2014 CIS 441/541: Introduction to Computer Graphics Lecture 4: Interpolating Colors and the Z-buffer.
CS 450: Introduction to Digital Signal and Image Processing Image Arithmetic.
Real-Time rendering Chapter 4.Visual Appearance 4.4. Aliasing and antialiasing 4.5. Transparency,alpha,and compositing 4.6. Fog 4.7. Gamma correction
Hardware-accelerated Rendering of Antialiased Shadows With Shadow Maps Stefan Brabec and Hans-Peter Seidel Max-Planck-Institut für Informatik Saarbrücken,
CS559: Computer Graphics Lecture 4: Compositing and Resampling Li Zhang Spring 2008.
Compositing and Blending
Computer Graphics Blending CO2409 Computer Graphics Week 14.
Sort-Independent Alpha Blending Houman Meshkin
Lynwood Dunn ( ) Visual effects pioneer Acme-Dunn optical printer.
Graphics Graphics Korea University cgvr.korea.ac.kr Image Processing 고려대학교 컴퓨터 그래픽스 연구실.
UniS CS297 Graphics with Java and OpenGL Blending.
Single Pass Point Rendering and Transparent Shading Paper by Yanci Zhang and Renato Pajarola Presentation by Harmen de Weerd and Hedde Bosman.
Scanner Scanner Introduction: Scanner is an input device. It reads the graphical images or line art or text from the source and converts.
9/28/04© University of Wisconsin, CS559 Fall 2004 Last Time Filtering –Box –Bartlett –Gaussian –Edge Detect (High-Pass) –Edge Enhance –How to apply filters.
1cs426-winter-2008 Notes. 2 Atop operation  Image 1 “atop” image 2  Assume independence of sub-pixel structure So for each final pixel, a fraction alpha.
Compositing and Blending Ed Angel Professor of Computer Science, Electrical and Computer Engineering, and Media Arts University of New Mexico.
Computer Graphics I, Fall 2008 Compositing and Blending.
Compositing and Rendering
Introduction to Computer Graphics with WebGL
Vector vs. Bitmap.
Advanced Computer Graphics
Multimedia Summer Camp
Hank Childs, University of Oregon
Chapter II, Digital Color Theory: Lesson IV Digital Printing
Images Presentation Name Course Name Unit # – Lesson #.# – Lesson Name
Composing Two Elements
Bitmap, Vector, Pixels, Resolution, Metadata.
Volume Rendering (2).
What do these words mean to you?
Angel: Interactive Computer Graphics5E © Addison-Wesley 2009
Hank Childs, University of Oregon
Matting, Transparency, and Illumination
© University of Wisconsin, CS559 Spring 2004
Images Presentation Name Course Name Unit # – Lesson #.# – Lesson Name
CS 534 Homework #4 References
CS Homework #4 References
Computer Graphics Image processing 紀明德
Presentation transcript:

Digital Image Compositing

Compositing for volume rendering c1 c2 c3 The initial pixel color = Black opaque Back-to-Front compositing: use ‘under’ operator C = backgrond ‘under’ C3 C = C ‘under’ C2 C = C ‘under’ C1 Cout = Cin * (1-  (x)) + C(x)*  (x) Co = cA (1-  B) + cB B A

c1 c2 c3 Or you can use ‘Front-to-Back’ Compositing formula Front-to-Back compositing: use ‘over’ operator C = backgrond ‘over’ C1 C = C ‘over’ C2 C = C ‘over’ C3 … Cout = Cin + C(x)*  (x)*(1-  in   out =  in +  (x) *(1-  in) Compositing for volume rendering

What is compositing anyway? A method for combining two or more images in a way that approximates the intervisibility of the scenes “over” = 2 ½ D rendering : scenes have to be disjoint in depth

Why compositing? Special effects (shake hands with important people…) Share the load of rendering Render translucent objects (translucent polygons, volume rendering, etc)

How to composite? A separate component other than RGB is needed to represent the coverage of en element at a pixel This component is called alpha channel alpha = 0 -> zero coverage alpha = 1 -> full coverage

How to composite? (2) 1 bit matte RGB 1-bit mask RGB Foreground Cf Background Cb C = Cf if  f = 1 Cb if  f = 0

Alpha Channel The value of alpha can be in [0,1] to indicate the extent of the coverage (or how opaque the object is) A pixel’s ‘color’ is represented by a quadruple (r,g,b,  ) (0,0,0,1) = opaque black (0,0,0,0) = transparent

Alpha Channel (2) How to represent a pixel that is half covered by a full red object? -> (1,0,0,0.5) ? the red contribution is - 1* 0.5 If we want to composite a foregrond color C f (1,0,0) over a background color C b then we do C = (1,0,0) * (1-0.5)*C b i.e. C = C f *  * C b

Pre-multiplied alpha Given C = C f *  * C b Every time we want to perform composite, we need to multiply the color by its alpha -> why not just pre-multiplied the color components by alpha and stored that way? (R,G,B,  R , G , B ,  ) This way, we have C = C f + (1-  Cb (r,g,b,  ) premultiplied quadruple -> (r/ , g/ , b/ ,  ) real color

Compositing Algebra Foreground over background is only one of the compositing (the simplest) methods. What are the formula for all possible kind of compositing (A over B, A under B, A in B…)? The issues is to understand and formulate the interplay between the alpha values of two input picture

Compositing Algebra (2) What is alpha any way? 1. Represents the opaqueness of semitransparent objects. With alpha =  the object will let (1-  ) of backgound color go through Smaller alpha Larger alpha (more transparent) (more opaque) Screen door

Compositing Algebra (3) 2.Represents the amount of pixel area covered by the object. (1-a) of the pixel is not covered, and a of the pixel is covered. (this method is better for understanding this paper) AA    BB   B A B

Compositing Algrbra (4) A and B B and A A and B Assumption: If B has alpha value  B, then the area A is Also divided as  B and 1 –  B And vice versa

Possible Compositing of A,B A and B (A) B and A (B) A and B (AB) A and B (0) All the possible compositing of A and B can be enumerated based on the value in the four regions ( 0, A, B, AB) A over B: (0, A,B,A) B over A: (0, A,B,B)

Compositing Arithmetic Basic Idea: To composite A an B: Each input picture source (A or B) will survive in its own matte (  ), and the fraction (F A ) of its own matte not covered in the output picture AA   A Example: A survives in  A, and (1-  B) So final color c o = contrib. A + contrib. B c o =  A F A C A +  B F B C B  A F A +  B F B oo

Compositing Arithmetic (2) c o =  A F A C A +  B F B C B  A F A +  B F B  o since  o =  A F A +  B F B cA = CA  A and cB = CB  A (cA, cB are alpha premultiplied color) Co = cA FA + cB FB (note that Co is also alpha premultiplied color)

Compositing Arithmetic (3) Co = cA FA + cB FB (note that Co is also alpha premultiplied color) Example 1: Now let’s look at ‘Over’ We know FA = 1, FB = 1-  A So we have Co = cA + cB (1-  A) Example 2: ‘Under’ FA = 1-  B FB = 1 So Co = cA (1-  B) + cB

c1 c2 c3 Or you can use ‘Front-to-Back’ Compositing formula Front-to-Back compositing: use ‘over’ operator C = clear ‘over’ C1 C = C ‘over’ C2 C = C ‘over’ C3 … Cout = Cin + C(x)*  (x)*(1-  in   out =  in +  (x) *(1-  in) Compositing for volume rendering Co = cA + cB (1-  A)

Compositing for volume rendering c1 c2 c3 The initial pixel color = Black opaque Back-to-Front compositing: use ‘under’ operator C = backgrond ‘under’ C3 C = C ‘under’ C2 C = C ‘under’ C1 Cout = Cin * (1-  (x)) + C(x)*  (x) Co = cA (1-  B) + cB B A