introduction to digital image · pdf filequantization: the process of ... spatial...

183
Introduction to Digital Image Processing Part I Chester F. Carlson Center for Imaging Science, RIT

Upload: vuque

Post on 28-Mar-2018

221 views

Category:

Documents


2 download

TRANSCRIPT

Page 1: Introduction to Digital Image  · PDF fileQuantization: The process of ... Spatial resolution--controlled by spatial sampling. ... Introduction to Digital Image Processing

Introduction to Digital

Image Processing

Part I

Chester F. Carlson Center for Imaging Science,

RIT

Page 2: Introduction to Digital Image  · PDF fileQuantization: The process of ... Spatial resolution--controlled by spatial sampling. ... Introduction to Digital Image Processing

HumanSubject Process DisplayCapture

Page 3: Introduction to Digital Image  · PDF fileQuantization: The process of ... Spatial resolution--controlled by spatial sampling. ... Introduction to Digital Image Processing
Page 4: Introduction to Digital Image  · PDF fileQuantization: The process of ... Spatial resolution--controlled by spatial sampling. ... Introduction to Digital Image Processing

What is a Digital Image?

Page 5: Introduction to Digital Image  · PDF fileQuantization: The process of ... Spatial resolution--controlled by spatial sampling. ... Introduction to Digital Image Processing

Digital Image:

“ Rendering of a continuously varying scene

with a finite array of picture elements,

where each one has a discrete intensity or

color

Page 6: Introduction to Digital Image  · PDF fileQuantization: The process of ... Spatial resolution--controlled by spatial sampling. ... Introduction to Digital Image Processing

Charge Coupled Device (CCD)

Page 7: Introduction to Digital Image  · PDF fileQuantization: The process of ... Spatial resolution--controlled by spatial sampling. ... Introduction to Digital Image Processing

Magnified View of a CCD Array

Individual pixel element

Close-up of a CCD Imaging Array

CCD

Page 8: Introduction to Digital Image  · PDF fileQuantization: The process of ... Spatial resolution--controlled by spatial sampling. ... Introduction to Digital Image Processing

Spatial Sampling:

Measuring a continuously varying image

at uniformly separated points in space and

assigning a value that corresponds to an

average light intensity within a small box

surrounding each point.

Page 9: Introduction to Digital Image  · PDF fileQuantization: The process of ... Spatial resolution--controlled by spatial sampling. ... Introduction to Digital Image Processing
Page 10: Introduction to Digital Image  · PDF fileQuantization: The process of ... Spatial resolution--controlled by spatial sampling. ... Introduction to Digital Image Processing
Page 11: Introduction to Digital Image  · PDF fileQuantization: The process of ... Spatial resolution--controlled by spatial sampling. ... Introduction to Digital Image Processing
Page 12: Introduction to Digital Image  · PDF fileQuantization: The process of ... Spatial resolution--controlled by spatial sampling. ... Introduction to Digital Image Processing
Page 13: Introduction to Digital Image  · PDF fileQuantization: The process of ... Spatial resolution--controlled by spatial sampling. ... Introduction to Digital Image Processing
Page 14: Introduction to Digital Image  · PDF fileQuantization: The process of ... Spatial resolution--controlled by spatial sampling. ... Introduction to Digital Image Processing
Page 15: Introduction to Digital Image  · PDF fileQuantization: The process of ... Spatial resolution--controlled by spatial sampling. ... Introduction to Digital Image Processing
Page 16: Introduction to Digital Image  · PDF fileQuantization: The process of ... Spatial resolution--controlled by spatial sampling. ... Introduction to Digital Image Processing
Page 17: Introduction to Digital Image  · PDF fileQuantization: The process of ... Spatial resolution--controlled by spatial sampling. ... Introduction to Digital Image Processing
Page 18: Introduction to Digital Image  · PDF fileQuantization: The process of ... Spatial resolution--controlled by spatial sampling. ... Introduction to Digital Image Processing
Page 19: Introduction to Digital Image  · PDF fileQuantization: The process of ... Spatial resolution--controlled by spatial sampling. ... Introduction to Digital Image Processing

=

==

=

=

Page 20: Introduction to Digital Image  · PDF fileQuantization: The process of ... Spatial resolution--controlled by spatial sampling. ... Introduction to Digital Image Processing

30 pixels

Page 21: Introduction to Digital Image  · PDF fileQuantization: The process of ... Spatial resolution--controlled by spatial sampling. ... Introduction to Digital Image Processing

63 pixels

Page 22: Introduction to Digital Image  · PDF fileQuantization: The process of ... Spatial resolution--controlled by spatial sampling. ... Introduction to Digital Image Processing

108 pixels

Page 23: Introduction to Digital Image  · PDF fileQuantization: The process of ... Spatial resolution--controlled by spatial sampling. ... Introduction to Digital Image Processing

180 pixels

Page 24: Introduction to Digital Image  · PDF fileQuantization: The process of ... Spatial resolution--controlled by spatial sampling. ... Introduction to Digital Image Processing

350 pixels

Page 25: Introduction to Digital Image  · PDF fileQuantization: The process of ... Spatial resolution--controlled by spatial sampling. ... Introduction to Digital Image Processing

980 pixels

Page 26: Introduction to Digital Image  · PDF fileQuantization: The process of ... Spatial resolution--controlled by spatial sampling. ... Introduction to Digital Image Processing

2215 pixels

Page 27: Introduction to Digital Image  · PDF fileQuantization: The process of ... Spatial resolution--controlled by spatial sampling. ... Introduction to Digital Image Processing

8700 pixels

Page 28: Introduction to Digital Image  · PDF fileQuantization: The process of ... Spatial resolution--controlled by spatial sampling. ... Introduction to Digital Image Processing

221,000 pixels

Page 29: Introduction to Digital Image  · PDF fileQuantization: The process of ... Spatial resolution--controlled by spatial sampling. ... Introduction to Digital Image Processing
Page 30: Introduction to Digital Image  · PDF fileQuantization: The process of ... Spatial resolution--controlled by spatial sampling. ... Introduction to Digital Image Processing
Page 31: Introduction to Digital Image  · PDF fileQuantization: The process of ... Spatial resolution--controlled by spatial sampling. ... Introduction to Digital Image Processing

Spatial Aliasing:

An effect seen in digital images which

have been inadequately sampled (too few

pixels) which gives rise to a misleading

appearance when compared to the

original.

Image distortions caused by spatial

aliasing are also known as sampling

artifacts.

Page 33: Introduction to Digital Image  · PDF fileQuantization: The process of ... Spatial resolution--controlled by spatial sampling. ... Introduction to Digital Image Processing
Page 34: Introduction to Digital Image  · PDF fileQuantization: The process of ... Spatial resolution--controlled by spatial sampling. ... Introduction to Digital Image Processing

0 0 0 0 0 0

0 0 0 0 0 0

100 100 10010050

10

10

20

20

20 20

20 20

40

55

55

5

5

Page 35: Introduction to Digital Image  · PDF fileQuantization: The process of ... Spatial resolution--controlled by spatial sampling. ... Introduction to Digital Image Processing

Quantization:

The process of taking a set of continuous

values and mapping them into a finite

number of discrete steps represented by

integers.

39

56

45

75

62

99

64

101

228 178 106 193

183 143 84 162

Page 36: Introduction to Digital Image  · PDF fileQuantization: The process of ... Spatial resolution--controlled by spatial sampling. ... Introduction to Digital Image Processing

Number of Steps = Power of 2

A bit is a value, a position, and

an amount of information

Each added bit allows us to

double the number of values

we can represent with a binary

number.

The number of values that can be

represented is given by 2Nbits

e.g., 4 bits provides 24

= 16

different values

0

1

10

11

100

101

110

111

1000

1001

1010

1011

1100

1101

1110

1111

10000...

binary

0

1

2

3

4

5

6

7

8

9

10

11

12

13

14

15

16...

decimal

1 bit

2 bits

3 bits

4 bits

Page 37: Introduction to Digital Image  · PDF fileQuantization: The process of ... Spatial resolution--controlled by spatial sampling. ... Introduction to Digital Image Processing

How Many Steps?

The simplest kind of digital image is known

as a ‚binary image‛ because the image

contains only two ‘colors’ - white and black

Page 38: Introduction to Digital Image  · PDF fileQuantization: The process of ... Spatial resolution--controlled by spatial sampling. ... Introduction to Digital Image Processing

Binary Images

Because binary images contain only two colors,

we can encode the image using just two

numbers, for example:

0 = black

1 = white

0 0 0 0 0 0 0 0 0 0 0 0 0 0 0

1 1 1 1 1 1 1 0 0 0 0 0 0 0 0

1 1 1 1 1 1 1 1 1 0 0 0 0 0 0

1 1 1 1 1 1 1 1 1 1 1 0 0 0 0

1 1 1 1 1 1 1 1 1 1 1 0 0 0 0

Page 39: Introduction to Digital Image  · PDF fileQuantization: The process of ... Spatial resolution--controlled by spatial sampling. ... Introduction to Digital Image Processing

2 shades of gray

Page 40: Introduction to Digital Image  · PDF fileQuantization: The process of ... Spatial resolution--controlled by spatial sampling. ... Introduction to Digital Image Processing

4 shades of gray

Page 41: Introduction to Digital Image  · PDF fileQuantization: The process of ... Spatial resolution--controlled by spatial sampling. ... Introduction to Digital Image Processing

8 shades of gray

Page 42: Introduction to Digital Image  · PDF fileQuantization: The process of ... Spatial resolution--controlled by spatial sampling. ... Introduction to Digital Image Processing

16 shades of gray

Page 43: Introduction to Digital Image  · PDF fileQuantization: The process of ... Spatial resolution--controlled by spatial sampling. ... Introduction to Digital Image Processing

32 shades of gray

Page 44: Introduction to Digital Image  · PDF fileQuantization: The process of ... Spatial resolution--controlled by spatial sampling. ... Introduction to Digital Image Processing

256 shades of gray

Page 45: Introduction to Digital Image  · PDF fileQuantization: The process of ... Spatial resolution--controlled by spatial sampling. ... Introduction to Digital Image Processing

Bit depth: bits per pixel

The number of possible gray levels is controlled

by the number of bits/pixel, or the ‘bit depth’ of the

image

gray levels

2

4

8

16

32

64

128

256

Bit depth;

bits/pixel

1

2

3

4

5

6

7

8

Page 47: Introduction to Digital Image  · PDF fileQuantization: The process of ... Spatial resolution--controlled by spatial sampling. ... Introduction to Digital Image Processing

Summary

“ Digital image:

“ Rendering of a continuously varying scene with a

finite array of picture elements, each one

containing a discrete numerical value which

represents an intensity

Page 48: Introduction to Digital Image  · PDF fileQuantization: The process of ... Spatial resolution--controlled by spatial sampling. ... Introduction to Digital Image Processing

Summary

“ Digital images are created by:

“ Spatial sampling

“ Quantizing

Page 49: Introduction to Digital Image  · PDF fileQuantization: The process of ... Spatial resolution--controlled by spatial sampling. ... Introduction to Digital Image Processing

Summary

“ Spatial sampling:

“ Measuring the scene at uniformly separated

points and assigning an average intensity to

the pixel at that location

“ The more samples taken, the better resolution

of the image

“ Insufficient sampling results in aliasing

Page 50: Introduction to Digital Image  · PDF fileQuantization: The process of ... Spatial resolution--controlled by spatial sampling. ... Introduction to Digital Image Processing

Summary

“ Quantization:

“ Converting the average intensity of a pixel to

a binary integer

Page 51: Introduction to Digital Image  · PDF fileQuantization: The process of ... Spatial resolution--controlled by spatial sampling. ... Introduction to Digital Image Processing

Summary

“ Number of available intensity levels or

colors is determined by the bit depth

“ Most gray scale images use 8 bits (256 levels)

Page 52: Introduction to Digital Image  · PDF fileQuantization: The process of ... Spatial resolution--controlled by spatial sampling. ... Introduction to Digital Image Processing

Color Images

In most cases, we also want to capture

color information

The way that we capture, store, view,

and print color digital images is based

on the way that humans perceive color

Page 53: Introduction to Digital Image  · PDF fileQuantization: The process of ... Spatial resolution--controlled by spatial sampling. ... Introduction to Digital Image Processing

Color Images

Page 54: Introduction to Digital Image  · PDF fileQuantization: The process of ... Spatial resolution--controlled by spatial sampling. ... Introduction to Digital Image Processing

Color Perception

The eyes have three different kinds of color receptors

(‘cones’); one type each for blue, green, and red light.

Color perception is based on how much light is

detected by each of the three ‘primary’ cone types

(red, green, and blue)

Page 55: Introduction to Digital Image  · PDF fileQuantization: The process of ... Spatial resolution--controlled by spatial sampling. ... Introduction to Digital Image Processing

Color Perception

Because we have three kinds of cones, every color

that we can see can be made up by combining red,

green, and blue light - the three ‚additive primaries‛

Page 56: Introduction to Digital Image  · PDF fileQuantization: The process of ... Spatial resolution--controlled by spatial sampling. ... Introduction to Digital Image Processing
Page 57: Introduction to Digital Image  · PDF fileQuantization: The process of ... Spatial resolution--controlled by spatial sampling. ... Introduction to Digital Image Processing
Page 58: Introduction to Digital Image  · PDF fileQuantization: The process of ... Spatial resolution--controlled by spatial sampling. ... Introduction to Digital Image Processing

RGB Color Images

Each one of the color images (‘planes’) is like a grayscale

image, but is displayed in R, G, or B

=

The most straightforward way to capture a color image is to

capture three images; one to record how much red is at each

point, another for the green, and a third for the blue.

Page 59: Introduction to Digital Image  · PDF fileQuantization: The process of ... Spatial resolution--controlled by spatial sampling. ... Introduction to Digital Image Processing

RGB Color Images

To capture a color image we record how much red,

green, and blue light there is at each pixel.

To view the image, we use a display (monitor or print)

to reproduce the color mixture we captured.

Q) How many different colors can a display produce?

A) It depends on how many bits per pixel we’ve got.

For a system with 8 bits/pixel in each of the red,

green, and blue (a ‘24-bit image’):

Page 60: Introduction to Digital Image  · PDF fileQuantization: The process of ... Spatial resolution--controlled by spatial sampling. ... Introduction to Digital Image Processing

RGB Color Images: 24-bit color

Every pixel in each of the

three 8-bit color planes can

have 256 different values (0-

255)

If we start with just the blue

image plane, we can make

256 different ‚colors of blue‛ 0

255

Page 61: Introduction to Digital Image  · PDF fileQuantization: The process of ... Spatial resolution--controlled by spatial sampling. ... Introduction to Digital Image Processing

RGB Color Images: 24-bit color

Every pixel in each of the three

8-bit color planes can have 256

different values (0-255)

If we start with just the blue

image plane, we can make 256

different ‚colors of blue‛

If we add red (which alone

gives us 256 different reds):

0 255

0

255

Page 62: Introduction to Digital Image  · PDF fileQuantization: The process of ... Spatial resolution--controlled by spatial sampling. ... Introduction to Digital Image Processing

RGB Color Images: 24-bit color

Every pixel in each of the three 8-

bit color planes can have 256

different values (0-255)

If we start with just the blue image

plane, we can make 256 different

‚colors of blue‛

If we add red (which alone gives us

256 different reds):

We can make 256 x 256 = 65,536

combination colors because for

every one of the 256 reds, we can

have 256 blues. 0 255

0

255

Page 63: Introduction to Digital Image  · PDF fileQuantization: The process of ... Spatial resolution--controlled by spatial sampling. ... Introduction to Digital Image Processing

RGB Color Images: 24-bit color

When we have all

three colors together,

there are 256 possible

values of green for

each one of the 65,536

combinations of red

and blue:

256 x 256 x 256 = 16,777,216 (‚> 16.7 million colors‛)

Page 64: Introduction to Digital Image  · PDF fileQuantization: The process of ... Spatial resolution--controlled by spatial sampling. ... Introduction to Digital Image Processing

Color Image = Red + Green + Blue

=

In a 24-bit image, each pixel has R, G, & B values

When viewed on a color display, the three images

are combined to make the color image.

212100139196

16375113149

37446372

95118155170

189

162

38

41608278

182

161

50

43576863

Page 65: Introduction to Digital Image  · PDF fileQuantization: The process of ... Spatial resolution--controlled by spatial sampling. ... Introduction to Digital Image Processing
Page 66: Introduction to Digital Image  · PDF fileQuantization: The process of ... Spatial resolution--controlled by spatial sampling. ... Introduction to Digital Image Processing
Page 67: Introduction to Digital Image  · PDF fileQuantization: The process of ... Spatial resolution--controlled by spatial sampling. ... Introduction to Digital Image Processing
Page 68: Introduction to Digital Image  · PDF fileQuantization: The process of ... Spatial resolution--controlled by spatial sampling. ... Introduction to Digital Image Processing

Image quality factors

Two major factors which determine image quality are:

Bit depth -- controlled by number of colors or grey levels

allocated for each pixel

Spatial resolution -- controlled by spatial sampling.

Increasing either of these factors results in a larger

image file size, which requires more storage space

and more processing/display time.

Page 69: Introduction to Digital Image  · PDF fileQuantization: The process of ... Spatial resolution--controlled by spatial sampling. ... Introduction to Digital Image Processing

File Size Calculation

100 pixels

100 pixels

Bit depth = 8 bits per pixel (256 gray levels)

File size (in bits) = Height x Width x Bit Depth

100 x 100 x 8 bits/pixel = 80,000

bits/image

80,000 bits or 10,000 bytes

How much memory is

necessary to store an

image that is 100 x 100

pixels with 8 bits/pixel?

Page 70: Introduction to Digital Image  · PDF fileQuantization: The process of ... Spatial resolution--controlled by spatial sampling. ... Introduction to Digital Image Processing

File Size Calculation

1280 pixels

960 pixels

Bit depth = 24 bits per pixel (RGB color)

File size (in bits) = Height x Width x Bit Depth

960 x 1280 x 24 bits/pixel = 29,491,200 bits/image

29,491,200 bits = 3,686,400 bytes = 3.5 MB

How much memory is

necessary to store an

image that is 1280 x 960

pixels with 24 bits/pixel?

Page 71: Introduction to Digital Image  · PDF fileQuantization: The process of ... Spatial resolution--controlled by spatial sampling. ... Introduction to Digital Image Processing

File Size = 217 KFile Size = 1442 K

Page 72: Introduction to Digital Image  · PDF fileQuantization: The process of ... Spatial resolution--controlled by spatial sampling. ... Introduction to Digital Image Processing
Page 73: Introduction to Digital Image  · PDF fileQuantization: The process of ... Spatial resolution--controlled by spatial sampling. ... Introduction to Digital Image Processing
Page 74: Introduction to Digital Image  · PDF fileQuantization: The process of ... Spatial resolution--controlled by spatial sampling. ... Introduction to Digital Image Processing

Summary

“ Digital image:

“ Rendering of a continuously varying scene with a

finite array of picture elements, each one containing a

discrete numerical value which represents an

intensity or color

Page 75: Introduction to Digital Image  · PDF fileQuantization: The process of ... Spatial resolution--controlled by spatial sampling. ... Introduction to Digital Image Processing

Summary

“ Digital images are created by:

“ Spatial sampling

“ Quantizing

Page 76: Introduction to Digital Image  · PDF fileQuantization: The process of ... Spatial resolution--controlled by spatial sampling. ... Introduction to Digital Image Processing

Summary

“ Spatial sampling:

“ Measuring the scene at uniformly separated

points and assigning an average intensity to

the pixel at that location

“ The more samples taken, the better resolution

of the image

“ Insufficient sampling results in aliasing

Page 77: Introduction to Digital Image  · PDF fileQuantization: The process of ... Spatial resolution--controlled by spatial sampling. ... Introduction to Digital Image Processing

Summary

“ Quantization:

“ Converting the average intensity of a pixel to

a binary integer

Page 78: Introduction to Digital Image  · PDF fileQuantization: The process of ... Spatial resolution--controlled by spatial sampling. ... Introduction to Digital Image Processing

Summary

“ Number of available intensity levels or

colors is determined by the bit depth

“ Most gray scale images use 8 bits (256 levels)

“ Most color images use 24 bits (16.7 million

colors)

Page 79: Introduction to Digital Image  · PDF fileQuantization: The process of ... Spatial resolution--controlled by spatial sampling. ... Introduction to Digital Image Processing

Summary

Resolution and bit depth are major factors

in determining the quality of a digital

image AND the size of the image file

Page 80: Introduction to Digital Image  · PDF fileQuantization: The process of ... Spatial resolution--controlled by spatial sampling. ... Introduction to Digital Image Processing

Introduction to Digital

Image Processing

Part II

Chester F. Carlson Center for Imaging Science,

RIT

Page 81: Introduction to Digital Image  · PDF fileQuantization: The process of ... Spatial resolution--controlled by spatial sampling. ... Introduction to Digital Image Processing

A simple black & white image is a volume of information!

Two dimensions are spatial dimensions (cm for example)

The other dimension is lightness/darkness

Image Characterization

x

y

y

x

gray level

Page 82: Introduction to Digital Image  · PDF fileQuantization: The process of ... Spatial resolution--controlled by spatial sampling. ... Introduction to Digital Image Processing

y

x

Contour Plot:

Another way to represent 3 dimensional information

Lines are regions

of constant gray level

Page 83: Introduction to Digital Image  · PDF fileQuantization: The process of ... Spatial resolution--controlled by spatial sampling. ... Introduction to Digital Image Processing

The Histogram

A statistical way of looking at an image

Step #1: Sample the image

Page 84: Introduction to Digital Image  · PDF fileQuantization: The process of ... Spatial resolution--controlled by spatial sampling. ... Introduction to Digital Image Processing

Step #2: Quantize each pixel

Gray Value: R = 167

Gray Scale

R = 255 is white

R = 0 is black

Page 85: Introduction to Digital Image  · PDF fileQuantization: The process of ... Spatial resolution--controlled by spatial sampling. ... Introduction to Digital Image Processing

Step #3: Take the gray pixels out of the image.

Page 86: Introduction to Digital Image  · PDF fileQuantization: The process of ... Spatial resolution--controlled by spatial sampling. ... Introduction to Digital Image Processing

Step #4: Sort the pixels from darkest to lightest.

There are many pixels at this gray level.

Only a few at these gray levels.

Page 87: Introduction to Digital Image  · PDF fileQuantization: The process of ... Spatial resolution--controlled by spatial sampling. ... Introduction to Digital Image Processing

R = 0 R = 255

Each pixel in the image has its

place in the stacks of rearranged pixels.

Page 88: Introduction to Digital Image  · PDF fileQuantization: The process of ... Spatial resolution--controlled by spatial sampling. ... Introduction to Digital Image Processing

Step #5: Form a graph to

represent the sorted pixels.

0 255

Num

ber

Gray Level

Page 89: Introduction to Digital Image  · PDF fileQuantization: The process of ... Spatial resolution--controlled by spatial sampling. ... Introduction to Digital Image Processing

If you use very many levels,

the graph becomes sharper.

0 255

Num

ber

Gray Level

This is called the image Histogram.

Page 90: Introduction to Digital Image  · PDF fileQuantization: The process of ... Spatial resolution--controlled by spatial sampling. ... Introduction to Digital Image Processing
Page 91: Introduction to Digital Image  · PDF fileQuantization: The process of ... Spatial resolution--controlled by spatial sampling. ... Introduction to Digital Image Processing
Page 92: Introduction to Digital Image  · PDF fileQuantization: The process of ... Spatial resolution--controlled by spatial sampling. ... Introduction to Digital Image Processing

The Image Histogram Has Many Uses

Use #1: A way to describe Image "Brightness"

R

N

R

N

R

N

Average R = 50 Average R = 120 Average R = 200

Page 93: Introduction to Digital Image  · PDF fileQuantization: The process of ... Spatial resolution--controlled by spatial sampling. ... Introduction to Digital Image Processing
Page 94: Introduction to Digital Image  · PDF fileQuantization: The process of ... Spatial resolution--controlled by spatial sampling. ... Introduction to Digital Image Processing
Page 95: Introduction to Digital Image  · PDF fileQuantization: The process of ... Spatial resolution--controlled by spatial sampling. ... Introduction to Digital Image Processing

R

N

R

N

Same Average

R=120

Different Ranges=

Different contrasts

Range = 255

Range = 50

Range = 180

R

N

Page 96: Introduction to Digital Image  · PDF fileQuantization: The process of ... Spatial resolution--controlled by spatial sampling. ... Introduction to Digital Image Processing

Characterizing Color Images

Page 97: Introduction to Digital Image  · PDF fileQuantization: The process of ... Spatial resolution--controlled by spatial sampling. ... Introduction to Digital Image Processing
Page 98: Introduction to Digital Image  · PDF fileQuantization: The process of ... Spatial resolution--controlled by spatial sampling. ... Introduction to Digital Image Processing
Page 99: Introduction to Digital Image  · PDF fileQuantization: The process of ... Spatial resolution--controlled by spatial sampling. ... Introduction to Digital Image Processing

Summary – Characterizing Digital Images

1. Number of pixels - resolution

2. Bit depth - number of gray levels or colors

3. Histogram - brightness and contrast.

When you start changing the values in the image array, that’s

digital image processing.

Page 100: Introduction to Digital Image  · PDF fileQuantization: The process of ... Spatial resolution--controlled by spatial sampling. ... Introduction to Digital Image Processing

What is Digital Image Processing?

Mathematical operations on the numbers

that make up a digital picture

Results in a new digital picture which is

different from the original

REMEMBER :

Start with an image -- end with an image

Page 101: Introduction to Digital Image  · PDF fileQuantization: The process of ... Spatial resolution--controlled by spatial sampling. ... Introduction to Digital Image Processing

Low Contrast Normal Contrast

Page 102: Introduction to Digital Image  · PDF fileQuantization: The process of ... Spatial resolution--controlled by spatial sampling. ... Introduction to Digital Image Processing

High Noise Low Noise

Page 103: Introduction to Digital Image  · PDF fileQuantization: The process of ... Spatial resolution--controlled by spatial sampling. ... Introduction to Digital Image Processing

Unnatural Color Realistic Color

Page 104: Introduction to Digital Image  · PDF fileQuantization: The process of ... Spatial resolution--controlled by spatial sampling. ... Introduction to Digital Image Processing

Adjusted Perspective

Page 105: Introduction to Digital Image  · PDF fileQuantization: The process of ... Spatial resolution--controlled by spatial sampling. ... Introduction to Digital Image Processing

Sharpen

Page 106: Introduction to Digital Image  · PDF fileQuantization: The process of ... Spatial resolution--controlled by spatial sampling. ... Introduction to Digital Image Processing

Initial Image

Page 107: Introduction to Digital Image  · PDF fileQuantization: The process of ... Spatial resolution--controlled by spatial sampling. ... Introduction to Digital Image Processing

Final Image

Page 108: Introduction to Digital Image  · PDF fileQuantization: The process of ... Spatial resolution--controlled by spatial sampling. ... Introduction to Digital Image Processing

Dark Light

Algorithm: for each pixel in the original image, add 55 to its value

Page 109: Introduction to Digital Image  · PDF fileQuantization: The process of ... Spatial resolution--controlled by spatial sampling. ... Introduction to Digital Image Processing

The Transfer Function

Initial image Final image

Page 110: Introduction to Digital Image  · PDF fileQuantization: The process of ... Spatial resolution--controlled by spatial sampling. ... Introduction to Digital Image Processing

The Transfer Function

0

255

0 255Pixel value in initial image

Pix

el v

alue

in f

inal

im

age

Page 111: Introduction to Digital Image  · PDF fileQuantization: The process of ... Spatial resolution--controlled by spatial sampling. ... Introduction to Digital Image Processing

The Transfer Function

0

255

0 255Pixel value in initial image

Pix

el v

alue

in f

inal

im

age

Page 112: Introduction to Digital Image  · PDF fileQuantization: The process of ... Spatial resolution--controlled by spatial sampling. ... Introduction to Digital Image Processing

The Transfer Function

0

255

0 255Pixel value in initial image

Pix

el v

alu

e in

fin

al i

mag

e

Page 113: Introduction to Digital Image  · PDF fileQuantization: The process of ... Spatial resolution--controlled by spatial sampling. ... Introduction to Digital Image Processing

0

255

0 255initial image

final

im

age

Initial image Final image

Page 114: Introduction to Digital Image  · PDF fileQuantization: The process of ... Spatial resolution--controlled by spatial sampling. ... Introduction to Digital Image Processing

Location of the Transfer Function

Pix

el v

alu

e in

fin

al i

mag

e

0

255

0 255Pixel value in initial image

1

2

3

Line 1 will result in a brighter final image

Line 2 will result in equal brightness

Line 3 will result in a darker final image

Page 115: Introduction to Digital Image  · PDF fileQuantization: The process of ... Spatial resolution--controlled by spatial sampling. ... Introduction to Digital Image Processing

Initial Image

Page 116: Introduction to Digital Image  · PDF fileQuantization: The process of ... Spatial resolution--controlled by spatial sampling. ... Introduction to Digital Image Processing

Final Image

Page 117: Introduction to Digital Image  · PDF fileQuantization: The process of ... Spatial resolution--controlled by spatial sampling. ... Introduction to Digital Image Processing

Low Contrast Normal Contrast

Algorithm: ‚stretch‛ the histogram by defining max and min values

In initial image as black and white (0 and 255), and evenly distribute

all intermediate values between them

Page 118: Introduction to Digital Image  · PDF fileQuantization: The process of ... Spatial resolution--controlled by spatial sampling. ... Introduction to Digital Image Processing

0

255

0 255initial image

final

im

age

Initial image Final image

Page 119: Introduction to Digital Image  · PDF fileQuantization: The process of ... Spatial resolution--controlled by spatial sampling. ... Introduction to Digital Image Processing

Slope of the Transfer Function

0

255

0 255

1 2

3

Curve 1 will result in a more contrast in the final image

Curve 2 will result in equal contrast in the final image

Curve 3 will result in a less contrast in the final image

Page 120: Introduction to Digital Image  · PDF fileQuantization: The process of ... Spatial resolution--controlled by spatial sampling. ... Introduction to Digital Image Processing

Mapping

First class of mathematical operations that

can be performed on images

Definition:

Creating a pixel value for the final image by

employing a computational rule that uses only

the value of the corresponding pixel in the

initial image

Same rule is applied to all pixels, no matter

where they are located

This rule can be described in terms of a

transfer function

Page 122: Introduction to Digital Image  · PDF fileQuantization: The process of ... Spatial resolution--controlled by spatial sampling. ... Introduction to Digital Image Processing
Page 123: Introduction to Digital Image  · PDF fileQuantization: The process of ... Spatial resolution--controlled by spatial sampling. ... Introduction to Digital Image Processing

Question…

What does the transfer function look like?

Page 124: Introduction to Digital Image  · PDF fileQuantization: The process of ... Spatial resolution--controlled by spatial sampling. ... Introduction to Digital Image Processing

Question…

What will the final image look like?

0

255

0 255initial image

final

im

age

200

Page 125: Introduction to Digital Image  · PDF fileQuantization: The process of ... Spatial resolution--controlled by spatial sampling. ... Introduction to Digital Image Processing

Introduction to Digital

Image Processing

Part III

Chester F. Carlson Center for Imaging Science,

RIT

Page 126: Introduction to Digital Image  · PDF fileQuantization: The process of ... Spatial resolution--controlled by spatial sampling. ... Introduction to Digital Image Processing

Question…

What will the final image look like?

0

255

0 255initial image

final

im

age

200

Page 127: Introduction to Digital Image  · PDF fileQuantization: The process of ... Spatial resolution--controlled by spatial sampling. ... Introduction to Digital Image Processing

threshold=200

Page 128: Introduction to Digital Image  · PDF fileQuantization: The process of ... Spatial resolution--controlled by spatial sampling. ... Introduction to Digital Image Processing

threshold = 100

Page 129: Introduction to Digital Image  · PDF fileQuantization: The process of ... Spatial resolution--controlled by spatial sampling. ... Introduction to Digital Image Processing

Question…

What does the transfer function look like?

Page 130: Introduction to Digital Image  · PDF fileQuantization: The process of ... Spatial resolution--controlled by spatial sampling. ... Introduction to Digital Image Processing

0

255

0 255initial image

fin

al

image

Page 131: Introduction to Digital Image  · PDF fileQuantization: The process of ... Spatial resolution--controlled by spatial sampling. ... Introduction to Digital Image Processing

Review

Digital images can be characterized by:

Resolution

Bit depth

Histogram

Page 132: Introduction to Digital Image  · PDF fileQuantization: The process of ... Spatial resolution--controlled by spatial sampling. ... Introduction to Digital Image Processing

Review

Histogram

Number of pixels at each allowable gray level

in a digital image

Page 133: Introduction to Digital Image  · PDF fileQuantization: The process of ... Spatial resolution--controlled by spatial sampling. ... Introduction to Digital Image Processing

Review

Digital image processing:

Performing mathematical operations on the

numbers that make up a digital image which

results in a new image different from the

original

Page 134: Introduction to Digital Image  · PDF fileQuantization: The process of ... Spatial resolution--controlled by spatial sampling. ... Introduction to Digital Image Processing

Review

One class of mathematical operations that

can be performed on digital images is

called mapping

Creating a pixel value for the final image by

employing a computational rule that uses only

the value of the corresponding pixel in the

initial image

This rule can be described in terms of a

transfer function

Page 135: Introduction to Digital Image  · PDF fileQuantization: The process of ... Spatial resolution--controlled by spatial sampling. ... Introduction to Digital Image Processing

Review

Shape and location of the transfer function

gives an indication of how the initial image

is being changed

Page 136: Introduction to Digital Image  · PDF fileQuantization: The process of ... Spatial resolution--controlled by spatial sampling. ... Introduction to Digital Image Processing

Review

Examples of mapping operations include:

Changes to brightness

Changes to contrast

Thresholding

Page 137: Introduction to Digital Image  · PDF fileQuantization: The process of ... Spatial resolution--controlled by spatial sampling. ... Introduction to Digital Image Processing

Arithmetic Combination of

Images

Next class of operations

Apply an arithmetic function to

corresponding pixel values of two different

images, resulting in a new, third image

Page 138: Introduction to Digital Image  · PDF fileQuantization: The process of ... Spatial resolution--controlled by spatial sampling. ... Introduction to Digital Image Processing

0

180 200

100

30 230

130

+

100

180

125 255

255

=

Image Addition

Page 139: Introduction to Digital Image  · PDF fileQuantization: The process of ... Spatial resolution--controlled by spatial sampling. ... Introduction to Digital Image Processing

Image Subtraction

0

180 200

100

30 170

130

-180

125 5

=

0

0

Page 140: Introduction to Digital Image  · PDF fileQuantization: The process of ... Spatial resolution--controlled by spatial sampling. ... Introduction to Digital Image Processing

Image Multiplication

0

180 200

100

30

130

X180

125 255

=

0

255 255

Page 141: Introduction to Digital Image  · PDF fileQuantization: The process of ... Spatial resolution--controlled by spatial sampling. ... Introduction to Digital Image Processing

Image Division

0

180 200

100

30

130

/180

125 1

=

0

1 6

Page 142: Introduction to Digital Image  · PDF fileQuantization: The process of ... Spatial resolution--controlled by spatial sampling. ... Introduction to Digital Image Processing

Noise Reduction

Noise: variations in an image not related

to the content of the scene

Page 143: Introduction to Digital Image  · PDF fileQuantization: The process of ... Spatial resolution--controlled by spatial sampling. ... Introduction to Digital Image Processing
Page 144: Introduction to Digital Image  · PDF fileQuantization: The process of ... Spatial resolution--controlled by spatial sampling. ... Introduction to Digital Image Processing
Page 145: Introduction to Digital Image  · PDF fileQuantization: The process of ... Spatial resolution--controlled by spatial sampling. ... Introduction to Digital Image Processing

average =

noise

Page 146: Introduction to Digital Image  · PDF fileQuantization: The process of ... Spatial resolution--controlled by spatial sampling. ... Introduction to Digital Image Processing

Average

Noisy Images

Page 147: Introduction to Digital Image  · PDF fileQuantization: The process of ... Spatial resolution--controlled by spatial sampling. ... Introduction to Digital Image Processing

Online Demo:

Image Averaging and Noise Removal

Page 148: Introduction to Digital Image  · PDF fileQuantization: The process of ... Spatial resolution--controlled by spatial sampling. ... Introduction to Digital Image Processing

Convolutions

Third class of mathematical operations

that can be performed on images

Also known as ‚neighborhood operations‛

Pixel values in new image are computed

from groups of pixels located near those

of the output pixel

The relative weighting of the neighboring

pixels is given by a matrix called a kernel

Page 149: Introduction to Digital Image  · PDF fileQuantization: The process of ... Spatial resolution--controlled by spatial sampling. ... Introduction to Digital Image Processing
Page 150: Introduction to Digital Image  · PDF fileQuantization: The process of ... Spatial resolution--controlled by spatial sampling. ... Introduction to Digital Image Processing

average

Page 151: Introduction to Digital Image  · PDF fileQuantization: The process of ... Spatial resolution--controlled by spatial sampling. ... Introduction to Digital Image Processing

http://www.microscopy.fsu.edu/primer/java/digitalimaging/processing/kernelmaskoperation/

Page 152: Introduction to Digital Image  · PDF fileQuantization: The process of ... Spatial resolution--controlled by spatial sampling. ... Introduction to Digital Image Processing

http://www.microscopy.fsu.edu/primer/java/digitalimaging/processing/kernelmaskoperation/

Page 153: Introduction to Digital Image  · PDF fileQuantization: The process of ... Spatial resolution--controlled by spatial sampling. ... Introduction to Digital Image Processing

http://www.microscopy.fsu.edu/primer/java/digitalimaging/processing/kernelmaskoperation/

Page 154: Introduction to Digital Image  · PDF fileQuantization: The process of ... Spatial resolution--controlled by spatial sampling. ... Introduction to Digital Image Processing

http://www.microscopy.fsu.edu/primer/java/digitalimaging/processing/kernelmaskoperation/

Page 155: Introduction to Digital Image  · PDF fileQuantization: The process of ... Spatial resolution--controlled by spatial sampling. ... Introduction to Digital Image Processing

http://www.microscopy.fsu.edu/primer/java/digitalimaging/processing/kernelmaskoperation/

Page 156: Introduction to Digital Image  · PDF fileQuantization: The process of ... Spatial resolution--controlled by spatial sampling. ... Introduction to Digital Image Processing

http://www.microscopy.fsu.edu/primer/java/digitalimaging/processing/kernelmaskoperation/

Page 157: Introduction to Digital Image  · PDF fileQuantization: The process of ... Spatial resolution--controlled by spatial sampling. ... Introduction to Digital Image Processing

http://www.microscopy.fsu.edu/primer/java/digitalimaging/processing/kernelmaskoperation/

Page 158: Introduction to Digital Image  · PDF fileQuantization: The process of ... Spatial resolution--controlled by spatial sampling. ... Introduction to Digital Image Processing

http://www.microscopy.fsu.edu/primer/java/digitalimaging/processing/kernelmaskoperation/

Page 159: Introduction to Digital Image  · PDF fileQuantization: The process of ... Spatial resolution--controlled by spatial sampling. ... Introduction to Digital Image Processing

http://www.microscopy.fsu.edu/primer/java/digitalimaging/processing/kernelmaskoperation/

Page 160: Introduction to Digital Image  · PDF fileQuantization: The process of ... Spatial resolution--controlled by spatial sampling. ... Introduction to Digital Image Processing

http://www.microscopy.fsu.edu/primer/java/digitalimaging/processing/kernelmaskoperation/

Page 162: Introduction to Digital Image  · PDF fileQuantization: The process of ... Spatial resolution--controlled by spatial sampling. ... Introduction to Digital Image Processing

Sharpening Filter

Original Filtered

Page 163: Introduction to Digital Image  · PDF fileQuantization: The process of ... Spatial resolution--controlled by spatial sampling. ... Introduction to Digital Image Processing

Edge Finding Filter

Original Filtered

Page 164: Introduction to Digital Image  · PDF fileQuantization: The process of ... Spatial resolution--controlled by spatial sampling. ... Introduction to Digital Image Processing

Embossing Filter

Original Filtered

Page 165: Introduction to Digital Image  · PDF fileQuantization: The process of ... Spatial resolution--controlled by spatial sampling. ... Introduction to Digital Image Processing

Summary: Classes of

Operations

Mappings

Adjust brightness and contrast

Arithmetic combinations of images

Averaging for noise reduction

Convolutions (filters)

Noise reduction

Sharpening and softening

Edge detection

Etc.

Page 166: Introduction to Digital Image  · PDF fileQuantization: The process of ... Spatial resolution--controlled by spatial sampling. ... Introduction to Digital Image Processing
Page 167: Introduction to Digital Image  · PDF fileQuantization: The process of ... Spatial resolution--controlled by spatial sampling. ... Introduction to Digital Image Processing

Introduction to Digital

Image Processing

Part IV

Chester F. Carlson Center for Imaging Science,

RIT

Page 168: Introduction to Digital Image  · PDF fileQuantization: The process of ... Spatial resolution--controlled by spatial sampling. ... Introduction to Digital Image Processing

What is Digital Image Processing?

Mathematical operations on the numbers

that make up a digital picture

Results in a new digital picture which is

different from the original

REMEMBER :

Start with an image -- end with an image

Page 169: Introduction to Digital Image  · PDF fileQuantization: The process of ... Spatial resolution--controlled by spatial sampling. ... Introduction to Digital Image Processing

What is Digital Image

Analysis?

“ Using the numbers in digital pictures to

get useful information or solve a

problem

REMEMBER:

Start with an image -- end with an answer

Page 170: Introduction to Digital Image  · PDF fileQuantization: The process of ... Spatial resolution--controlled by spatial sampling. ... Introduction to Digital Image Processing
Page 171: Introduction to Digital Image  · PDF fileQuantization: The process of ... Spatial resolution--controlled by spatial sampling. ... Introduction to Digital Image Processing
Page 172: Introduction to Digital Image  · PDF fileQuantization: The process of ... Spatial resolution--controlled by spatial sampling. ... Introduction to Digital Image Processing
Page 173: Introduction to Digital Image  · PDF fileQuantization: The process of ... Spatial resolution--controlled by spatial sampling. ... Introduction to Digital Image Processing
Page 174: Introduction to Digital Image  · PDF fileQuantization: The process of ... Spatial resolution--controlled by spatial sampling. ... Introduction to Digital Image Processing
Page 175: Introduction to Digital Image  · PDF fileQuantization: The process of ... Spatial resolution--controlled by spatial sampling. ... Introduction to Digital Image Processing
Page 176: Introduction to Digital Image  · PDF fileQuantization: The process of ... Spatial resolution--controlled by spatial sampling. ... Introduction to Digital Image Processing
Page 177: Introduction to Digital Image  · PDF fileQuantization: The process of ... Spatial resolution--controlled by spatial sampling. ... Introduction to Digital Image Processing
Page 178: Introduction to Digital Image  · PDF fileQuantization: The process of ... Spatial resolution--controlled by spatial sampling. ... Introduction to Digital Image Processing
Page 179: Introduction to Digital Image  · PDF fileQuantization: The process of ... Spatial resolution--controlled by spatial sampling. ... Introduction to Digital Image Processing
Page 180: Introduction to Digital Image  · PDF fileQuantization: The process of ... Spatial resolution--controlled by spatial sampling. ... Introduction to Digital Image Processing
Page 181: Introduction to Digital Image  · PDF fileQuantization: The process of ... Spatial resolution--controlled by spatial sampling. ... Introduction to Digital Image Processing
Page 182: Introduction to Digital Image  · PDF fileQuantization: The process of ... Spatial resolution--controlled by spatial sampling. ... Introduction to Digital Image Processing
Page 183: Introduction to Digital Image  · PDF fileQuantization: The process of ... Spatial resolution--controlled by spatial sampling. ... Introduction to Digital Image Processing

Answers

Width of Genesee River = 193 feet

Length of ‚Quarter Mile‛ = 0.41 mile

Length of Perimeter Road = 3.1 miles

Area inside Perimeter Road = 346 acres

Number of cars in ‚E‛ Lot = 226