Transcript Chapter 4

Chapter 10 Image Segmentation

Preview Segmentation subdivides an image into its constituent regions or objects.

Level of division depends on the problem being solved.

Image segmentation algorithms generally are based on one of two basic properties of intensity values: discontinuity (e.g. edges) and similarity (e.g., thresholding, region growing, region splitting and merging)

Chapter Outline Detection of discontinuities Edge linking and boundary detection Thresholding Region-based segmentation Morphological watersheds Motion in segmentation

Detection of Discontinuities Define the response of the mask: 9

R

i

  1

w i z i

Point detection:

R

T

Point Detection Example

Line Detection Masks that extract lines of different directions.

Illustration

Edge Detection An ideal edge has the properties of the model shown to the right: A set of connected pixels, each of which is located at an orthogonal step transition in gray level.

Edge: local concept Region Boundary: global idea

Ramp Digital Edge In practice, optics, sampling and other image acquisition imperfections yield edges that area blurred. Slope of the ramp determined by the degree of blurring.

Zero-Crossings of 2 nd Derivative

Noisy Edges: Illustration

Edge Point We define a point in an image as being an edge point if its 2-D 1 threshold.

st order derivative is greater than a specified A set of such points that are connected according to a predefined criterion of connectedness is by definition an edge.

Gradient Operators Gradient: 

f

  

G G x y

        

f

 

f x

y

     Magnitude: 

f

Direction:  [

G x

2 

G y

2 ] 1 / 2  (

x

,

y

)  tan  1  

G y G x

 

Gradient Masks

Diagonal Edge Masks

Illustration

Illustration (cont ’ d)

Illustration (cont ’ d)

Definition: The Laplacian  2

f

  2 

x

2

f

  2 

y

2

f

Generally not used in its original form due to sensitivity to noise.

Role of Laplacian in segmentation: Zero-crossings Tell whether a pixel is on the dark or light side of an edge.

Laplacian of Gaussian Definition:

h

(

r

)   exp( 

r

2 / 2  2 )  2

h

(

r

)  

r

 4  2   exp( 

r

2 / 2  2 )

Illustration

Edge Linking: Local Processing Link edges points with similar gradient magnitude and direction.

Global Processing: Hough Transform Representation of lines in parametric space: Cartesian coordinate

Hough Transform Representation in parametric space: polar coordinate

Illustration

Illustration (cont ’ d)

Graphic-Theoretic Techniques Minimal-cost path

c

(

p

,

q

) 

H

 [

f

(

p

) 

c f

i k

  2 (

q

)]

c

(

n i

 1 ,

n i

)

Illustration

Example

Thresholding Foundation: background point vs. object point The role of illumination: f(x,y)=i(x,y)*r(x,y) Basic global thresholding Adaptive thresholding Optimal global and adaptive thresholding Use of boundary characteristics for histogram improvement and local thresholding Thresholds based on several variables

Foundation

The Role of Illumination

Basic Global Thresholding

Another Example

Basic Adaptive Thresholding

Basic Adaptive Thresholding (cont ’ d)

Optimal Global and Adaptive Thresholding Refer to Chapter 2 of the “ Pattern Classification ” textbook by Duda, Hart and Stork.

Thresholds Based on Several Variables

Region-Based Segmentation Let R represent the entire image region. We may view segmentation as a process that partitions R into n sub-regions R 1 , R 2 , … , R n such that:

n

(a) 

i

(b) R i  1

R i

R

is a connected region (c)

R i

R j

  (d) P(R i )= TRUE for i=1,2, … n (e) P(R i U R j )= FALSE for i != j

Region Growing

Region-Splitting and Merging

Morphological Watersheds (I)

Morphological Watersheds (II)

Motion-based Segmentation (I)

Motion-based Segmentation (II)