Download Image Processing: Compositing, Alpha Channel, and Semi-Transparent Objects and more Slides Computer Graphics in PDF only on Docsity!
Image Processing
Overview
Image compositing
Blue-screen mattes
Alpha channel
Porter-Duff compositing algebra
Image morphing
Specifying correspondences
Warping
Blending
Blue-Screen Matting
Composite foreground and background
images
Create background image
Create foreground image with blue background
Insert non-blue foreground pixels into background
Alpha Channel
Encodes pixel coverage information
α = 0 : no coverage (or transparent) α = 1 : full coverage (or opaque) 0 < α < 1 : partial coverage (or semi-transparent)
Example : α = 0.
Partial coverage Semi-Transparent or
Pixels with Alpha
Alpha channel convention :
(r, g, b, α) represents a pixel that is α covered by the color C=(r/α, g/α, b/α) Color components are premultiplied by α Can display (r, g, b) values directly Closure in composition algebra
What is the meaning of the following?
Pixels with Alpha
Alpha channel convention :
(r, g, b, α) represents a pixel that is α covered by the color C=(r/α, g/α, b/α) Color components are premultiplied by α Can display (r, g, b) values directly Closure in composition algebra
What is the meaning of the following?
(0, 1, 0, 1) = full green, full coverage (0, ½, 0, 1) = half green, full coverage (0, ½, 0, ½) = full green, half coverage (0, ½, 0, 0) = no coverage
Semi-Transparent Objects
Suppose we put A over B over background G
How much of B is blocked by A?
How much of B is shows through A?
α A A B G
Semi-Transparent Objects
Suppose we put A over B over background G
How much of B is blocked by A?
How much of B shows through A?
How much of G shows through both A and B?
α A (1 – α A
A B G
Opaque Objects
How do we combine 2 partially covered pixels
3 possible colors (0, A, B) 4 regions (0, A, B, AB)
B
A
A B
AB
Composition Algebra
12 reasonable combinations
clear A B A over B B over A A in B
B in A A out B B out A A atop B B atop A A xor B
Image Composition Example
Jurassic Park
Overview
Image compositing
Blue-screen mattes
Alpha channel
Porter-Duff compositing algebra
Image morphing
Specifying correspondences
Warping
Blending
Cross-Dissolving
Blend image with “over” operator
Alpha of bottom image is 1.
Alpha of top image varies from 0.0 to 1.
blend i , j 1 t src i , j t dst i , j 0 t 1
Image Morphing
Combines warping and cross-dissolving