Title: IMAGE SEGMENTATION
1TOPIC 12 IMAGE SEGMENTATION MORPHOLOGY
2SEGMENTATION
Image segmentation is approached from three
different perspectives .Region detection
each pixel is assigned to a particular object or
region. .Boundary detection one attempts to
detect the boundaries that exist between
regions. .Edge detection one seeks to identify
edge pixels and then link them together to form
a connected boundary.
3THRESHOLDING
4THE LAPLACIAN OPERATOR
5THE LAPLACIAN OPERATOR IN PRACTICE
6PROPERTIES OF THE LAPLACIAN OPERATOR
- If the area around the pixel has a constant grey
level - then application of the kernel results in a grey
level - value of 0
- The average grey level is 0
- Negative values are possible. In practice this
can be - avoided by defining zero to be the grey value
128 - The kernel is not direction sensitive in the
sense of - preferentially selecting either vertical or
horizontal - edges.
7(No Transcript)
8ALTERNATIVE FORM OF THE LAPLACIAN
9ROBERTS OPERATOR
10SOBEL OPERATOR
11THE SOBEL OPERATOR
The Sobel operator is one of those most commonly
used and has received special attention because
it can be performed in real time (lt 1/30 sec.
Per image) which makes it attractive for
military tracking applications.
12The Canny Edge Detector
- The Canny edge detector is an example of an
optimal edge detector in that it claims to
optimise the edge detecting process. Its
operation is however quite complex. - It works as a multi stage process
- The image is smoothed with a Gaussian
convolution. - A simple 2D operator (similar to the Roberts) is
applied to highlight regions with a high
gradient. - Edges give rise to ridges in the gradient image
the algorithm then tracks along these ridges
marking a trail 1 pixel wide on the top of the
ridge. - Two parameters control the process (a) which is
the lowest point on a ridge that tracking begins
and (b) blta is the point at which tracking ceases
when the height of the ridge falls below this
value.
13The Canny edge detector in action
a 0.0938
b 0.0375
14(No Transcript)
15Edge detection in MATLAB
function UsingEdge To edge detect a butterfly A
imread('moth9.gif') BW,thresh
edge(A,'sobel',0.04) imshow(BW) thresh
Thresh0.04
Thresh0.06
16A MORPHOLOGICAL TRANSFORMATION
A morphological transformation is one where a
structuring element (usually 3x3 but could be
larger) is passed over the binary image and a
logical operation performed (e.g. AND, OR, NOT,
XOR in simple cases) on a pixel by pixel basis.
The structuring element is also binary in form
17BASIC EROSION
This is the process of eliminating all boundary
points from an element. In other words if a
pixel with a value 1 has an immediate neighbour
with a value 0 the pixel value is set to 0. Note
the pixel values are not continuously updated
during the transformation otherwise the result
would be a blank image !
18EROSION APPLICATION
19FORMAL DEFINITION OF EROSION
20DILATION
Dilation is the inverse of erosion where any
pixel adjacent to a pixel of value 1 is changed
to 1
21Thinning Erosion can be programmed as a two step
process so that objects are not broken up. In
the first step candidate pixels are marked for
deletion but not deleted. In the second pass
pixels are eliminated only if they would not
destroy the connectivity of the object. Thinning
reduces objects to a single pixel wide line
highlighting line topology
22THINNING
23Opening The process of erosion followed by
dilation is known as opening. It has the effect
of eliminating small objects, smoothing the
boundaries of large objects without
significantly changing their area. In other words
a good combination for cleaning up a segmented
image.
24Closing The process of dilation followed
erosion is known as closing. It has the effect
of filling small and thin holes and smoothing
boundaries without changing the area of larger
objects.
25Shrinking If erosion is implemented in such a
way that single pixel objects are left intact
the process is known as shrinking. It is a
useful way of counting the size distribution of
objects in the scene by successive shrinking
followed by counting the change in the number of
single pixel objets in the image.
26Skeletonisation This process is very similar to
thinning and can also be achieved by a two pass
process. The essential difference is that
skeletonisation retains the full dimension of
the object.
27ANALYSIS PIPELINE
28UNDERSTANDING A PRINTED CIRCUIT BOARD
29Using convolution for filtering
30Convolution and Correlation
Convolution
Finds its principal application in high and low
pass filtering
Correlation
Finds its principal application in template
matching
31Example of using filter2
function UsingMask Edge detection using a mask A
imread('moth9.gif') smooth the image mask
1 1 11 1 11 1 1 multiplier 1/(2559) mask
multiplier.mask BW filter2(mask,A) imshow(
BW)
The mask
32An improved filtering mask to remove noise
33DILATION