SlideShare a Scribd company logo
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
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
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.
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.
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.
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 :
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)
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)
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.
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
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

More Related Content

What's hot

gaussian filter seminar ppt
gaussian filter seminar pptgaussian filter seminar ppt
gaussian filter seminar ppt
sachin kumar rajput
 
Edge Detection algorithm and code
Edge Detection algorithm and codeEdge Detection algorithm and code
Edge Detection algorithm and code
Vaddi Manikanta
 
Hog
HogHog
Image segmentation
Image segmentationImage segmentation
Image segmentation
Bulbul Agrawal
 
Digital Image Processing - Frequency Filters
Digital Image Processing - Frequency FiltersDigital Image Processing - Frequency Filters
Digital Image Processing - Frequency Filters
Aly Abdelkareem
 
Thresholding.ppt
Thresholding.pptThresholding.ppt
Thresholding.ppt
shankar64
 
Image Enhancement in Spatial Domain
Image Enhancement in Spatial DomainImage Enhancement in Spatial Domain
Image Enhancement in Spatial Domain
A B Shinde
 
ImageProcessing10-Segmentation(Thresholding) (1).ppt
ImageProcessing10-Segmentation(Thresholding) (1).pptImageProcessing10-Segmentation(Thresholding) (1).ppt
ImageProcessing10-Segmentation(Thresholding) (1).ppt
VikramBarapatre2
 
Image segmentation
Image segmentationImage segmentation
Image segmentation
khyati gupta
 
Image enhancement techniques
Image enhancement techniquesImage enhancement techniques
Image enhancement techniques
Bulbul Agrawal
 
image basics and image compression
image basics and image compressionimage basics and image compression
image basics and image compression
murugan hari
 
Image segmentation
Image segmentationImage segmentation
Image segmentation
Md Shabir Alam
 
Digital image processing
Digital image processingDigital image processing
Digital image processing
Astha Jain
 
Adaptive Median Filters
Adaptive Median FiltersAdaptive Median Filters
Adaptive Median Filters
Amnaakhaan
 
Edge detection of video using matlab code
Edge detection of video using matlab codeEdge detection of video using matlab code
Edge detection of video using matlab codeBhushan Deore
 
image enhancement
 image enhancement image enhancement
image enhancement
Rajendra Prasad
 
Image segmentation techniques
Image segmentation techniquesImage segmentation techniques
Image segmentation techniques
gmidhubala
 
IMAGE SEGMENTATION.
IMAGE SEGMENTATION.IMAGE SEGMENTATION.
IMAGE SEGMENTATION.
Tawose Olamide Timothy
 
Image enhancement lecture
Image enhancement lectureImage enhancement lecture
Image enhancement lecture
ISRAR HUSSAIN
 
Texture in image processing
Texture in image processing Texture in image processing
Texture in image processing
Anna Aquarian
 

What's hot (20)

gaussian filter seminar ppt
gaussian filter seminar pptgaussian filter seminar ppt
gaussian filter seminar ppt
 
Edge Detection algorithm and code
Edge Detection algorithm and codeEdge Detection algorithm and code
Edge Detection algorithm and code
 
Hog
HogHog
Hog
 
Image segmentation
Image segmentationImage segmentation
Image segmentation
 
Digital Image Processing - Frequency Filters
Digital Image Processing - Frequency FiltersDigital Image Processing - Frequency Filters
Digital Image Processing - Frequency Filters
 
Thresholding.ppt
Thresholding.pptThresholding.ppt
Thresholding.ppt
 
Image Enhancement in Spatial Domain
Image Enhancement in Spatial DomainImage Enhancement in Spatial Domain
Image Enhancement in Spatial Domain
 
ImageProcessing10-Segmentation(Thresholding) (1).ppt
ImageProcessing10-Segmentation(Thresholding) (1).pptImageProcessing10-Segmentation(Thresholding) (1).ppt
ImageProcessing10-Segmentation(Thresholding) (1).ppt
 
Image segmentation
Image segmentationImage segmentation
Image segmentation
 
Image enhancement techniques
Image enhancement techniquesImage enhancement techniques
Image enhancement techniques
 
image basics and image compression
image basics and image compressionimage basics and image compression
image basics and image compression
 
Image segmentation
Image segmentationImage segmentation
Image segmentation
 
Digital image processing
Digital image processingDigital image processing
Digital image processing
 
Adaptive Median Filters
Adaptive Median FiltersAdaptive Median Filters
Adaptive Median Filters
 
Edge detection of video using matlab code
Edge detection of video using matlab codeEdge detection of video using matlab code
Edge detection of video using matlab code
 
image enhancement
 image enhancement image enhancement
image enhancement
 
Image segmentation techniques
Image segmentation techniquesImage segmentation techniques
Image segmentation techniques
 
IMAGE SEGMENTATION.
IMAGE SEGMENTATION.IMAGE SEGMENTATION.
IMAGE SEGMENTATION.
 
Image enhancement lecture
Image enhancement lectureImage enhancement lecture
Image enhancement lecture
 
Texture in image processing
Texture in image processing Texture in image processing
Texture in image processing
 

Similar to Image Segmentation using Otsu's Method - Computer Graphics (UCS505) Project Report

International Journal of Engineering Research and Development (IJERD)
International Journal of Engineering Research and Development (IJERD)International Journal of Engineering Research and Development (IJERD)
International Journal of Engineering Research and Development (IJERD)
IJERD Editor
 
Image Segmentation using Otsu's Method - Computer Graphics (UCS505) Project PPT
Image Segmentation using Otsu's Method - Computer Graphics (UCS505) Project PPTImage Segmentation using Otsu's Method - Computer Graphics (UCS505) Project PPT
Image Segmentation using Otsu's Method - Computer Graphics (UCS505) Project PPT
Akshit Arora
 
IRJET- Image Feature Extraction using Hough Transformation Principle
IRJET- Image Feature Extraction using Hough Transformation PrincipleIRJET- Image Feature Extraction using Hough Transformation Principle
IRJET- Image Feature Extraction using Hough Transformation Principle
IRJET Journal
 
A Review on Image Segmentation using Clustering and Swarm Optimization Techni...
A Review on Image Segmentation using Clustering and Swarm Optimization Techni...A Review on Image Segmentation using Clustering and Swarm Optimization Techni...
A Review on Image Segmentation using Clustering and Swarm Optimization Techni...
IJSRD
 
Multitude Regional Texture Extraction for Efficient Medical Image Segmentation
Multitude Regional Texture Extraction for Efficient Medical Image SegmentationMultitude Regional Texture Extraction for Efficient Medical Image Segmentation
Multitude Regional Texture Extraction for Efficient Medical Image Segmentation
inventionjournals
 
Comparative performance analysis of segmentation techniques
Comparative performance analysis of segmentation techniquesComparative performance analysis of segmentation techniques
Comparative performance analysis of segmentation techniquesIAEME Publication
 
Image Segmentation Based Survey on the Lung Cancer MRI Images
Image Segmentation Based Survey on the Lung Cancer MRI ImagesImage Segmentation Based Survey on the Lung Cancer MRI Images
Image Segmentation Based Survey on the Lung Cancer MRI Images
IIRindia
 
A Survey of Image Segmentation based on Artificial Intelligence and Evolution...
A Survey of Image Segmentation based on Artificial Intelligence and Evolution...A Survey of Image Segmentation based on Artificial Intelligence and Evolution...
A Survey of Image Segmentation based on Artificial Intelligence and Evolution...
IOSR Journals
 
Edge detection by using lookup table
Edge detection by using lookup tableEdge detection by using lookup table
Edge detection by using lookup table
eSAT Journals
 
Importance of Mean Shift in Remote Sensing Segmentation
Importance of Mean Shift in Remote Sensing SegmentationImportance of Mean Shift in Remote Sensing Segmentation
Importance of Mean Shift in Remote Sensing Segmentation
IOSR Journals
 
Ea4301770773
Ea4301770773Ea4301770773
Ea4301770773
IJERA Editor
 
Review of Image Segmentation Techniques based on Region Merging Approach
Review of Image Segmentation Techniques based on Region Merging ApproachReview of Image Segmentation Techniques based on Region Merging Approach
Review of Image Segmentation Techniques based on Region Merging Approach
Editor IJMTER
 
L045066671
L045066671L045066671
L045066671
IJERA Editor
 
Image segmentation using wvlt trnsfrmtn and fuzzy logic. ppt
Image segmentation using wvlt trnsfrmtn and fuzzy logic. pptImage segmentation using wvlt trnsfrmtn and fuzzy logic. ppt
Image segmentation using wvlt trnsfrmtn and fuzzy logic. ppt
RCC Institute of Information Technology
 
Object extraction using edge, motion and saliency information from videos
Object extraction using edge, motion and saliency information from videosObject extraction using edge, motion and saliency information from videos
Object extraction using edge, motion and saliency information from videos
eSAT Journals
 
Massive Regional Texture Extraction for Aerial and Natural Images
Massive Regional Texture Extraction for Aerial and Natural ImagesMassive Regional Texture Extraction for Aerial and Natural Images
Massive Regional Texture Extraction for Aerial and Natural Images
IOSR Journals
 
IMAGE SEGMENTATION BY USING THRESHOLDING TECHNIQUES FOR MEDICAL IMAGES
IMAGE SEGMENTATION BY USING THRESHOLDING TECHNIQUES FOR MEDICAL IMAGESIMAGE SEGMENTATION BY USING THRESHOLDING TECHNIQUES FOR MEDICAL IMAGES
IMAGE SEGMENTATION BY USING THRESHOLDING TECHNIQUES FOR MEDICAL IMAGES
cseij
 
SIRG-BSU_3_used-important.pdf
SIRG-BSU_3_used-important.pdfSIRG-BSU_3_used-important.pdf
SIRG-BSU_3_used-important.pdf
DrAhmedElngar
 

Similar to Image Segmentation using Otsu's Method - Computer Graphics (UCS505) Project Report (20)

International Journal of Engineering Research and Development (IJERD)
International Journal of Engineering Research and Development (IJERD)International Journal of Engineering Research and Development (IJERD)
International Journal of Engineering Research and Development (IJERD)
 
Q0460398103
Q0460398103Q0460398103
Q0460398103
 
Image Segmentation using Otsu's Method - Computer Graphics (UCS505) Project PPT
Image Segmentation using Otsu's Method - Computer Graphics (UCS505) Project PPTImage Segmentation using Otsu's Method - Computer Graphics (UCS505) Project PPT
Image Segmentation using Otsu's Method - Computer Graphics (UCS505) Project PPT
 
IRJET- Image Feature Extraction using Hough Transformation Principle
IRJET- Image Feature Extraction using Hough Transformation PrincipleIRJET- Image Feature Extraction using Hough Transformation Principle
IRJET- Image Feature Extraction using Hough Transformation Principle
 
A Review on Image Segmentation using Clustering and Swarm Optimization Techni...
A Review on Image Segmentation using Clustering and Swarm Optimization Techni...A Review on Image Segmentation using Clustering and Swarm Optimization Techni...
A Review on Image Segmentation using Clustering and Swarm Optimization Techni...
 
Multitude Regional Texture Extraction for Efficient Medical Image Segmentation
Multitude Regional Texture Extraction for Efficient Medical Image SegmentationMultitude Regional Texture Extraction for Efficient Medical Image Segmentation
Multitude Regional Texture Extraction for Efficient Medical Image Segmentation
 
Comparative performance analysis of segmentation techniques
Comparative performance analysis of segmentation techniquesComparative performance analysis of segmentation techniques
Comparative performance analysis of segmentation techniques
 
Image Segmentation Based Survey on the Lung Cancer MRI Images
Image Segmentation Based Survey on the Lung Cancer MRI ImagesImage Segmentation Based Survey on the Lung Cancer MRI Images
Image Segmentation Based Survey on the Lung Cancer MRI Images
 
A Survey of Image Segmentation based on Artificial Intelligence and Evolution...
A Survey of Image Segmentation based on Artificial Intelligence and Evolution...A Survey of Image Segmentation based on Artificial Intelligence and Evolution...
A Survey of Image Segmentation based on Artificial Intelligence and Evolution...
 
Edge detection by using lookup table
Edge detection by using lookup tableEdge detection by using lookup table
Edge detection by using lookup table
 
Importance of Mean Shift in Remote Sensing Segmentation
Importance of Mean Shift in Remote Sensing SegmentationImportance of Mean Shift in Remote Sensing Segmentation
Importance of Mean Shift in Remote Sensing Segmentation
 
154 158
154 158154 158
154 158
 
Ea4301770773
Ea4301770773Ea4301770773
Ea4301770773
 
Review of Image Segmentation Techniques based on Region Merging Approach
Review of Image Segmentation Techniques based on Region Merging ApproachReview of Image Segmentation Techniques based on Region Merging Approach
Review of Image Segmentation Techniques based on Region Merging Approach
 
L045066671
L045066671L045066671
L045066671
 
Image segmentation using wvlt trnsfrmtn and fuzzy logic. ppt
Image segmentation using wvlt trnsfrmtn and fuzzy logic. pptImage segmentation using wvlt trnsfrmtn and fuzzy logic. ppt
Image segmentation using wvlt trnsfrmtn and fuzzy logic. ppt
 
Object extraction using edge, motion and saliency information from videos
Object extraction using edge, motion and saliency information from videosObject extraction using edge, motion and saliency information from videos
Object extraction using edge, motion and saliency information from videos
 
Massive Regional Texture Extraction for Aerial and Natural Images
Massive Regional Texture Extraction for Aerial and Natural ImagesMassive Regional Texture Extraction for Aerial and Natural Images
Massive Regional Texture Extraction for Aerial and Natural Images
 
IMAGE SEGMENTATION BY USING THRESHOLDING TECHNIQUES FOR MEDICAL IMAGES
IMAGE SEGMENTATION BY USING THRESHOLDING TECHNIQUES FOR MEDICAL IMAGESIMAGE SEGMENTATION BY USING THRESHOLDING TECHNIQUES FOR MEDICAL IMAGES
IMAGE SEGMENTATION BY USING THRESHOLDING TECHNIQUES FOR MEDICAL IMAGES
 
SIRG-BSU_3_used-important.pdf
SIRG-BSU_3_used-important.pdfSIRG-BSU_3_used-important.pdf
SIRG-BSU_3_used-important.pdf
 

More from Akshit Arora

Kalam innovation award
Kalam innovation awardKalam innovation award
Kalam innovation award
Akshit Arora
 
Cv akshitarora
Cv akshitaroraCv akshitarora
Cv akshitarora
Akshit Arora
 
Capstone Report - Industrial Attachment Program (IAP) Evaluation Portal
Capstone Report - Industrial Attachment Program (IAP) Evaluation PortalCapstone Report - Industrial Attachment Program (IAP) Evaluation Portal
Capstone Report - Industrial Attachment Program (IAP) Evaluation Portal
Akshit Arora
 
Organizational behavior presentation - Origins of Intelligence
Organizational behavior presentation - Origins of IntelligenceOrganizational behavior presentation - Origins of Intelligence
Organizational behavior presentation - Origins of Intelligence
Akshit Arora
 
Application of Management Tools: Total Quality Management Course
Application of Management Tools: Total Quality Management CourseApplication of Management Tools: Total Quality Management Course
Application of Management Tools: Total Quality Management Course
Akshit Arora
 
A multilevel automatic thresholding method based on a genetic algorithm for a...
A multilevel automatic thresholding method based on a genetic algorithm for a...A multilevel automatic thresholding method based on a genetic algorithm for a...
A multilevel automatic thresholding method based on a genetic algorithm for a...
Akshit Arora
 
Industrial Attachment Program (IAP) Report
Industrial Attachment Program (IAP) ReportIndustrial Attachment Program (IAP) Report
Industrial Attachment Program (IAP) Report
Akshit Arora
 
G.D.P. Trends in India
G.D.P. Trends in IndiaG.D.P. Trends in India
G.D.P. Trends in India
Akshit Arora
 
SRS for Ph.D. Student Portal (C.S.E.D., Thapar University)
SRS for Ph.D. Student Portal (C.S.E.D., Thapar University)SRS for Ph.D. Student Portal (C.S.E.D., Thapar University)
SRS for Ph.D. Student Portal (C.S.E.D., Thapar University)
Akshit Arora
 
Souvenir's Booth - Algorithm Design and Analysis Project Project Report
Souvenir's Booth - Algorithm Design and Analysis Project Project ReportSouvenir's Booth - Algorithm Design and Analysis Project Project Report
Souvenir's Booth - Algorithm Design and Analysis Project Project Report
Akshit Arora
 
Souvenir's Booth - Algorithm Design and Analysis Project Presentation
Souvenir's Booth - Algorithm Design and Analysis Project PresentationSouvenir's Booth - Algorithm Design and Analysis Project Presentation
Souvenir's Booth - Algorithm Design and Analysis Project Presentation
Akshit Arora
 
Developing Interactive Landslide Simulator
Developing Interactive Landslide SimulatorDeveloping Interactive Landslide Simulator
Developing Interactive Landslide SimulatorAkshit Arora
 
Developing Interactive Landslide Simulator (Poster)
Developing Interactive Landslide Simulator (Poster)Developing Interactive Landslide Simulator (Poster)
Developing Interactive Landslide Simulator (Poster)Akshit Arora
 
Developing Interactive Landslide Simulator (Report)
Developing Interactive Landslide Simulator (Report)Developing Interactive Landslide Simulator (Report)
Developing Interactive Landslide Simulator (Report)Akshit Arora
 
Emotional Regulation and Stress Burnout
Emotional Regulation and Stress BurnoutEmotional Regulation and Stress Burnout
Emotional Regulation and Stress Burnout
Akshit Arora
 
Asynchronous processors Poster
Asynchronous processors PosterAsynchronous processors Poster
Asynchronous processors PosterAkshit Arora
 
Asynchronous Processors - The Clock less Future
Asynchronous Processors - The Clock less FutureAsynchronous Processors - The Clock less Future
Asynchronous Processors - The Clock less Future
Akshit Arora
 

More from Akshit Arora (17)

Kalam innovation award
Kalam innovation awardKalam innovation award
Kalam innovation award
 
Cv akshitarora
Cv akshitaroraCv akshitarora
Cv akshitarora
 
Capstone Report - Industrial Attachment Program (IAP) Evaluation Portal
Capstone Report - Industrial Attachment Program (IAP) Evaluation PortalCapstone Report - Industrial Attachment Program (IAP) Evaluation Portal
Capstone Report - Industrial Attachment Program (IAP) Evaluation Portal
 
Organizational behavior presentation - Origins of Intelligence
Organizational behavior presentation - Origins of IntelligenceOrganizational behavior presentation - Origins of Intelligence
Organizational behavior presentation - Origins of Intelligence
 
Application of Management Tools: Total Quality Management Course
Application of Management Tools: Total Quality Management CourseApplication of Management Tools: Total Quality Management Course
Application of Management Tools: Total Quality Management Course
 
A multilevel automatic thresholding method based on a genetic algorithm for a...
A multilevel automatic thresholding method based on a genetic algorithm for a...A multilevel automatic thresholding method based on a genetic algorithm for a...
A multilevel automatic thresholding method based on a genetic algorithm for a...
 
Industrial Attachment Program (IAP) Report
Industrial Attachment Program (IAP) ReportIndustrial Attachment Program (IAP) Report
Industrial Attachment Program (IAP) Report
 
G.D.P. Trends in India
G.D.P. Trends in IndiaG.D.P. Trends in India
G.D.P. Trends in India
 
SRS for Ph.D. Student Portal (C.S.E.D., Thapar University)
SRS for Ph.D. Student Portal (C.S.E.D., Thapar University)SRS for Ph.D. Student Portal (C.S.E.D., Thapar University)
SRS for Ph.D. Student Portal (C.S.E.D., Thapar University)
 
Souvenir's Booth - Algorithm Design and Analysis Project Project Report
Souvenir's Booth - Algorithm Design and Analysis Project Project ReportSouvenir's Booth - Algorithm Design and Analysis Project Project Report
Souvenir's Booth - Algorithm Design and Analysis Project Project Report
 
Souvenir's Booth - Algorithm Design and Analysis Project Presentation
Souvenir's Booth - Algorithm Design and Analysis Project PresentationSouvenir's Booth - Algorithm Design and Analysis Project Presentation
Souvenir's Booth - Algorithm Design and Analysis Project Presentation
 
Developing Interactive Landslide Simulator
Developing Interactive Landslide SimulatorDeveloping Interactive Landslide Simulator
Developing Interactive Landslide Simulator
 
Developing Interactive Landslide Simulator (Poster)
Developing Interactive Landslide Simulator (Poster)Developing Interactive Landslide Simulator (Poster)
Developing Interactive Landslide Simulator (Poster)
 
Developing Interactive Landslide Simulator (Report)
Developing Interactive Landslide Simulator (Report)Developing Interactive Landslide Simulator (Report)
Developing Interactive Landslide Simulator (Report)
 
Emotional Regulation and Stress Burnout
Emotional Regulation and Stress BurnoutEmotional Regulation and Stress Burnout
Emotional Regulation and Stress Burnout
 
Asynchronous processors Poster
Asynchronous processors PosterAsynchronous processors Poster
Asynchronous processors Poster
 
Asynchronous Processors - The Clock less Future
Asynchronous Processors - The Clock less FutureAsynchronous Processors - The Clock less Future
Asynchronous Processors - The Clock less Future
 

Recently uploaded

Hybrid optimization of pumped hydro system and solar- Engr. Abdul-Azeez.pdf
Hybrid optimization of pumped hydro system and solar- Engr. Abdul-Azeez.pdfHybrid optimization of pumped hydro system and solar- Engr. Abdul-Azeez.pdf
Hybrid optimization of pumped hydro system and solar- Engr. Abdul-Azeez.pdf
fxintegritypublishin
 
J.Yang, ICLR 2024, MLILAB, KAIST AI.pdf
J.Yang,  ICLR 2024, MLILAB, KAIST AI.pdfJ.Yang,  ICLR 2024, MLILAB, KAIST AI.pdf
J.Yang, ICLR 2024, MLILAB, KAIST AI.pdf
MLILAB
 
Gen AI Study Jams _ For the GDSC Leads in India.pdf
Gen AI Study Jams _ For the GDSC Leads in India.pdfGen AI Study Jams _ For the GDSC Leads in India.pdf
Gen AI Study Jams _ For the GDSC Leads in India.pdf
gdsczhcet
 
CME397 Surface Engineering- Professional Elective
CME397 Surface Engineering- Professional ElectiveCME397 Surface Engineering- Professional Elective
CME397 Surface Engineering- Professional Elective
karthi keyan
 
power quality voltage fluctuation UNIT - I.pptx
power quality voltage fluctuation UNIT - I.pptxpower quality voltage fluctuation UNIT - I.pptx
power quality voltage fluctuation UNIT - I.pptx
ViniHema
 
一比一原版(UofT毕业证)多伦多大学毕业证成绩单如何办理
一比一原版(UofT毕业证)多伦多大学毕业证成绩单如何办理一比一原版(UofT毕业证)多伦多大学毕业证成绩单如何办理
一比一原版(UofT毕业证)多伦多大学毕业证成绩单如何办理
ydteq
 
Hierarchical Digital Twin of a Naval Power System
Hierarchical Digital Twin of a Naval Power SystemHierarchical Digital Twin of a Naval Power System
Hierarchical Digital Twin of a Naval Power System
Kerry Sado
 
Top 10 Oil and Gas Projects in Saudi Arabia 2024.pdf
Top 10 Oil and Gas Projects in Saudi Arabia 2024.pdfTop 10 Oil and Gas Projects in Saudi Arabia 2024.pdf
Top 10 Oil and Gas Projects in Saudi Arabia 2024.pdf
Teleport Manpower Consultant
 
weather web application report.pdf
weather web application report.pdfweather web application report.pdf
weather web application report.pdf
Pratik Pawar
 
Architectural Portfolio Sean Lockwood
Architectural Portfolio Sean LockwoodArchitectural Portfolio Sean Lockwood
Architectural Portfolio Sean Lockwood
seandesed
 
Fundamentals of Electric Drives and its applications.pptx
Fundamentals of Electric Drives and its applications.pptxFundamentals of Electric Drives and its applications.pptx
Fundamentals of Electric Drives and its applications.pptx
manasideore6
 
ethical hacking-mobile hacking methods.ppt
ethical hacking-mobile hacking methods.pptethical hacking-mobile hacking methods.ppt
ethical hacking-mobile hacking methods.ppt
Jayaprasanna4
 
ethical hacking in wireless-hacking1.ppt
ethical hacking in wireless-hacking1.pptethical hacking in wireless-hacking1.ppt
ethical hacking in wireless-hacking1.ppt
Jayaprasanna4
 
AP LAB PPT.pdf ap lab ppt no title specific
AP LAB PPT.pdf ap lab ppt no title specificAP LAB PPT.pdf ap lab ppt no title specific
AP LAB PPT.pdf ap lab ppt no title specific
BrazilAccount1
 
space technology lecture notes on satellite
space technology lecture notes on satellitespace technology lecture notes on satellite
space technology lecture notes on satellite
ongomchris
 
road safety engineering r s e unit 3.pdf
road safety engineering  r s e unit 3.pdfroad safety engineering  r s e unit 3.pdf
road safety engineering r s e unit 3.pdf
VENKATESHvenky89705
 
The role of big data in decision making.
The role of big data in decision making.The role of big data in decision making.
The role of big data in decision making.
ankuprajapati0525
 
H.Seo, ICLR 2024, MLILAB, KAIST AI.pdf
H.Seo,  ICLR 2024, MLILAB,  KAIST AI.pdfH.Seo,  ICLR 2024, MLILAB,  KAIST AI.pdf
H.Seo, ICLR 2024, MLILAB, KAIST AI.pdf
MLILAB
 
Railway Signalling Principles Edition 3.pdf
Railway Signalling Principles Edition 3.pdfRailway Signalling Principles Edition 3.pdf
Railway Signalling Principles Edition 3.pdf
TeeVichai
 
The Benefits and Techniques of Trenchless Pipe Repair.pdf
The Benefits and Techniques of Trenchless Pipe Repair.pdfThe Benefits and Techniques of Trenchless Pipe Repair.pdf
The Benefits and Techniques of Trenchless Pipe Repair.pdf
Pipe Restoration Solutions
 

Recently uploaded (20)

Hybrid optimization of pumped hydro system and solar- Engr. Abdul-Azeez.pdf
Hybrid optimization of pumped hydro system and solar- Engr. Abdul-Azeez.pdfHybrid optimization of pumped hydro system and solar- Engr. Abdul-Azeez.pdf
Hybrid optimization of pumped hydro system and solar- Engr. Abdul-Azeez.pdf
 
J.Yang, ICLR 2024, MLILAB, KAIST AI.pdf
J.Yang,  ICLR 2024, MLILAB, KAIST AI.pdfJ.Yang,  ICLR 2024, MLILAB, KAIST AI.pdf
J.Yang, ICLR 2024, MLILAB, KAIST AI.pdf
 
Gen AI Study Jams _ For the GDSC Leads in India.pdf
Gen AI Study Jams _ For the GDSC Leads in India.pdfGen AI Study Jams _ For the GDSC Leads in India.pdf
Gen AI Study Jams _ For the GDSC Leads in India.pdf
 
CME397 Surface Engineering- Professional Elective
CME397 Surface Engineering- Professional ElectiveCME397 Surface Engineering- Professional Elective
CME397 Surface Engineering- Professional Elective
 
power quality voltage fluctuation UNIT - I.pptx
power quality voltage fluctuation UNIT - I.pptxpower quality voltage fluctuation UNIT - I.pptx
power quality voltage fluctuation UNIT - I.pptx
 
一比一原版(UofT毕业证)多伦多大学毕业证成绩单如何办理
一比一原版(UofT毕业证)多伦多大学毕业证成绩单如何办理一比一原版(UofT毕业证)多伦多大学毕业证成绩单如何办理
一比一原版(UofT毕业证)多伦多大学毕业证成绩单如何办理
 
Hierarchical Digital Twin of a Naval Power System
Hierarchical Digital Twin of a Naval Power SystemHierarchical Digital Twin of a Naval Power System
Hierarchical Digital Twin of a Naval Power System
 
Top 10 Oil and Gas Projects in Saudi Arabia 2024.pdf
Top 10 Oil and Gas Projects in Saudi Arabia 2024.pdfTop 10 Oil and Gas Projects in Saudi Arabia 2024.pdf
Top 10 Oil and Gas Projects in Saudi Arabia 2024.pdf
 
weather web application report.pdf
weather web application report.pdfweather web application report.pdf
weather web application report.pdf
 
Architectural Portfolio Sean Lockwood
Architectural Portfolio Sean LockwoodArchitectural Portfolio Sean Lockwood
Architectural Portfolio Sean Lockwood
 
Fundamentals of Electric Drives and its applications.pptx
Fundamentals of Electric Drives and its applications.pptxFundamentals of Electric Drives and its applications.pptx
Fundamentals of Electric Drives and its applications.pptx
 
ethical hacking-mobile hacking methods.ppt
ethical hacking-mobile hacking methods.pptethical hacking-mobile hacking methods.ppt
ethical hacking-mobile hacking methods.ppt
 
ethical hacking in wireless-hacking1.ppt
ethical hacking in wireless-hacking1.pptethical hacking in wireless-hacking1.ppt
ethical hacking in wireless-hacking1.ppt
 
AP LAB PPT.pdf ap lab ppt no title specific
AP LAB PPT.pdf ap lab ppt no title specificAP LAB PPT.pdf ap lab ppt no title specific
AP LAB PPT.pdf ap lab ppt no title specific
 
space technology lecture notes on satellite
space technology lecture notes on satellitespace technology lecture notes on satellite
space technology lecture notes on satellite
 
road safety engineering r s e unit 3.pdf
road safety engineering  r s e unit 3.pdfroad safety engineering  r s e unit 3.pdf
road safety engineering r s e unit 3.pdf
 
The role of big data in decision making.
The role of big data in decision making.The role of big data in decision making.
The role of big data in decision making.
 
H.Seo, ICLR 2024, MLILAB, KAIST AI.pdf
H.Seo,  ICLR 2024, MLILAB,  KAIST AI.pdfH.Seo,  ICLR 2024, MLILAB,  KAIST AI.pdf
H.Seo, ICLR 2024, MLILAB, KAIST AI.pdf
 
Railway Signalling Principles Edition 3.pdf
Railway Signalling Principles Edition 3.pdfRailway Signalling Principles Edition 3.pdf
Railway Signalling Principles Edition 3.pdf
 
The Benefits and Techniques of Trenchless Pipe Repair.pdf
The Benefits and Techniques of Trenchless Pipe Repair.pdfThe Benefits and Techniques of Trenchless Pipe Repair.pdf
The Benefits and Techniques of Trenchless Pipe Repair.pdf
 

Image Segmentation using Otsu's Method - Computer Graphics (UCS505) Project Report

  • 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