25
Chapter 5 Digital Image Processing Fundamentals

Chapter 5

  • Upload
    hubert

  • View
    15

  • Download
    0

Embed Size (px)

DESCRIPTION

Chapter 5. Digital Image Processing Fundamentals. Learning Goals. The human visual system Digitizing images Display of Images. Trading an eye for an ear. An eye is a Multi-mega pixel camera. It has a lens (adjustable zoom) It has an automatic f-stop (iris 2-8 mm) - PowerPoint PPT Presentation

Citation preview

Page 1: Chapter 5

Chapter 5

Digital Image Processing Fundamentals

Page 2: Chapter 5

Learning Goals

• The human visual system

• Digitizing images

• Display of Images

Page 3: Chapter 5

Trading an eye for an ear

opticalaxiscornea

lensopticdisk

opticnerveretina

foveacentralis

iris

Page 4: Chapter 5

An eye is a Multi-mega pixel camera

• It has a lens (adjustable zoom)

• It has an automatic f-stop (iris 2-8 mm)

• It has a sensor plane (100 million pixels)

• The sensor has a transfer function senstive to mesopic range; 380 to about 700 nm

Page 5: Chapter 5

The eyes have a USB2 data rate!

• 250,000 neurons in the optic nerve

• variable voltage output on EACH nerve

• 17.5 million neural samples per second

• 12.8 bits per sample

• 224 Mbps, per eye (a 1/2 G bps system!).

• Compression using lateral inhibition between the retinal neurons

Page 6: Chapter 5

Response curves

• Eye has Gaussian response to light.

• Gives rise to biologically motivated image processing

Page 7: Chapter 5

Quantization of an Image

• Computers use digital cameras -> quantizationSNR≤6b+ 4.8

SNR =10 log3×22 b( ) =20blog2 +10log3

Page 8: Chapter 5

Sampling an Image

f s

f (x) Anti-aliasingFilter

Page 9: Chapter 5

Sampling=convolution w pulse train

F(u) *P(u) ≡ F(γ)P(u−γ)dγ−∞

F(u) *P(u) = f(x) δ(x−n / fs)n=−∞

∑ e−j 2πux ⎡ ⎣ ⎢

⎤ ⎦ ⎥dx

−∞

Page 10: Chapter 5

Quantization Error is visible

Page 11: Chapter 5

Displays

• Color Monitors are made for people

Page 12: Chapter 5

Chapter 6-7

• Opening and Saving Images

Page 13: Chapter 5

Chapter 8 Convolutionwith a kernel, g(x)

h(x) = f(x) * g(x)= f(u)g(x−u)du−∞

h(x) = f(x) * g(x)= f (u)g(−∞

∑ x−u)

Page 14: Chapter 5

Region of Support

• The region of support is defined as that area of the .kernel which is non-zero

• linear convolution:=signal has infinite extent but kernel has finite support

• If function has finite region of support we have compact support

Page 15: Chapter 5

Real images have finite region of support

• But we treat them as periodic and infinite!

• We repeat kernels so that they have the same period as the images.

• We call this cyclic convolution.

Page 16: Chapter 5

Convolution in 2D

h(x, y) = f * g= f (u,v)g(x−u,y−v)dudv−∞

∫−∞

h(x,y) = f * g= f(u,v)g([x−u],[y−v])v=0

vmax−1

∑u=0

umax−1

[x −u] =(x−u)modumax

[y−v] =(y−v)modvmax

Page 17: Chapter 5

Avoid the Mod op

h(x,y) = f * g= f (x−u,y−v)g(u+uc ,v+vc)v=−vc

vc

∑u=−uc

uc

Page 18: Chapter 5

What is wrong with avoiding the mod op?

• How do I find the center of the kernel?

Page 19: Chapter 5

Cyclic Convolution

Page 20: Chapter 5

Implementing Convolution for(int y = 0; y < height; y++) { for(int x = 0; x < width; x++) { sum = 0.0; for(int v = -vc; v <= vc; v++) for(int u = -uc; u <= uc; u++) sum += f[cx(x-u) ][cy(y-v)] * k[ u+uc][v+vc]; if (sum < 0) sum = 0; if (sum > 255) sum = 255; h[x][y] = (short)sum; } }

Page 21: Chapter 5

What happens to the image if you ignore the wrap?

Page 22: Chapter 5

Cyclic Convolution keeps the edges

Page 23: Chapter 5

Can you think of a better way to implement convolution?

• Keep the edges!

• Don’t use the mod operation.

• How about growing the image by the size of the kernel*2?

Page 24: Chapter 5

Convolution is slow, how can I speed it up?

• JAI!

• FFT!?

• Other ideas?

Page 25: Chapter 5