chapter 2: digital image fundamentals

45
Chapter 2: Digital Image Fundamentals Fall 2003, 劉劉劉

Upload: isabel

Post on 05-Jan-2016

62 views

Category:

Documents


6 download

DESCRIPTION

Chapter 2: Digital Image Fundamentals. Fall 2003, 劉震昌. Outline. Elements of Visual Perception Image sensing and acquisition Image sampling and quantization Relationships between pixels. Understanding visual perception. Most image processing operations are based on math. and probability - PowerPoint PPT Presentation

TRANSCRIPT

Page 1: Chapter 2: Digital Image Fundamentals

Chapter 2: Digital Image Fundamentals

Fall 2003, 劉震昌

Page 2: Chapter 2: Digital Image Fundamentals

Outline Elements of Visual Perception Image sensing and acquisition Image sampling and quantization Relationships between pixels

Page 3: Chapter 2: Digital Image Fundamentals

Understanding visual perception

Most image processing operations are based on math. and probability

Why understanding visual perception? Human intuition plays an important role in

the choice of processing technique

Page 4: Chapter 2: Digital Image Fundamentals

Structure of the Human eye

角膜虹膜

網膜

水晶體

Diameter:20mm

Page 5: Chapter 2: Digital Image Fundamentals

2 class of receptors: cones and rods

Distribution of cones and rods

1 cone -> 1 nerve

Many rods -> 1 nerve

Page 6: Chapter 2: Digital Image Fundamentals

Discrete nature of human vision

Area of cones

15mm

Cone density: 150,000 per mm

Page 7: Chapter 2: Digital Image Fundamentals

Image formation in the Eye

Page 8: Chapter 2: Digital Image Fundamentals

Image Sensing and Acquisition

Page 9: Chapter 2: Digital Image Fundamentals

Images?Illumination source

scene

reflection

Page 10: Chapter 2: Digital Image Fundamentals

Image sensors Incoming energy is transformed

into a voltage by the combination of input electrical power and sensor material

(continuous)

Page 11: Chapter 2: Digital Image Fundamentals

Single sensor with motion

Page 12: Chapter 2: Digital Image Fundamentals

Sensor strips Flat-bed scanner aircraft

Page 13: Chapter 2: Digital Image Fundamentals

Sensor arrays CCD arrays in digital camera

Page 14: Chapter 2: Digital Image Fundamentals

Image sampling and quantization

Page 15: Chapter 2: Digital Image Fundamentals

Image sampling and quantization

continuousdata

digitaldata

Sampling: digitize the coordinate values

Quantization: digitize the amplitude values

Why? Limited representation power in digital computers

discretize

Page 16: Chapter 2: Digital Image Fundamentals
Page 17: Chapter 2: Digital Image Fundamentals

Image sampling and quantization (cont.) Sometimes, the sampling and

quantization are done mechanically Limitation on the sensing equipment

sensor array

Page 18: Chapter 2: Digital Image Fundamentals

Sampling rule How to determine the sampling rate? Nyquist sampling theorem

If input is a band-limited signal with maximum frequency ΩN

The input can be uniquely determined if sampling rate ΩS > 2ΩN

Nyquist frequency : ΩN

Nyquist rate : ΩS

Page 19: Chapter 2: Digital Image Fundamentals

Sampling rule (cont.)

Page 20: Chapter 2: Digital Image Fundamentals

Representing digital images

Page 21: Chapter 2: Digital Image Fundamentals

Representing digital images (cont.) Matrix form

f(0,0) f(0,1) … f(0,N-1)f(1,0) f(0,1) … f(1,N-1)

… …

f(M-1,0) f(M-1,1) … f(M-1,N-1)MxN

bits to store the image = M x N x kgray level = 2k

Page 22: Chapter 2: Digital Image Fundamentals

Representing digital images (cont.)

L = 2k gray levels, gray scales [0,…,L-1] The dynamic range of an image

[min(image) max(image)] If the dynamic range of an image spans a

significant portion of the gray scale -> high contrast

Otherwise, low dynamic range results in a dull, washed out gray look

Page 23: Chapter 2: Digital Image Fundamentals

Spatial and gray-level resolution L-level digital image of size MxN = digital image having

a spatial resolution MxN pixels a gray-level resolution of L levels

Spatial resolution in real-world space line width=W cm

space width=W cm

Resolution = 1/2W (line/cm)

Page 24: Chapter 2: Digital Image Fundamentals

Spatial and gray-level resolution (cont.) Resolution of printer or screen

dpi(dot per inch) pixel/unit of distance

When an digital image of size MxN is to be printed or viewed using devices with resolution k dpi, how large will be the output image?

Page 25: Chapter 2: Digital Image Fundamentals

Multi-rate image processing Down-sampling

Up-sampling neighboring pixel duplication interpolation

2

2

Page 26: Chapter 2: Digital Image Fundamentals

Down-sampling operations

Page 27: Chapter 2: Digital Image Fundamentals

See the information loss due to down-sampling

Page 28: Chapter 2: Digital Image Fundamentals

Gray-level reduction

Page 29: Chapter 2: Digital Image Fundamentals

Gray-level reduction

falsecontouring

Page 30: Chapter 2: Digital Image Fundamentals

Empirical study of resolutions 2k-level digital image of size NxN How K and N affect the image quality

Increased details

Page 31: Chapter 2: Digital Image Fundamentals

Empirical study of resolutions(cont.) iso-preference curses

*shift up and right

*A detailed image may need less gray levels

Page 32: Chapter 2: Digital Image Fundamentals

Zoom and Shrink Operations applied to digital

images Zoom: up-sampling

Pixel duplication Bi-linear interpolation

Shrink: down-sampling

Page 33: Chapter 2: Digital Image Fundamentals

Zoom and shrink: idea

Idea: adjust the gridsize over the originalimage

Page 34: Chapter 2: Digital Image Fundamentals

Zooming: example

pixelduplication

bilinearinterpolation

Page 35: Chapter 2: Digital Image Fundamentals

Relationships Between Pixels

Page 36: Chapter 2: Digital Image Fundamentals

Neighbors of a pixel 4-neighbors of p: N4(p)

Diagonal neighbors: ND(p)

8-neighbors = 4-neighbors+diagonal neighbors : N8(p)

p

p

Page 37: Chapter 2: Digital Image Fundamentals

Adjacency, connectivity, regions, and boundaries Connectivity of pixels

They are neighbors Their gray levels satisfy a specified

criterion of similarity Concept about regions and boundaries

Adjacency 4-adjacency: p and q with intensity

from V and q is in N4(p) 8-adjacency: p and q with intensity

from V and q is in N8(p)

Page 38: Chapter 2: Digital Image Fundamentals

Connectivity and adjacency (cont.)

m-adjacency(mixed adjacency): p and q having intensity from V and

q is in N4(p), or q is in ND(p) and N4(p) N4(q) has no

pixels whose values are from V

Page 39: Chapter 2: Digital Image Fundamentals

Path A path from p: (x,y) to q: (s,t) is a

sequence of pixels:

Length = n It’s a k-path if it is 4-, 8-, and m-

adjacency

(x,y), (x1,y1), (x2,y2),…, , (xn-1,yn-1),(s,t)

consecutive pixels are adjacency

Page 40: Chapter 2: Digital Image Fundamentals

Growth of definitions

adjacency

path

connectedcomponent

connectedset (region)

S

S

Sboundary

Page 41: Chapter 2: Digital Image Fundamentals

Summary We need solid mathematical

definitions to let the algorithm run on a computer

Page 42: Chapter 2: Digital Image Fundamentals

Distance measure p: (x,y), q: (s,t) Euclidean distance

De(p,q)=[(x-s)2+(y-t)2]1/2

D4 distance D4(p,q)=|x-s|+|y-t|

D8 distance D8(p,q)=max(|x-s|,|y-t|)

r

22 1 2

2 1 0 1 22 1 2

22 2 2 2 22 1 1 1 22 1 0 1 22 1 1 1 22 2 2 2 2

Page 43: Chapter 2: Digital Image Fundamentals

Pixel-wise operation For example, how does image I divide

d by image M? Division is carried out between correspon

ding pixels in the two images Matlab: Q = I./M

Page 44: Chapter 2: Digital Image Fundamentals

Linear and non-linear operations H be an operator whose input and out

put are images H is linear if

H(af+bg) = aH(f)+bH(g) Otherwise non-linear

We have well-understood theoretical and practical results about linear operators

Page 45: Chapter 2: Digital Image Fundamentals

Announcement !!! There are solutions to the marked pro

blems in the textbook http://www.imageprocessingbook.com/teaching/proble

m_solutions.htm HW#1