Professional Documents
Culture Documents
Chapter 10:
Image Segmentation
Element of Image Analysis
Preprocess
Image acquisition, restoration, and enhancement
Intermediate process
Image segmentation and feature extraction
ISAN-DSP GROUP
Importance of Image Segmentation
Image segmentation is used to separate an image into constituent
parts based on some image attributes. Image segmentation is an
important step in image analysis
Benefit
1. Image segmentation reduces huge amount of unnecessary
data while retaining only importance data for image analysis
2. Image segmentation converts bitmap data into better
structured data which is easier to be interpreted
Image Attributes for Image Segmentation
. Similarity properties of pixels inside the object are used to group
ixels into the same set.
. Discontinuity of pixel properties at the boundary between object
nd background is used to distinguish between pixels belonging to
he object and those of background.
Discontinuity:
Intensity change
at boundary
Similarity:
Internal
pixels share
the same
intensity
Spatial Filtering Application to Shape Detection
This mask will give the high response to the object that has the
similar shape as the mask such as isolated points.
Location of
porosity
X-ray image of the Laplacian image After thresholding
turbine blade with
porosity (Images from Rafael C. Gonzalez and Richard E.
Wood, Digital Image Processing, 2nd Edition.
Line Detection
There are several directions that the line in a digital image can be.
For a simple line detection, 4 directions that are mostly used are
Horizontal, +45 degree, vertical and –45 degree.
Absolute value
of result after Result after
processing with thresholding
-45 line detector
Blurred edge
Edge
Original image
Intensity
1
0.8
Edge
Gray level profile 0.6
0.4
0.2
0
-0.2
-1.5 -1 -0.5 0 0.5 1 1.5 2 2.5 3 3.5
0.06 Minimum
0.04
0.02 point
The 1st derivative 0
-0.02
-0.04 Maximum
-0.5point
-0.06
-1.5 -1 0 0.5 1 1.5 2 2.5 3 3.5
x 10-3 Zero
5
4
3
crossing
2
1
+ +
The 2nd derivative 0
-1 - -
-2
-3
-4
-5
-1.5 -1 -0.5 0 0.5 1 1.5 2 2.5 3 3.5
Derivative Based Edge Detection
df d2 f Derivative operator is
f(x) a highpass filter and
dx dx 2
thus enhances noise.
Edge responses
AWGN = 1.0
are buried by
noise.
AWGN = 10
(Images from Rafael C. Gonzalez and Richard E.
Wood, Digital Image Processing, 2nd Edition.
Gradient Operators
• First-order derivatives:
– The gradient of an image f(x,y) at location (x,y) is defined
as the vector:
G x f
x
f f
G y y
– The magnitude of this vector: f mag(f ) G G 2
x
2
y
1
2
Gx
– The direction of this vector: ( x, y ) tan
1
Gy
Masks for Estimating Partial Derivatives
f ( x, y ) f
y
f f f
x x y
f f f
x x y
x y
4
Surface plot of
LOG, Looks like
a “Mexican hat” LOG image
T = 102
500
Background
400
300
bacteria
200
100
2. T1 Average ( p( x, y ) p( x, y ) T )
3. T2 Average ( p( x, y ) p( x, y ) T )
T1 T2
4. T
2
5. Repeat step 2
Automatic Threshold Level Selection Example
200
T1 = 158
150
T2 = 196
100
50
T3 = 228
0
Illumination
Function i(x,y)
Image histogram
f(x,y)
Local thresholding:
. Divide an image into subimages.
. Threshold each subimage independently
2.1 Compute histogram of each subimage and select a suitable
threshold value for each subimage
2.2 threshold each subimage using a threshold value in 2.1
2.3 Combine all local thresholding results
Error
900
800
700
600
500
400
300
200
100
T=0.4
Error due to object pixels
E (T ) p1 ( z )dz
classified as background pixels is: 2
T
In this example,
we can find the
license plate
candidate after
edge linking
process.
Edge Linking and Boundary Detection
Global Processing via the Hough Transform
2,3,4
1,4
Edge Linking and Boundary Detection
Hough Transform Example
Region-Based Segmentation
Histogram
Region Splitting
ISAN-DSP GROUP
Region Splitting and Merging Example
Intensity
1
0.8
Edge
Gray level profile 0.6
0.4
0.2
0
-0.2
-1.5 -1 -0.5 0 0.5 1 1.5 2 2.5 3 3.5
0.06 Minimum
0.04
0.02 point
The 1st derivative 0
-0.02
-0.04 Maximum
-0.5point
-0.06
-1.5 -1 0 0.5 1 1.5 2 2.5 3 3.5
x 10-3 Zero
5
4
3
crossing
2
1
+ +
The 2nd derivative 0
-1 - -
-2
-3
-4
-5
-1.5 -1 -0.5 0 0.5 1 1.5 2 2.5 3 3.5
Derivative Based Edge Detection