230 likes | 260 Views
ECE 692 – Advanced Topics in Computer Vision. Lecture 5 – Segmentation 02/16/16. Goals of image processing - revisit. Image improvement – low level IP Improvement of pictorial information for human interpretation (Improving the visual appearance of images to a human viewer)
E N D
ECE 692 – Advanced Topics in Computer Vision Lecture 5 – Segmentation 02/16/16
Goals of image processing - revisit • Image improvement – low level IP • Improvement of pictorial information for human interpretation (Improving the visual appearance of images to a human viewer) • Image analysis – high level IP • Processing of scene data for autonomous machine perception (Preparing images for measurement of the features and structures present)
HLIP segmentation Objects & regions Image Description & Representation Understanding, Decisions, Knowledge recognition Features
Image segmentation • Based on two properties of gray-level image values • Discontinuity • Edge detection • Similarity • Thresholding • Region growing / splitting / merging
Image segmentation Segmentation Detect discontinuity Detect similarity Edge detection Zero crossing (LoG) Gradient operator edge Edge linking
Edge detection • Compute the local derivative • Magnitude of the 1st derivative can be used to detect the presence of an edge • The sign of the 2nd derivative can be used to determine whether an edge pixel lies on the dark or light side of an edge • Zero crossing at the midpoint of a transition in gray level, which provides a powerful approach for locating the edge
Gradient operator • Use gradient for image differentiation • The gradient of an image f(x,y) at location (x,y) is the vector • Some properties about this gradient vector • It points in the direction of maximum rate of change of image at (x,y) • Magnitude: • Direction (angle is measured w.r.t x axis):
Sobel edge detector • Advantages: • Providing both differencing and a smoothing effect -1 -2 -1 -1 0 1 0 0 0 -2 0 2 1 2 1 -1 0 1
0 -1 0 -1 4 -1 0 -1 0 Laplacian edge detector • A second order derivative • Problems: • Very sensitive to noise • Detect double edges • Can’t detect edge direction • Usage: • Find the location of edge using zero-crossings property
Marr and Hildreth’s approach • Smooth the image first to reduce noise • Then compute the 2nd derivative • Finally, find zero-crossings • LoG (Laplacian of Gaussian)
Sobel Threshold=50 Laplacian Threshold=30 Marr-Hildreth Std=3.0
angiogram Sobel, thresh=40 Laplacian, thresh=15 Marr-Hildreth (std = 3.0, std=5.0, std=7.0)
Edge linking • How to deal with gaps in edges? • How to deal with noise in edges? • Linking points by determining whether they lie on a curve of a specified shape
Hough transform • Can tolerate noise and gaps in edge image • Look for solutions in a parameter space • Classical Hough transform • Detect simple shapes • Line detection • Circle detection • Generalized Hough transform • Detect complicate shapes
Problem with Cartesian coordinate • Polar coordinate
Gradient operator Zero crossing (LoG) Image segmentation Segmentation Detect discontinuity Detect similarity Edge detection Optimal thresholding Boundary thresholding edge Hough Transform Region growing Edge linking
Optimal thresholding using Otsu’s method • Assumes the image histogram is bi-modal • Maximizes between-class variance
Boundary thresholding • The chances of selecting a “good” threshold will be considerably enhanced if the histogram peaks are tall, narrow, symmetric, and separated by deep valleys. • Approach to improve the shape of histogram • Only consider those pixels that lie on or near the boundary (edge)
Region growing • Step 1: Assume we find a good threshold, and use it to partition the regions into pure black and white • Step 2: Use different labels to identify different objects • Use region growing to connect parts that should have belonged to the same region • This is called “Connected component analysis” • The regions with the same label generate one segment
1 1 2 2 Example (need 2 scans) 41 541 21 1 1 2 2 3 3 1 1 4 4 4 4 4 4 4 4 2 2 3 3 1 1 4 4 4 4 4 4 4 4 2 2 3 3 1 1 4 4 4 4 2 2 3 3 1 1 4 4 4 4 2 2 3 3 1 1 4 4 4 4 2 2 3 3 1 1 4 4 4 4 2 2 3 3 1 1 1 1 1 1 5 5 1 1 2 2 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1