Professional Documents
Culture Documents
4Tn3 Image Processing: Diitli F D TL Digital Image Fundamentals
4Tn3 Image Processing: Diitli F D TL Digital Image Fundamentals
4TN3
Image Processing
Di it l Image
Digital I Fundamentals
F d t l
2 5
3 6
1
Brightness & Intensity A simple image model
• Relationship between brightness and intensity is not • The image magnitude depends on:
a simple function! 1. The amount of source illumination incident
on the scene, i(x,y)
2. The amount of illumination reflected by the
objects in the scene, r(x,y)
f ( x, y ) = i( x, y ) ⋅ r ( x, y )
(x,y): coordinates
Total absorption: r(x,y)=0
Total reflection: r(x,y)=1
7 10
8 11
9 12
2
Sampling & Quantization Effects of Reducing Gray Levels
13 16
14 17
shrinkage
15 18
3
Zooming Relationship between pixels
0 0 0 0 0 0 0 0 0 0 0 0
0 0 0 0 0 0 0 1 1 1 1 1
0 0 0 0 0 0 1 0 0 0 0 0
• Pixel replication: interpolated pixel in the 0
0
0
0
0
0
0
0
0
0
0
0
1
1
0
0
0
0
0
0
0
0
0
0
enlarged image is set to the gray-level of its 0
0
0
0
0
0
0
0
0
1
1
1
0
0
0
0
0
0
0
0
0
0
0
0
0 0 1 1 0 0 0 0 0 0 0 0
nearest pixel in the original image. 0 1 0 0 0 0 0 0 0 0 0 0
0 1 0 0 0 0 0 0 0 0 0 0
• Bilinear
Bili interpolation:
i l i interpolated
i l d pixel
i l in
i the
h 0
0
0
0
1
0
1
0
0
1
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0 0 0 0 0 1 0 0 0 0 0 0
enlarged image is set to the average its four 0 0 0 0 0 1 0 0 0 0 0 0
0 0 0 0 0 0 1 0 0 0 0 0
nearest pixels in the original image. 0
0
0
0
0
0
0
0
0
0
0
0
0
0
1
0
0
1
0
0
0
0
0
0
0 0 0 0 0 0 0 0 1 0 0 0
0 0 0 0 0 0 0 0 0 1 0 0
0 0 0 0 0 0 0 0 0 1 0 0
0 0 0 0 0 0 0 0 0 1 0 0
19 22
• Neighbors
• Adjacency
• Path
• Connectivity
• Region
• Boundary
• Distance
20 23
21 24
4
Adjacency Region
• R: a subset of pixels in an image.
• Two pixels are adjacent if they are neighbors • R is called a region if every pixel in R is connected
and their gray levels are similar to any other pixel in R.
• V: set of gray levels • Boundary (border or contour) of a region: set of
pixels in the region that have one or more neighbors
• Similar gray level means that the gray levels that are not in R.
of both pixels belong to set V
• Exp: 0 1 1 0 0 1 1 0
0 1 1 1 0 1 1 1
– Binary images: V={1} 0 0 1 0 0 0 1 0
0 0 0 0 1 0 0 0
– Gray level image: V={32,33, …,63,64}
25 28
0 1 1 0 1 1 0 1 1
0 1 0 0 1 0 0 1 0
0 0 1 0 0 1 0 0 1
26 29
27 30
5
Distance measures
• D4 distance
D4 ( p, q ) = x − s + y − t
• D8 distance
End of Lecture
D8 ( p, q ) = max{ x − s , y − t }
31
Distance measures
• Dm distance: length of the shortest m-path between
two pixels
• D4, D8 distance between p and q are independent of
the pixels along the path
• Dm depends on the value of the pixels between p and
q
0 0 1 0 0 1
1 1 0 0 1 0
1 0 0 1 0 0
Dm=3 Dm=2
32
33