Presentation is loading. Please wait.

Presentation is loading. Please wait.

Tutorial # 9 Nov. 21, 2013 1. Segmentation  Isolating a region/regions of interest in an image  Useful for:  Collect more meaningful data from an image.

Similar presentations


Presentation on theme: "Tutorial # 9 Nov. 21, 2013 1. Segmentation  Isolating a region/regions of interest in an image  Useful for:  Collect more meaningful data from an image."— Presentation transcript:

1 Tutorial # 9 Nov. 21, 2013 1

2 Segmentation  Isolating a region/regions of interest in an image  Useful for:  Collect more meaningful data from an image  Easier analysis  Locate objects  Locate boundaries 2

3 K-means clustering 3

4 Example – 1 Channel  Given a gray scale image, use K-means to segment the image. Choose K = 2 (Cluster A and Cluster B) 153 262 551 4

5 1.) Calculate the histogram 5

6 2.) Initialize centroids 6

7 3) Cluster intensities based on distance 12356 0141625 41049 Note: Points with intensity 2 can be classified as either, but our algorithm chooses the first cluster. 7

8 4.) Recalculate centroids 8

9 5.) Recluster intensities using new centroids 12356 0.25 2.2512.2520.25 14.447.843.240.041.44 We have a new clustering! Recalculate the centroid. 9

10 10

11 11 12356 0.640.041.4410.2417.64 18.06310.565.0630.630.56

12 Final Clustering/Segmentation ABA ABA BBA This answer would change if we chose K = 3. Also, the number of iterations would change depending on the starting centroids. 12

13 Real example 13

14 Real example 14

15 Number of Clusters: K = 1 15

16 Number of Clusters: K = 3 16

17 Actual Segmentation 17 Cluster 1 Cluster 2 Cluster 3

18 Similar intensities 18

19 Number of Clusters: K = 5 Oversegmentation – K is too high 19

20 What about colour segmentation?  Different regions of interest may have the same intensity but different colours  Can use the colour information of an image to improve segmentation  Let’s focus only on the colour and remove the intensity by converting to a different colour space:  HSI (Hue Saturation Intensity)  YCbCr (Luma, Blue difference, Red difference)  L*a*b* (Lightness, a* - colour that falls on the red-green axis, b* - colour that falls on the blue-yellow axis) 20

21 Using L*a*b* space  Our K-means problem becomes a 2D problem  Our centroid will now have two variables, one defining the intensity of the a* channel and one defining the b* channel http://www.mathworks.com/help/releases/R201 3b/stats/kmeans.gif 21

22 22 K = 1 K = 3 K = 5

23 23 Cluster 1 Cluster 2 Cluster 3


Download ppt "Tutorial # 9 Nov. 21, 2013 1. Segmentation  Isolating a region/regions of interest in an image  Useful for:  Collect more meaningful data from an image."

Similar presentations


Ads by Google