Beruflich Dokumente
Kultur Dokumente
Chapter 2
Lecture 6
Chapter 2
Chapter 2
Engineering Motivations
Why do we need image interpolation?
We want BIG images
When we see a video clip on a PC, we like to see it in
the full screen mode
Chapter 2
Zooming
Shrinking
Rotating
Geometric Correction
Chapter 2
Chapter 2
Low-Res.
High-Res.
Chapter 2
Non-damaged
Damaged
Chapter 2
Chapter 2
Concept
Interpolation works by using known data to estimate values at unknown points.
The more temperature measurements you have which are close to noon, the
more sophisticated (and hopefully more accurate) your interpolation algorithm
can be.
19922008 R. C. Gonzalez & R. E. Woods
Chapter 2
f(n+1)
1-a
Chapter 2
Numerical Examples
f(n)=[0,120,180,120,0]
Interpolate at 1/2-pixel
f(x)=[0,60,120,150,180,150,120,60,0], x=n/2
Interpolate at 1/3-pixel
f(x)=[0,20,40,60,80,100,120,130,140,150,160,170,180,
], x=n/6
Chapter 2
Chapter 2
Bilinear Interpolation
Four nearest neighbors are used to estimate the
intensity.
Bicubic Interpolation
Sixteen nearest neighbors of point are used to assign
the intensity.
Chapter 2
Bilinear Interpolation
Use 4 nearest neighbor
Solve for 4 coefficients
Product of 2 linear functions
Chapter 2
Bilinear Interpolation
I20,14.5 = 150.5
I21,14.5 = 128.5
I20.2,14.5 = 146.1
19922008 R. C. Gonzalez & R. E. Woods
Chapter 2
Chapter 2
Chapter 2
Chapter 2
Bilinear Interpolation
Chapter 2
Bicubic Interpolation
The function values f and the derivatives fx, fy and
fxy are known at the four corners (0,0), (1,0), (0,1),
and (1,1) of the unit square. The interpolated
surface can then be written
Chapter 2
Chapter 2
Interpolation Comparative
Chapter 2
Chapter 2
Chapter 2
Jagged artifacts
Z
X
X
Chapter 2
Limitation of Interpolation
Image details can be lost during Interpolation.
Rotate
Chapter 2
Edge-Sensitive Interpolation
Step 1: interpolate the missing pixels along the diagonal
a
b
x
black or white?
Since |a-c|=|b-d|
x has equal probability
of being black or white
d
c
19922008 R. C. Gonzalez & R. E. Woods
Since |a-c|>|b-d|
x=(b+d)/2=black
Chapter 2
A common confusion
Chapter 2
Lecture 7
Chapter 2
Geometric Transformation
In the virtual space, you can have any kind of apple you want!
MATLAB functions: griddata, interp2, maketform, imtransform
19922008 R. C. Gonzalez & R. E. Woods
Chapter 2
Rotation
x'
cos
sin
y'
sin
cos
Chapter 2
Scale
a=1/2
x'
y'
a 0 x
0 1/ a y
Chapter 2
Affine Transform
parallelogram
square
x'
y'
a11 a12
a21 a22
x
y
dx
dy
Chapter 2
x'
y'
Affine Transform
Example
19922008 R. C. Gonzalez & R. E. Woods
.5
.5
1 x
2 y
0
1
Chapter 2
Shear
parallelogram
square
x'
y'
1 0 x
s 1 y
dx
dy
Chapter 2
x'
y'
1 0 x
.5 1 y
0
1
Shear Example
19922008 R. C. Gonzalez & R. E. Woods
Chapter 2
Chapter 2
Seung-Yong Lee et al., Image Metamorphosis Using Snakes and Free-Form Deformations,
SIGGRAPH 1985, Pages 439-448
19922008 R. C. Gonzalez & R. E. Woods
Chapter 2
Chapter 2
Which is good?
(1) Geometric Invariance: The interpolation method should preserve the
geometry and relative sizes of objects in an image. That is, the subject matter
should not change under interpolation.
(2) Contrast Invariance: The method should preserve the luminance values of
objects in an image and the overall contrast of the image.
(3) Noise: The method should not add noise or other artifacts to the image,
such as ringing artifacts near the boundaries.
(4) Edge Preservation: The method should preserve edges and boundaries,
sharpening them where possible.
(5) Aliasing: The method should not produce jagged or staircase edges.
19922008 R. C. Gonzalez & R. E. Woods
Chapter 2
Chapter 2
Geometry
Chapter 2
DiagonalNeighbours
ND(P) = {(x1,y1), (x1,y+1) , (x+1,y1), (x+1,y+1)}
8Neighbours
N8(P) = N4(P)
ND(P)
Chapter 2
Chapter 2
Adjacency
V = Set of intensity values for adjacency
P & Q are considered adjacent iff g(P), g(Q)
V = {1} for binary
4adjacency: Q
8adjacency: Q
madjacency:
Q
Q
N4(P)
N8(P)
N4(P) OR
ND(P) and for all R
Chapter 2
Chapter 2
Path
Sequence of distinct pixels satisfying pair-wise
adjacency
Length of the path
Number of adjacencies
One less than the number of points
Chapter 2
2-D Path
Length of the path
Number of
adjacencies
One less than the
number of points
Shortest Path
between two pixels
can be non-unique
19922008 R. C. Gonzalez & R. E. Woods
Chapter 2
8-path
m-path
Chapter 2
Connectivity
Let S represents a subset of pixels in an image. p, q
are said to be connected if there exists a path
between them consisting entirely of pixels in S.
For any pixel p S, the set of pixels that are
connected to it in S is called a connected
component
If S has only one connected component, then S is
called a connected set.
19922008 R. C. Gonzalez & R. E. Woods
Chapter 2
Connectivity
Let R be a subset of pixels in an image. R is said to
be a region of the image if R is a connected set.
Region Ri and Rj are adjacent if their union form a
connected set; disjoint otherwise.
If S has only one connected component, then S is
called a connected set.
Chapter 2
Chapter 2
Outer Border
Set of points in complement of R adjacent to R
19922008 R. C. Gonzalez & R. E. Woods
Chapter 2
The circled point is part of the boundary of the 1-valued pixels only if 8adjacency between the region and the background is used.
Chapter 2
The distinction between inner and outer boundary is important for the
development of the border-following algorithm.
Such algorithms use outer boundary to guarantee a closed path.
Chapter 2
Chapter 2
Chapter 2