Image Processing: Ch2: Digital Image Fundamentals
Image Processing: Ch2: Digital Image Fundamentals
Zoomed by
using
Bilinear
Ch2, lesson2: Zooming and shrinking
• Pixel replication (re sampling) is a special case that is applicable when the size of the image
needs to be increased an integer number of times (like 2 times not 1.5 for example).
shrinking
Similar to image zooming.
Shrinking an image an integer number of times
Pixel replication is replaced by row&column
deletion.
Shrinking an image by a non-integer factor
Expand the grid to fit over the original image.
Do gray-level interpolation (nearest neighbor
or bilinear).
Shrink the grid back to its original specified
size.
Ch2, lesson3: Some basic Relationships between pixels
Neighbors of a pixel
Ch2, lesson3: Some basic Relationships between pixels
Adjacency
V: set of gray level values (L), (V is a subset of L.)
3 types of adjacency
connectivity
A digital path from pixel p with coordinates (x,y) to pixel q
with coordinates (s,t) is a sequence of distinct pixels with
coordinates (x0,y0), (x1,y1), …, (xn,yn), where (x0,y0)=
(x,y) and (xn,yn)=(s,t), and pixels (xi,yi) and (xi-1,yi-1) are
adjacent for 1 ≤ i ≤ n.
Distance measures
If we have 3 pixels: p,q,z:
p with (x,y)
q with (s,t)
z with (v,w)
Then:
D(p,q) = 0 iff p = q
D(p,q) = D(q,p)
D(p,z) ≤ D(p,q) + D(q,z)
: Example
Use the city block distance to prove 4-
? neighbors 3 2 1
1
d
Pixel A : | 2-2| + |1-2| = 1 2
c p a
Pixel B: | 3-2|+|2-2|= 1
3 b
Pixel C: |2-2|+|2-3| =1
Pixel D: |1-2| + |2-2| = 1