Presentation is loading. Please wait.

Presentation is loading. Please wait.

Lecture 07 Segmentation Lecture 07 Segmentation Mata kuliah: T0283 - Computer Vision Tahun: 2010.

Similar presentations


Presentation on theme: "Lecture 07 Segmentation Lecture 07 Segmentation Mata kuliah: T0283 - Computer Vision Tahun: 2010."— Presentation transcript:

1

2 Lecture 07 Segmentation Lecture 07 Segmentation Mata kuliah: T0283 - Computer Vision Tahun: 2010

3 January 20, 2010T0283 - Computer Vision3 Learning Objectives After carefullylistening this lecture, students will be able to do the following : After carefully listening this lecture, students will be able to do the following : Explain various segmentation techniques and demonstrate their implementation (histogram based segmentation, k- means) using MATLAB and OpenCV Explain various segmentation techniques and demonstrate their implementation (histogram based segmentation, k- means) using MATLAB and OpenCV

4 January 20, 2010T0283 - Computer Vision4 Motivation : Recognition Using Region Properties Training For all training samples of each model object Segment the image Compute region properties (features) Recognition Given an image of unknown object, Segment the image Compute its feature vector Compare with the training set

5 January 20, 2010T0283 - Computer Vision5 Region Segmentation

6 January 20, 2010T0283 - Computer Vision6 Segmentation Find set of regions R 1, R 2, ….,R n such that All pixels in region i satisfy some similarity constraint

7 January 20, 2010T0283 - Computer Vision7 Similarity Constraints All pixels in any sub-image musts have the same gray levels. All pixels in any sub-image must not differ more than some threshold All pixels in any sub-image may not differ more than some threshold from the mean of the gray of the region The standard deviation of gray levels in any sub-image must be small.

8 January 20, 2010T0283 - Computer Vision8 Simple Segmentation

9 January 20, 2010T0283 - Computer Vision9 Image Histogram Histogram graphs the number of pixels with a particular gray level as a function of the image of gray levels. gray level number of pixels

10 January 20, 2010T0283 - Computer Vision10 Segmentation Using Histogram Simple Case

11 January 20, 2010T0283 - Computer Vision11 Segmentation Using Histogram Simple Case

12 January 20, 2010T0283 - Computer Vision12 Realistic Histograms Smooth out noise Convolve hist. by averaging or 1D Gaussian filter peak valley

13 January 20, 2010T0283 - Computer Vision13 Segmentation Using Histogram Real image histograms 1.Compute the histogram of a given image. 2.Smooth the histogram by averaging peaks and valleys in the histogram. 3.Detect good peaks by applying thresholds at the valleys. 4.Segment the image into several binary images using thresholds at the valleys. 5.Apply connected component algorithm to each binary image find connected regions.

14 January 20, 2010T0283 - Computer Vision14 Segmentation Using Histograms Select the valleys as thresholds Apply threshold to histogram Label the pixels within the range of a threshold with same label, i.e., a, b, c … or 1, 2, 3 …

15 January 20, 2010T0283 - Computer Vision15 Connected Components Disjoint segments with same labels need to be split may be added to segment c

16 January 20, 2010T0283 - Computer Vision16 Recursive Connected Component Algorithm 1.Scan the binary image left to right, top to bottom. 2.If there is an unlabeled pixel with a value of “1”, assign a new label to it. 3.Recursively check the neighbors of the pixel in step 2 and assign the same label if they are unlabeled with value “1”. 4.Stop when all the pixels of value “1” have been labeled.

17 January 20, 2010T0283 - Computer Vision17 Sequential Connected Component Algorithm 1.Scan the binary image left to right, top to bottom. 2.If an unlabeled pixel with a value of “1”, assign a new label to it according to the following rules : 3.Determine equivalence classes of labels 4.In the second pass, assign the same label to all elements in an equivalence class.

18 January 20, 2010T0283 - Computer Vision18 Sequential Connected Component Algorithm d=c Equivalence class

19 January 20, 2010T0283 - Computer Vision19 Example Detecting Finger Tips (marked white)

20 January 20, 2010T0283 - Computer Vision20 Recaps : Steps in Seed Segmentation 1.Compute the histogram. 2.Smooth the histogram 3.Detect good peaks 4.Segment image into binary images using thresholds at the valleys. 5.Apply connected component algorithm.

21 January 20, 2010T0283 - Computer Vision21 Improving Seed Segmentation Merge small neighboring regions Region growing step Split large regions Region splitting Remove weak boundaries between adjacent regions

22 January 20, 2010T0283 - Computer Vision22 Region Growing Seed segmentation (histogram based seg.) Region splitting and merging Phagocyte algorithm Likelihood ratio test

23 January 20, 2010T0283 - Computer Vision23 Region Split and Merge Splitting: split non uniform region into 4 adjacent regions Merging: merge similar regions Stop when no splitting merging are possible Uniformity/similarity function: P

24 January 20, 2010T0283 - Computer Vision24 Example R R R RRRR R R R R R R R R R RRRR R R RR R RR RR R R R R R R R R

25 January 20, 2010T0283 - Computer Vision25 Phagocyte Algorithm Boundary melting Remove weak boundaries Similar to region merging Boundary weakness is based on color similarity R1R1 R2R2

26 January 20, 2010T0283 - Computer Vision26 Phagocyte Algorithm R1R1 R2R2

27 January 20, 2010T0283 - Computer Vision27 Phagocyte Merging Heuristics Merge two regions ifMerge two regions if where P 1 and P 2 are the perimeters of regions R 1 and R 2. Merge regions ifMerge regions if Phagocyte Weakness

28 January 20, 2010T0283 - Computer Vision28 Likelihood Ratio Test Two region hypothesis There is only one region There are indeed two regions Intensity at every pixel is independent Joint probability Gaussian distribution

29 January 20, 2010T0283 - Computer Vision29 Likelihood Ratio Test observing intensity under Gaussian model x 1, x 2, …,x m1  A x m1+1, x m1+2, …,x m1+m2  B Likelihood of region A Likelihood of region B

30 January 20, 2010T0283 - Computer Vision30 Likelihood Ratio Test There is 1 region hypothesis There are 2 regions hypothesis

31 January 20, 2010T0283 - Computer Vision31 Likelihood Ratio Test Merge regions if LH<T.

32 January 20, 2010T0283 - Computer Vision32 Region Growing Methods Different algorithms have different number of thresholds How much merging is required Stopping criterion Though simple, seed segmentation succeed by region growing is usually successful

33 January 20, 2010T0283 - Computer Vision33 Difference Between Segmentation and Edge Detection Closed boundary Edges are usually open Segmentation provides closed boundaries Local or global Edges are computed in the locality Segmentation is global Increasing feature vector dimensionality Does not drastically improve edge detection Improves segmentation (motion, texture information etc.) Boundary position Localized in edge detection Usually not localized (recent advancements use locality as well) Especially contour based segmentation


Download ppt "Lecture 07 Segmentation Lecture 07 Segmentation Mata kuliah: T0283 - Computer Vision Tahun: 2010."

Similar presentations


Ads by Google