Sampling and Quantisation
Sampling and Quantisation
53
Quantization
• Digitization of the light intensity function
54
Image Acquisition
55
Sampling and Quantization
56
Sampling and Quantization
• How many samples to take?
57
How to choose the spatial resolution
Spatial resolution = Sampling locations
Original image
Sampled image
59
Definition of Aliasing
• Aliasing refers to the effect produced when a signal is imperfectly reconstructed
from the original signal.
• Aliasing occurs when a signal is not sampled at a high enough frequency to
create an accurate representation. This effect is shown in the following example
of a sinusoidal function:
• In this example, the dots represent the sampled data and the curve represents
the original signal. Because there are too few sampled data points, the resulting
pattern produced by the sampled data is a poor representation of the original.
Aliasing is relevant in fields associated with signal processing, such as digital audio,
digital photography, and computer graphics.
Aliasing(mixing of two different signals)
• Spatial aliasing in the form of a Moiré pattern.
• In signal processing and related disciplines, aliasing refers to an effect that
causes different signals to become indistinguishable (or aliases of one
another) when sampled. It also refers to the distortion or artifact that
results when the signal reconstructed from samples is different from the
original continuous signal.
• Aliasing can occur in signals sampled in time, for instance digital audio is
referred to as temporal aliasing. Aliasing can also occur in spatially
sampled signals, for instance digital images. Aliasing in spatially sampled
signals is called spatial aliasing.
Properly sampled image of brick wall. Spatial aliasing in the form of a Moiré pattern.
Sampling and Quantization
• How many samples to take?
62
How to choose the spatial resolution :
Nyquist Rate
Original image
Sampled image
1mm
2mm
No detail is lost!
Minimum Nyquist Rate:
Spatial resolution
Period Spatial resolution must be less or equal
(sampling rate)
half of the minimum period of the image
or sampling frequency must be greater or
= Sampling locations
Equal twice of the maximum frequency.
Aliased Frequency
x1 (t ) sin( 2t ), f 1
1 x2 (t ) sin(12t ), f 6
0.5
-0.5
-1
0 0.5 1 1.5 2
Sampling rate:
5 samples/sec
1
0.5
-0.5
-1
0 0.5 1 1.5 2
65
Effect of Spatial Resolution
Image quantization:
discretize continuous pixel values into discrete numbers
Nc 2 b
Nc-1
Nc-2
Quantization level
1
0
Light intensity
Darkest Brightest
Effect of Quantization Levels
64 levels 32 levels
Effect of Quantization Levels (cont.)
16 levels 8 levels
In this image,
it is easy to see
false contour.
4 levels 2 levels
How to select the suitable size and pixel depth of images
(0,0) x