1 / 34

DIGITAL IMAGE PROCESSING

DIGITAL IMAGE PROCESSING. Chapter 10 – Image Segmentation. Instructors: Dr J. Shanbehzadeh Shanbehzadeh@gmail.com M.Yekke Zare. Road map of chapter 10. 10.5. 10.3. 10.3. 10.4. 10.1. 10.1. 10.2. 10.2. 10.4. 10.5. 10.6. 10.6. Point, Line and Edge Detection. Thresholding.

cora-vinson
Download Presentation

DIGITAL IMAGE PROCESSING

An Image/Link below is provided (as is) to download presentation Download Policy: Content on the Website is provided to you AS IS for your information and personal use and may not be sold / licensed / shared on other websites without getting consent from its author. Content is provided to you AS IS for your information and personal use only. Download presentation by click this link. While downloading, if for some reason you are not able to download a presentation, the publisher may have deleted the file from their server. During download, if you can't get a presentation, the file might be deleted by the publisher.

E N D

Presentation Transcript


  1. DIGITAL IMAGE PROCESSING Chapter 10 – Image Segmentation Instructors: Dr J. Shanbehzadeh Shanbehzadeh@gmail.com M.YekkeZare ( J.ShanbehzadehM.YekkeZare )

  2. Road map of chapter 10 • 10.5 • 10.3 • 10.3 • 10.4 10.1 10.1 • 10.2 • 10.2 • 10.4 • 10.5 • 10.6 • 10.6 • Point, Line and Edge Detection • Thresholding • Segmentation Using Morphological watersheds • Fundamentals • The Use of Motion in Segmentation • Image Smoothing Using Frequency Domain Filters • Region-Based Segmentation • 10.1- Fundamentals • 10.2- Point, Line and Edge Detection • 10.3-Thresholding • 10.4- Region-Based Segmentation • 10.5 - Segmentation Using Morphological watersheds • 10.6- The Use of Motion in Segmentation ( J.ShanbehzadehM.YekkeZare )

  3. Thresholding ( J.ShanbehzadehM.YekkeZare )

  4. Foundation • Foundation • Multivariable Thresholding Thresholding • Basic Global Thresholding Optimum Global Thresholding Using Otsu’s Method Using Image Smoothing to improve Global Thresholding Using Edges to improve Global thresholding • Variable Thresholding Multiple Thresholds • 10.1- Fundamentals • 10.2- Point, Line and Edge Detection • 10.3- Thresholding • 10.4- Region-Based Segmentation • 10.5 - Segmentation Using Morphological watersheds • 10.6- The Use of Motion in Segmentation ( J.ShanbehzadehM.YekkeZare )

  5. Thresholding Foundation image with dark background and a light object image with dark background and two light objects • 10.1- Fundamentals • 10.2- Point, Line and Edge Detection • 10.3-Thresholding • 10.4- Region-Based Segmentation • 10.5 - Segmentation Using Morphological watersheds • 10.6- The Use of Motion in Segmentation ( J.ShanbehzadehM.YekkeZare )

  6. Thresholding Foundation- Multilevel thresholding • a point (x,y) belongs to • to an object class if T1 < f(x,y)  T2 • to another object class if f(x,y) > T2 • to background if f(x,y)  T1 • T depends on • only f(x,y) : only on gray-level values  Global threshold • both f(x,y) and p(x,y) : on gray-level values and its neighbors  Local threshold • 10.1- Fundamentals • 10.2- Point, Line and Edge Detection • 10.3-Thresholding • 10.4- Region-Based Segmentation • 10.5 - Segmentation Using Morphological watersheds • 10.6- The Use of Motion in Segmentation ( J.ShanbehzadehM.YekkeZare )

  7. Thresholding Foundation-The Role of Illumination easily use global thresholding object and background are separated f(x,y) = i(x,y) r(x,y) a). computer generated reflectance function b). histogram of reflectance function c). computer generated illumination function (poor) d). product of a). and c). e). histogram of product image difficult to segment ( J.ShanbehzadehM.YekkeZare )

  8. Foundation Basic Global Thresholding • Multivariable Thresholding Thresholding • Basic Global Thresholding Optimum Global Thresholding Using Otsu’s Method Using Image Smoothing to improve Global Thresholding Using Edges to improve Global thresholding • Variable Thresholding Multiple Thresholds • 10.1- Fundamentals • 10.2- Point, Line and Edge Detection • 10.3- Thresholding • 10.4- Region-Based Segmentation • 10.5 - Segmentation Using Morphological watersheds • 10.6- The Use of Motion in Segmentation ( J.ShanbehzadehM.YekkeZare )

  9. Thresholding Basic Global Thresholding • 10.1- Fundamentals • 10.2- Point, Line and Edge Detection • 10.3-Thresholding • 10.4- Region-Based Segmentation • 10.5 - Segmentation Using Morphological watersheds • 10.6- The Use of Motion in Segmentation • based on visual inspection of histogram • Select an initial estimate for T. • Segment the image using T. This will produce two groups of pixels: G1 consisting of all pixels with gray level values > T and G2 consisting of pixels with gray level values  T • Compute the average gray level values 1 and 2 for the pixels in regions G1 and G2 • Compute a new threshold value • T = 0.5 (1 + 2) • Repeat steps 2 through 4 until the difference in T in successive iterations is smaller than a predefined parameter To. ( J.ShanbehzadehM.YekkeZare )

  10. Thresholding Basic Global Thresholding-Example: Heuristic method note: the clear valley of the histogram and the effective of the segmentation between object and background • 10.1- Fundamentals • 10.2- Point, Line and Edge Detection • 10.3- Thresholding • 10.4- Region-Based Segmentation • 10.5 - Segmentation Using Morphological watersheds • 10.6- The Use of Motion in Segmentation T0 = 0 3 iterations with result T = 125 ( J.ShanbehzadehM.YekkeZare )

  11. Foundation Optimum Global Thresholding Using Otsu’s Method • Multivariable Thresholding Thresholding • Basic Global Thresholding Optimum Global Thresholding Using Otsu’s Method Using Image Smoothing to improve Global Thresholding Using Edges to improve Global thresholding • Variable Thresholding Multiple Thresholds • 10.1- Fundamentals • 10.2- Point, Line and Edge Detection • 10.3- Thresholding • 10.4- Region-Based Segmentation • 10.5 - Segmentation Using Morphological watersheds • 10.6- The Use of Motion in Segmentation ( J.ShanbehzadehM.YekkeZare )

  12. Thresholding Optimum Global Thresholding Using Otsu’s Method Otsu’s Method • 10.1- Fundamentals • 10.2- Point, Line and Edge Detection • 10.3-Thresholding • 10.4- Region-Based Segmentation • 10.5 - Segmentation Using Morphological watersheds • 10.6- The Use of Motion in Segmentation • Assumptions • It does not depend on modeling the probability density functions. • It does assume a bimodal histogram distribution ( J.ShanbehzadehM.YekkeZare )

  13. Thresholding Optimum Global Thresholding Using Otsu’s Method Otsu’s Method • 10.1- Fundamentals • 10.2- Point, Line and Edge Detection • 10.3-Thresholding • 10.4- Region-Based Segmentation • 10.5 - Segmentation Using Morphological watersheds • 10.6- The Use of Motion in Segmentation • Segmentation is based on “region homogeneity”. • Region homogeneity can be measured using variance (i.e., regions with high homogeneity will have low variance). • Otsu’s method selects the threshold by minimizing the within-class variance. ( J.ShanbehzadehM.YekkeZare )

  14. Thresholding Optimum Global Thresholding Using Otsu’s Method Otsu’s Method (cont’d) Mean andVariance • Consider an image with L gray levels and its normalized histogram • P(i) is the normalized frequency of i. • Assuming that we have set the threshold at T, the normalized fraction of pixels that will be classified as background and object will be: • 10.1- Fundamentals • 10.2- Point, Line and Edge Detection • 10.3-Thresholding • 10.4- Region-Based Segmentation • 10.5 - Segmentation Using Morphological watersheds • 10.6- The Use of Motion in Segmentation T object background ( J.ShanbehzadehM.YekkeZare )

  15. Thresholding Optimum Global Thresholding Using Otsu’s Method • The mean gray-level value of the background and the object pixels will be: • The mean gray-level value over the whole image (“grand” mean) is: • 10.1- Fundamentals • 10.2- Point, Line and Edge Detection • 10.3-Thresholding • 10.4- Region-Based Segmentation • 10.5 - Segmentation Using Morphological watersheds • 10.6- The Use of Motion in Segmentation ( J.ShanbehzadehM.YekkeZare )

  16. Thresholding Optimum Global Thresholding Using Otsu’s Method • The variance of the background and the object pixels will be: • The variance of the whole image is: • 10.1- Fundamentals • 10.2- Point, Line and Edge Detection • 10.3-Thresholding • 10.4- Region-Based Segmentation • 10.5 - Segmentation Using Morphological watersheds • 10.6- The Use of Motion in Segmentation ( J.ShanbehzadehM.YekkeZare )

  17. Thresholding Optimum Global Thresholding Using Otsu’s Method Otsu’s Method (cont’d) Within-class and between-class variance • 10.1- Fundamentals • 10.2- Point, Line and Edge Detection • 10.3-Thresholding • 10.4- Region-Based Segmentation • 10.5 - Segmentation Using Morphological watersheds • 10.6- The Use of Motion in Segmentation • It can be shown that the variance of the whole image can be written as follows: within-class variance should be minimized! should be maximized! between-class variance ( J.ShanbehzadehM.YekkeZare )

  18. Thresholding Optimum Global Thresholding Using Otsu’s Method Otsu’s Method (cont’d) Determining the threshold • Since the total variance does not depend on T, the T that minimizes will also maximize • Let us rewrite as follows: • Find the T value that maximizes • 10.1- Fundamentals • 10.2- Point, Line and Edge Detection • 10.3-Thresholding • 10.4- Region-Based Segmentation • 10.5 - Segmentation Using Morphological watersheds • 10.6- The Use of Motion in Segmentation where ( J.ShanbehzadehM.YekkeZare )

  19. Thresholding Optimum Global Thresholding Using Otsu’s Method Otsu’s Method (cont’d) Determining the threshold • Start from the beginning of the histogram and test each gray- level value for the possibility of being the threshold T that maximizes • 10.1- Fundamentals • 10.2- Point, Line and Edge Detection • 10.3-Thresholding • 10.4- Region-Based Segmentation • 10.5 - Segmentation Using Morphological watersheds • 10.6- The Use of Motion in Segmentation ( J.ShanbehzadehM.YekkeZare )

  20. Thresholding Optimum Global Thresholding Using Otsu’s Method Otsu’s Method (cont’d) • 10.1- Fundamentals • 10.2- Point, Line and Edge Detection • 10.3-Thresholding • 10.4- Region-Based Segmentation • 10.5 - Segmentation Using Morphological watersheds • 10.6- The Use of Motion in Segmentation • Drawbacks of the Otsu’s method • The method assumes that the histogram of the image is bimodal (i.e., two classes). • The method breaks down when the two classes are very unequal (i.e., the classes have very different sizes) • In this case, may have two maxima. • The correct maximum is not necessary the global one. • The method does not work well with variable illumination. ( J.ShanbehzadehM.YekkeZare )

  21. Thresholding Optimum Global Thresholding Using Otsu’s Method Otsu’s Method (cont’d) • 10.1- Fundamentals • 10.2- Point, Line and Edge Detection • 10.3-Thresholding • 10.4- Region-Based Segmentation • 10.5 - Segmentation Using Morphological watersheds • 10.6- The Use of Motion in Segmentation ( J.ShanbehzadehM.YekkeZare )

  22. Foundation Using Image Smoothing to improve Global Thresholding • Multivariable Thresholding Thresholding • Basic Global Thresholding Optimum Global Thresholding Using Otsu’s Method Using Image Smoothing to improve Global Thresholding Using Edges to improve Global thresholding • Variable Thresholding Multiple Thresholds • 10.1- Fundamentals • 10.2- Point, Line and Edge Detection • 10.3- Thresholding • 10.4- Region-Based Segmentation • 10.5 - Segmentation Using Morphological watersheds • 10.6- The Use of Motion in Segmentation ( J.ShanbehzadehM.YekkeZare )

  23. Thresholding Using Image Smoothing to improve Global Thresholding • 10.1- Fundamentals • 10.2- Point, Line and Edge Detection • 10.3-Thresholding • 10.4- Region-Based Segmentation • 10.5 - Segmentation Using Morphological watersheds • 10.6- The Use of Motion in Segmentation ( J.ShanbehzadehM.YekkeZare )

  24. Foundation Using Edges to improve Global thresholding • Multivariable Thresholding Thresholding • Basic Global Thresholding Optimum Global Thresholding Using Otsu’s Method Using Image Smoothing to improve Global Thresholding Using Edges to improve Global thresholding • Variable Thresholding Multiple Thresholds • 10.1- Fundamentals • 10.2- Point, Line and Edge Detection • 10.3- Thresholding • 10.4- Region-Based Segmentation • 10.5 - Segmentation Using Morphological watersheds • 10.6- The Use of Motion in Segmentation ( J.Shanbehzadeh M.Gholizadeh )

  25. Thresholding Using Edges to improve Global thresholding • 10.1- Fundamentals • 10.2- Point, Line and Edge Detection • 10.3-Thresholding • 10.4- Region-Based Segmentation • 10.5 - Segmentation Using Morphological watersheds • 10.6- The Use of Motion in Segmentation ( J.ShanbehzadehM.YekkeZare )

  26. Thresholding Using Edges to improve Global thresholding • 10.1- Fundamentals • 10.2- Point, Line and Edge Detection • 10.3-Thresholding • 10.4- Region-Based Segmentation • 10.5 - Segmentation Using Morphological watersheds • 10.6- The Use of Motion in Segmentation ( J.ShanbehzadehM.YekkeZare )

  27. Thresholding Using Edges to improve Global thresholding • 10.1- Fundamentals • 10.2- Point, Line and Edge Detection • 10.3-Thresholding • 10.4- Region-Based Segmentation • 10.5 - Segmentation Using Morphological watersheds • 10.6- The Use of Motion in Segmentation ( J.ShanbehzadehM.YekkeZare )

  28. Thresholding Using Edges to improve Global thresholding • 10.1- Fundamentals • 10.2- Point, Line and Edge Detection • 10.3-Thresholding • 10.4- Region-Based Segmentation • 10.5 - Segmentation Using Morphological watersheds • 10.6- The Use of Motion in Segmentation ( J.ShanbehzadehM.YekkeZare )

  29. Foundation Multiple Thresholds • Multivariable Thresholding Thresholding • Basic Global Thresholding Optimum Global Thresholding Using Otsu’s Method Using Image Smoothing to improve Global Thresholding Using Edges to improve Global thresholding • Variable Thresholding Multiple Thresholds • 10.1- Fundamentals • 10.2- Point, Line and Edge Detection • 10.3- Thresholding • 10.4- Region-Based Segmentation • 10.5 - Segmentation Using Morphological watersheds • 10.6- The Use of Motion in Segmentation ( J.ShanbehzadehM.YekkeZare )

  30. Thresholding Multiple Thresholds • Otsu’s method can be extended to a • multiple multiplethresholding method thresholdingmethod. • Between-class variance can be reformulated • as • 10.1- Fundamentals • 10.2- Point, Line and Edge Detection • 10.3-Thresholding • 10.4- Region-Based Segmentation • 10.5 - Segmentation Using Morphological watersheds • 10.6- The Use of Motion in Segmentation ( J.ShanbehzadehM.YekkeZare )

  31. Thresholding Multiple Thresholds The K classes are separated by K-1 thresholds and these optimal thresholds can be solved by maximizing • 10.1- Fundamentals • 10.2- Point, Line and Edge Detection • 10.3-Thresholding • 10.4- Region-Based Segmentation • 10.5 - Segmentation Using Morphological watersheds • 10.6- The Use of Motion in Segmentation For example (two thresholds) ( J.ShanbehzadehM.YekkeZare )

  32. Thresholding Multiple Thresholds The following relationships hold: • 10.1- Fundamentals • 10.2- Point, Line and Edge Detection • 10.3-Thresholding • 10.4- Region-Based Segmentation • 10.5 - Segmentation Using Morphological watersheds • 10.6- The Use of Motion in Segmentation The optimum thresholds can be found by : The image is then segmented by ( J.ShanbehzadehM.YekkeZare )

  33. Thresholding Multiple Thresholds • 10.1- Fundamentals • 10.2- Point, Line and Edge Detection • 10.3-Thresholding • 10.4- Region-Based Segmentation • 10.5 - Segmentation Using Morphological watersheds • 10.6- The Use of Motion in Segmentation ( J.ShanbehzadehM.YekkeZare )

  34. Foundation • Variable Thresholding • Multivariable Thresholding Thresholding • Basic Global Thresholding Optimum Global Thresholding Using Otsu’s Method Using Image Smoothing to improve Global Thresholding Using Edges to improve Global thresholding • Variable Thresholding Multiple Thresholds • 10.1- Fundamentals • 10.2- Point, Line and Edge Detection • 10.3- Thresholding • 10.4- Region-Based Segmentation • 10.5 - Segmentation Using Morphological watersheds • 10.6- The Use of Motion in Segmentation ( J.ShanbehzadehM.YekkeZare )

More Related