Image Segmentation I
Image Segmentation I
Image Segmentation
1
Outline
• What is Image segmentation
• Different Approaches for Image Segmentation
– Discontinuity based
– Region based
• Different Edge Detection operators
• Linking of edge points
– Local processing
– Global processing (Hough Transform)
2
Image analysis
• It is the extraction of meaningful information from images
• Computers are vital for the analysis of large amounts of data, for tasks that
require complex computation, or for the extraction of quantitative
information.
• On the other hand, the human visual cortex is an excellent image analysis
apparatus, especially for extracting higher-level information, and for many
applications — including medicine, security, and remote sensing — human
analysts still cannot be replaced by computers.
• For this reason, many important image analysis tools such as edge
detectors and neural networks are inspired by human visual perception
models.
3
Image analysis: Techniques
• There are many different techniques used in automatically analyzing
images.
6
Categorization of Image Segmentation
approaches
• Two approaches
• Discontinuity Based segmentation (methods that
are based on detecting sharp, local changes in
intensity)
– Isolated points
– Lines
– Edges
• Similarity based
– Thresholding
– Region growing
– Region splitting and Merging
7
Discontinuity based Approaches
• Points
Detected through
• Edges Mask processing
• lines
• An isolated point may be viewed as a foreground (background) pixel
surrounded by background (foreground) pixels
Non-Negative Threshold T,
is compared with filter
11
response
Point detection
12
Point detection
13
Line Detection
14
15
Line Detection
16
Line Detection
For Mask i and mask j, the line is directed in the
direction of mask i
17
Edges
18
Edges
19
Edge Detection
20
Edge Detection
Because of Quantization and sampling all the abrupt
changes/transitions are converted to gradual
transitions Intensity profile along a horizontal scan
line.
Second derivative are sensitive to noise, but can be used
to give us secondary information use the sign of the 2nd
derivative to tell either the point are on the darker side
or brighter side. And the zero crossing can give us exact
location of the boundary when there is a gradual
transition between two regions.
21
Edge and line in a single figure
You can think of a line as being two opposite edges very close
together.
23
Gradient Operator
27
Gradient Direction
28
Edge Operators
29
Prewitt Edge Operator
30
Sobel Edge Operator
32
Sobel Edge detection example
33
Edge detection with Thresholding
34
Diagonal Edge detection
35
2nd Derivative operator
36
LoG
37
LoG
40
Edge linking: Local Processing
They are similar, if:
41
Edge Linking and Boundary Detection
Local Processing: Example
In this example,
we can find the
license plate
candidate after
edge linking
process.
Hough Transform
44
Hough Transform, many lines passing
through a single point (x1,y1) in xy
plane
45
Hough Transform
Many line passing through a single point in xy plane becomes a single line
in mc plane, with x1 and y1 as the slope and C-intercept 46
Hough Transform
48
Hough Transform
If many boundary points,
there would still be one
particular red line
49
Hough Transform
A(i,j) corresponds
to mi and cj
Initialized A(i,j) =0
• Suppose A(i,j) =Q , where Q is the number of points in the xy-plane that are part of
a line with ci and mj as the specific intercept and slope. And if we want to keep this
line in our output Hough transd image then the equation of this line is given by
y=mix +cj
54
Hough Transform (Normal
Representation of a straight line)
Maximum values of theta and row
55
Hough Transform (Normal
Representation of a straight line)
56
The rest of the story is similar with
that to mc plane described earlier
57
The rest of the story is similar with
that to mc plane described earlier
58
A particular line equation selected
from the row-theta grid
59
As before see the boundary points in
xy plane and the row-theta plane its
zero crossings highlighting significant
lines to be retained,
60
Segmentation followed by edge linking
through hough transform
61
Extra slides for reference
62
Detection of Discontinuities
Gradient Operators: Example
f G x + G y
Detection of Discontinuities
Gradient Operators: Example
Detection of Discontinuities
Gradient Operators: Example
Detection of Discontinuities
Gradient Operators
Gaussian mask
References
• Gonzalez R. C. & Woods R.E. (2008). Digital Image Processing. Prentice
Hall.
• Forsyth, D. A. & Ponce, J. (2011).Computer Vision: A Modern Approach.
Pearson Education.
67