Chapter 2:
Digital Image Fundamental
6 June 2007
Digital Image
10
9
15
32
10 16 28
65 70 56 43
6 26703756
32 99
54 96 67
25 6013 902296
21 54 47 42
15 8587 853943
54 65 65 39
32 65 87
78
67
92
99
2.
3.
The iris diaphragm controls amount of light that enters the eye.
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.
Intensity
Position
A
Intensity
Position
In area A, brightness perceived is darker while in area B is
brighter. This phenomenon is called Mach Band Effect.
Simultaneous contrast. All small squares have exactly the same intensity
but they appear progressively darker as background becomes lighter.
Simultaneous Contrast
Optical illusion
Visible Spectrum
Image Sensors
Single sensor
Line sensor
Array sensor
Photosites
Amplifier
Output Gate
Gate
Gate
Gate
Output
Horizontal transport
register
Image pixel
Vertical shift
Horizontal shift
a Output
f(x,y)
Digital Images
10 10 16 28
9 6 26 37
15 25 13 22
32 15 87 39
RGB components
10 10 16 28
56 43
9 656 70
26
3756
70
32 99
54 96 67
15 25 6013 902296
21
54
47
42
32
15
87
39
85 85 43
54 65 65 39
32 65 87
78
67
92
99
Binary data
0 0 0 0
0 0 0 0
1 1 1 1
1 1 1 1
1 4 9
6 4 7
6 5 2
Index value
Red
Green
Blue
component
component
component
0.1
0.5
0.3
1.0
0.0
0.0
0.0
1.0
0.0
0.5
0.5
0.5
0.2
0.8
0.9
= Sampling locations
Sampled image
Original image
Spatial resolution
Original image
1mm
Sampled image
2mm
No detail is lost!
Minimum
Period
Spatial resolution
(sampling rate)
= Sampling locations
Nyquist Rate:
Spatial resolution must be less or equal
half of the minimum period of the image
or sampling frequency must be greater or
Equal twice of the maximum frequency.
Aliased Frequency
x1 (t ) sin( 2t ),
f 1
x2 (t ) sin(12t ),
f 6
0.5
0
-0.5
-1
0.5
1.5
0.5
1.5
1
0.5
0
-0.5
-1
Sampling rate:
5 samples/sec
256x256 pixels
128x128 pixels
64x64 pixels
32x32 pixels
Image Quantization
Image quantization:
discretize continuous pixel values into discrete numbers
Color resolution/ color depth/ levels:
- No. of colors or gray levels or
- No. of bits representing each pixel value
- No. of colors or gray levels Nc is given by
Nc 2
where b = no. of bits
Quantization function
Quantization level
Nc-1
Nc-2
2
1
0
Light intensity
Darkest
Brightest
256 levels
128 levels
64 levels
32 levels
16 levels
8 levels
4 levels
2 levels
In this image,
it is easy to see
false contour.
(0,0)
(x-1,y-1)
(x,y-1)
(x+1,y-1)
(x-1,y)
(x,y)
(x+1,y)
Neighbors of a Pixel
Neighborhood relation is used to tell adjacent pixels. It is
useful for analyzing regions.
4-neighbors of p:
(x,y-1)
(x-1,y)
(x+1,y)
N4(p) =
(x,y+1)
(x1,y)
(x+1,y)
(x,y1)
(x,y+1)
(x-1,y-1)
(x,y-1)
(x+1,y-1)
(x-1,y)
(x+1,y)
(x-1,y+1)
(x,y+1)
(x+1,y+1)
8-neighbors of p:
N8(p) =
(x1,y1)
(x,y1)
(x+1,y1)
(x1,y)
(x+1,y)
(x1,y+1)
(x,y+1)
(x+1,y+1)
(x-1,y-1)
(x+1,y-1)
Diagonal neighbors of p:
ND(p) =
(x-1,y+1)
(x+1,y+1)
(x1,y1)
(x+1,y1)
(x1,y1)
(x+1,y+1)
Connectivity
Adjacency
S1
S2
Path
A path from pixel p at (x,y) to pixel q at (s,t) is a sequence
of distinct pixels:
(x0,y0), (x1,y1), (x2,y2),, (xn,yn)
such that
(x0,y0) = (x,y) and (xn,yn) = (s,t)
and
(xi,yi) is adjacent to (xi-1,yi-1),
i = 1,,n
p
Path (cont.)
8-path
p
8-path from p to q
results in some ambiguity
m-path
p
q
m-path from p to q
solves this ambiguity
Distance
De ( p, q) ( x s ) 2 ( y t ) 2
Distance (cont.)
D4 ( p, q) x s y t
2
1
2
2
1
0
1
2
2
1
2
Distance (cont.)
D8 ( p, q) max( x s , y t )
2
2
2
2
2
2
1
1
1
2
2
1
0
1
2
2
1
1
1
2
2
2
2
2
2