1. Image Sampling and Quantization
Mithun kumar kar
Department of Electrical Engineering
BALASORE COLLEGE OF ENGINEERING AND TECHNOLOGY, BALASORE
July 21, 2020
Mithun kumar kar (BCET) Image Sampling and Quantization July 21, 2020 1 / 15
2. Image
An Image may be defined as a two dimensional function f (x, y) where
x and y are spatial coordinates and the amplitude of ’f ’ at any pair of
coordinates (x,y) is called the intensity value or gray level of the
image at that point.
An image is called a digital image when the spatial coordinates x, y
and the intensity value of ’f’ all are finite and discrete quantities.
A digital image is an array of real or complex numbers represented by
a finite number of bits.
Mithun kumar kar (BCET) Image Sampling and Quantization July 21, 2020 2 / 15
3. Representation of digital image
A digital image is formed by sampling and quantization containing M
rows and N columns.
f (x, y) =
f (0, 0) f (0, 1) . . . f (0, N − 1)
f (1, 0)
...
f (1, 1) · · ·
...
f (1, N − 1)
...
f (M − 1, 0) f (M − 1, 0) · · · f (M − 1, N − 1)
Each element of this matrix is called an image element or picture
element or pixels.
The origin of a digital image is at the top left with the + x axis
extending downward and the + y axis extending to the right.
Mithun kumar kar (BCET) Image Sampling and Quantization July 21, 2020 3 / 15
4. sampling
Sampling is the operation that transforms a continuous-time signal
into a discrete-time signal, that is discrete values.
Sampling the continuous-time signal x(t) with interval T we get the
discrete-time signal x(n) = x(nT) , which is a function of the discrete
variable n.
We can reconstruct the signal from the discrete samples by means of
interpolation.
Sampling a continuous-time signal with sampling rate ωs produces a
discrete-time signal whose frequency spectrum is the periodic
replication of the original signal, and the replication period is ωs.
Mithun kumar kar (BCET) Image Sampling and Quantization July 21, 2020 4 / 15
5. sampling Basics
δ(t) =
∞, ift = 0
0, ift = 0
and
∞
−∞
δ(t)dt = 1
∞
−∞
f (t)δ(t)dt = f (0)and
∞
−∞
f (t)δ(t − t0)dt = f (t0)
δ(t, z) =
∞, ift = z = 0
0, ift = z = 0
and
∞
−∞
∞
−∞
δ(t, z)dtdz = 1
∞
−∞
∞
−∞
f (t, z)δ(t − t0, z − z0)dtdz = f (t0, z0)
Mithun kumar kar (BCET) Image Sampling and Quantization July 21, 2020 5 / 15
6. sampling
The Fourier transform of a continuous signal x(t) is given by
X(Ω) =
∞
−∞
x(t)e−jΩt
dt
where Ω is the analog frequency in radian and
Ω = 2πFs =
2π
T
where T is the sampling period.
By inverse Fourier transform we can extract the signal from frequency
domain.
x(t) =
1
2π
∞
−∞
X(Ω)ejΩt
dΩ
Mithun kumar kar (BCET) Image Sampling and Quantization July 21, 2020 6 / 15
8. Image sampling
Image is represented by 2D function f(x,y).
For sampling the analog image is multiply by two dimensional direc
delta function or comb function. The comb function is a rectangular
grid of points on both x and y axis or shifted impulses on both x and
y direction by a distance ∆x and ∆x.
comb(x, y, ∆x, ∆y) =
∞
k1=−∞
∞
k2=−∞
δ(x − k1∆x, y − k2∆y)
After multiplying the analog image f(x,y) with comb function we get
the discrete image f(m,n) where
f (m, n) =
∞
k1=−∞
∞
k2=−∞
f (k1∆x, k2∆y)δ(x − k1∆x, y − k2∆y)
Mathematically we write f (m, n) = f (k1∆x, k2∆y) where ∆x and
∆y are known as sampling intervals.
Mithun kumar kar (BCET) Image Sampling and Quantization July 21, 2020 8 / 15
9. Image sampling
Figure : Three dimensional view of comb function.
Mithun kumar kar (BCET) Image Sampling and Quantization July 21, 2020 9 / 15
10. Image sampling in frequency domain
The Fourier transform of the image signal f (x, y) is represented by
F(Ω1, Ω2) =
∞
−∞
∞
−∞
f (x, y)e−jΩ1x
e−jΩ2y
dxdy
The FT of 2D comb function is an another comb function in
frequency domain which is given by
comb(Ω1, Ω2) =
1
∆x
1
∆y
∞
p=−∞
∞
q=−∞
δ(Ω1 −
p
∆x
, Ω2 −
q
∆y
)
As in time domain the image function is multiply by comb function
which is equivalent to convolution of Fourier transforms in frequency
domain.
Mithun kumar kar (BCET) Image Sampling and Quantization July 21, 2020 10 / 15
11. Image sampling in frequency domain
Now the spectrum of the 2D comb function is convolved with the
spectrum of analog image which is given by
F(ω1, ω2) = F(Ω1, Ω2) ∗ comb(Ω1, Ω2)
F(ω1, ω2) = F(Ω1, Ω2) ∗
1
∆x
1
∆y
∞
p=−∞
∞
q=−∞
δ(Ω1 −
p
∆x
, Ω2 −
q
∆y
)
F(ω1, ω2) = 1
∆x
1
∆y
∞
p=−∞
∞
q=−∞
F(Ω1 − p
∆x , Ω2 − q
∆y )
Mithun kumar kar (BCET) Image Sampling and Quantization July 21, 2020 11 / 15
12. Image sampling in frequency domain
In order to retrieve the original image from the sampled spectrum, the
following condition should be satisfied ωxs > 2ωx0 and ωys > 2ωy0
where ωxs = 1
∆x and ωys = 1
∆y .
2ωx0 is the bandwidth of the spectrum in ω1 direction and 2ωy0 is the
bandwidth of the spectrum in ω2 direction
The above condition says that the sampling frequency should be
greater than twice the maximum signal frequency, which is generally
termed as sampling theorem.
A low pass filter is generally employed in order to extract the desired
spectrum.
Mithun kumar kar (BCET) Image Sampling and Quantization July 21, 2020 12 / 15
13. Quantization
Digitizing the coordinate values is called sampling and digitizing the
amplitude values is called quantization.
After sampling, the values of the samples span a continuous range of
intensity values. In order to discretized the intensity values, the
intensity values must be converted in to discrete quantities. This is
called quantization.
Mithun kumar kar (BCET) Image Sampling and Quantization July 21, 2020 13 / 15
14. References
Rafael C. Gonzalez, Richard E. Woods (2008)
Digital Image Processing
Pearson Education 2009,Third Edition.
Mithun kumar kar (BCET) Image Sampling and Quantization July 21, 2020 14 / 15
15. The End
Mithun kumar kar (BCET) Image Sampling and Quantization July 21, 2020 15 / 15