Lecture 4
Lecture 4
Computational Photography
Lecture 2: Digital image processing contd
Ayelet Heimowitz
October, 2022
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=I∗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.
J = I + α(I − I ∗ h)
M
X N
X
J(x, y ) = I (x − m, y − n)h(m, n)
m=−M n=−N
I = I∗
I∗h=h∗I
Ayelet Heimowitz Computer Vision, Image Processing and Computational Photogra
Review: properties of convolution
convolution
M
X N
X
J(x, y ) = I (x − m, y − n)h(m, n)
m=−M n=−N
Distributive property
(I + J) ∗ h = I ∗ h + J ∗ h
convolution
M
X N
X
J(x, y ) = I (x − m, y − n)h(m, n)
m=−M n=−N
I ∗ (f ∗ h) = (I ∗ f) ∗ h.