2. Digital Image
Digital image = a multidimensional
array of numbers (such as intensity image)
or vectors (such as color image)
Each component in the image
called pixel associates with
the pixel value (a single number in
the case of intensity images or a
vector in the case of color images).
39
87
15
32
22
13
25
15
37
26
6
9
28
16
10
10
39
65
65
54
42
47
54
21
67
96
54
32
43
56
70
65
99
87
65
32
92
43
85
85
67
96
90
60
78
56
70
99
4. Cross Section of the Human Eye
(Images from Rafael C. Gonzalez and Richard E.
Wood, Digital Image Processing, 2nd Edition.
5. 1. The lens contains 60-70% water, 6% of fat.
2. The iris diaphragm controls amount of light that enters the eye.
3. Light receptors in the retina
- About 6-7 millions cones for bright light vision called photopic
- Density of cones is about 150,000 elements/mm2.
- Cones involve in color vision.
- Cones are concentrated in fovea about 1.5x1.5 mm2.
- About 75-150 millions rods for dim light vision called scotopic
- Rods are sensitive to low level of light and are not involved
color vision.
4. Blind spot is the region of emergence of the optic nerve from the eye.
Visual Perception: Human Eye (cont.)
6. Distribution of Rods and Cones in the Retina
(Images from Rafael C. Gonzalez and Richard E.
Wood, Digital Image Processing, 2nd Edition.
7. Image Formation in the Human Eye
(Picture from Microsoft Encarta 2000)
(Images from Rafael C. Gonzalez and Richard E.
Wood, Digital Image Processing, 2nd Edition.
8. Brightness Adaptation of Human Eye
Digital Images are displayed as a discrete set of intensities, the eye’s ability to
discriminate between different intensity levels is important consideration.
The subjective brightness is a logarithmic function of the light intensity
incident on the eye.
10. Mach Band Effect
Intensities of surrounding points
effect perceived brightness at each
point.
In this image, edges between bars
appear brighter on the right side
and darker on the left side.
(Images from Rafael C. Gonzalez and Richard E.
Wood, Digital Image Processing, 2nd Edition.
11. In area A, brightness perceived is darker while in area B is
brighter. This phenomenon is called Mach Band Effect.
Position
Intensity
A
B
Mach Band Effect (Cont)
12. Simultaneous contrast. All small squares have exactly the same intensity
but they appear progressively darker as background becomes lighter.
Brightness Adaptation of Human Eye : Simultaneous Contrast
16. Continue……
• The electromagnetic spectrum can be expressed in terms of wavelength and Frequency
or Energy
• Electromagnetic waves can be visualized as propagating sinusoidal waves with
wavelength λ.
• It is considered as a massless particles, each travelling in a wave like pattern and
moving at the speed of light. Each bundle of energy is called a photon.
• Light that is void of color is called achromatic or monochromatic light. The only
attribute of such light is intensity. The term gray level is generally describe
monochromatic intensity.
• Three basic quantities are used to describe the quality of chromatic light source:
Radiance, Luminance and brightness.
• Radiance is the total amount of energy that flows from light source. Measured in watts.
Luminance is measure of amount of energy an observer perceives from a light source.
Measured in lumens(lm). Brightness is a subjective descriptor of light perception that is
impossible to measure. It embodies achromatic notation of intensity and one of the key
factor to describe color sensation.
• Gamma radiation is important for Medical and Astronomical imaging. X-rays are used
in industrial applications.
17. Image Sensors
Single sensor
Line sensor
Array sensor
(Images from Rafael C. Gonzalez and Richard E.
Wood, Digital Image Processing, 2nd Edition.
18. Image Sensors : Single Sensor
(Images from Rafael C. Gonzalez and Richard E.
Wood, Digital Image Processing, 2nd Edition.
19. Image Sensors : Line Sensor
Fingerprint sweep sensor
Computerized Axial Tomography
(Images from Rafael C. Gonzalez and Richard E.
Wood, Digital Image Processing, 2nd Edition.
20. Digital Image Acquisition Process
(Images from Rafael C. Gonzalez and Richard E.
Wood, Digital Image Processing, 2nd Edition.
23. Image Types : Binary Image
Binary image or black and white image
Each pixel contains one bit :
1 represent white
0 represents black
1
1
1
1
1
1
1
1
0
0
0
0
0
0
0
0
Binary data
24. Image Types : Index Image
Index image
Each pixel contains index number
pointing to a color in a color table
2
5
6
7
4
6
9
4
1
Index value
Index
No.
Red
component
Green
component
Blue
component
1 0.1 0.5 0.3
2 1.0 0.0 0.0
3 0.0 1.0 0.0
4 0.5 0.5 0.5
5 0.2 0.8 0.9
… … … …
Color Table
25. Generating a Digital Image: Image Sampling and Quntization
(Images from Rafael C. Gonzalez and Richard E.
Wood, Digital Image Processing, 2nd Edition.
26. Image Sampling and Quantization
Image sampling: discretize an image in the spatial domain
Spatial resolution / image resolution: pixel size or number of pixels
(Images from Rafael C. Gonzalez and Richard E.
Wood, Digital Image Processing, 2nd Edition.
28. Spatial and Gray level resolution
Spatial resolution is the smallest discernible detail in an
image
Gray level resolution similarly refers to the smallest
discernible change in gray level.
29. Effect of Spatial Resolution
(Images from Rafael C. Gonzalez and Richard E.
Wood, Digital Image Processing, 2nd Edition.
30. Effect of Spatial Resolution
(Images from Rafael C. Gonzalez and Richard E.
Wood, Digital Image Processing, 2nd Edition.
33. Effect of Quantization Levels (cont.)
16 levels 8 levels
2 levels
4 levels
In this image,
it is easy to see
false contour.
34. How to select the suitable size and pixel depth of images
Low detail image Medium detail image High detail image
Lena image Cameraman image
To satisfy human mind
1. For images of the same size, the low detail image may need more pixel depth.
2. As an image size increase, fewer gray levels may be needed.
The word “suitable” is subjective: depending on “subject”.
(Images from Rafael C. Gonzalez and Richard E.
Wood, Digital Image Processing, 2nd Edition.
35. Zooming and Shrinking Digital Image
Zooming is viewed as Oversampling and shrinking is viewed as under sampling. Zooming process requires two
steps : the creation of a new pixel locations and assignment of new gray levels to those locations
36. Moire Pattern Effect : Special Case of Sampling
Moire patterns occur when frequencies of two superimposed
periodic patterns are close to each other.
(Images from Rafael C. Gonzalez and Richard E.
Wood, Digital Image Processing, 2nd Edition.
37. Basic Relationship of Pixels
x
y
(0,0)
Conventional indexing method
(x,y) (x+1,y)
(x-1,y)
(x,y-1)
(x,y+1)
(x+1,y-1)
(x-1,y-1)
(x-1,y+1) (x+1,y+1)
38. Neighbors of a Pixel
p (x+1,y)
(x-1,y)
(x,y-1)
(x,y+1)
4-neighbors of p:
N4(p) =
(x-1,y)
(x+1,y)
(x,y-1)
(x,y+1)
Neighborhood relation is used to tell adjacent pixels. It is
useful for analyzing regions.
Note: q N4(p) implies p N4(q)
4-neighborhood relation considers only vertical and
horizontal neighbors.
41. Connectivity
If two pixels are connected, it must be determined if they are
neighbors and if their gray level satisfy a specified criterion of
similarity(if their gray level are equal).
A pixel p is adjacent to pixel q if they are connected.
For p and q from the same class
w 4-adjacency: Two pixels p and q with values from V are 4-
adjacent if q is in the set N4(p), q N4(p).
w 8-adjacency: Two pixels p and q with values from V are 8-
adjacent if q is in the set N8(p), q N8(p)
w mixed-adjacency(m-adjacency): Two pixels p and q values
from V are m-adjacent if,
(i)q is in N4(p), q N4(p) or
(ii) q is in ND(p) and the set N4(p) N4(q) has no pixel whose
values are from V, q ND(p) and N4(p) N4(q) =
42. Adjacency
A pixel p is adjacent to pixel q if they are connected.
Two image subsets S1 and S2 are adjacent if some pixel
in S1 is adjacent to some pixel in S2
S1
S2
We can define type of adjacency: 4-adjacency, 8-adjacency
or m-adjacency depending on type of connectivity.
43. Path
A path from pixel p with coordinates (x,y) to pixel q with
coordinates (s,t) is a sequence of distinct pixels:
(x0,y0), (x1,y1), (x2,y2),…, (xn,yn)
where
(x0,y0) = (x,y) and (xn,yn) = (s,t)
and
(xi,yi) is adjacent to (xi-1,yi-1) for 1 <= i <= n
p
q
We can define type of path: 4-path, 8-path or m-path
depending on type of adjacency.
45. Region and Boundary
Let S represent a subset of pixel in an image. Two pixels
p and q are said to be connected in S if there exists a path
between them consisting entirely of pixel in S. For any
pixel p in S the set of pixels that are connected to it in S is
called connected component of S. If it only has one
connected component, then set S is called a connected
set.
Let R be the subset of pixel in an image. If R is a
connected set then it is called a Region of image.
The boundary of a region R is the set of pixels in the
region that have one or more neighbors that are not in R.
46. Distance
For pixel p, q, and z with coordinates (x,y), (s,t) and (u,v),
D is a distance function or metric if
w D(p,q) 0 (D(p,q) = 0 if and only if p = q)
w D(p,q) = D(q,p)
w D(p,z) D(p,q) + D(q,z)
Example: Euclidean distance
2
2
)
(
)
(
)
,
( t
y
s
x
q
p
De -
+
-
The pixels having a distance less than or equal to
some value r from (x,y) are the points contained in a
disk of radius r centered at (x,y)
47. Distance (cont.)
D4-distance (city-block distance) is defined as
t
y
s
x
q
p
D -
+
-
)
,
(
4
1 2
1
0
1 2
1
2
2
2
2
2
2
Pixels with D4(p) = 1 is 4-neighbors of p.
Distance
The pixels having a D4 distance from (x,y) less than or equal
To some value r from a diamond centered at (x,y).
48. Distance (cont.)
D8-distance (chessboard distance) is defined as
)
,
max(
)
,
(
8 t
y
s
x
q
p
D -
-
1
2
1
0
1
2
1
2
2
2
2
2
2
Pixels with D8(p) = 1 is 8-neighbors of p.
2
2
2
2
2
2
2
2
1
1
1
1
The pixels having a D8 distance from (x,y) less than or equal
To some value r from a square centered at (x,y).