0% found this document useful (0 votes)
11 views37 pages

Lecture 8

This document discusses applications of morphology in computer graphics and image processing. It begins by stating that morphological operations can be used after segmentation to remove imperfections and provide structural information about an image. It then covers basic morphological concepts like structuring elements, erosion, dilation, and compound operations like opening and closing. Examples are provided to illustrate how these operations can split or join objects. The document concludes by discussing morphological algorithms for tasks like boundary extraction and region filling.

Uploaded by

Behind The Side
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)
11 views37 pages

Lecture 8

This document discusses applications of morphology in computer graphics and image processing. It begins by stating that morphological operations can be used after segmentation to remove imperfections and provide structural information about an image. It then covers basic morphological concepts like structuring elements, erosion, dilation, and compound operations like opening and closing. Examples are provided to illustrate how these operations can split or join objects. The document concludes by discussing morphological algorithms for tasks like boundary extraction and region filling.

Uploaded by

Behind The Side
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/ 37

Applications of Morphology

Computer Graphics and Image Processing


Lecture 8

Muhammad Usman Ghani Khan

Department of Computer Science & Engineering


UET, Lahore

Autumn Semester

Computer Graphics and Image Processing - Lecture 8


Applications of Morphology

Outline

1 Applications of Morphology

Computer Graphics and Image Processing - Lecture 8


Applications of Morphology

Agenda

Today Discussion
Once segmentation is complete, morphological operations
can be used to remove imperfections in the segmented
image and provide information on the form and structure of
the image
In this lecture we will consider
What is morphology?
Simple morphological operations
Compound operations
Morphological algorithms

Computer Graphics and Image Processing - Lecture 8


Applications of Morphology

1, 0, Black & White?

Throughout all of the following slides whether 0 and 1 refer


to white or black is a little interchangeable
All of the discussion that follows assumes segmentation
has already taken place and that images are made up of
0s for background pixels and 1s for object pixels
After this it doesn’t matter if 0 is black, white, yellow, green

Computer Graphics and Image Processing - Lecture 8


Applications of Morphology

Morphology - Definition

Morphology: a branch of biology that deals with the form


and structure of animals and plants
Morphological image processing is used to extract image
components for representation and description of region
shape, such as boundaries, skeletons, and the convex hull

Computer Graphics and Image Processing - Lecture 8


Applications of Morphology

What Is Morphology?

Definition
Morphological image processing (or morphology)
describes a range of image processing techniques that
deal with the shape (or morphology) of features in an
image

Uses of Morphology
Morphological operations are typically applied to remove
imperfections introduced during segmentation, and so
typically operate on bi-level images

Computer Graphics and Image Processing - Lecture 8


Applications of Morphology

Quick Example

Computer Graphics and Image Processing - Lecture 8


Applications of Morphology

Structuring Elements, Hits & Fits

Fit: All on pixels in the structuring


element cover on pixels in the
image
Hit: Any on pixel in the
structuring element covers an on
pixel in the image
All morphological processing operations are based on these simple ideas

Computer Graphics and Image Processing - Lecture 8


Applications of Morphology

Structuring Elements, Hits & Fits

Fit: All on pixels in the structuring


element cover on pixels in the
image
Hit: Any on pixel in the
structuring element covers an on
pixel in the image

Computer Graphics and Image Processing - Lecture 8


Applications of Morphology

Structuring Elements

Structuring elements can be any size and make any shape


However, for simplicity we will use rectangular structuring
elements with their origin at the middle pixel

Computer Graphics and Image Processing - Lecture 8


Applications of Morphology

Fitting & Hitting

Computer Graphics and Image Processing - Lecture 8


Applications of Morphology

Fitting & Hitting

Computer Graphics and Image Processing - Lecture 8


Applications of Morphology

Fundamental Operations

1 Fundamentally morphological image processing is very


like spatial filtering
2 The structuring element is moved across every pixel in the
original image to give a pixel in a new processed image
3 The value of this new pixel depends on the operation
performed
4 There are two basic morphological operations: erosion and
dilation

Computer Graphics and Image Processing - Lecture 8


Applications of Morphology

Erosion

Erosion of image f by structuring element s is given by


f s
The structuring element s is positioned with its origin at
(x, y ) and the new pixel value is determined using the rule:

Computer Graphics and Image Processing - Lecture 8


Applications of Morphology

Erosion Example 1

In these examples a 1 refers to a black pixel!

Computer Graphics and Image Processing - Lecture 8


Applications of Morphology

Erosion Example 2

Computer Graphics and Image Processing - Lecture 8


Applications of Morphology

What Is Erosion For?


Erosion can split apart joined objects

Erosion can strip away extrusions

Erosion shrinks objects


Computer Graphics and Image Processing - Lecture 8
Applications of Morphology

Dilation

Erosion of image f by structuring element s is given by


f ⊕s
The structuring element s is positioned with its origin at
(x, y ) and the new pixel value is determined using the rule:

Computer Graphics and Image Processing - Lecture 8


Applications of Morphology

Dilation Example 1

In these examples a 1 refers to a black pixel!

Computer Graphics and Image Processing - Lecture 8


Applications of Morphology

Dilation Example 2

Computer Graphics and Image Processing - Lecture 8


Applications of Morphology

What Is Dilation Used For?


Dilation can repair breaks

Dilation can repair intrusions

Erosion enlarge objects


Computer Graphics and Image Processing - Lecture 8
Applications of Morphology

Compound Operations

More interesting morphological operations can be


performed by performing combinations of erosions and
dilations
The most widely used of these compound operations are:
Opening
Closing

Computer Graphics and Image Processing - Lecture 8


Applications of Morphology

Opening

Opening of image f by structuring element s denoted by


f ◦ s is simply an erosion followed by a dilation

f ◦ s = (f s) ⊕ s (1)

Note a disc shaped structuring element is used

Computer Graphics and Image Processing - Lecture 8


Applications of Morphology

Opening Example

Computer Graphics and Image Processing - Lecture 8


Applications of Morphology

Closing

Closing of image f by structuring element s denoted by f · s


is simply dilation followed by erosion

f · s = (f ⊕ s) s (2)

Note a disc shaped structuring element is used

Computer Graphics and Image Processing - Lecture 8


Applications of Morphology

Closing Example

Computer Graphics and Image Processing - Lecture 8


Applications of Morphology

Morphological Processing Example

Computer Graphics and Image Processing - Lecture 8


Applications of Morphology

Morphological Algorithms

Using the simple technique we have looked at so far we


can begin to consider some more interesting
morphological algorithms
We will look at:
Boundary extraction
Region filling
There are lots of others as well though:
Extraction of connected components
Thinning/thickening
Skeletonisation

Computer Graphics and Image Processing - Lecture 8


Applications of Morphology

Boundary Extraction

Extracting the boundary (or outline) of an object is often


extremely useful
The boundary can be given simply as

Computer Graphics and Image Processing - Lecture 8


Applications of Morphology

Boundary Extraction Example

A simple image and the result of performing boundary


extraction using a square 3 ∗ 3 structuring element

Computer Graphics and Image Processing - Lecture 8


Applications of Morphology

Region Filling

Given a pixel inside a boundary, region filling attempts to fill


that boundary with object pixels (1s)

Computer Graphics and Image Processing - Lecture 8


Applications of Morphology

Region Filling Equation

The key equation for region filling is

Where X0 is simply the starting point inside the boundary,


B is a simple structuring and Ac is the complement of A
This equation is applied repeatedly until XK is equal to
XK −1
Finally the result is unioned with the original boundary

Computer Graphics and Image Processing - Lecture 8


Applications of Morphology

Region Filling Step By Step

Computer Graphics and Image Processing - Lecture 8


Applications of Morphology

Region Filling Step By Step

Computer Graphics and Image Processing - Lecture 8


Applications of Morphology

Region Filling Step By Step

Computer Graphics and Image Processing - Lecture 8


Applications of Morphology

Region Filling Example

Computer Graphics and Image Processing - Lecture 8


Applications of Morphology

Summary

The purpose of morphological processing is primarily to


remove imperfections added during segmentation
The basic operations are erosion and dilation
Using the basic operations we can perform opening and
closing
More advanced morphological operation can then be
implemented using combinations of all of these

Computer Graphics and Image Processing - Lecture 8

You might also like