Lecture 5 - Spatial and Intensity Resolution, Image Interpolation
Lecture 5 - Spatial and Intensity Resolution, Image Interpolation
• Spatial resolution
— A measure of the smallest discernible detail in an image
— stated with line pairs per unit distance, dots (pixels) per unit
distance, dots per inch (dpi)
• Intensity resolution
— The smallest discernible change in intensity level
— stated with 8 bits, 12 bits, 16 bits, etc.
57
Spatial Resolution
58
Spatial Resolution
59
© 1992–2008 R. C. Gonzalez & R. E. Woods
Intensity Level Resolution
60
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
61
Intensity Level Resolution
16 million colors
16 colors
62
Intensity Level Resolution
63
Intensity Level Resolution
With 1-bit
quantization, the
output intensities
are taken to be
{0,255}.
64
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)
65
Intensity Level Resolution
8 bits 256 levels 7 bits 128 levels 6 bits 64 levels 5 bits 32 levels
66
Resolution: How much is enough?
67
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
68
Image Interpolation
w Image resizing
w Three methods
69
Enlarging an Image
w Pixel replication
[1 2 3 4 5]
[1 1 2 2 3 3 4 4 5 5] (One step)
[1 1 1 2 2 2 3 3 3 4 4 4 5 5 5] (Two step)
70
Enlarging an Image
…
…
Example:
zoom this
image 4x to
…
get this
image. …
…
.
…
.
Start with a blank image 4 times the Fill
. in every 4th pixel in every 4th
linear dimensions of the original. row with the original pixel values.
71
Enlarging an Image
…
…
…
…
…
…
Detail showing every 4th pixel in every 4th row with the original pixel values.
72
Enlarging an Image
73
Reducing an Image
w Pixel Decimation
Decimation by
a factor of n:
take every nth
Example:
decimate
pixel in every
this image
4x to get
nth row
this image.
74
Reducing an Image
Example:
decimate
this image
4x to get
this image.
Zoom in on a
section for a
closer look at
the process
75
Reducing an Image
Example:
decimate
this image
4x to get
this image.
Keep every
4th pixel in
every 4th row
76
Reducing an Image
Example:
decimate
this image
4x to get
this image.
ignore all
the others
77
Reducing an Image
Copy them
Example:
decimate into a new
this image image.
4x to get
this image.
78
Nearest Neighbor Interpolation
79
Nearest Neighbor Interpolation
Zoom in on a
section for a
closer look at
the process
Example:
resize to 3/7
of the original
80
Nearest Neighbor Interpolation
3/7 resize
Zoom in for a
better look
81
Nearest Neighbor Interpolation
3/7 resize
Outlined in
blue: 7x7
pixel squares
82
Nearest Neighbor Interpolation
3/7 resize
In yellow: 3 pixels
for every 7 rows,
3 pixels for every
7 cols.
83
Nearest Neighbor Interpolation
3/7 resize
Keep the
highlighted
pixels…
84
Nearest Neighbor Interpolation
3/7 resize
… don’t keep
the others.
85
Nearest Neighbor Interpolation
3/7 resize
86
Nearest Neighbor Interpolation
3/7 resize
87
Nearest Neighbor Interpolation
88
Nearest Neighbor Interpolation
Original
image
Detail of
resized image
Resize to 3/7 of
the original dims.
89
Nearest Neighbor Interpolation
7/3 resize
Original
image
Pixels spread out … then filled in.
for a 7/3 resize …
90
Nearest Neighbor Interpolation
7/3 resize
Original
image Detail
91
Nearest Neighbor Interpolation
7/3 resize
3x3 blocks
distributed over
7x7 blocks
92
Nearest Neighbor Interpolation
7/3 resize
93
Nearest Neighbor Interpolation
7/3 resize
94
Nearest Neighbor Interpolation
Original
image
7/3 resized