This project report describes the implementation of Otsu's method for image segmentation. Otsu's method is a global thresholding technique that automatically performs image thresholding. It finds the optimal threshold to separate foreground objects from the background by minimizing intra-class variance. The report provides an overview of image segmentation and thresholding techniques. It explains Otsu's algorithm and how it maximizes between-class variance. Results of applying Otsu's method on sample images using histogram analysis, the graythresh function, and adaptive thresholding are presented. The report concludes that Otsu's method is a simple and effective approach for automatic image thresholding and segmentation.
Edge detection is the name for a set of mathematical methods which aim at identifying points in a digital image at which the image brightness changes sharply or, more formally, has discontinuities.
Edge detection is the name for a set of mathematical methods which aim at identifying points in a digital image at which the image brightness changes sharply or, more formally, has discontinuities.
Image segmentation is an important image processing step, and it is used everywhere if we want to analyze what is inside the image. Image segmentation, basically provide the meaningful objects of the image.
Image enhancement is the process of adjusting digital images so that the results are more suitable for display or further image analysis. For example, you can remove noise, sharpen, or brighten an image, making it easier to identify key features.
Here are some useful examples and methods of image enhancement:
Filtering with morphological operators, Histogram equalization, Noise removal using a Wiener filter, Linear contrast adjustment, Median filtering, Unsharp mask filtering, Contrast-limited adaptive histogram equalization (CLAHE). Decorrelation stretch
Adaptive Median Filters
Elements of visual perception
Representing Digital Images
Spatial and Intensity Resolution
cones and rods
Brightness Adaptation
Spatial and Intensity Resolution
International Journal of Engineering Research and Development (IJERD)IJERD Editor
journal publishing, how to publish research paper, Call For research paper, international journal, publishing a paper, IJERD, journal of science and technology, how to get a research paper published, publishing a paper, publishing of journal, publishing of research paper, reserach and review articles, IJERD Journal, How to publish your research paper, publish research paper, open access engineering journal, Engineering journal, Mathemetics journal, Physics journal, Chemistry journal, Computer Engineering, Computer Science journal, how to submit your paper, peer reviw journal, indexed journal, reserach and review articles, engineering journal, www.ijerd.com, research journals,
yahoo journals, bing journals, International Journal of Engineering Research and Development, google journals, hard copy of journal
Image segmentation is an important image processing step, and it is used everywhere if we want to analyze what is inside the image. Image segmentation, basically provide the meaningful objects of the image.
Image enhancement is the process of adjusting digital images so that the results are more suitable for display or further image analysis. For example, you can remove noise, sharpen, or brighten an image, making it easier to identify key features.
Here are some useful examples and methods of image enhancement:
Filtering with morphological operators, Histogram equalization, Noise removal using a Wiener filter, Linear contrast adjustment, Median filtering, Unsharp mask filtering, Contrast-limited adaptive histogram equalization (CLAHE). Decorrelation stretch
Adaptive Median Filters
Elements of visual perception
Representing Digital Images
Spatial and Intensity Resolution
cones and rods
Brightness Adaptation
Spatial and Intensity Resolution
International Journal of Engineering Research and Development (IJERD)IJERD Editor
journal publishing, how to publish research paper, Call For research paper, international journal, publishing a paper, IJERD, journal of science and technology, how to get a research paper published, publishing a paper, publishing of journal, publishing of research paper, reserach and review articles, IJERD Journal, How to publish your research paper, publish research paper, open access engineering journal, Engineering journal, Mathemetics journal, Physics journal, Chemistry journal, Computer Engineering, Computer Science journal, how to submit your paper, peer reviw journal, indexed journal, reserach and review articles, engineering journal, www.ijerd.com, research journals,
yahoo journals, bing journals, International Journal of Engineering Research and Development, google journals, hard copy of journal
A Review on Image Segmentation using Clustering and Swarm Optimization Techni...IJSRD
The process of dividing an image into multiple regions (set of pixels) is known as Image segmentation. It will make an image easy and smooth to evaluate. Image segmentation objective is to generate image more simple and meaningful. In this paper present a survey on image segmentation general segmentation techniques, clustering algorithms and optimization methods. Also a study of different research also been presented. The latest research in each of image segmentation methods is presented in this study. This paper presents the recent research in biologically inspired swarm optimization techniques, including ant colony optimization algorithm, particle swarm optimization algorithm, artificial bee colony algorithm and their hybridizations, which are applied in several fields.
Multitude Regional Texture Extraction for Efficient Medical Image Segmentationinventionjournals
Image processing plays a major role in evaluation of images in many concerns. Manual interpretation of the image is time consuming process and it is susceptible to human errors. Computer assisted approaches for analyzing the images have increased in latest evolution of image processing. Also it has highlighted its performance more in the field of medical sciences. Many techniques are available for the involvement in processing of images, evaluation, extraction etc. The main goal of image segmentation is cluster pixeling the regions corresponding to individual surfaces, objects, or natural parts of objects and to simplify and/or change the representation of an image into something that is more meaningful and easier to analyze. The proposed method is to conquer segmentation and texture extraction with Regional and Multitude and techniques involved in it. Ultrasound (US) is increasingly considered as a viable alternative imaging modality in computer-assisted brain segmentation and disease diagnosis applications.First for ultra sound we present region based segmentation.Homogeneous regions depends on image granularity features. Second a local threshold based multitude texture regional seed segmentation for medical image segmentation is proposed. Here extraction is done with dimensions comparable to the speckle size are to be extracted. The algorithm provides a less medical metrics awareness in a minimum user interaction environment. The shape and size of the growing regions depend on look up table entries.
Image Segmentation Based Survey on the Lung Cancer MRI ImagesIIRindia
Educational data mining (EDM) creates high impact in the field of academic domain. The methods used in this topic are playing a major advanced key role in increasing knowledge among students. EDM explores and gives ideas in understanding behavioral patterns of students to choose a correct path for choosing their carrier. This survey focuses on such category and it discusses on various techniques involved in making educational data mining for their knowledge improvement. Also, it discusses about different types of EDM tools and techniques in this article. Among the different tools and techniques, best categories are suggested for real world usage.
A Survey of Image Segmentation based on Artificial Intelligence and Evolution...IOSR Journals
Abstract : In image analysis, segmentation is the partitioning of a digital image into multiple regions (sets of
pixels), according to some homogeneity criterion. The problem of segmentation is a well-studied one in
literature and there are a wide variety of approaches that are used. Different approaches are suited to different
types of images and the quality of output of a particular algorithm is difficult to measure quantitatively due to
the fact that there may be much correct segmentation for a single image. Image segmentation denotes a process
by which a raw input image is partitioned into nonoverlapping regions such that each region is homogeneous
and the union of any two adjacent regions is heterogeneous. A segmented image is considered to be the highest
domain-independent abstraction of an input image. Image segmentation is an important processing step in many
image, video and computer vision applications. Extensive research has been done in creating many different
approaches and algorithms for image segmentation, but it is still difficult to assess whether one algorithm
produces more accurate segmentations than another, whether it be for a particular image or set of images, or
more generally, for a whole class of images.
In this paper, The Survey of Image Segmentation using Artificial Intelligence and Evolutionary Approach
methods that have been proposed in the literature. The rest of the paper is organized as follows. 1.
Introduction, 2.Literature review, 3.Noteworthy contributions in the field of proposed work, 4.Proposed
Methodology, 5.Expected outcome of the proposed research work, 6.Conclusion.
Keywords: Image Segmentation, Segmentation Algorithm, Artificial Intelligence, Evolutionary Algorithm,
Neural Network, Fuzzy Set, Clustering.
Abstract Edge detection is a fundamental tool used in most image processing applications. We proposed a simple, fast and efficient technique to detect the edge for the identifying, locating sharp discontinuities in an image and boundary of an image. In this paper, we found that proposed method called LookUp Table performs well, which requires least computational time as compared to conventional Edge Detection techniques. And also in this paper we presented a comparative performance of various conventional Edge Detection Techniques. Keywords: Edge detectors, Lookup table.
International Journal of Engineering Research and Applications (IJERA) is an open access online peer reviewed international journal that publishes research and review articles in the fields of Computer Science, Neural Networks, Electrical Engineering, Software Engineering, Information Technology, Mechanical Engineering, Chemical Engineering, Plastic Engineering, Food Technology, Textile Engineering, Nano Technology & science, Power Electronics, Electronics & Communication Engineering, Computational mathematics, Image processing, Civil Engineering, Structural Engineering, Environmental Engineering, VLSI Testing & Low Power VLSI Design etc.
Review of Image Segmentation Techniques based on Region Merging ApproachEditor IJMTER
Image segmentation is an important task in computer vision and object recognition. Since
fully automatic image segmentation is usually very hard for natural images, interactive schemes with a
few simple user inputs are good solutions. In image segmentation the image is dividing into various
segments for processing images. The complexity of image content is a bigger challenge for carrying out
automatic image segmentation. On regions based scheme, the images are merged based on the similarity
criteria depending upon comparing the mean values of both the regions to be merged. So, the similar
regions are then merged and the dissimilar regions are merged together.
International Journal of Engineering Research and Applications (IJERA) is an open access online peer reviewed international journal that publishes research and review articles in the fields of Computer Science, Neural Networks, Electrical Engineering, Software Engineering, Information Technology, Mechanical Engineering, Chemical Engineering, Plastic Engineering, Food Technology, Textile Engineering, Nano Technology & science, Power Electronics, Electronics & Communication Engineering, Computational mathematics, Image processing, Civil Engineering, Structural Engineering, Environmental Engineering, VLSI Testing & Low Power VLSI Design etc.
This is about Image segmenting.We will be using fuzzy logic & wavelet transformation for segmenting it.Fuzzy logic shall be used because of the inconsistencies that may occur during segementing or
Object extraction using edge, motion and saliency information from videoseSAT Journals
Abstract Object detection is a process of finding the instances of object of a certain class which is useful in analysis of video or image. There are number of algorithms have been developed so far for object detection. Object detection has got significant role in variety of areas of computer vision like video surveillance, image retrieval`. In this paper presented an efficient algorithm for moving object extraction using edge, motion and saliency information from videos. Out methodology includes 4 stages: Frame generation, Pre-processing, Foreground generation and integration of cues. Foreground generation includes edge detection using sobel edge detection algorithm, motion detection using pixel-based absolute difference algorithm and motion saliency detection. Conditional Random Field (CRF) is applied for integration of cues and thus we get better spatial information of segmented object. Keywords: Object detection, Saliency information, Sobel edge detection, CRF.
IMAGE SEGMENTATION BY USING THRESHOLDING TECHNIQUES FOR MEDICAL IMAGEScseij
Image binarization is the process of separation of pixel values into two groups, black as background and
white as foreground. Thresholding can be categorized into global thresholding and local thresholding. This
paper describes a locally adaptive thresholding technique that removes background by using local mean
and standard deviation. Most common and simplest approach to segment an image is using thresholding.
In this work we present an efficient implementation for threshoding and give a detailed comparison of
Niblack and sauvola local thresholding algorithm. Niblack and sauvola thresholding algorithm is
implemented on medical images. The quality of segmented image is measured by statistical parameters:
Jaccard Similarity Coefficient, Peak Signal to Noise Ratio (PSNR).
Capstone Report - Industrial Attachment Program (IAP) Evaluation PortalAkshit Arora
Capstone Project Report on IAP Evaluation Portal submitted in partial fulfillment of the requirements for the award of the degree of Bachelor of Engineering in Computer Science and Engineering Department by:
Abhinav Garg (101303004), Arush Nagpal (101303034), Akshit Arora (101303012) and Chahak Gupta (101303041)
Under the supervision of:
Dr. Prashant Singh Rana, Assistant Professor, CSED (http://psrana.com) and Dr. Ajay Batish, Professor, MED (www.thapar.edu/index.php/mechanical-engineering-department/faculty?pid=153&sid=387:dr-ajay-batish)
Thapar University,
Patiala, Punjab, India - 147004.
December 2016
Organizational behavior presentation - Origins of IntelligenceAkshit Arora
Based on the following links:
http://bigthink.com/big-think-tv/the-origin-of-intelligence
https://www.ted.com/talks/simon_sinek_how_great_leaders_inspire_action
Industrial Attachment Program (IAP) ReportAkshit Arora
Project report for IAP, project developed for automating the Industrial Attachment Program of Dept. of Mechanical Engineering at Thapar University. Developed under the guidance of Dr. Ajay Batish (Professor at Mechanical Engg. Dept, TU)
Asynchronous Processors - The Clock less FutureAkshit Arora
The synchronous processor chips of computers use a clock to time the entire chip. But this clock is also the cause of speed and power consumption headaches. Here is how an asynchronous chip overcomes these problems by eliminating the clock altogether.
A presentation by Akshit Arora and Ankit Goyal for Computer Science Architecture (UCS401) at Thapar University, Patiala
Hybrid optimization of pumped hydro system and solar- Engr. Abdul-Azeez.pdffxintegritypublishin
Advancements in technology unveil a myriad of electrical and electronic breakthroughs geared towards efficiently harnessing limited resources to meet human energy demands. The optimization of hybrid solar PV panels and pumped hydro energy supply systems plays a pivotal role in utilizing natural resources effectively. This initiative not only benefits humanity but also fosters environmental sustainability. The study investigated the design optimization of these hybrid systems, focusing on understanding solar radiation patterns, identifying geographical influences on solar radiation, formulating a mathematical model for system optimization, and determining the optimal configuration of PV panels and pumped hydro storage. Through a comparative analysis approach and eight weeks of data collection, the study addressed key research questions related to solar radiation patterns and optimal system design. The findings highlighted regions with heightened solar radiation levels, showcasing substantial potential for power generation and emphasizing the system's efficiency. Optimizing system design significantly boosted power generation, promoted renewable energy utilization, and enhanced energy storage capacity. The study underscored the benefits of optimizing hybrid solar PV panels and pumped hydro energy supply systems for sustainable energy usage. Optimizing the design of solar PV panels and pumped hydro energy supply systems as examined across diverse climatic conditions in a developing country, not only enhances power generation but also improves the integration of renewable energy sources and boosts energy storage capacities, particularly beneficial for less economically prosperous regions. Additionally, the study provides valuable insights for advancing energy research in economically viable areas. Recommendations included conducting site-specific assessments, utilizing advanced modeling tools, implementing regular maintenance protocols, and enhancing communication among system components.
Hierarchical Digital Twin of a Naval Power SystemKerry Sado
A hierarchical digital twin of a Naval DC power system has been developed and experimentally verified. Similar to other state-of-the-art digital twins, this technology creates a digital replica of the physical system executed in real-time or faster, which can modify hardware controls. However, its advantage stems from distributing computational efforts by utilizing a hierarchical structure composed of lower-level digital twin blocks and a higher-level system digital twin. Each digital twin block is associated with a physical subsystem of the hardware and communicates with a singular system digital twin, which creates a system-level response. By extracting information from each level of the hierarchy, power system controls of the hardware were reconfigured autonomously. This hierarchical digital twin development offers several advantages over other digital twins, particularly in the field of naval power systems. The hierarchical structure allows for greater computational efficiency and scalability while the ability to autonomously reconfigure hardware controls offers increased flexibility and responsiveness. The hierarchical decomposition and models utilized were well aligned with the physical twin, as indicated by the maximum deviations between the developed digital twin hierarchy and the hardware.
Saudi Arabia stands as a titan in the global energy landscape, renowned for its abundant oil and gas resources. It's the largest exporter of petroleum and holds some of the world's most significant reserves. Let's delve into the top 10 oil and gas projects shaping Saudi Arabia's energy future in 2024.
Explore the innovative world of trenchless pipe repair with our comprehensive guide, "The Benefits and Techniques of Trenchless Pipe Repair." This document delves into the modern methods of repairing underground pipes without the need for extensive excavation, highlighting the numerous advantages and the latest techniques used in the industry.
Learn about the cost savings, reduced environmental impact, and minimal disruption associated with trenchless technology. Discover detailed explanations of popular techniques such as pipe bursting, cured-in-place pipe (CIPP) lining, and directional drilling. Understand how these methods can be applied to various types of infrastructure, from residential plumbing to large-scale municipal systems.
Ideal for homeowners, contractors, engineers, and anyone interested in modern plumbing solutions, this guide provides valuable insights into why trenchless pipe repair is becoming the preferred choice for pipe rehabilitation. Stay informed about the latest advancements and best practices in the field.
1. PROJECT REPORT
(COMPUTER GRAPHICS)
IMPLEMENTATION OF OTSU’S METHOD FOR
IMAGE SEGMENTATION
Submitted to
Dr. Sushma Jain
Submitted by
Abhinav Garg (101303004)
Akshit Arora (101303012)
Akul Gupta (101303013)
Anmoldeep Kang (101303027)
Department of Computer Science and Engineering
THAPAR UNIVERSITY, PATIALA
1516 ODDSEM
2. Image Segmentation using Otsu's Method Page 1
CONTENTS
Sr. No. Title Page Number
1 Area of Project 2
2 Abstract 3
3 Project Background 3
4 Description of Project 4
4.1 Introduction 4
4.2 Aim and Objective 4
4.3 Algorithm 5
4.4 Techniques Used 5
4.5 Method 7
4.6 Results 8
4.7 Conclusion 9
5 Specific Achievements 9
6 References 11
3. Image Segmentation using Otsu's Method Page 2
1. AREA OF PROJECT
Image segmentation can be applied in variety of different fields, e.g. pattern recognition,
image compression, and image retrieval. The several other areas of Image Segmentation are:
Pattern recognition:
Pattern recognition involves study from image processing and from various other fields that
includes machine learning (a branch of artificial intelligence). In pattern recognition, image
segmentation is used for identifying the objects in an images and then machine learning is
used to train the system for the change in pattern. Pattern recognition is used in computer
aided diagnosis, recognition of handwriting, recognition of images etc.
Video processing:
A video is nothing but just the very fast movement of pictures. The quality of the video
depends on the number of frames/pictures per minute and the quality of each frame being
used. Video processing involves noise reduction, detail enhancement, motion detection,
frame rate conversion, aspect ratio conversion, colour space conversion etc.
Medical Applications:
The need for accurate segmentation tools in medical applications is driven by the increased
capacity of the imaging devices. Common modalities such as CT and MRI generate images
which simply cannot be examined manually, due to high resolutions and a large number of
image slices. Furthermore, it is very difficult to visualize complex structures in three-
dimensional image volumes without cutting away large portions of, perhaps important, data.
Tools, such as segmentation, can aid the medical staff in browsing through such large images
by highlighting objects of particular importance. In addition, segmentation in particular can
output models of organs, tumours, and other structures for further analysis, quantification or
simulation.
Object Detection:
Object detection is a computer technology related to computer vision and image processing
that deals with detecting instances of semantic objects of a certain class (such as humans,
buildings, or cars) in digital images and videos. Well-researched domains of object detection
include face detection and pedestrian detection. Object detection has applications in many
areas of computer vision, including image retrieval and video surveillance.
4. Image Segmentation using Otsu's Method Page 3
2. ABSTRACT
A nonparametric and unsupervised method of automatic threshold selection for picture
segmentation is presented. An optimal threshold is selected by the discriminant criterion,
namely, so as to maximize the seperability of the resultant classes in grey levels. The
procedure is very simple, utilizing only the zeroth- and the first-order cumulative moments
of the grey-level histogram. It is straightforward to extend the method to multithreshold
problems. Several examples are also presented to support the validity of the method.
3. PROJECT BACKGROUND
The history of segmentation of digital images using computers can be traced back to 40 years
ago. In 1965, an operator for detecting the edges between different parts of an image, Roberts
operator (also called Roberts edge detector), was introduced and used for partition of image
components. Since then, the field of image segmentation has evolved very quickly and has
undergone great change. This report explains of one of the initial methods called Otsu’s
method which is based on Thresholding.
It is important in picture processing to select an adequate threshold of grey level for
extracting objects from their background. Before Otsu, A variety of techniques have been
proposed in this regard. In an ideal case, the histogram has a deep and sharp valley between
two peaks representing objects and background, respectively, so that the threshold can be
chosen at the bottom of this valley . However, for most real pictures, it is often difficult to
detect the valley bottom precisely, especially in such cases as when the valley is flat and
broad, imbued with noise, or when the two peaks are extremely unequal in height, often
producing no traceable valley.
There have been some techniques proposed in order to overcome these difficulties. They are,
for example, the valley sharpening technique, which restricts the histogram to the pixels with
large absolute values of derivative (Laplacian or gradient), and the difference histogram
method, which selects the threshold at the grey level with the maximal amount of difference.
These utilize information concerning neighbouring pixels (or edges) in the original picture to
modify the histogram so as to make it useful for thresholding. Another class of methods deals
directly with the grey-level histogram by parametric techniques. For example, the histogram
is approximated in the least square sense by a sum of Gaussian distributions, and statistical
decision procedures are applied. However, such a method requires considerably tedious and
sometimes unstable calculations. Moreover, in many cases, the Gaussian distributions turn
out to be a meagre approximation of the real modes.
In any event, no "goodness" of threshold has been evaluated in most of the methods proposed
before. Otsu’s method is the right way of deriving an optimal thresholding method to
establish an appropriate criterion for evaluating the "goodness" of threshold from a more
general standpoint.
5. Image Segmentation using Otsu's Method Page 4
4. DESCRIPTION OF PROJECT WORK
a. INTRODUCTION
Image segmentation is one of the basic techniques of image processing and computer vision.
It is a key step for image analysis, comprehension and description. Among all the
segmentation techniques, thresholding segmentation method is the most popular algorithm
and is widely used in the image segmentation field. The basic idea of automatic thresholding
is to automatically select an optimal or several optimal grey-level threshold values for
separating objects of interest in an image from the background based on their grey-level
distribution. Otsu method is one of thresholding methods and frequently used in various
fields
Segmentation subdivides an image into its constituent region or object. Image segmentation
methods are categorized on the basis of two properties discontinuity and similarity [1].Based
on this property image segmentation is categorized as Edged based segmentation and region
based segmentation. The segmentation methods that are based on discontinuity property of
pixels are considered as boundary or edges based techniques. Edge based segmentation
method attempts to resolve image segmentation by detecting the edges or pixels between
different regions that have rapid transition in intensity and are extracted and linked to form
closed object boundaries. Region based segmentation partitions an image into regions that are
similar according to a set of predefined criteria. There are different type of the Region based
method like thresholding, region growing and region splitting and merging.
Thresholding is an important technique in image segmentation applications. The basic idea of
thresholding is to select an optimal grey-level threshold value for separating objects of
interest in an image from the background based on their grey-level distribution. While
humans can easily differentiable an object from complex background and image thresholding
is a difficult task to separate them. The grey-level histogram of an image is usually
considered as efficient tools for development of image thresholding algorithms. Thresholding
creates binary images from grey-level ones by turning all pixels below some threshold to zero
and all pixels about that threshold to one.
There are two types of thresholding methods.
1) Global thresholding: The threshold value depends on the grey values and the value of
Threshold solely relates to the character of pixels, this thresholding technique is called global
thresholding.
2) Local thresholding: This method divides an original image into several sub regions, and
chooses various thresholds T for each sub region reasonably.
Otsu method is type of global thresholding in which it depend only grey value of the image.
Otsu method was proposed by Scholar Otsu in 1979. Otsu method is global thresholding
selection method, which is widely used because it is simple and effective.
6. Image Segmentation using Otsu's Method Page 5
b. AIM AND OBJECTIVE
The aim is to find the threshold value where the sum of foreground and background spreads
is at its minimum. Otsu's thresholding method involves iterating through all the possible
threshold values and calculating a measure of spread for the pixel levels each side of the
threshold, i.e. the pixels that either fall in foreground or background.
c. ALGORITHM
1. Compute histogram and probabilities of each intensity level
2. Set up initial and
3. Step through all possible thresholds maximum intensity
1. Update and
2. Compute
threshold corresponds to the maximum4. Desired
5. You can compute two maxima (and two corresponding thresholds). is the
greater max and is the greater or equal maximum
6. Desired threshold =
d. TECHNIQUES USED
In Otsu's method we exhaustively search for the threshold that minimizes the intra-class
variance (the variance within the class), defined as a weighted sum of variances of the two
classes:
Weights are the probabilities of the two classes separated by a threshold and are
variances of these classes.
Otsu shows that minimizing the intra-class variance is the same as maximizing inter-class
variance:[2]
Which is expressed in terms of class probabilities and class means .
The class probability is computed from the histogram as :
7. Image Segmentation using Otsu's Method Page 6
While the class mean is:
Where is the value at the centre of the th histogram bin. Similarly, you can
compute and on the right-hand side of the histogram for bins greater
than .
The class probabilities and class means can be computed iteratively. This idea yields an
effective algorithm.
INPUT
INPUT (rgb2gray)
8. Image Segmentation using Otsu's Method Page 7
e. METHOD
The threshold value can be obtained by one of the following ways:
1. Histogram Analysis: By using the imhist(I) command, we can generate the histogram
of intensity levels. The intensity values range between 0 to 255. On analysing the
histogram, we can divide the intensity values into two classes. One acting as foreground
and the other acting as background.
In the histogram above, the Y-co-ordinate 115 is chosen as the deciding value. The grey
image is then converted to binary using the im2bw() function. Since the function takes the
threshold values between 0 and 1, therefore the value 115 is divided by 255 to change the
scale from 0 to 1. This threshold value the separates the background and the foreground.
2. Using graythresh () function: graythresh (I) computes a global threshold level that can
be used to convert an intensity image to a binary image with im2bw. Level is a
normalized intensity value that lies in the range [0, 1].The graythresh function uses Otsu's
method, which chooses the threshold to minimize the interclass variance of the black and
white pixels. Multi-dimensional arrays are converted automatically to 2-D arrays
using reshape. The graythresh function ignores any nonzero imaginary part of ‘I’.
Example:
I = imread('coins.png');
level = graythresh(I);
BW = im2bw(I,level);
imshow(BW)
9. Image Segmentation using Otsu's Method Page 8
3. Using Adaptive Threshold value: This is a local thresholding method in which we
create blocks and apply the thresholding on those particular blocks. A function derives the
threshold value by calculating the standard deviation using std2 () function. If this value
of standard deviation is less than 1, then the block is considered as background otherwise
we apply the thresholding using graythresh () function.
f. RESULT
1) Thresholding by histogram Analysis:
Histogram:
The ‘rice.jpg’ is the input image, whose histogram has been obtained using imhist() function.
From analysis of histogram the threshold value of 150 was found to be optimum. The result
obtained is a black and white image that shows the black background separated from the
white rice grains distinctly. The output image obtained is as following:
2) Using graythresh function:
Graythresh() is the function that automatically calculates the threshold value from the input
image, This threshold value can now be used to separate the image into two classes. The
value of threshold is used in im2bw() and the output obtained was better as compared to the
guessing of the threshold in the previous method.
10. Image Segmentation using Otsu's Method Page 9
OUTPUT
3) Adaptive Threshold
The blocks of size 15 by 15 pixels are passed on to a function which calculates the standard
deviation of the pixel intensities and checks if it is less than 1. In case the value is greater
than 1, then the graythresh is applied individually to those blocks. If the value is less than
one, it indicates very minor changes to the intensity values and it should be probably the part
of the background and is filled ones (white colour).
f. CONCLUSION
Image segmentation is one of the basic techniques of image processing and computer vision.
It is a key step for image analysis, comprehension and description. Otsu’s method has been
studied and implemented in MATLAB. The outputs local and histogram analysis have been
collected and differences observed.
5. SPECIFIC ACHIEVEMENTS
A method to select a threshold automatically from a grey level histogram has been derived
from the viewpoint of discriminant analysis. This directly deals with the problem of
evaluating the goodness of thresholds. The range of its applications is not restricted only to
the thresholding of the grey-level picture, such as specifically described in the foregoing,
but it may also cover other cases of unsupervised classification in which a histogram of
some characteristic (or feature) discriminative for classifying the objects is available.
Taking into account these points, the method suggested in this correspondence may be
11. Image Segmentation using Otsu's Method Page 10
recommended as the most simple and standard one for automatic threshold selection that
can be applied to various practical problems.
1) Pattern Recognition
2) Video Processing
3) Object Detection
4) Computational Arts
5) Medical Image Analysis
6. REFERENCES
1. http://web-ext.u-aizu.ac.jp/course/bmclass/documents/otsu1979.pdf
2. https://en.wikipedia.org/wiki/Otsu%27s_method