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.

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.
Image Data Representations and Standards
Incorporating Color Techniques
Computational Biology, Part 23 Biological Imaging II Robert F. Murphy Copyright  1996, 1999, All rights reserved.
Week 7 - Monday.  What did we talk about last time?  Specular shading  Aliasing and antialiasing.
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
Bit Depth and Spatial Resolution SIMG-201 Survey of Imaging Science © 2002 CIS/RIT.
Adobe Photoshop CS Design Professional TECHNIQUES INCORPORATING COLOR.
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
Graphics and Still Images John H. Krantz Hanover College.
2.01 Understand Digital Raster Graphics
7/2/2006Based on: Angel (4th Edition) & Akeine-Möller & Haines (2nd Edition)1 CSC345: Advanced Graphics & Virtual Environments Lecture 4: Visual Appearance.
Introduction to Computer Graphics
Vector vs. Bitmap SciVis V
Color of (digital image) Raed S. Rasheed Agenda Color. Color Image. Color Models – RGB color model. – CMYK color model. – HSV and HSL color model.
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.
DIGITAL GRAPHICS & ANIMATION Complete LESSON 5 CREATING SPECIAL EFFECTS.
GIMP Graphic Image Manipulation Program. GIMP Image manipulation software Free Open Source Written by two students First version in 1996.
COMP Bitmapped and Vector Graphics Pages Using Qwizdom.
Digital Images Chapter 8, Exploring the Digital Domain.
CS324e - Elements of Graphics and Visualization Compositing.
© 2011 Delmar, Cengage Learning Chapter 5 Incorporating Color Techniques.
Vector vs. Bitmap
1 Perception, Illusion and VR HNRS 299, Spring 2008 Lecture 14 Introduction to Computer Graphics.
CS559: Computer Graphics Lecture 6: Edge Detection, Image Compositing, and Warping Li Zhang Spring 2010.
7/11/20081 Today’s Agenda Friday 6 th Nov Revision of certain topics Floating point notation Excess Notation Exam format Interim Report.
1 Ethics of Computing MONT 113G, Spring 2012 Session 10 HTML Tables Graphics on the Web.
Digital Image Processing CCS331 Relationships of Pixel 1.
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
Digital Image Compositing. Compositing for volume rendering c1 c2 c3 The initial pixel color = Black opaque Back-to-Front compositing: use ‘under’ operator.
1 Introduction to Computer Graphics with WebGL Ed Angel Professor Emeritus of Computer Science Founding Director, Arts, Research, Technology and Science.
Lecture 7: Intro to Computer Graphics. Remember…… DIGITAL - Digital means discrete. DIGITAL - Digital means discrete. Digital representation is comprised.
Graphics Lecture 4: Slide 1 Interactive Computer Graphics Lecture 4: Colour.
CS559: Computer Graphics Lecture 4: Compositing and Resampling Li Zhang Spring 2008.
DIGITAL IMAGE. Basic Image Concepts An image is a spatial representation of an object An image can be thought of as a function with resulting values of.
Compositing and Blending
Computer Graphics Blending CO2409 Computer Graphics Week 14.
9/30/04© University of Wisconsin, CS559 Fall 2004 Last Time Reconstruction Aliasing Compositing Intro.
The Digital Revolution Changing information. What is Digital?  Discrete values used for  Input  Processing  Transmission  Storage  Display  Derived.
Graphics Graphics Korea University cgvr.korea.ac.kr Image Processing 고려대학교 컴퓨터 그래픽스 연구실.
UniS CS297 Graphics with Java and OpenGL Blending.
Masks and Channels Digital Imaging. Masks  Let you isolate and protect parts of an image  Based on a selection The area not selected is masked or protected.
Implementing the By: Matthew Marsh Supervisors: Prof Shaun Bangay Mrs Adele Lobb segmentation technique as a plugin for the GIMP.
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.
More Digital Representation Discrete information is represented in binary (PandA), and “continuous” information is made discrete.
Guilford County SciVis V104.03
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.
Com·pos·ite k ə m ˈ päz ə t/ verb Compositing is the combining of visual elements from separate sources into single images, often to create the illusion.
Binary Notation and Intro to Computer Graphics
Introduction to Computer Graphics with WebGL
Vector vs. Bitmap.
Advanced Computer Graphics
Adobe software utilization
Tutorial 4 Topic: CSS 3.0 Li Xu
Hank Childs, University of Oregon
Angel: Interactive Computer Graphics5E © Addison-Wesley 2009
© University of Wisconsin, CS559 Spring 2004
(c) 2002 University of Wisconsin, CS 559
Last Time Dithering Introduction to signal processing Filtering
Computer Graphics Image processing 紀明德
Presentation transcript:

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 each channel separately may change color significantly –Adjusting intensity while keeping hue and saturation may be best, although some loss of saturation is probably OK

Compositing Compositing combines components from two or more images to make a new image The basis for film special effects (even before computers) –Create digital imagery and composite it into live action Important part of animation – even hand animation –Background change more slowly than foregrounds, so composite foreground elements onto constant background

Very Simple Example over =

Mattes A matte is an image that shows which parts of another image are foreground objects Term dates from film editing and cartoon production To composite with a matte: –Take foreground pixels over white parts of the matte and copy them into the background image

Alpha Basic idea: Encode opacity information in the image Add an extra channel, the alpha channel, to each image –alpha = 1 implies full opacity at a pixel –alpha = 0 implies completely clear pixels Images are now in RGBA format, and typically 32 bits per pixel (8 bits for alpha)

Smoothing Edges Reduce alpha gradually at edges to smooth them

Pre-Multiplied Alpha Instead of storing (R,G,B,  ), store (  R,  G,  B,  ) The compositing operations in the next several slides are easier with pre-multiplied alpha To display and do color conversions, must extract RGB by dividing out  –  =0 is always black –Some loss of precision as  gets small, but generally not a problem

Alpha and Translucent Objects If the image is of a translucent object, then  represents the amount of the background that is blocked When combining two translucent objects: –(1-  a )(1-  b ) of the background shows through both –  a (1-  b ) passes through B but is blocked by A –  b (1-  a ) passes through A but is blocked by B –  a  b of the background is blocked by both

Alpha and Opaque Objects Assume a pixel represents the color of a small area –Typically a square, but not necessarily Interpret  to represent the fraction of the pixel area covered by an object Question: When we combine two images, how much of the pixel is covered? –What should the new  be?

Sub-Pixel Configurations We will assume partial overlap, implying that we have no specific knowledge of the sub-pixel structure No overlap  o =  a +  b Full overlap  o =  b Partial overlap  o =  a + (1-  a )  b

Compositing Assumptions We will combine two images, f and g, to get a third composite image –Not necessary that one be foreground and background –Background can remain unspecified Both images are the same size and use the same color representation Multiple images can be combined in stages, operating on two at a time

Sample Images

Image Decomposition The composite image can be broken into regions –Parts covered by f only –Parts covered by g only –Parts covered by f and g –Parts covered by neither f nor g Same goes for sub-pixels in places where  1

Sample Decomposition

Basic Compositing Operation The different compositing operations define which image “wins” in each sub-region of the composite At each pixel, combine the pixel data from f and the pixel data from g with the equation: F and G describe how much of each input image survives, and c f and c g are pre-multiplied pixels, and all four channels are calculated

“Over” Operator Computes composite with the rule that f covers g

“Over” Operator

“Inside” Operator Computes composite with the rule that only parts of f that are inside g contribute

“Inside” Operator

“Outside” Operator Computes composite with the rule that only parts of f that are outside g contribute

“Outside” Operator

“Atop” Operator Computes composite with the over rule but restricted to places where there is some g

“Atop” Operator

“Xor” Operator Computes composite with the rule that f contributes where there is no g, and g contributes where there is no f

“Xor” Operator

“Clear” Operator Computes a clear composite Note that (0,0,0,  >0) is a partially opaque black pixel, whereas (0,0,0,0) is fully transparent, and hence has no color

“Set” Operator Computes composite by setting it to equal f Copies f into the composite

Unary Operators Darken: Makes an image darker (or lighter) without affecting its opacity Dissolve: Makes an image transparent without affecting its color

“PLUS” Operator Computes composite by simply adding f and g, with no overlap rules Useful for defining cross dissolve in terms of compositing:

Obtaining  Values Hand generate (paint a grayscale image) Automatically create by segmenting an image into foreground background: –Blue-screening is the analog method Remarkably complex to get right –“Lasso” is the Photoshop operation With synthetic imagery, use a special background color that does not occur in the foreground –Brightest blue is common

Compositing With Depth Can store pixel “depth” instead of alpha Then, compositing can truly take into account foreground and background Generally only possible with synthetic imagery –Image Based Rendering is an area of graphics that, in part, tries to composite photographs taking into account depth