Presentation is loading. Please wait.

Presentation is loading. Please wait.

Chapter 5 Digital Image Processing Fundamentals. Learning Goals The human visual system Digitizing images Display of Images.

Similar presentations


Presentation on theme: "Chapter 5 Digital Image Processing Fundamentals. Learning Goals The human visual system Digitizing images Display of Images."— Presentation transcript:

1 Chapter 5 Digital Image Processing Fundamentals

2 Learning Goals The human visual system Digitizing images Display of Images

3 Trading an eye for an ear

4 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

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

6 Response curves Eye has Gaussian response to light. Gives rise to biologically motivated image processing

7 Quantization of an Image Computers use digital cameras -> quantization

8 Delta-function

9 Sampling an Image

10 Sampling=convolution w pulse train

11 Quantization Error is visible

12 Displays Color Monitors are made for people

13 Chapter 6-7 Opening and Saving Images

14 Chapter 8 Convolution with a kernel, g(x)

15 Convolution 1D and 2D signal processing

16 Consider the delta function

17 Time-shift delta

18 Sample the input (it’s a convolution!)

19 What does sampling do to spectrum?

20 What is the spectrum?

21 Fourier Coefficients

22 CTFT

23 Euler’s identity

24 Sine-cos Rep

25 Harmonic Analysis

26 Convolution=time-shift&multi

27 Convolution Thm multiplication in the time domain = convolution in the frequency domain

28 Sample

29 Spectrum reproduced spectrum to be reproduced at intervals

30 Summary

31 Example of 1D convoln

32 2D Convolution

33 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

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

35 Convolution in 2D

36 Avoid the Mod op

37 What is wrong with avoiding the mod op? How do I find the center of the kernel?

38 Cyclic Convolution

39 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; }

40 What happens to the image if you ignore the wrap?

41 Cyclic Convolution keeps the edges

42 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?

43 Convolution is slow, how can I speed it up? JAI! FFT!? Other ideas?

44 Chapter 9 Spatial Filters Blurring Median Filtering Hi-pass filtering SpatialFilterFrame and JAI

45 Blurring=Low-pass Filters

46 Why Blur an Image? Remove Noise Other ideas?

47 Average=low-pass

48 Want Unity Gain

49 Many variations on LP filters

50 Gaussian Blur

51 Why use Gaussian Blur? How the eye works Symmetric Differentiable Smooth

52 Classic bell curve

53 Larger Kernels=more blur

54 Median Filtering Middle of a list of samples listed in ascending order. Sort samples, return n/2

55 Why use median filtering? Discard outliers 0, 85, 90, 87 and 100. The mean is 72 Median is 87. {0, 85, 87, 90, and 100}=87

56 How do I implement the median?

57 Salt and Pepper

58 Median 3x3

59 Median on any kernel

60 Median result

61 Median Octagon, less aggressive

62 Median Octagon results

63 Median Filtering is not FREE! Image degradation Selective median filtering. How do you know when to apply it?

64 Use Sample Variance

65 Coefficient of variation public static boolean outlierHere(int a[]) { return ( coefficientOfVariation(a) >.4); }

66 Before and After 3x3 Median Filtering with Outlier Detection

67 High-pass Filters

68 Defining HP Kernels public void hp1() { float k[][] = { { 0, -1, 0}, {-1, 10, -1}, { 0, -1, 0} }; Mat.normalize(k); convolve(k); }

69 Lower Center Number, GREATER edge enhancement! 5 10

70 Project ideas Add an interface that allows the user to outline a rectangular region of interest. Then perform processing only in that region.

71 10. Convolution-based Edge Detection Why do edge detection? What is an edge? What is a good edge? How do you find an edge?

72 Laplacian

73 Why Laplacian? because it is zero when the rate of intensity change in the image plane is zero or linear.

74 Log filters=prefilter+laplacian

75 Mexican Hat (LoG Kernel)

76 The Log kernel

77 Oriented Filters are steerable

78 Changing Scale at 0 Degrees

79 Changing Phase at 0 degrees

80 Interactive Heuristic Edge Detection Douglas A. Lyon, Ph.D. Chair, Computer Engineering Dept. Fairfield University, CT, USA Lyon@DocJava.com, http://www.DocJava.comhttp://www.DocJava.com CGIM, 2002 Copyright 2002 © DocJava, Inc.

81 Background It is easy to find a bad edge! We know a good edge when we see it!

82 The Problem Given an expert + an image. The expert places markers on a good edge. Find a way to connect the markers.

83 Motivation Experts find/define good edges Knowledge is hard to encode.

84 Approach Mark an important edge Pixels=graph nodes Search in pixel space using a heuristic A* is faster than DP

85 Assumptions User is a domain expert Knowledge rep=heuristics+markers

86 Applications Photo interpretation Path planning (source+destination) Medical imaging

87 Photo Interpretation

88 Echocardiogram 3D-multi-scale analysis

89 Path Plans, the idea

90 Path Planning-pre proc. hist+thresh Dil+Skel

91 Path Planning - Search

92 The Idea The mind selects from filter banks The mind tunes the filters

93 Gabor filter w/threshold The Strong edge is the wrong edge!

94 Sub bands for 3x3 Robinson

95 Sub Bands 7x7 Gabor

96 Gabor-biologically motivated

97 Summary Heuristics+markers= knowledge Low-level image processing still needed Global optimization is not appropriate for all applications Sometimes we only want a single, good edge

98 http://www.DocJava.com


Download ppt "Chapter 5 Digital Image Processing Fundamentals. Learning Goals The human visual system Digitizing images Display of Images."

Similar presentations


Ads by Google