Sampling and Quantization
Sampling and Quantization
1 7/12/2018
Intensity Plot along scan line
Scan line AB
A B
2 7/12/2018
Sampling and Quantization
Sampling: Digitizing Coordinate Values
3 7/12/2018
Sampling of 1D signal
4 7/12/2018
Sampling: with increasing sampling time
T
0 0
1 201 1 201
0 0
1 201 1 201
5 7/12/2018
Image Sampling and Quantization
Digitizing the
coordinate values Digitizing the
amplitude values
6 7/12/2018
Image Sampling and Quantization
7 7/12/2018
Digital image Representation
The representation of an M×N numerical array as
9 7/12/2018
Spatial and Intensity Resolution
Spatial resolution
— A measure of the smallest discernible (visible) detail in an
image
— stated with line pairs per unit distance, dots (pixels) per unit
distance, dots per inch (dpi)
Eg: newspapers are printed with resolution with 75 dpi
magazines at 133 dpi
glossy brochures at 175 dpi
book page printed at 2400 dpi
Intensity resolution
— The smallest discernible change in intensity level
— stated with 8 bits, 16 bits, 24 bits, etc.
10 7/12/2018
Spatial Resolution: Downsampling
Effects of varying number of samples in a digital image
12 7/12/2018
13 7/12/2018
Interpolation Method: Local Averaging
14 7/12/2018
15 7/12/2018
Spatial Resolution: Resampling
By Row and column duplication
1 2 3
(1) 1024x1024
(2) 512x512
(3) 256x256
(4) 128x128
(5) 64x64
(6) 32x32
4 5 6
16 7/12/2018
Resampling by pixel replication
17 7/12/2018
18 7/12/2018
Resampling by Bilinear Interpolation
(3+4+5+6+8+9+10+11)/
8
3 5 3 4 5
9 11 6 7 8 (5+11)/2
9 10 11
19 7/12/2018
Spatial Resolution
Effect of reducing Spatial Resolution
3 4
22 7/12/2018
Example: Gray Level Resolution
Neighborhood
Adjacency
Connectivity
Paths
Distance Measure
Regions and boundaries
24 7/12/2018
Basic Relationships Between Pixels
( x 1, y 1) ( x 1, y) ( x 1, y 1)
( x, y 1) p ( x, y) ( x, y 1)
( x 1, y 1) ( x 1, y) ( x 1, y 1)
0 1 1 0
1 1 0 1
(p)
0 0 1 1
26 7/12/2018
Types of Adjacency
0 1 1 0
q=(1,1)
1 1 0 1 N4(p)={(1,1))
(p) (q) Since q is in set N4(p) p and q are adjacent
0 0 1 1
27 7/12/2018
Types of Adjacency
Let set of colors consist of color 1 i.e v={1}
0 1 1 0
(q) q=(0,2)
N4(p)={(0,1), (1,0)
1 1 0 1 Since q is in not in set N4(p) p and q are not
(p) adjacent
0 0 1 1
0 1 1 0
1 1 0 1
0 0 1 1
28 7/12/2018
Types of Adjacency
0 1 1 0
1 1 0 1
0 0 1 1
30 7/12/2018
Types of Adjacency
31 7/12/2018
Types of Adjacency
32 7/12/2018
Path
0 1 1 0
1 1 0 1
(p) (q)
0 0 1 1
33 7/12/2018
Distance measures
Given pixels p, q and z with coordinates (x, y), (s, t), (u, v)
respectively, the distance function D has following
properties:
D(p, q) >=0 [D(p, q) = 0, iff p = q]
D(p, q) = D(q, p)
D(p, z)<= D(p, q) + D(q, z)
34 7/12/2018
Distance measures
Common Distance Measures:
1. Euclidean:
De(p,q)2 = (x-s)2 + (y-t)2
35 7/12/2018
Example
For pixels p and q shown in figure with co-ordinates (0,0) and (4,3)
and V={2 ,3, 4}. find D4 (city block distance) and D8 (chessboard
distance)?
2 4 5 3 4
5 3 2 4 5
7 6 2 1 5
6 5 3 4 0
4 5 7 2 6
36 7/12/2018
Example
For pixels p and q shown in figure with co-ordinates (0,0) and (4,3) and V={2 ,3,
4}. find D4 (city block distance), D8 (chessboard distance)?
37 7/12/2018
Example
For pixels p and q shown in figure with co-ordinates (0,0) and (4,3)
and V={2 ,3, 4}. find D4 (city block distance), D8 (chessboard
distance)?
2(p) 4 5 3 4 Ans: p(x1, y1)= p(0,0)
1. 5 3 2 4 5 q(x2 , y2)= q(4,3)
7 6 2 1 5
b) D8(p,q)=max(|x1-x2|,|y1-y2|)
6 5 3 4 0
=max(4, 3)
4 5 7 2(q) 6 =4
38 7/12/2018