Professional Documents
Culture Documents
Lecture 3
Lecture 3
Computational Photography
Lecture 2: Digital image processing
Ayelet Heimowitz
October, 2022
2
x( )
y( )
z( )
1.5
0.5
0
400 450 500 550 600 650 700
[nm]
X 0.49 0.31 0.20 R
Y = 1 0.17697 0.81240 0.01063 G
0.17697
Z 0 0.01 0.99 B
1
Sometimes the factor of 0.17697 is omitted.
Specifically,
Y
L∗ = 116 · f ( )
Yn
X Y
a∗ = 500 · [f ( ) − f ( )]
Xn Yn
Y Z
b∗ = 200 · [f ( ) − f ( )]
Yn Zn
Ayelet Heimowitz Computer Vision, Image Processing and Computational Photogra
Y’CbCr color space
Y0
0.299 0.587 0.114 R
Cb = −0.168736 −0.331264 0.5 G
Cr 0.5 −0.418688 −0.081312 B
The value I (x, y ) is the pixel value. This can be a scalar value
indicating intensity (for grayscale images) or a vector (for
color images).
A B C D E F G ... T U V W X Y Z
D E F G H J K ... W X Y Z A B C
A B C D E F G ... T U V W X Y Z
R L U E Z T A ... K M N O S W Y
Say I have a dice, and would like to verify that it is a fair dice.
I could roll the dice many time and count the occurrences of
each result.
Graphically, this would look like
Figure: h. Figure: c.
The linear filter will replace each pixel with a weighted sum
over the pixel values in some (small) neighborhood around the
pixel.
The weights are called the filter coefficients.
We define the kernel h as the matrix whose entries are the
filter coefficients. For example,
1/9 1/9 1/9
h = 1/9 1/9 1/9 .
1/9 1/9 1/9
J(x, y ) = I (x, y ) ∗ h
That is,
k
X k
X
J(x, y ) = I (x − m, y − n)h(m, n)
m=−k n=−k
k
X k
X
J(x, y ) = I (x + m, y + n)h(m, n)
m=−k n=−k
1/25 1/25 1/25 1/25 1/25
1/25 1/25 1/25 1/25 1/25
/25
h=1 1/25 1/25 1/25 1/25 .
1/25 1/25 1/25 1/25 1/25
1/25 1/25 1/25 1/25 1/25
etc.