0% found this document useful (0 votes)
440 views

Lecture 5 - Spatial and Intensity Resolution, Image Interpolation

Digital Image Processing course lecture

Uploaded by

Raja G
Copyright
© © All Rights Reserved
Available Formats
Download as PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
440 views

Lecture 5 - Spatial and Intensity Resolution, Image Interpolation

Digital Image Processing course lecture

Uploaded by

Raja G
Copyright
© © All Rights Reserved
Available Formats
Download as PDF, TXT or read online on Scribd
You are on page 1/ 41

Spatial and Intensity Resolution

• 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.

© 1992–2008 R. C. Gonzalez & R. E. Woods


Spatial Resolution

w The spatial resolution of an image is determined by


how sampling was carried out
w Three measures we come across when talking about
Image Size/Resolution
n Pixel count - e.g 3000x2000 pixels Difference/Relation
n Physical size - e.g. 8" x 10" Between these three?
n Resolution - e.g. 240 pixels per inch (PPI)

57
Spatial Resolution

58
Spatial Resolution

59
© 1992–2008 R. C. Gonzalez & R. E. Woods
Intensity Level Resolution

w Intensity level resolution refers to the number of


intensity levels used to represent the image
n The more intensity levels used, the finer the level of detail in
an image
n Intensity level resolution is usually given in terms of the
number of bits used to store each intensity level

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

4 bits 16 levels 3 bits 8 levels 2 bits 4 levels 1 bit 2 levels

66
Resolution: How much is enough?

w How many samples and gray levels are required


for a good approximation?
n Quality of an image depends on number of pixels and gray-
level number
n The more these parameters are increased, the closer the
digitized array approximates the original image
n But: Storage & processing requirements increase rapidly as a
function of N, M, and k

67
Resolution: How much is enough?

w Depends on what is in the image and what you


would like to do with it

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

Replicate the values

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

The “Nearest Neighbor” algorithm is


a generalization of pixel replication
and decimation.
It also includes fractional resizing,
i.e. resizing an image so that it has
p/q of the pixels per row and p/q of
the rows in the original. (p and q are
both integers.)

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

Copy them into


a new image.

86
Nearest Neighbor Interpolation
3/7 resize

Copy them into


a new image.

87
Nearest Neighbor Interpolation

3/7 times the


linear dimensions
of the original

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

Each 3x3 block … is spread out over


of pixels from a 7x7 block here
here …

Original
image Detail

91
Nearest Neighbor Interpolation
7/3 resize

3x3 blocks
distributed over
7x7 blocks

92
Nearest Neighbor Interpolation
7/3 resize

Empty pixels filled


with color from non-
empty pixel

93
Nearest Neighbor Interpolation
7/3 resize

Empty pixels filled


with color from non-
empty pixel

94
Nearest Neighbor Interpolation

Original
image
7/3 resized

You might also like