Chapter 9 Image Segmentation Partition an image into

  • Slides: 46
Download presentation
Chapter 9: Image Segmentation – Partition an image into component parts 。 Mathematical Partition

Chapter 9: Image Segmentation – Partition an image into component parts 。 Mathematical Partition 。 Image Segmentation Image I Segmentation 9 -1

Contents: (1) Thresholding (2) Edge detection 9 -2

Contents: (1) Thresholding (2) Edge detection 9 -2

(3) Region-based segmentation Split Merge 3

(3) Region-based segmentation Split Merge 3

◎ Thresholoding 。 Single Thresholoding Example: 9 -4

◎ Thresholoding 。 Single Thresholoding Example: 9 -4

。 Double Thresholding Example: 9 -5

。 Double Thresholding Example: 9 -5

。Advantages: (i) Remove unnecessary detail (ii) Bring out hidden detail Example: 9 -6

。Advantages: (i) Remove unnecessary detail (ii) Bring out hidden detail Example: 9 -6

○ How to choose a threshold value 。 Histogram method 9 -7

○ How to choose a threshold value 。 Histogram method 9 -7

。 Otsu’s thresholding method Describe the histogram as a probability distribution by 9 -8

。 Otsu’s thresholding method Describe the histogram as a probability distribution by 9 -8

Let t be the determined threshold value (t unknown so far). Define Find t

Let t be the determined threshold value (t unknown so far). Define Find t such that 9 -9

9 -10

9 -10

 • Adaptive Thresholding (i) Divide image into strips (ii) Apply Otsu’s method to

• Adaptive Thresholding (i) Divide image into strips (ii) Apply Otsu’s method to each strip 9 -11

。 Variable thresholding (i) Divide image into blocks Global thresholding (ii) Compute histograms of

。 Variable thresholding (i) Divide image into blocks Global thresholding (ii) Compute histograms of block images 9 -12

(iii) For each block image, compute its (1) Smooth histogram h 9 -13

(iii) For each block image, compute its (1) Smooth histogram h 9 -13

(2) Fit with mixture of Gaussian 9 -14

(2) Fit with mixture of Gaussian 9 -14

where v is the gray level corresponding to the deepest valley of (3) Test

where v is the gray level corresponding to the deepest valley of (3) Test bimodality 9 -15

(4) If the bimodality test is past, compute T by (5) For block (x,

(4) If the bimodality test is past, compute T by (5) For block (x, y) whose threshold value T(x, y) hasn’t yet been determined 9 -16

(6) Smooth T by (7) Determine thresholding values of image pixels by bilinear interpolation

(6) Smooth T by (7) Determine thresholding values of image pixels by bilinear interpolation 9 -17

Global thresholding Variable thresholding 9 -18

Global thresholding Variable thresholding 9 -18

◎ Edge Detection 。 Types of edge: Step edge (jump edge) Ramp edge Roof

◎ Edge Detection 。 Types of edge: Step edge (jump edge) Ramp edge Roof edge (crease edge) Smooth edge 9 -19

○ Derivatives 9 -20

○ Derivatives 9 -20

2 -D case: 9 -21

2 -D case: 9 -21

Prewitt filters 。Consider Horizontal filter: , Smooth filter: Combine Vertical filter: , Smooth filter:

Prewitt filters 。Consider Horizontal filter: , Smooth filter: Combine Vertical filter: , Smooth filter: Combine 9 -22

vertical Edge image Binary image horizontal Thinning 9 -23

vertical Edge image Binary image horizontal Thinning 9 -23

。Roberts filter: 。Sobel filter: 9 -24

。Roberts filter: 。Sobel filter: 9 -24

◎ Second Derivatives Laplacian: 9 -25

◎ Second Derivatives Laplacian: 9 -25

Laplacian Filter: Invariant under rotation (isotropic filter) 9 -26

Laplacian Filter: Invariant under rotation (isotropic filter) 9 -26

Step edge: Ramp edge: 9 -27

Step edge: Ramp edge: 9 -27

。 Second derivatives are sensitive to noise 。 Other Laplacian masks 9 -28

。 Second derivatives are sensitive to noise 。 Other Laplacian masks 9 -28

○ Zero crossing 0 +, + 0 0 -, - 0 + -, -

○ Zero crossing 0 +, + 0 0 -, - 0 + -, - + 9 -29

Example: Edge detection by taking zero crossings after a Laplace filtering Marr-Hildreth method Smooth

Example: Edge detection by taking zero crossings after a Laplace filtering Marr-Hildreth method Smooth the input image using a Gaussian before Laplace filtering 9 -30

。 Gaussian smooth + Laplace filtering = Laplacian of Gaussian (LOG): Gaussian: LOG: 9

。 Gaussian smooth + Laplace filtering = Laplacian of Gaussian (LOG): Gaussian: LOG: 9 -31

Mexican hat: Difference of Gaussian (DOG): 9 -32

Mexican hat: Difference of Gaussian (DOG): 9 -32

◎ Canny edge detector ○ Steps: Let 1. Smoothing and Edge detection (a) Horizontal

◎ Canny edge detector ○ Steps: Let 1. Smoothing and Edge detection (a) Horizontal direction (b) Vertical direction (c) Edge magnitude 9 -33

2. Non-maximum suppression (a) For each pixel p, (b) Quantize to 0, 45, 90

2. Non-maximum suppression (a) For each pixel p, (b) Quantize to 0, 45, 90 or 135 degs. (c) Along p is marked if its edge magnitude is larger than both its two neighbors p is deleted otherwise 9 -34

3. Hysteresis thresholding For each marked pixel p, (a) If > or (b) If

3. Hysteresis thresholding For each marked pixel p, (a) If > or (b) If and p is adjacent to an edge pixel p is considered as an edge pixel 9 -35

◎ Hough Transform 9 -36

◎ Hough Transform 9 -36

○ Line equation: y = ax + b A point on the line Rewrite

○ Line equation: y = ax + b A point on the line Rewrite as Another point Parameter space on the line 9 -37

○ Line equation: 9 -38

○ Line equation: 9 -38

◎ Region-based Segmentation ○ Splitting and Merging Steps: 1. Equally divide the input image

◎ Region-based Segmentation ○ Splitting and Merging Steps: 1. Equally divide the input image into 4 sub-images; 2. Compute the characteristics of each sub-image, e. g. , intensity, color, texture etc; 3. Repeatedly divide sub-images into sub-images if their characteristics are significantly different; 4. Repeatedly merge adjacent sub-images if their characteristics are similar enough. 39

Split Merge Different segmentations may result from region splitting and region merging approaches. 40

Split Merge Different segmentations may result from region splitting and region merging approaches. 40

41

41

42

42

Input Image Region Boundary Segmentation 43

Input Image Region Boundary Segmentation 43

Summary Contents: (1) Thresholding (2) Edge detection (3) Region-Based Segmentation ◎ Thresholding: • Single

Summary Contents: (1) Thresholding (2) Edge detection (3) Region-Based Segmentation ◎ Thresholding: • Single Thresholding • Double Thresholding 9 -44

○ How to choose a threshold value 。 Histogram method 。 Otsu’s thresholding method

○ How to choose a threshold value 。 Histogram method 。 Otsu’s thresholding method 。 Adaptive Thresholding 。 Variable thresholding 9 -45

◎ Edge Detection • First Derivatives Roberts, Prewitt, Sobel • Secound Derivatives Laplacian, LOG,

◎ Edge Detection • First Derivatives Roberts, Prewitt, Sobel • Secound Derivatives Laplacian, LOG, DOG 。 Canny edge detector ○ Hough Transform ◎ Region-based Segmentation 。 Split-and-Merge 9 -46