0% found this document useful (0 votes)
98 views54 pages

Digital Image Processing & Computer Vision

Digital morphology analyzes the shape of digital images, especially raster images. It uses mathematical morphology operations on pixels that collect into groups to have structure. The main operations are erosion and dilation, which shrink and expand images respectively using a structuring element. Erosion erodes away the boundaries of objects, while dilation thickens and expands them. Morphology is useful for tasks like counting connected regions, filling holes, and smoothing boundaries in images.

Uploaded by

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

Digital Image Processing & Computer Vision

Digital morphology analyzes the shape of digital images, especially raster images. It uses mathematical morphology operations on pixels that collect into groups to have structure. The main operations are erosion and dilation, which shrink and expand images respectively using a structuring element. Erosion erodes away the boundaries of objects, while dilation thickens and expands them. Morphology is useful for tasks like counting connected regions, filling holes, and smoothing boundaries in images.

Uploaded by

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

Digital Image Processing &

Computer Vision

Digital Morphology
Chapter Content
DIGITAL MORPHOLOGY: Connectedness, Binary Operations, Dilation and Erosion, Opening and Closing,
Grey-Level Morphology, Color Morphology.
 

 Morphology
 Form and structure of an object (or) arrangement & interrelations between parts of an object

 Digital Morphology
  A way to describe or analyze the shape of a digital, most often raster object.

 Language (Linguistics) -- study of structure of words


 Biology -- Shape of an organism

5
Morphology (An Example)

6
7
Digital Morphology

• Digital Morphology relatively new.


• Mathematical morphology well researched
• Images consist of a set of picture elements (pixels) that collect into groups having a 2D structure(Shape).
• Mathematical operations on the set of pixels
• Erosion
• Dilation

• Type of image (bi-level, grey-level, or color)


• Definition of these operations changes based on the type of image

8
• Digital morphology uses the geometry of small connected sets of pixels to accomplish tasks that are
useful in processing regions within images.

• Morphology can count and mark


• connected regions in images
• Can fill In small holes
• Can smooth boundaries

9
Rasterization

• Filling in the interior of a shape by pixels or voxels


• Scan-Conversion / Voxelization in 3D

2D Polygon Binary Picture

10
Binary Pictures

Creation Processing
Connected Components

Take the largest 2 components of the object


Connected Components

• How many connected components are there in the object?


Connectivity (2D)

• Two pixels are connected if their squares share: Two connected All pixels
• A common edge pixels connected to x
• 4-connectivity
• A common vertex
x
• 8-connectivity

4-connectivity

8-connectivity
Connectivity (2D)

• Connected component
• A maximum set of pixels (voxels) in the object or background, such that any two pixels (voxels) are
connected via a path of connected pixels (voxels)

8-connected object 4-connected object


(1 component) (4 components)
Connectedness

(a) A collection of pixels consisting of four 4-connected regions.


(b) Adding a pixel seems to connect the regions, but does not; now there are five 4-connected regions.
(c) Three 8-connected regions, showing the diagonal connections allowed for 8-regions. There are five 4-regions in
this image.
(d) Setting one pixel to black (the grey one) connects all regions together.

16
• Morphology can count and mark connected regions in images
• Can fill in small holes
• Can smooth boundaries

17
Elements of Digital Morphology - Binary Operations

• Binary Morphological operators


• Morphological operators working on bi-level images (black & white pixels)
• Gray-level morphological operators

The effects of a simple binary


dilation one a small object.
(a) Original image. (b)
Dilation of the original by one
pixel. (c)
Dilation of the original by two
pixels (dilation of (b) by one
pixel).

18
Structuring Element

• A collection of non-linear processes which can be applied to an image to remove details smaller than a
certain reference shape

19
Morphological Image Processing

• Morphological operations are defined by moving a structuring element over the binary image to be
modified, in such a way that it is centered over every image pixel at some point. When the structuring
element is centered over a region of the image, a logical operation is performed on the pixels covered by
the structuring element, yielding a binary output.

20
• Like convolution kernel, the structuring element can be of any size, and it can contain complements of 1s and 0s.
• At each pixel position, a specified logical operation is performed between the structuring element and the underlying binary image.
• The binary result of that logical operation is stored in the output image at that pixel position.
• The effect created depends upon the size and content of the structuring element and the nature of the logical operation.
• Could be defined in 1, 2, 3 (or higher) dimensions.
If
structuring element is perfectly fit on to the binary image then perform the logical operation;
else
do not perform any operation into resultant binary image pixel

21
Set Operations

22
23
Logical Operations

XOR Operation of images A and B

24
Binary Dilation

• Translation
  of the set A by the point x is defined in set notation as:

(A)x = {c | c = a + x, a Є A}
• Reflection of the set A is defined as :
= {c | c = -a, a Є A}
• Complement of the set:

• Intersection of the two sets A and B is the set of elements (pixels) belonging to both A and B:

• Union of the two sets A and B is the set of pixels that belong to either A or B or to both:

• Difference between the set A and set B is: 25


Dilation

•• Dilation
  is a process in which the binary image is expanded from its original shape.
• Expansion is determined by the structuring element.
• This structuring element is smaller in size compared to the image itself
• A Dilation of the set A by the set B is:

where
A represents the image being operated on,
B is a second set of pixels, a shape that operates on the pixels of A to produce the result.

26
• Fills in Holes
• Smoothens object boundaries
• Adds an extra outer ring of pixels onto object boundary,

27
• Using the input image and structuring element as given below, find the dilated version of the input
image.

28
29
Erosion

• Erosion is the counter-process of dilation. If dilation enlarges an image then erosion shrinks the image.
• The structuring element is normally smaller than the image with a 3 × 3 size.
• Faster computation time when compared to larger structuring-element size.
• The erosion process will move the structuring element from left to right and top to bottom.
• At the center position, indicated by the center of the structuring element, the process will look for whether there is a complete overlap with
the structuring element or not.
• If there is no complete overlapping then the center pixel indicated by the center of the structuring element will be set white or 0.

30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
Set Theory

47
48
49
50
Morphological Operators

Object (A) Structure element (Bx)

Erosion Dilation
Morphological Operators

• Duality (if the structuring element is symmetric)


• Dilation is equivalent to erosion of the background

Erosion Dilation
Morphological Operators

• Opening (erode, then dilate)


• Union of all structuring elements B contained in A
• Shaves off convex corners and thin spikes

Object (A) Structure element (Bx) Opening


Morphological Operators

• Closing (dilate, then erode)


• Complement of union of structuring elements B outside A
• Equivalent to “opening” the background (because of duality)
• Fills concave corners and thin tunnels

Object (A)
Structure element (Bx)

A  B   
Closing
A B B

You might also like