















Study with the several resources on Docsity
Earn points by helping other students or get them with a premium plan
This page cannot be seen from the preview
Don't miss anything!
















Prof. Sinisa Todorovic
1
Outline
Image interpolation
MATLAB tutorial
Review of image elements
Affine transforms of images
Spatial-domain filtering
Image Interpolation
Bilinear N = 1
Bicubic N = 3
f (x, y) =
N
i=
N
j=
a
ij
x
i
y
j
3
7
Pixels, 4-adjacency, 8-adjacency, m-adjacency
Path -- directed, undirected, loop
Region = Connected set of pixels
Region boundary, inner and outer contour
Foreground - background
Edge = Connected pixels with high derivative values
Interest points: T-junction, Y-junction
Highlights or specularities
Lambertian surface = isotropic reflectance
Specular surface = zero reflectance except at an angle
Image Elements
9
2D Translation
displacement
[
x
y
]
=
source: S. Savarese
t =
[
t
x
t
y
]
13
2D Translation
displacement
[
x
y
]
=
source: S. Savarese
t =
[
t
x
t
y
]
′
= P + t =
x + t
x
y + t
y
1 0 t
x
0 1 t
y
x
y
2D Translation
displacement
homogeneous
coordinates
[
x
y
]
=
source: S. Savarese
t =
[
t
x
t
y
]
′
= P + t =
x + t
x
y + t
y
1 0 t
x
0 1 t
y
x
y
13
2D Translation
displacement
homogeneous
coordinates
′
x + t
x
y + t
y
1 0 t
x
0 1 t
y
x
y
[
x
y
]
=
source: S. Savarese
t =
[
t
x
t
y
]
′
= P + t =
x + t
x
y + t
y
1 0 t
x
0 1 t
y
x
y
2D Scaling
=
[
x
y
]
=
[
s
x
x
s y
y
]
s
x
x
s
y
y
s
x
0 s
y
x
y
source: S. Savarese
14
2D Scaling
=
[
x
y
]
=
[
s
x
x
s y
y
]
s
x
x
s
y
y
s
x
0 s
y
x
y
source: S. Savarese
scaling matrix
2D Scaling
=
[
x
y
]
=
[
s
x
x
s y
y
]
s
x
x
s
y
y
s
x
0 s
y
x
y
source: S. Savarese
scaling matrix
14
2D Scaling + Translation
′
′′
′
′′
Is the ordering important?
source: S. Savarese
2D Rotation
counter-clockwise
by angle θ
source: S. Savarese
θ
x
y
x x
′
y
′
y
′
cos θ x − sin θ y
sin θ x + cos θ y
x
′
y
′
cos θ − sin θ 0
sin θ cos θ 0
x
y
16
2D Rotation
counter-clockwise
by angle θ
source: S. Savarese
θ
x
y
x x
′
y
′
y
′
cos θ x − sin θ y
sin θ x + cos θ y
x
′
y
′
cos θ − sin θ 0
sin θ cos θ 0
x
y
rotation matrix
2D Rotation
counter-clockwise
by angle θ
source: S. Savarese
θ
x
y
x x
′
y
′
y
′
cos θ x − sin θ y
sin θ x + cos θ y
x
′
y
′
cos θ − sin θ 0
sin θ cos θ 0
x
y
rotation matrix
16
2D Rotation + Scaling + Translation
x
′
y
′
1
=
cos θ − sin θ 0
sin θ cos θ 0
0 0 1
1 0 t
x
0 1 t
y
0 0 1
s
x
0 0
0 s
y
0
0 0 1
x
y
1
scaling
matrix
translation
matrix
rotation
matrix
t R
x
′
y
′
R S t
x
y
Re-writing the Equation of Transformation
x
′
y
′
1
=
t
11
t
12
t
13
t
21
t
22
t
23
0 0 1
x
y
1
20
Re-writing the Equation of Transformation
x
′
y
′
1
=
t
11
t
12
t
13
t
21
t
22
t
23
0 0 1
x
y
1
x i
·t
11
i
·t
12
13
21
22
23
= x
′
i
0 ·t
11
12
13
i
·t
21
i
·t
22
23
= y
′
i
Re-writing the Equation of Transformation
x
′
y
′
1
=
t
11
t
12
t
13
t
21
t
22
t
23
0 0 1
x
y
1
x i
·t
11
i
·t
12
13
21
22
23
= x
′
i
0 ·t
11
12
13
i
·t
21
i
·t
22
23
= y
′
i
x
i
y
i
1 0 0 0
0 0 0 x
i
y
i
1
t
11
t 12
t
13
t
21
t
22
t
23
=
x
′
i
y
′
i
20
Summary of Affine Transforms
Addition
Multiplication
Basic Operations on Images
24
Example: Averaging Noisy Measurements
g ¯(x, y) =
K
i=
g
i
(x, y)
g(x, y) = f (x, y) + η(x, y)
Example: Shading Correction
g(x, y) = f (x, y)h(x, y)
26
Example: Masking
g(x, y) = f (x, y)h(x, y)