Digital Image Processing: Lecture # 2
Digital Image Processing: Lecture # 2
Lecture # 2
( Dr M Mohsin Riaz )
Course Outline
• Digital Image Fundamentals
• Image sensing and acquisition
• Image sampling and quantization
• Pixel level operations
• Image Compression
• Compression models and information theory
• Error free and lossy compression
• Image compression standards
Course Outline (Optional)
• Morphological Operations
• Feature identification and extraction
• Clustering and classification
• Deep-learning
Course Outline
1 pixel
Image Formation
10
Image Formation
Sampling
11
Image Formation
12
Image Formation
Quantization
13
Image Formation
14
Sampling and Quantization
pixel grid
15
Sampling and Quantization
16
Sampling and Quantization
Sampling:
◼ Digitization of the spatial coordinates (x,y)
Quantization:
◼ Digitization in amplitude (also known as gray level
quantization)
17
Sampling and Quantization
Quantization
◼ 8 bit quantization: 28 =256 gray levels (0: black, 255: white)
◼ 1 bit quantization: 2 gray levels (0: black, 1: white) – binary
Sampling
◼ Commonly used number of samples (resolution)
⚫ Digital still cameras: 640x480, 1024x1024
⚫ Digital video cameras: 640x480 at 30 frames/second (fps)
18
Digital Image Representation
19
Digital Image Representation
a11 a1n
A=
a amn
m1
Divided into
8x8 blocks
20
Digital Image Representation
L=2 k
Intensity levels
0, L − 1
Dynamic range – Range of values spanned by the gray
scale
21
Digital Image Representation
Image Size
◼ Number of bits required to store an image
b = M N k
◼ Image having 2k intensity levels
⚫ k – bit image
⚫ 256 intensity levels – 8 bit image
22
Spatial Resolution
23
Spatial Resolution
24
Spatial Resolution
25
Intensity Level Resolution
26
Intensity Level Resolution
Number of Intensity
Number of Bits Examples
Levels
1 2 0, 1
2 4 00, 01, 10, 11
4 16 0000, 0101, 1111
8 256 00110011, 01010101
16 65,536 1010101010101010
27
Intensity Level Resolution
16 million colors
16 colors
28
Intensity Level Resolution
29
Intensity Level Resolution
256 grey levels (8 bits per pixel) 128 grey levels (7 bpp) 64 grey levels (6 bpp) 32 grey levels (5 bpp)
16 grey levels (4 bpp) 8 grey levels (3 bpp) 4 grey levels (2 bpp) 2 grey levels (1 bpp)
30
Intensity Level Resolution
8 bits 256 levels 7 bits 128 levels 6 bits 64 levels 5 bits 32 levels
31
Resolution: How much is enough?
32
Resolution: How much is enough?
The picture on the right is fine for counting the number of cars, but not for
reading the number plate
33
Questions??
34
Internship Opportunity Available (CAST)
◼ 4- Months
◼ Android App Development
35