0% found this document useful (0 votes)
27 views

Digital Image Processing Assignment

this is digital image processing assignment

Uploaded by

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

Digital Image Processing Assignment

this is digital image processing assignment

Uploaded by

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

Submitted To

Instructor Sir Shoaib Latif

Submission Date 31-7-2023


Assignment #3
Submitted By

Name Syed Rizwan Haider

Roll NO 19014198-070

Section SE-19-B

Course Digital image Processing

7/31/2023

Department of Software Engineering


Morphological Image Processing: Dilation, Erosion, Opening, Closing, Hit-
Miss Transformations:
Morphological Image Processing:
The word ‘Morphology’ generally represents a branch of biology that deals with the form
and structure of animals and plants. However, we use the same term in ‘mathematical
morphology’ to extract image components useful in representing region shape,
boundaries.

It is a technique used to process images based on their shapes and structures. It primarily
focuses on operations that modify the geometric structure of an image. Morphological
operations are especially useful for image enhancement, noise removal, segmentation,
and object extraction.

Morphology is a comprehensive set of image processing operations that process images


based on shapes. Morphological operations apply a structuring element to an input image,
creating an output image of the same size. In a morphological operation, the value of
each pixel in the output image is based on a comparison of the corresponding pixel in the
input image with its neighbors.

Dilation:
Dilation expands the image pixels, or it adds pixels on object boundaries. First, we
traverse the structuring element over the image object to perform dilation operation. The
output pixel values are calculated using the following equation.

Pixel (output) = 1 {if HIT}

Pixel (output) = 0 {otherwise}

Example:
This example of Dilation is shown in this Figure. Where (a) represents original image,
8(b) and 8(c) shows processed images after dilation using 3x3 and 5x5 structuring
elements respectively.

Properties:
 It can repair breaks.
 It can repair intrusions.

Erosion:
Erosion shrinks the image or removes pixels on object boundaries. First, we traverse the
structuring element over the image object to perform an erosion operation. The output
pixel values are calculated using the following equation.

Pixel (output) = 1 {if FIT}

Pixel (output) = 0 {otherwise}

Example:

This example of Erosion is shown in this Figure. Where (a) represents original image,
8(b) and 8(c) shows processed images after dilation using 3x3 and 5x5 structuring
elements respectively.

Properties:
 It can split apart joint objects.
 It can strip away extrusions.
Opening:
This operation is the combination of erosion followed by dilation. It helps to remove
small objects and noise while preserving the overall structure of larger objects.

Closing:
This operation is the combination of dilation followed by erosion. It helps to close
small gaps between objects.

Usage:
Morphological image processing is widely used in various applications, such as image
segmentation, feature extraction, character recognition, medical image analysis, and
more. It can be implemented efficiently using algorithms and data structures like erosion
and dilation masks or more advanced techniques like the distance transform.

Hit/Miss Transformation:
The Hit/Miss transformation is a morphological operation used in image processing to
detect specific patterns or shapes in binary images. It is a more advanced morphological
operation that helps identify patterns based on the exact arrangement of foreground and
background pixels in the image.

Hit/Miss transformation uses two structuring elements: one for foreground (object) pixels
and another for background (non-object) pixels. The goal is to find matches for the object
pattern and the complement of the object pattern within the image.

The operation involves two steps:

1. Erosion with the foreground structuring element:


The first structuring element represents the pattern of the object that is to be
detected. An erosion operation is performed using this structuring element on the
input binary image. This operation retains only those pixels that match the pattern
exactly. The result is called the "hit" image.

2. Erosion with the background structuring element:


The second structuring element represents the complement of the object pattern. It
identifies the background area around the object. An erosion operation is
performed using this structuring element on the complement of the input binary
image. This operation retains only those pixels that match the background pattern
exactly. The result is called the "miss" image.

Conclusion:
The final result of the Hit/Miss transformation is obtained by combining the hit and miss
images using logical operations. Typically, a pixel is considered to be a match if it is a hit
(foreground) and also a miss (background) in the complement image.
The Hit/Miss transformation is particularly useful for detecting complex shapes or
objects with specific arrangements of pixels. It can be used in various image processing
tasks, such as pattern recognition, character recognition, and feature extraction.

You might also like