0% found this document useful (0 votes)
85 views35 pages

Digital Image Processing-6

This document discusses morphological image processing techniques. It defines basic operations like dilation and erosion using structuring elements. Dilation expands objects in an image while erosion shrinks them. Opening and closing are also defined as combinations of erosion and dilation. Techniques like connected component extraction, convex hull, thinning, thickening, and skeletonization are described. Morphological operations can be extended to gray-level images. MATLAB functions for implementing morphological operations using structuring elements are also provided.

Uploaded by

Chalan Kunar
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
85 views35 pages

Digital Image Processing-6

This document discusses morphological image processing techniques. It defines basic operations like dilation and erosion using structuring elements. Dilation expands objects in an image while erosion shrinks them. Opening and closing are also defined as combinations of erosion and dilation. Techniques like connected component extraction, convex hull, thinning, thickening, and skeletonization are described. Morphological operations can be extended to gray-level images. MATLAB functions for implementing morphological operations using structuring elements are also provided.

Uploaded by

Chalan Kunar
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
You are on page 1/ 35

Digital Image Processing

Morphological Image Processing (2)


Topics
 Morphological Operations
 Connected Component Extraction
 Convex Hull
 Thinning
 Thickening
 Skeleton
 Pruning
 Extension to gray level images
 Matlab Examples
Dilation and Erosion
 Dilation and Erosion are two basic operations in
morphological processing.
 Dilation of a set A in Z2 by a set B in Z2 is denoted by A B
and given by
Dilation
 The dilation of A by B is the set of all displacements such that
A and overlap with at least one point

 B is called structuring element


Dilation
Erosion
 Erosion of a set A in Z2 by a set B in Z2 is denoted by
and given by:

Erosion of A by B is the set of all points z such that B


translated by z is contained in A
Erosion
Opening
 Opening smoothes the outer contours, breaks narrow
connections, and eliminates small protrusions.

 Opening is defined as :
Closing
 Closing smoothes the object contour, fuses narrow
connections, eliminates small holes and gaps.
Extraction of Connected Components
 Begin with a point P inside the connected component,
iterate:

Until Xk = Xk-1
Initially X0 = P
Connected Component Extraction
Convex Hull
 A set is said convex if the straight line connecting any two
points of the set lies entirely within A.
 Convex Hull of set S is the smallest convex set A that
contains S
 The set difference A-S is called the convex deficiency of S
Computing Convex Hull
 Let Bi for i=1,2,3,4 represent the structuring elements
shown below
Convex Hull
 Repeat the following equation until converge

with

is the Hit-or-Miss operator

4
Assuming Convex Hull is C ( A)   D i
i 1
Example (Convex Hull)
Improving Convex Hull Algorithm
 The algorithm can be improved by limiting the growth of the
algorithm beyond the maximum dimensions of the original
set.
Thinning and Thickening
 Thinning is an image-processing operation in which binary
valued image regions are reduced to lines
 The purpose of thinning is to reduce the image components
to their essential information for further analysis and
recognition
 Thickening is changing a pixel from 1 to 0 if any neighbors of
the pixel are 1.
 Thickening followed by thinning can be used for filling
undesirable holes.
 Thinning followed by thickening is used for determining
isolated components and clusters.
Thinning
 Thinning is defined in terms of hit or miss as

where B is a sequence of structuring elements like


{B} = {B1, B2, B3, …, Bn} and the operation can be given as
Thinning
 Sample set of structuring elements
Thinning Example
Thickening
 Thickening is the morphological dual of thinning and defined
as

or
Thickening Example
Skeleton
 The informal definition of a skeleton is a line representation
of an object that is:
 one-pixel thick,
 through the "middle" of the object, and,
 preserves the topology of the object.
Skeleton
 Skeleton is defined by

where

k is the last iterative step before A erodes to an empty set


Skeleton Example
Pruning
 Thinning and skeletonizing algorithms need a clean-up post-
processing
 The following steps are used for pruning:

 Thinning
 Find the end points

 Dilate end points

 Find the union of X1 and X3


Pruning Example
 Original image and structuring elements
Pruning Example
 Result of thinning and end points detected
Pruning Example
 Dilation of end points and the pruned image
Extension to Gray Level
 Dilation is expressed in 1D as

 Erosion is given by
Extension to Gray Level (2D Case)
 Dilation

 Erosion
Morphological Operations in MATLAB
 To create structuring element use strel(.)
SE = strel(shape, parameters)
Examples:
SE = strel('arbitrary', NHOOD)
SE = strel('diamond', R)
SE = strel('disk', R, N)
SE = strel('line', LEN, DEG)
SE = strel('octagon', R)
SE = strel('pair', OFFSET)
SE = strel('periodicline', P, V)
SE = strel('rectangle', MN)
SE = strel('square', W)
Morphological Operations in MATLAB
 SE=strel(NHOOD) is also a valid call for the function
 Use imerode(Im,SE) and imdialte(Im,SE) for erosion and
dilation respectively
 Use imopen(Im,SE) and imcolose(Im,SE) for openning and
closing
 For hit-or-miss use bwhitmiss(.)
 BW2 = bwhitmiss(BW1,SE1,SE2)
BW2 = bwhitmiss(BW1,INTERVAL)
Hit or Miss Example
Questions?

You might also like

pFad - Phonifier reborn

Pfad - The Proxy pFad of © 2024 Garber Painting. All rights reserved.

Note: This service is not intended for secure transactions such as banking, social media, email, or purchasing. Use at your own risk. We assume no liability whatsoever for broken pages.


Alternative Proxies:

Alternative Proxy

pFad Proxy

pFad v3 Proxy

pFad v4 Proxy