SlideShare a Scribd company logo
4
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).



6 26 37
25 13 22

2 15 87 39
10 10 16 28


54 96 67
54 47 42

65 65 39
 9 65 70 56 43



 65 87 99
32
43 92
5485
15 60
3
21
3299 70 56 78
90 96 67
85
2.3 IMAGE SENSING AND ACQUISITION
Image Sensing
o Scene
o Molecules
o Human Brains
o …
o Illumination
o Radar
o Infrared
o X-ray
o Sun
o …
o Reflection
5
CONT’D
6
Single imaging
Sensor
Line Sensor
Array Sensor
IMAGE ACQUISITION USING A SINGLE SENSOR
7
The most familiar sensor of
this type is the photodiode
It is constructed of silicon
materials and whose output
voltage waveform is
proportional to light.
The use of a filter in front of a
sensor improves selectivity.
For example, a green (pass)
filter in front of a light sensor
favors light in the green band
of the color spectrum.
As a consequence, the sensor
output will be stronger for
green light than for other
components in the visible
spectrum.
IMAGE ACQUISITION USING SENSOR STRIPS
5
Image Acquisition Using Sensor Strip
6
IMAGE ACQUISITION USING SENSOR ARRAYS
7
 Used for convert a continuous
image into a digital image
 Contains an array of light sensors
 Converts photon into electric charges
accumulated in each sensor unit
CCD KAF-3200E from Kodak.
(2184 x 1472 pixels,
Pixel size 6.8 microns2)
8
Image Sensors : Array Sensor
Charge-Coupled Device (CCD)
A SIMPLE IMAGE FORMATION
MODEL
f(x,y) = i(x,y)  r(x,y)
0 < i(x,y) < 
0 < r(x,y) < 1
(from total absorption to
total reflectance)
Sample values of
r(x,y):
0.01: black velvet
0.93: snow
Intensity of a monochrome
image f at (x0,y0): gray level l
of the image at that point
l=f(x0, y0)
Lmin ≤ l ≤ Lmax
Where:
Lmin: Positive
Lmax: Finite
In practice:
Lmin = Imin rmin
Lmax = Imax rmax
e.g. for indoor image processing:
Lmin ≈ 10 Lmax ≈ 1000
[L , L
min max] : gray scale
Often shifted to [0,L-1] 
l=0: black
l=L-1: white
All intermediate values are shades
of gray
12
CONT’D
10
2.4 Image Sampling and Quantization
11
• The output of most sensors is continuous in
amplitude and spatial coordinates.
• Converting an analog image to a digital image
require sampling and quantization
• Sampling: is digitizing the coordinate values
• Quantization: is digitizing the amplitude values
SAMPLING & QUANTIZATION
12
 The spatial and amplitude digitization of f(x,y) is
called:
⚫ image sampling when it refers to spatial coordinates
(x,y) and
⚫ gray-level quantization when it refers to the amplitude.
Image Sampling and Quantization
13
Spatial sampling is
accomplished by sensor
arrangement and
mechanical movement.
IMAGE SAMPLING AND
QUANTISATION
A digital sensor can only measure a limited number of
samples at a discrete set of energy levels
Quantisation is the process of converting a continuous
analogue signal into a digital representation of this signal
14
IMAGE SAMPLING AND QUANTISATION
15
IMAGE SAMPLING AND QUANTISATION
IMAGE SAMPLING AND QUANTISATION
(CONT…)
Remember that a digital image is always only an
approximation of a real world scene
20
21
original Sampled by 2 Sampled by 4
Sampled by 8 Sampled by 16
UNIFORM QUANTIZATION
 Digitized in amplitude (or pixel value)
 PGM – 256 levels  4 levels
0
255
64
128
192
0
3
1
2
23
original 128 levels (7 bits) 16 levels (4 bits)
4 levels (2 bits) 2 levels (1 bit)
Representing Digital Images
21
Image “After snow storm”
Fundamentals of Digital Images
f(x,y)
x
y
 An image: a multidimensional function of spatial coordinates.
 Spatial coordinate: (x,y) for 2D case such as photograph,
(x,y,z) for 3D case such as CT scan images
(x,y,t) for movies
 The function f may represent intensity (for monochrome images)
or color (for color images) or other associated values.
Origin
22
REPRESENTING DIGITAL IMAGES
0  ai,j  L-1 Where L = 2k
The dynamic range of an image is the range of values
spanned by the gray scale.
The number, b, of bits required to store a digitized image of
size M by N is
b = M  N  k
The pixel intensity levels (gray scale levels) are in the
interval of [0, L-1].
26
77 66 68 67 98 93 79 81
79 61 61 71 61 78 88 94
79 93 84 64 72 76 95 94
97 65 71 75 75 72 95 111
120 81 82 76 72 77 78 83
150 146 112 83 78 62 9127 85
156 145 158 125 107 121 95 86
158 166 147 146 153 149 129 107
Elaine image of size 512
by 512 pixels (5 by 5
inches), The dynamic
range is [0, 255].
Find the following:
• The number of bits
required to represent a
pixel
• The size of the image in
bits?
Representing Digital Images
Representing Digital Images
25
Digital Image Types : Intensity Image
Intensity image or monochrome image
each pixel corresponds to light intensity
normally represented in gray scale (gray
level).


 9
10 10 16 28
 6 26 37

15 25 13 22
32 15 87 39
Gray scale values
26



6 26 37
5 25 13 22

2 15 87 39
3



54 96 67
54 47 42

65 65 39


 65 87 99
32
43 92
5485
 99 70 56 78
1 32
 
21 60 90 96 67
85
RGB components
10 10 16 28
 9 65 70 56 43
30
Digital Image Types : RGB Image
Color image or RGB image:
each pixel contains a vector
representing red, green and
blue components.
Image Types : Binary Image
Binary image or black and white image
Each pixel contains one bit :
1 represent white
0 represents black

 1
1
0
0
0 0 0 0
 0 0 
1 1 1 1
1 1
Binary data
31
Image Types : Index Image
 

2
7
6
1 4 9
 4
6 5
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
… … … …
Index image
Each pixel contains index number
pointing to a color in a color table
Color Table
32
Effect of Spatial Resolution
256x256 pixels
64x64 pixels
128x128 pixels
32x32 pixels
33
SPATIAL RESOLUTION
The spatial resolution of an image is determined by
how sampling was carried out
Spatial resolution simply refers to the smallest
discernable detail in an image
⚫ Vision specialists will
often talk about pixel
size
⚫ Graphic designers will
talk about dots per
inch (DPI)
Effect of Spatial Resolution
32
SPATIAL RESOLUTION (CONT…)
33
SPATIAL RESOLUTION (CONT…)
34
SPATIAL RESOLUTION (CONT…)
35
SPATIAL RESOLUTION (CONT…)
36
SPATIAL RESOLUTION (CONT…)
37
SPATIAL RESOLUTION (CONT…)
38
INTENSITY LEVEL RESOLUTION
39
Intensity level resolution refers to the number of
intensity levels used to represent the image
⚫ The more intensity levels used, the finer the level
of detail discernable in an image
⚫ Intensity level resolution is usually given in terms
of the number of bits used to store each intensity
level
Number of Bits
Number of Intensity
Levels
Examples
1 2 0, 1
2 4 00, 01, 10, 11
4 16 0000, 0101, 1111
8 256 00110011, 01010101
16 65,536 1010101010101010
INTENSITY LEVEL RESOLUTION (CONT…)
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)
256 grey levels (8 bits per pixel)
43
INTENSITY LEVEL RESOLUTION (CONT…)
41
INTENSITY LEVEL RESOLUTION (CONT…)
42
INTENSITY LEVEL RESOLUTION (CONT…)
43
INTENSITY LEVEL RESOLUTION (CONT…)
44
INTENSITY LEVEL RESOLUTION (CONT…)
45
INTENSITY LEVEL RESOLUTION (CONT…)
46
INTENSITY LEVEL RESOLUTION (CONT…)
47
INTENSITY LEVEL RESOLUTION (CONT…)
48
SATURATION & NOISE
49
RESOLUTION: HOW MUCH IS
ENOUGH?
50
The big question with resolution is always how much is
enough?
⚫ This all depends on what is in the image and what you would
like to do with it
⚫ Key questions include
 Does the image look aesthetically pleasing?
 Can you see what you need to see within the image?
RESOLUTION: HOW MUCH IS ENOUGH?
(CONT…)
The picture on the right is fine for counting the number of
cars, but not for reading the number plate
51
INTENSITY LEVEL RESOLUTION (CONT…)
52
Low Detail Medium Detail High Detail
INTENSITY LEVEL RESOLUTION (CONT…)
53
INTENSITY LEVEL RESOLUTION (CONT…)
54
INTENSITY LEVEL RESOLUTION (CONT…)
55
Basic Relationship of Pixels
x
Conventional indexing method 59
y
(0,0)
(x-1,y-1) (x,y-1) (x+1,y-1)
(x-1,y) (x,y) (x+1,y)
(x-1,y+1) (x,y+1) (x+1,y+1)
(x,y-1)
(x-1,y) p (x+1,y)
(x,y+1)
Neighbors of a Pixel
Neighborhood relation is used to tell adjacent pixels. It is
useful for analyzing regions.
4-neighbors of p:
N4(p) =
(x1,y)
(x+1,y)
(x,y1)
(x,y+1)
Note: q  N4(p) implies p  N4(q)
4-neighborhood relation considers only vertical and
horizontal neighbors.
60
(x-1,y-1) (x,y-1) (x+1,y-1)
(x-1,y) p (x+1,y)
(x-1,y+1) (x,y+1) (x+1,y+1)
CONT’D
8-neighbors of p:
(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)
N8(p) =
8-neighborhood relation considers all neighbor pixels.
61
(x-1,y-1) (x+1,y-1)
p
(x-1,y+1) (x+1,y+1)
Diagonal neighbors of p:
ND(p) =
(x1,y1)
(x+1,y1)
(x1,y1)
(x+1,y+1)
Diagonal -neighborhood relation considers only diagonal
neighbor pixels.
CONT’D
62
If pixel p at location (x,y) then its neighbors are:
• 4-neighbors N4(p)
(x-1 , y), (x+1 , y), (x , y-1), (x , y+1)
• 4-diagonal neighbors ND(p)
(x-1 , y-1), (x-1 , y+1), (x+1 , y+1), (x+1 , y-1)
• 8-neighbors N8(p)
All pixels in N4(p) and in ND(p)
2.5 Some Basic Relationship Between Pixels
63
Three type of adjacency:
(a) 4-adjacency. Two pixels p and q with values from V
are 4-adjacent if q is in the set N4(p).
(b) 8-adjacency. Two pixels p and q with values from V
are 8-adjacent if q is in the set N8(p).
(c) m-adjacency (mixed adjacency). Two pixels p and q
with values from V are m-adjacent if
(i) q is in N4(p), or
(ii) q is in ND(p) and the set N4(p)  N4(q) has
no pixels whose values are from V
V: The set of gray-level values used to define adjacency 64
Adjacency
Adjacency
A pixel p is adjacent to pixel q is 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. 65
0 1 0
0 1 0
0 0 1
4-adjacency
q
p
0 0
0 1 0
0 0 1
8-adjacency
q
1
m-adjacency
0 1
0 1 0
0 0 1
q
1
0 1
0 1 0
0 0 1
1 q
8-adjacency
!?
Adjacency
66
CONT’D
 Subset adjacency
⚫ S1 and S2 are adjacent if some pixel in S1 is adjacent to
some pixel in S2
A path (curve) from pixel p with coordinates (x,y) to pixel
q with coordinates (s,t) is a sequence of distinct pixels:
(x0,y0), (x1,y1), …, (xn,yn)
where (x0,y0)=(x,y), (xn,yn)=(s,t), and (xi,yi) is
adjacent to (xi-1,yi-1), for 1≤i ≤n ; n is the length of the
path.
If (x0, y0) = (xn, yn): A closed path.
64
 Region
⚫ We call R a region of the image if R is a connected set
 Boundary
⚫ 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
 Edge
⚫ Pixels with derivative values that exceed a preset
threshold
65
CONT’D
 Distance measures
⚫ Euclidean distance
⚫ City-block distance
D4 ( p,q) | (x  s) |  | (y t) |
⚫ Chessboard distance
D8 ( p,q)  max(| (x  s) |,| (y t) |)
1
 (y t)2
]2
66
e
D ( p,q)  [(x  s)2
CONT’D
 Dm distance: The shortest m-path between
the points
67
CONT’D
For pixels p, q, and z, with coordinates (x,y), (s,t), and
(v,w), respectively, D is a distance function or metric if
(a) D(p,q)  0 ,
(b) D(p,q) = D(q,p), (symmetry)
(c) D(p,z)  D(p,q) + D(q,z) (triangular inequality)
Euclidean distance between p and q is
De(p,q) = [ (x - s)2 + (y - t)2 ]1/2
For this distance measure, 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).
Distance Measure (Euclidean)
71
The D4 distance (city-block) between p and q i
D4(p,q) = |x – s | + |y – t |
Diamond shape
The D8 distance (chessboard) between p and q is
D8(p,q) = max ( |x – s | , |y – t | )
2
s 2 1 2
2 1 0 1 2
2 1 2
2
2 2 2 2 2
2 1 1 1 2
2 1 0 1 2
2 1 1 1 2
Distance Measure (City block, Chessboard)
2 2 2 2 7
2
2
If distance depend on the path between two pixels such
as m-adjacency then the Dm distance between two pixels
is defined as the shortest m-path between the pixels.
0 0 1
0 1 0
1 0 0
q
Dm( p , q ) = 2
0 0 1
1 1 0
1 0 0
Dm( p , q ) = 3
p
0 1 1
1 1 0
1 0 0
Dm( p , q ) = 4
Distance Measure of Path
70
Distance
For pixel p, q, and z with coordinates (x,y), (s,t) and (u,v),
D is a distance function or metric if
 D(p,q)  0 (D(p,q) = 0 if and only if p = q)
 D(p,q) = D(q,p)
 D(p,z)  D(p,q) + D(q,z)
Example: Euclidean distance
D (p,q)  (x  s)2
 (y  t)2
e
71
D4-distance (city-block distance) is defined as
D4(p,q)  x  s  y  t
2
2 1 2
2 1 0 1 2
2 1 2
2
Pixels with D4(p) = 1 is 4-neighbors of p. 72
D8-distance (chessboard distance) is defined as
D8(p,q)  max( x  s, y  t )
Pixels with D4(p) = 1 is 4-neighbors of p. 73
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
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
q
We can define type of path: 4-path, 8-path or m-path
depending on type of adjacency. 77
p
q
p
q
p
q
8-path from p to q
results in some ambiguity
75
m-path from p to q
solves this ambiguity
8-path m-path
Find the shortest 4-, 8-, m-path
between p and q for
V= {0, 1} and V={1, 2}
3
2
1
2
2
0
(q)
1
2
1 2 1 1
1
(p)
0 1 2
76
Path Length
Images are represented by Matrices, and matrix division
is not defined. The following image division
C = A/B
means that the division is carried out between
corresponding pixels in the two images A and B to form
image C.
77
Image Operation on a Pixel Basis
Linear operation
H is said to be a linear operator if, for any two
images f and g and any two scalars a and b,
H(af + bg) = a H( f ) + b H( g )
Linear and Nonlinear Operation
78
IMAGE ADDITION (AVERAGING)
79
IMAGE SUBTRACTION
80
IMAGE SUBTRACTION
81
IMAGE MULTIPLICATION (DIVISION)
82
IMAGE MULTIPLICATION (DIVISION)
83
REFERENCES
 “Digital Image Processing”, 2/ E, Rafael C. Gonzalez & Richard
E. Woods, www.prenhall.com/gonzalezwoods.
 Only Original Owner has full rights reserved for copied
images.
 This PPT is only for fair academic use.
84
Questions?
85
Think Smarter,
Work Harder

More Related Content

PPT
L 1 5 sampling quantizing encoding pcm
PPTX
Chap6 image restoration
PDF
Digital Signal Processing
PPTX
Canny Edge Detection
PPT
Enhancement in frequency domain
PPTX
Fourier transforms
PPTX
Fourier series and applications of fourier transform
PPT
Histogram equalization
L 1 5 sampling quantizing encoding pcm
Chap6 image restoration
Digital Signal Processing
Canny Edge Detection
Enhancement in frequency domain
Fourier transforms
Fourier series and applications of fourier transform
Histogram equalization

What's hot (20)

PPT
Image trnsformations
PDF
Digital Signal Processing[ECEG-3171]-Ch1_L03
PDF
Fourier series 1
PDF
Fourier transform
PDF
Multiuser MIMO-OFDM simulation framework in Matlab
PDF
Digital Signal Processing[ECEG-3171]-Ch1_L02
PPTX
PDF
Ppt compressed sensing a tutorial
PDF
DSP_2018_FOEHU - Lec 0 - Course Outlines
PPTX
Fourier series and fourier integral
PPTX
Image transforms
PPTX
Quadrature amplitude modulation
PPT
Pulse amplitude modulation
PPT
Image enhancement
PPTX
Dft,fft,windowing
PPT
Chapter 5 Image Processing: Fourier Transformation
PDF
Lecture 16 KL Transform in Image Processing
PPTX
Windowing (signal processing)
PPTX
Nlms algorithm for adaptive filter
PPTX
Chapter 3 image enhancement (spatial domain)
Image trnsformations
Digital Signal Processing[ECEG-3171]-Ch1_L03
Fourier series 1
Fourier transform
Multiuser MIMO-OFDM simulation framework in Matlab
Digital Signal Processing[ECEG-3171]-Ch1_L02
Ppt compressed sensing a tutorial
DSP_2018_FOEHU - Lec 0 - Course Outlines
Fourier series and fourier integral
Image transforms
Quadrature amplitude modulation
Pulse amplitude modulation
Image enhancement
Dft,fft,windowing
Chapter 5 Image Processing: Fourier Transformation
Lecture 16 KL Transform in Image Processing
Windowing (signal processing)
Nlms algorithm for adaptive filter
Chapter 3 image enhancement (spatial domain)
Ad

Similar to quantization and sampling presentation ppt (20)

PPTX
Lect 02 second portion
PPTX
Digital-Image-processing-fundamenntal.pptx
PPTX
Ch2
PPT
DIP Image Representation by Khademul.ppt
PDF
2. IP Fundamentals.pdf
PPTX
CLASS 1.1.pptx
PPTX
Distance measures in Image in Digital Image Processing
PDF
Computer_Vision-Lecture 2- Revision on Image.pdf
PPTX
computer Vision and Machine learning Chapter 1
PPTX
Topic 1- computer vision and machine learning
PPTX
Module 1.pptx
PPT
Image processing 1-lectures
PDF
Digital_image_processing introduction ppt for basic understanding
PPTX
Multimedia graphics and image data representation
PPT
introduction to Digital Image Processing
PDF
matdid950092.pdf
PDF
Basics of image processing & analysis
PDF
DIP Notes Unit-1 PPT.pdf
PDF
DIGITAL IMAGE PROCESSING FUNDAMENTALS .PDF
PPTX
Digital image processing2.pptx
Lect 02 second portion
Digital-Image-processing-fundamenntal.pptx
Ch2
DIP Image Representation by Khademul.ppt
2. IP Fundamentals.pdf
CLASS 1.1.pptx
Distance measures in Image in Digital Image Processing
Computer_Vision-Lecture 2- Revision on Image.pdf
computer Vision and Machine learning Chapter 1
Topic 1- computer vision and machine learning
Module 1.pptx
Image processing 1-lectures
Digital_image_processing introduction ppt for basic understanding
Multimedia graphics and image data representation
introduction to Digital Image Processing
matdid950092.pdf
Basics of image processing & analysis
DIP Notes Unit-1 PPT.pdf
DIGITAL IMAGE PROCESSING FUNDAMENTALS .PDF
Digital image processing2.pptx
Ad

More from KNaveenKumarECE (11)

PPTX
Industrial internet of things IOT Week-Week-4.pptx
PPTX
Industrial internet of things IOT Week-3.pptx
PPTX
Industry 4.o the fourth revolutionWeek-2.pptx
PPTX
Introduction to sensing and Week-1.pptx
PPTX
ARM introduction registers architectures
PPT
basic electronic engineering introduction
PPT
introduction to python, fundamentals and basics
PPTX
super vector machines algorithms using deep
PPT
digital image processing chapter two, fundamentals
PPTX
Augastiny_VANET advantages and disadvantages.pptx
PDF
ARM_System_Developers_Guide-Designing_and_Optimizing_System_Software.pdf
Industrial internet of things IOT Week-Week-4.pptx
Industrial internet of things IOT Week-3.pptx
Industry 4.o the fourth revolutionWeek-2.pptx
Introduction to sensing and Week-1.pptx
ARM introduction registers architectures
basic electronic engineering introduction
introduction to python, fundamentals and basics
super vector machines algorithms using deep
digital image processing chapter two, fundamentals
Augastiny_VANET advantages and disadvantages.pptx
ARM_System_Developers_Guide-Designing_and_Optimizing_System_Software.pdf

Recently uploaded (20)

PPTX
CH1 Production IntroductoryConcepts.pptx
PPTX
Foundation to blockchain - A guide to Blockchain Tech
PDF
Mohammad Mahdi Farshadian CV - Prospective PhD Student 2026
PDF
SM_6th-Sem__Cse_Internet-of-Things.pdf IOT
PPTX
IOT PPTs Week 10 Lecture Material.pptx of NPTEL Smart Cities contd
PDF
TFEC-4-2020-Design-Guide-for-Timber-Roof-Trusses.pdf
PPT
Project quality management in manufacturing
PPTX
MET 305 2019 SCHEME MODULE 2 COMPLETE.pptx
PPTX
web development for engineering and engineering
PDF
Digital Logic Computer Design lecture notes
PPTX
additive manufacturing of ss316l using mig welding
DOCX
ASol_English-Language-Literature-Set-1-27-02-2023-converted.docx
PPTX
bas. eng. economics group 4 presentation 1.pptx
PDF
July 2025 - Top 10 Read Articles in International Journal of Software Enginee...
PDF
PRIZ Academy - 9 Windows Thinking Where to Invest Today to Win Tomorrow.pdf
PPTX
KTU 2019 -S7-MCN 401 MODULE 2-VINAY.pptx
PPTX
Engineering Ethics, Safety and Environment [Autosaved] (1).pptx
PPTX
UNIT 4 Total Quality Management .pptx
PPTX
Geodesy 1.pptx...............................................
PDF
Embodied AI: Ushering in the Next Era of Intelligent Systems
CH1 Production IntroductoryConcepts.pptx
Foundation to blockchain - A guide to Blockchain Tech
Mohammad Mahdi Farshadian CV - Prospective PhD Student 2026
SM_6th-Sem__Cse_Internet-of-Things.pdf IOT
IOT PPTs Week 10 Lecture Material.pptx of NPTEL Smart Cities contd
TFEC-4-2020-Design-Guide-for-Timber-Roof-Trusses.pdf
Project quality management in manufacturing
MET 305 2019 SCHEME MODULE 2 COMPLETE.pptx
web development for engineering and engineering
Digital Logic Computer Design lecture notes
additive manufacturing of ss316l using mig welding
ASol_English-Language-Literature-Set-1-27-02-2023-converted.docx
bas. eng. economics group 4 presentation 1.pptx
July 2025 - Top 10 Read Articles in International Journal of Software Enginee...
PRIZ Academy - 9 Windows Thinking Where to Invest Today to Win Tomorrow.pdf
KTU 2019 -S7-MCN 401 MODULE 2-VINAY.pptx
Engineering Ethics, Safety and Environment [Autosaved] (1).pptx
UNIT 4 Total Quality Management .pptx
Geodesy 1.pptx...............................................
Embodied AI: Ushering in the Next Era of Intelligent Systems

quantization and sampling presentation ppt

  • 1. 4 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).    6 26 37 25 13 22  2 15 87 39 10 10 16 28   54 96 67 54 47 42  65 65 39  9 65 70 56 43     65 87 99 32 43 92 5485 15 60 3 21 3299 70 56 78 90 96 67 85
  • 2. 2.3 IMAGE SENSING AND ACQUISITION Image Sensing o Scene o Molecules o Human Brains o … o Illumination o Radar o Infrared o X-ray o Sun o … o Reflection 5
  • 4. IMAGE ACQUISITION USING A SINGLE SENSOR 7 The most familiar sensor of this type is the photodiode It is constructed of silicon materials and whose output voltage waveform is proportional to light. The use of a filter in front of a sensor improves selectivity. For example, a green (pass) filter in front of a light sensor favors light in the green band of the color spectrum. As a consequence, the sensor output will be stronger for green light than for other components in the visible spectrum.
  • 5. IMAGE ACQUISITION USING SENSOR STRIPS 5
  • 6. Image Acquisition Using Sensor Strip 6
  • 7. IMAGE ACQUISITION USING SENSOR ARRAYS 7
  • 8.  Used for convert a continuous image into a digital image  Contains an array of light sensors  Converts photon into electric charges accumulated in each sensor unit CCD KAF-3200E from Kodak. (2184 x 1472 pixels, Pixel size 6.8 microns2) 8 Image Sensors : Array Sensor Charge-Coupled Device (CCD)
  • 9. A SIMPLE IMAGE FORMATION MODEL f(x,y) = i(x,y)  r(x,y) 0 < i(x,y) <  0 < r(x,y) < 1 (from total absorption to total reflectance) Sample values of r(x,y): 0.01: black velvet 0.93: snow Intensity of a monochrome image f at (x0,y0): gray level l of the image at that point l=f(x0, y0) Lmin ≤ l ≤ Lmax Where: Lmin: Positive Lmax: Finite In practice: Lmin = Imin rmin Lmax = Imax rmax e.g. for indoor image processing: Lmin ≈ 10 Lmax ≈ 1000 [L , L min max] : gray scale Often shifted to [0,L-1]  l=0: black l=L-1: white All intermediate values are shades of gray 12
  • 11. 2.4 Image Sampling and Quantization 11 • The output of most sensors is continuous in amplitude and spatial coordinates. • Converting an analog image to a digital image require sampling and quantization • Sampling: is digitizing the coordinate values • Quantization: is digitizing the amplitude values
  • 12. SAMPLING & QUANTIZATION 12  The spatial and amplitude digitization of f(x,y) is called: ⚫ image sampling when it refers to spatial coordinates (x,y) and ⚫ gray-level quantization when it refers to the amplitude.
  • 13. Image Sampling and Quantization 13 Spatial sampling is accomplished by sensor arrangement and mechanical movement.
  • 14. IMAGE SAMPLING AND QUANTISATION A digital sensor can only measure a limited number of samples at a discrete set of energy levels Quantisation is the process of converting a continuous analogue signal into a digital representation of this signal 14
  • 15. IMAGE SAMPLING AND QUANTISATION 15
  • 16. IMAGE SAMPLING AND QUANTISATION
  • 17. IMAGE SAMPLING AND QUANTISATION (CONT…) Remember that a digital image is always only an approximation of a real world scene 20
  • 18. 21 original Sampled by 2 Sampled by 4 Sampled by 8 Sampled by 16
  • 19. UNIFORM QUANTIZATION  Digitized in amplitude (or pixel value)  PGM – 256 levels  4 levels 0 255 64 128 192 0 3 1 2
  • 20. 23 original 128 levels (7 bits) 16 levels (4 bits) 4 levels (2 bits) 2 levels (1 bit)
  • 22. Image “After snow storm” Fundamentals of Digital Images f(x,y) x y  An image: a multidimensional function of spatial coordinates.  Spatial coordinate: (x,y) for 2D case such as photograph, (x,y,z) for 3D case such as CT scan images (x,y,t) for movies  The function f may represent intensity (for monochrome images) or color (for color images) or other associated values. Origin 22
  • 23. REPRESENTING DIGITAL IMAGES 0  ai,j  L-1 Where L = 2k The dynamic range of an image is the range of values spanned by the gray scale. The number, b, of bits required to store a digitized image of size M by N is b = M  N  k The pixel intensity levels (gray scale levels) are in the interval of [0, L-1]. 26
  • 24. 77 66 68 67 98 93 79 81 79 61 61 71 61 78 88 94 79 93 84 64 72 76 95 94 97 65 71 75 75 72 95 111 120 81 82 76 72 77 78 83 150 146 112 83 78 62 9127 85 156 145 158 125 107 121 95 86 158 166 147 146 153 149 129 107 Elaine image of size 512 by 512 pixels (5 by 5 inches), The dynamic range is [0, 255]. Find the following: • The number of bits required to represent a pixel • The size of the image in bits? Representing Digital Images
  • 26. Digital Image Types : Intensity Image Intensity image or monochrome image each pixel corresponds to light intensity normally represented in gray scale (gray level).    9 10 10 16 28  6 26 37  15 25 13 22 32 15 87 39 Gray scale values 26
  • 27.    6 26 37 5 25 13 22  2 15 87 39 3    54 96 67 54 47 42  65 65 39    65 87 99 32 43 92 5485  99 70 56 78 1 32   21 60 90 96 67 85 RGB components 10 10 16 28  9 65 70 56 43 30 Digital Image Types : RGB Image Color image or RGB image: each pixel contains a vector representing red, green and blue components.
  • 28. Image Types : Binary Image Binary image or black and white image Each pixel contains one bit : 1 represent white 0 represents black   1 1 0 0 0 0 0 0  0 0  1 1 1 1 1 1 Binary data 31
  • 29. Image Types : Index Image    2 7 6 1 4 9  4 6 5 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 … … … … Index image Each pixel contains index number pointing to a color in a color table Color Table 32
  • 30. Effect of Spatial Resolution 256x256 pixels 64x64 pixels 128x128 pixels 32x32 pixels 33
  • 31. SPATIAL RESOLUTION The spatial resolution of an image is determined by how sampling was carried out Spatial resolution simply refers to the smallest discernable detail in an image ⚫ Vision specialists will often talk about pixel size ⚫ Graphic designers will talk about dots per inch (DPI)
  • 32. Effect of Spatial Resolution 32
  • 39. INTENSITY LEVEL RESOLUTION 39 Intensity level resolution refers to the number of intensity levels used to represent the image ⚫ The more intensity levels used, the finer the level of detail discernable in an image ⚫ Intensity level resolution is usually given in terms of the number of bits used to store each intensity level Number of Bits Number of Intensity Levels Examples 1 2 0, 1 2 4 00, 01, 10, 11 4 16 0000, 0101, 1111 8 256 00110011, 01010101 16 65,536 1010101010101010
  • 40. INTENSITY LEVEL RESOLUTION (CONT…) 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) 256 grey levels (8 bits per pixel) 43
  • 50. RESOLUTION: HOW MUCH IS ENOUGH? 50 The big question with resolution is always how much is enough? ⚫ This all depends on what is in the image and what you would like to do with it ⚫ Key questions include  Does the image look aesthetically pleasing?  Can you see what you need to see within the image?
  • 51. RESOLUTION: HOW MUCH IS ENOUGH? (CONT…) The picture on the right is fine for counting the number of cars, but not for reading the number plate 51
  • 52. INTENSITY LEVEL RESOLUTION (CONT…) 52 Low Detail Medium Detail High Detail
  • 56. Basic Relationship of Pixels x Conventional indexing method 59 y (0,0) (x-1,y-1) (x,y-1) (x+1,y-1) (x-1,y) (x,y) (x+1,y) (x-1,y+1) (x,y+1) (x+1,y+1)
  • 57. (x,y-1) (x-1,y) p (x+1,y) (x,y+1) Neighbors of a Pixel Neighborhood relation is used to tell adjacent pixels. It is useful for analyzing regions. 4-neighbors of p: N4(p) = (x1,y) (x+1,y) (x,y1) (x,y+1) Note: q  N4(p) implies p  N4(q) 4-neighborhood relation considers only vertical and horizontal neighbors. 60
  • 58. (x-1,y-1) (x,y-1) (x+1,y-1) (x-1,y) p (x+1,y) (x-1,y+1) (x,y+1) (x+1,y+1) CONT’D 8-neighbors of p: (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) N8(p) = 8-neighborhood relation considers all neighbor pixels. 61
  • 59. (x-1,y-1) (x+1,y-1) p (x-1,y+1) (x+1,y+1) Diagonal neighbors of p: ND(p) = (x1,y1) (x+1,y1) (x1,y1) (x+1,y+1) Diagonal -neighborhood relation considers only diagonal neighbor pixels. CONT’D 62
  • 60. If pixel p at location (x,y) then its neighbors are: • 4-neighbors N4(p) (x-1 , y), (x+1 , y), (x , y-1), (x , y+1) • 4-diagonal neighbors ND(p) (x-1 , y-1), (x-1 , y+1), (x+1 , y+1), (x+1 , y-1) • 8-neighbors N8(p) All pixels in N4(p) and in ND(p) 2.5 Some Basic Relationship Between Pixels 63
  • 61. Three type of adjacency: (a) 4-adjacency. Two pixels p and q with values from V are 4-adjacent if q is in the set N4(p). (b) 8-adjacency. Two pixels p and q with values from V are 8-adjacent if q is in the set N8(p). (c) m-adjacency (mixed adjacency). Two pixels p and q with values from V are m-adjacent if (i) q is in N4(p), or (ii) q is in ND(p) and the set N4(p)  N4(q) has no pixels whose values are from V V: The set of gray-level values used to define adjacency 64 Adjacency
  • 62. Adjacency A pixel p is adjacent to pixel q is 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. 65
  • 63. 0 1 0 0 1 0 0 0 1 4-adjacency q p 0 0 0 1 0 0 0 1 8-adjacency q 1 m-adjacency 0 1 0 1 0 0 0 1 q 1 0 1 0 1 0 0 0 1 1 q 8-adjacency !? Adjacency 66
  • 64. CONT’D  Subset adjacency ⚫ S1 and S2 are adjacent if some pixel in S1 is adjacent to some pixel in S2 A path (curve) from pixel p with coordinates (x,y) to pixel q with coordinates (s,t) is a sequence of distinct pixels: (x0,y0), (x1,y1), …, (xn,yn) where (x0,y0)=(x,y), (xn,yn)=(s,t), and (xi,yi) is adjacent to (xi-1,yi-1), for 1≤i ≤n ; n is the length of the path. If (x0, y0) = (xn, yn): A closed path. 64
  • 65.  Region ⚫ We call R a region of the image if R is a connected set  Boundary ⚫ 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  Edge ⚫ Pixels with derivative values that exceed a preset threshold 65 CONT’D
  • 66.  Distance measures ⚫ Euclidean distance ⚫ City-block distance D4 ( p,q) | (x  s) |  | (y t) | ⚫ Chessboard distance D8 ( p,q)  max(| (x  s) |,| (y t) |) 1  (y t)2 ]2 66 e D ( p,q)  [(x  s)2 CONT’D
  • 67.  Dm distance: The shortest m-path between the points 67 CONT’D
  • 68. For pixels p, q, and z, with coordinates (x,y), (s,t), and (v,w), respectively, D is a distance function or metric if (a) D(p,q)  0 , (b) D(p,q) = D(q,p), (symmetry) (c) D(p,z)  D(p,q) + D(q,z) (triangular inequality) Euclidean distance between p and q is De(p,q) = [ (x - s)2 + (y - t)2 ]1/2 For this distance measure, 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). Distance Measure (Euclidean) 71
  • 69. The D4 distance (city-block) between p and q i D4(p,q) = |x – s | + |y – t | Diamond shape The D8 distance (chessboard) between p and q is D8(p,q) = max ( |x – s | , |y – t | ) 2 s 2 1 2 2 1 0 1 2 2 1 2 2 2 2 2 2 2 2 1 1 1 2 2 1 0 1 2 2 1 1 1 2 Distance Measure (City block, Chessboard) 2 2 2 2 7 2 2
  • 70. If distance depend on the path between two pixels such as m-adjacency then the Dm distance between two pixels is defined as the shortest m-path between the pixels. 0 0 1 0 1 0 1 0 0 q Dm( p , q ) = 2 0 0 1 1 1 0 1 0 0 Dm( p , q ) = 3 p 0 1 1 1 1 0 1 0 0 Dm( p , q ) = 4 Distance Measure of Path 70
  • 71. Distance For pixel p, q, and z with coordinates (x,y), (s,t) and (u,v), D is a distance function or metric if  D(p,q)  0 (D(p,q) = 0 if and only if p = q)  D(p,q) = D(q,p)  D(p,z)  D(p,q) + D(q,z) Example: Euclidean distance D (p,q)  (x  s)2  (y  t)2 e 71
  • 72. D4-distance (city-block distance) is defined as D4(p,q)  x  s  y  t 2 2 1 2 2 1 0 1 2 2 1 2 2 Pixels with D4(p) = 1 is 4-neighbors of p. 72
  • 73. D8-distance (chessboard distance) is defined as D8(p,q)  max( x  s, y  t ) Pixels with D4(p) = 1 is 4-neighbors of p. 73 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
  • 74. 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 q We can define type of path: 4-path, 8-path or m-path depending on type of adjacency. 77
  • 75. p q p q p q 8-path from p to q results in some ambiguity 75 m-path from p to q solves this ambiguity 8-path m-path
  • 76. Find the shortest 4-, 8-, m-path between p and q for V= {0, 1} and V={1, 2} 3 2 1 2 2 0 (q) 1 2 1 2 1 1 1 (p) 0 1 2 76 Path Length
  • 77. Images are represented by Matrices, and matrix division is not defined. The following image division C = A/B means that the division is carried out between corresponding pixels in the two images A and B to form image C. 77 Image Operation on a Pixel Basis
  • 78. Linear operation H is said to be a linear operator if, for any two images f and g and any two scalars a and b, H(af + bg) = a H( f ) + b H( g ) Linear and Nonlinear Operation 78
  • 84. REFERENCES  “Digital Image Processing”, 2/ E, Rafael C. Gonzalez & Richard E. Woods, www.prenhall.com/gonzalezwoods.  Only Original Owner has full rights reserved for copied images.  This PPT is only for fair academic use. 84