Image Segmentation - Inspiring Innovation · 11/2/10 15 Region-Based Segmentation! A simple...

20
11/2/10 1 Jesus J Caban Image Segmentation Schedule Today: Image Segmentation Topic : Matting ( P. Bindu ) Assignment #3 distributed Monday: Revised proposal due Topic: Image Warping ( K. Martinez ) Topic: Image Deformation ( D. Mann ) Remember to submit your questions….

Transcript of Image Segmentation - Inspiring Innovation · 11/2/10 15 Region-Based Segmentation! A simple...

Page 1: Image Segmentation - Inspiring Innovation · 11/2/10 15 Region-Based Segmentation! A simple approach to image segmentation is to start from some pixels (seeds) representing distinct

11/2/10  

1  

Jesus J Caban

Image Segmentation

Schedule   Today:

  Image Segmentation   Topic : Matting ( P. Bindu )   Assignment #3 distributed

  Monday:   Revised proposal due   Topic: Image Warping ( K. Martinez )   Topic: Image Deformation ( D. Mann )

Remember to submit your questions….

Page 2: Image Segmentation - Inspiring Innovation · 11/2/10 15 Region-Based Segmentation! A simple approach to image segmentation is to start from some pixels (seeds) representing distinct

11/2/10  

2  

Final Project   11/3: Annotated Bibliography

  Final Presentations   12/01:   12/06:   12/08:   12/13:   12/20: ???

+5 bonus points

+3 bonus points

+2 bonus points

+0 bonus points

Wes, Niyati, and ???

http://www.surveymonkey.com/s/SimpleITKCommunitySurvey

Page 3: Image Segmentation - Inspiring Innovation · 11/2/10 15 Region-Based Segmentation! A simple approach to image segmentation is to start from some pixels (seeds) representing distinct

11/2/10  

3  

Assignment #3a: View Morphing   The aim is to find “an average” between two objects

 We are looking for the average object!  How can we make a smooth transition in time?

  Do a “weighted average” over time t

Slide credit: Alyosha Efros

Assignment #3b: Motion Tracking

Page 4: Image Segmentation - Inspiring Innovation · 11/2/10 15 Region-Based Segmentation! A simple approach to image segmentation is to start from some pixels (seeds) representing distinct

11/2/10  

4  

Motion Tracking

Image Segmentation

Page 5: Image Segmentation - Inspiring Innovation · 11/2/10 15 Region-Based Segmentation! A simple approach to image segmentation is to start from some pixels (seeds) representing distinct

11/2/10  

5  

Introduction: Image Segmentation For the most part there are two kinds of approaches to

segmentation   Discontinuity

  requires boundary and/or edge detection

  Similarity   Image regions generally have homogeneous characteristics (e.g.

intensity, texture)

Detection of Discontinuities   There are three kinds of discontinuities of intensity:

  Points   Lines   Edges

Page 6: Image Segmentation - Inspiring Innovation · 11/2/10 15 Region-Based Segmentation! A simple approach to image segmentation is to start from some pixels (seeds) representing distinct

11/2/10  

6  

Point Detection

R ≥Twhere T : a nonnegative threshold

Line Detection

Page 7: Image Segmentation - Inspiring Innovation · 11/2/10 15 Region-Based Segmentation! A simple approach to image segmentation is to start from some pixels (seeds) representing distinct

11/2/10  

7  

Prewitt masks for detecting diagonal edges

Sobel masks for detecting diagonal edges

Line Detection / Gradient Operators

Introduction: Image Segmentation For the most part there are two kinds of approaches to

segmentation   Discontinuity

  requires boundary and/or edge detection

  Similarity   Image regions generally have homogeneous characteristics (e.g.

intensity, texture)

Page 8: Image Segmentation - Inspiring Innovation · 11/2/10 15 Region-Based Segmentation! A simple approach to image segmentation is to start from some pixels (seeds) representing distinct

11/2/10  

8  

Segmentation: Similarity-based techniques

1.  Histogram Thresholding 2.  Region Growing and Shrinking 3.  Clustering in the color space

Thresholding

image with dark background and a light object

image with dark background and two light objects

Page 9: Image Segmentation - Inspiring Innovation · 11/2/10 15 Region-Based Segmentation! A simple approach to image segmentation is to start from some pixels (seeds) representing distinct

11/2/10  

9  

Multilevel thresholding

 Global threshold:   classify based on Ti < f(x,y) ≤ Tj

 Where T only considers the gray-level values

  Local threshold:  Classify based on Ti < f(x,y) ≤ Tj  Where T considers the gray-level values and its neighbors

Basic Global Thresholding

use T midway between the max and min gray levels

Page 10: Image Segmentation - Inspiring Innovation · 11/2/10 15 Region-Based Segmentation! A simple approach to image segmentation is to start from some pixels (seeds) representing distinct

11/2/10  

10  

Basic Global Thresholding Based on visual inspection of histogram

1.  Select an initial estimate for T.

2.  Segment the image using T. This will produce two groups of pixels: G1 and G2

3.  Compute the average gray level values µ1 and µ2 for the pixels in regions G1 and G2

4.  Compute a new threshold value T = 0.5 (µ1 + µ2)

5.  Repeat steps 2 through 4 until the difference in T in successive iterations is smaller than a predefined parameter To.

Example: Heuristic method

T0 = 0 3 iterations with result T = 125

Page 11: Image Segmentation - Inspiring Innovation · 11/2/10 15 Region-Based Segmentation! A simple approach to image segmentation is to start from some pixels (seeds) representing distinct

11/2/10  

11  

The Role of Illumination

f(x,y) = i(x,y) r(x,y) Histogram segmentation can be challenging give the illumination changes

Global Thresholding

Page 12: Image Segmentation - Inspiring Innovation · 11/2/10 15 Region-Based Segmentation! A simple approach to image segmentation is to start from some pixels (seeds) representing distinct

11/2/10  

12  

Basic Adaptive Thresholding

1.  subdivide original image into small areas. 2.  utilize a different threshold to segment each subimages. 3.  since the threshold used for each pixel depends on the

location of the pixel in terms of the subimages, this type of thresholding is adaptive.

Example : Adaptive Thresholding

Page 13: Image Segmentation - Inspiring Innovation · 11/2/10 15 Region-Based Segmentation! A simple approach to image segmentation is to start from some pixels (seeds) representing distinct

11/2/10  

13  

Further subdivision

Boundary Characteristic for Histogram Improvement and Local Thresholding

  Gradient gives an indication of whether a pixel is on an edge   Laplacian can yield information regarding whether a given pixel lies on the

dark or light side of the edge   all pixels that are not on an edge are labeled 0   all pixels that are on the dark side of an edge are labeled +   all pixels that are on the light side an edge are labeled -

light object of dark background

Page 14: Image Segmentation - Inspiring Innovation · 11/2/10 15 Region-Based Segmentation! A simple approach to image segmentation is to start from some pixels (seeds) representing distinct

11/2/10  

14  

Image segmentation by local thresholding

Segmentation: Similarity-based techniques

1.  Histogram Thresholding 2.  Region Growing and Shrinking 3.  Clustering in the color space

Page 15: Image Segmentation - Inspiring Innovation · 11/2/10 15 Region-Based Segmentation! A simple approach to image segmentation is to start from some pixels (seeds) representing distinct

11/2/10  

15  

Region-Based Segmentation   A simple approach to image segmentation is to start from some pixels

(seeds) representing distinct image regions and to grow them, until they cover the entire image

  For region growing we need a rule describing a growth mechanism and a rule checking the homogeneity of the regions after each growth step   growing by appending to each seed those neighbors that have similar

properties

Region Growing

criteria: 1.  the absolute gray-level difference

between any pixel and the seed has to be less than 65

2.  the pixel has to be 8-connected to at least one pixel in that region (if more, the regions are merged)

Page 16: Image Segmentation - Inspiring Innovation · 11/2/10 15 Region-Based Segmentation! A simple approach to image segmentation is to start from some pixels (seeds) representing distinct

11/2/10  

16  

Split / Merge

  The opposite approach to region growing is region shrinking ( splitting ).

  It is a top-down approach and it starts with the assumption that the entire image is homogeneous

  If this is not true , the image is split into four sub images   This splitting procedure is repeated recursively until we split the

image into homogeneous regions

Split / Merge

Quadtree

R0 R1

R2 R3

R0

R1

R00 R01 R02 R04

Page 17: Image Segmentation - Inspiring Innovation · 11/2/10 15 Region-Based Segmentation! A simple approach to image segmentation is to start from some pixels (seeds) representing distinct

11/2/10  

17  

Split / Merge   Splitting techniques disadvantage, they create regions that

may be adjacent and homogeneous, but not merged.

  Split and Merge method – It is an iterative algorithm that includes both splitting and merging at each iteration:   If a region R is inhomogeneous: split into four sub regions   If two adjacent regions are homogeneous: merge  Repeat until no further splitting or merging is possible

Results – Region grow

Page 18: Image Segmentation - Inspiring Innovation · 11/2/10 15 Region-Based Segmentation! A simple approach to image segmentation is to start from some pixels (seeds) representing distinct

11/2/10  

18  

Results – Region Split and Merge

http://astro.temple.edu/~siddu

Results – Region Split and Merge

Page 19: Image Segmentation - Inspiring Innovation · 11/2/10 15 Region-Based Segmentation! A simple approach to image segmentation is to start from some pixels (seeds) representing distinct

11/2/10  

19  

Segmentation: Similarity-based techniques

1.  Histogram Thresholding 2.  Region Growing and Shrinking 3.  Clustering in the color space

Other segmentation techniques 1) Watershed Segmentation

Page 20: Image Segmentation - Inspiring Innovation · 11/2/10 15 Region-Based Segmentation! A simple approach to image segmentation is to start from some pixels (seeds) representing distinct

11/2/10  

20  

Other segmentation techniques   Level sets   K-mean clustering   Etc…