




Study with the several resources on Docsity
Earn points by helping other students or get them with a premium plan
Prepare for your exams
Study with the several resources on Docsity
Earn points to download
Earn points by helping other students or get them with a premium plan
Image compositing, a technique for combining multiple images to create a single image. It introduces the concept of alpha channels and different compositing operators. Additionally, it covers aliasing, a common issue in digital imaging, and methods for reducing it through antialiasing techniques such as super-sampling and area-weighted sampling.
Typology: Study notes
1 / 8
This page cannot be seen from the preview
Don't miss anything!





Introduce a new alpha channel in addition to RGB channels
α
value of a pixel indicates its opacity
α=
0, pixel is totally transparent
α=
1, pixel is totally opaque
α
as the fraction of the pixel actually
covered by the stored color
α
premultiplied
Area
α
r g b
r
g
b
α
α
α
α
α
Given images
, we can compute
over
α
values, this simplifies to
This is only one possible compositing operator
A
A
B
α
α
α
A
α
Given RGB colors
and
A
B
α
α
Premultiply:
A
B
α
α
over
A^
B
A
α
C^
A
A
B^
B
A^
A^
B
α
α
α
α
α
α
De-premultiply:
C
α
Read RGB
α
values from frame buffer
Write RGB
α
values back into frame buffer
But aliasing can arise in other contexts
We want to get rid of this problem
Note that increasing resolution decreases jaggies
What pixels do we fill in?
Consider a spoked wagon wheel
Can solve the problem in the same way as spatial aliasing
We’ve skipped over vast amounts of theory
as a function of an image
example:
x,y
] = sqrt(
x,y
example:
x,y
average of neighbors of
[ x,y
Image processing is a key component in:
f(p)
= 1−
p
Grayscale Inversion
RGB Inversion
f(p)
=
p
k
if
k
< 1
if
k
= 1
if
k
1
p
k^ , k
1 0
p
k^ , k
1
k
= 0.
k
= 2.
the source image
(x,y)
of the output image
find corresponding
(x,y)
location of input image
pick up local neighborhood matching filter template size
weight each value of the input according to the value in the template
add all the weighted values together
1.01.0 0.
0.4 0.
1
1
1 1 1
1
1 1
1
3x
5x
9x
3x
5x
9x
which have the same color as the seed point; recurse
pixels are reached which have a specified boundary color
Can define neighborhood in different ways
4-connected
8-connected
seed poin
void FloodFill4(int x, int y, color oldValue, color newValue){
if( ReadPixel(x, y) == oldValue ){
WritePixel(x, y, newValue);FloodFill4(x, y-1, oldValue, newValue);FloodFill4(x, y+1, oldValue, newValue);FloodFill4(x-1, y, oldValue, newValue);FloodFill4(x+1, y, oldValue, newValue);
}
}
taken from Foley
et al