Image Segmentation using Otsu Thresholding, Study Guides, Projects, Research of Digital Image Processing

The otsu thresholding algorithm, a popular method for automatic image segmentation. It provides an introduction to image segmentation, explains the otsu thresholding concept, and presents a python implementation of the algorithm. The document highlights the advantages of otsu's method, such as its automated and data-driven approach, and its widespread use in various image analysis applications. It also acknowledges the potential limitations of otsu's method, particularly in cases where the foreground and background pixel intensities overlap significantly or when the image contains complex structures or textures. Overall, this document offers a comprehensive understanding of the otsu thresholding algorithm and its applications in medical image segmentation.

Typology: Study Guides, Projects, Research

2023/2024

Uploaded on 06/01/2024

khadija-yousaf
khadija-yousaf 🇵🇰

1 document

1 / 10

Toggle sidebar

This page cannot be seen from the preview

Don't miss anything!

bg1
COMPLEX ENGINEERTING
PROBLEM
DIGITAL IMAGE PROCESSING
Submitted to : Engr.Khurram Baig
Submitted by:
Khadija Yousaf (2020-CPE-03)
Arooj Fatima (2020-CPE-17)
Hamid Majeed (2020-CPE-24)
pf3
pf4
pf5
pf8
pf9
pfa

Partial preview of the text

Download Image Segmentation using Otsu Thresholding and more Study Guides, Projects, Research Digital Image Processing in PDF only on Docsity!

COMPLEX ENGINEERTING

PROBLEM

DIGITAL IMAGE PROCESSING

Submitted to : Engr.Khurram Baig

Submitted by:

Khadija Yousaf (2020-CPE-03)

Arooj Fatima (2020-CPE-17)

Hamid Majeed (2020-CPE-24)

Image Segmentation using Otsu thresholding Statement: Implement image segmentation using Otsu thresholding algorithm on Brain Tumor. Introduction: Image segmentation plays a major role in various image processing tasks, such as object detection and segmentation. In this, we will explore a popular method called Otsu’s algorithm, which is used to automatically select the threshold value to separate pixels in an image into meaningful classes. The main objective of medical image segmentation is to extract and characterize anatomical structures with respect to some input features or expert knowledge. The Otsu method is a popular non-parametric method in medical image segmentation. Traditional Otsu method for medical image segmentation is time–consuming computation and became an obstacle in real time application systems. Otsu’s thresholding algorithm: Otsu’s method is a well-known technique used in computer vision and image processing for automatic image thresholding. The main purpose of Otsu’s method is to determine an optimal threshold value that effectively separates pixels in an image into two distinct classes: foreground and background. The algorithm works by analyzing the histogram of the image, which represents the distribution of pixel intensities. Otsu’s method aims to find the threshold value that minimizes the variance within each class (intra-class variance) or, equivalently, maximizes the variance between classes (inter-class variance). By achieving this, it identifies the threshold that best discriminates the foreground and background regions, making it useful for image segmentation tasks. Once the threshold is determined, all pixels with intensities below the threshold are assigned to the background class, while those above the threshold are assigned to the foreground class. This thresholding process enables the extraction of objects or regions of interest from the image. The advantage of Otsu’s method is that it provides an automated and data-driven approach for selecting the threshold, eliminating the need for manual intervention. This makes it widely used in various image analysis applications, including object recognition, edge detection, and image segmentation. Otsu’s Thresholding Concept Automatic global thresholding algorithms usually have following steps.

Class 1: For example let’s consider there are L gray levels, then the total mean is given by, We can see for class 0 and class 1 all calculations depends on value k. Likewise, we can calculate the variance of two classes by below equations: Class 0: Class 1: Otsu’s thresholding method utilizes these statistical information to determine the optimal threshold value, denoted as t*, for effectively separating the classes during image binarization. By analyzing the histogram, Otsu’s method identifies the threshold that maximizes the separation between the foreground and background classes, resulting in the most accurate and reliable binarization of the image. It has been proven that the optimal separation between the background and subject, assuming that they have distinct intensity distributions, is achieved by minimizing a within class variability or maximizing the between class variability. Within class variability:

Between class variability: Total variance: Finally, we have try all values of “k” and pick the one which has minimum within class variability or maximum between class variability. For example minimizing within class variance for all possible k values is obtained by minimizing below equation: Python Implementation: Here we going to implement the above discussed method in python. The main objective is to minimize the above equation.

Importing necessary libraries:

Threshold function: This is used to applying selected threshold in an image.

The result of the original image vs image after the algorithm:

optimally in cases where the foreground and background pixel intensities overlap significantly or when the image contains complex structures or textures.