Image Segmentation Jesus J Caban Today: Schedule 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. 1
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 2
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 3
Motion Tracking Image Segmentation 4
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 5
Point Detection R T where T : a nonnegative threshold Line Detection 6
Line Detection / Gradient Operators Prewitt masks for detecting diagonal edges Sobel masks for detecting diagonal edges 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) 7
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 8
Multilevel thresholding Global threshold: classify based on T i < f(x,y) T j Where T only considers the gray-level values Local threshold: Classify based on T i < f(x,y) T j Where T considers the gray-level values and its neighbors Basic Global Thresholding use T midway between the max and min gray levels 9
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: G 1 and G 2 3. Compute the average gray level values µ 1 and µ 2 for the pixels in regions G 1 and G 2 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 T o. Example: Heuristic method T 0 = 0 3 iterations with result T = 125 10
The Role of Illumination f(x,y) = i(x,y) r(x,y) Histogram segmentation can be challenging give the illumination changes Global Thresholding 11
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 12
Further subdivision Boundary Characteristic for Histogram Improvement and Local Thresholding light object of dark background 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 - 13
Image segmentation by local thresholding Segmentation: Similarity-based techniques 1. Histogram Thresholding 2. Region Growing and Shrinking 3. Clustering in the color space 14
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) 15
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 16
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 17
Results Region Split and Merge Results Region Split and Merge http://astro.temple.edu/~siddu 18
Segmentation: Similarity-based techniques 1. Histogram Thresholding 2. Region Growing and Shrinking 3. Clustering in the color space Other segmentation techniques 1) Watershed Segmentation 19
Other segmentation techniques Level sets K-mean clustering Etc 20