SlideShare a Scribd company logo
Journal for Research| Volume 02| Issue 05 | July 2016
ISSN: 2395-7549
All rights reserved by www.journalforresearch.org 20
Gray Scale Image Segmentation using OTSU
Thresholding Optimal Approach
Patil Priyanka Vijay Prof. N. C. Patil
Department of Electronics & Telecommunication Engineering Department of Electronics & Telecommunication Engineering
D. N. Patel college of engineering, Shahada, MP-India D. N. Patel college of engineering, Shahada, MP-India
Abstract
Image segmentation is often used to distinguish the foreground from the background. Image segmentation is one of the difficult
research problems in the machine vision industry and pattern recognition. Thresholding is a simple but effective method to
separate objects from the background. A commonly used method, the Otsu method, improves the image segmentation effect
obviously. It can be implemented by two different approaches: Iteration approach and Custom approach. In this paper both
approaches has been implemented on MATLAB and give the comparison of them and show that both has given almost the same
threshold value for segmenting image but the custom approach requires less computations. So if this method will be
implemented on hardware in an optimized way then custom approach is the best option.
Keywords: OTSU, Image Segmentation, Thresholding
_______________________________________________________________________________________________________
I. INTRODUCTION
Otsu's method [1][2] is a very popular global automatic thresholding technique, which can be applied to a wide range of
applications. These applications demand real-time performance and a hardware implementation is essential to increase the
computational efficiency of the Otsu's procedure. Many improved algorithms have been given till date. Xiaolu Yang has given an
improved median-based Algorithm [3], WANG Hongzhi and DONG Ying has proposed new method for selection of optimal
threshold value for defect detection[4], Ningbo Zhu1 and Gang Wang have proposed fast algorithm based on improved
histogram[5].
In this paper, two different approaches have been implemented on MATLAB and given the comparison. The rest of this paper
is organized as follows. Section 2 gives a brief review of Otsu method. In section 3,we describe the implementation of iteration
approach and custom approach. Then, section 4 presents experimental results and analysis. Finally, the paper is summarized and
conclusions are drawn in section 5 and section 6 gives future work.
II. OTSU METHOD
Otsu's method is based on the principle that the gray-level for which the between-class variance is maximum or within class
variance is minimum is selected as the threshold [7]. Let the pixels of a given picture be represented in L gray levels [0, 1, …, L–
1]. The number of pixels at level i is denoted by ni and the total number of pixels by N = n0 + n1 + … + nL–1. In order to simplify
the discussion, the gray-level histogram is normalized and regarded as a probability distribution:
Now suppose that we dichotomize the pixels into two classes C0 and C1 (background and objects, or vice versa) by a threshold at
level t; C0 denotes pixels with levels [0, …, t], and C1 denotes pixels with levels [t+1, … , L–1]. Then the probabilities of class
occurrence and the class mean levels, respectively, are given by
And
Gray Scale Image Segmentation using OTSU Thresholding Optimal Approach
(J4R/ Volume 02 / Issue 05 / 004)
All rights reserved by www.journalforresearch.org 21
Where
And
are the zeroth- and the first-order cumulative moments of the histogram up to the t th level, respectively, and
is the total mean level of the original picture. We can easily verify the following relation for any choice of t :
The class variances are given by
These require second-order cumulative moments (statistics). In order to evaluate the "goodness" of the threshold (at level t),
we shall take the following discriminant criterion measures (or measures of class separability) used in the discriminant analysis
as shown in (12)
Then our problem is reduced to an optimization problem to search for a threshold t that maximizes the object functions
(thecriterion measures) in (12).
This standpoint is motivated by a conjecture that between class variance is a measurement to the difference between two parts.
The greater the between-class variance is, the greater difference between the two parts. When we make a mistake between the
objects and the background, between-class variance will decrease. As a result, making the between-class variance maximum
means making the probability of error minimum, a threshold giving the best separation of classes in gray levels would be the best
threshold. That is the Otsu algorithm.
The optimal threshold t* that maximizes , is selected in the following sequential search for the values of t from 0 to L–1 by
using the simple cumulative quantities (6) and (7), or explicitly using (2)-(5):
and the optimal threshold t* is
III. IMPLEMENTATION
Iteration Approach
Iteration Approach is exact representation of Otsu's method. The within-class variance is simply the sum of the two variances
multiplied by their associated weights.
Where,
= The variance of the pixels in the background (below threshold)
= The variance of the pixels in the foreground (above threshold)
It has lot of computations.
Gray Scale Image Segmentation using OTSU Thresholding Optimal Approach
(J4R/ Volume 02 / Issue 05 / 004)
All rights reserved by www.journalforresearch.org 22
Custom Approach
It’s Easier using simple recurrence relations. The threshold with the maximum between class variance also has the minimum
within class variance. So it can also be used for finding the best threshold and therefore due to being simpler is a much better
approach to use. Threshold is calculated by optimized formula of Otsu's method.
Between Class Variance
(Where )
Implemented both approaches in MATLAB. The simulation results in MATLAB software for different images are shown in
fig. (a), (b) and (c).
IV. HISTOGRAM
An image histogram is a type of histogram that acts as a graphical representation of the intensity distribution in a digital image. It
plots the number of pixels for each intensity value. By looking at the histogram for a specific image a viewer will be able to
judge the entire intensity distribution at a glance.
The horizontal axis of the graph represents the intensity variations, while the vertical axis represents the number of pixels at
that particular intensity. The left side of the horizontal axis represents the black and dark areas, the middle represents medium
gray and the right hand side represents light and pure white areas. The vertical axis represents the size of the area that is captured
in each one of these zones. Thus, the histogram for a very dark image will have the majority of its data points on the left side and
center of the graph. Conversely, the histogram for a very bright image with few dark areas and/or shadows will have most of its
data points on the right side and center of the graph.
Fig. 1: Histogram
V. EXPERIMENTAL RESULTS AND ANALYSIS
In this section, the performance of the both approach has been evaluated and compared .To evaluate the practical performance,
both approaches have been implemented in MATLAB under windows 7 system. Experiments are performed on nearly 10 images
to compare the results of both approaches. The few images are given below to know how the segmentation takes place.
As per the figures, figure (a) indicates the original images and figure (b) indicates the corresponding segmented images using
Iteration approach and figure (c) indicates the corresponding segmented images using custom approach. d) Indicates the
corresponding segmented image using MATLAB function as shown in Fig. The important point in this concept is in both the
methods the obtained threshold value is nearly same, but these methods are differing in terms of computations. The iteration
approach has lot of computations while custom approach has fewer computations.
VI. SIMULATION RESULT & COMPARISON TABLES
Design Otsu algorithm in MATLAB 7.0. MATLAB is a data analysis and visualisation tool designed to make matrix
manipulation as simple as possible. In addition, it has powerful graphics capabilities and its own programming language. The
basic MATLAB distribution can be expanded by adding a range of toolboxes, the one relevant to this course is the image-
processing toolbox (IPT). Result carry out of different Image and compare with MATLAB function. The basic distribution and
all of the currently available toolboxes are available in the labs. The basic distribution plus any installed toolboxes will provide a
large selection of functions, invoked via a command line interface.
Table – 1
Simulation Results
Gray Scale Image Segmentation using OTSU Thresholding Optimal Approach
(J4R/ Volume 02 / Issue 05 / 004)
All rights reserved by www.journalforresearch.org 23
Image 1 Iteration Approach Custom Approach MATLAB function
GRAY Image Histogram Histogram Of Binary Image Cumulative Sum
Image 2 Iteration Approach Custom Approach MATLAB Function
GRAY Image Histogram Histogram of Binary Image Cumulative sum
Image 3 Iteration Approach Custom Approach MATLAB function
GRAY image Histogram histogram of binary image Cumulative sum
Gray Scale Image Segmentation using OTSU Thresholding Optimal Approach
(J4R/ Volume 02 / Issue 05 / 004)
All rights reserved by www.journalforresearch.org 24
Image 4 Iteration Approach Custom Approach Matlab Function
GRAY image Histogram histogram of binary image Cumulative sum
Table – 2
Comparison Table
Sr. No. Input Image
Threshold Value
Iteration Approach Custom Approach MATLAB Function
1 Image 1 110 111 111
2 Image 2 114 115 115
3 Image 3 127 128 128
4 Image 4 154 155 155
VII.CONCLUSION
The Otsu method is one of very efficient methods to threshold the gray images. Comparison of iteration approach and custom
approach to implement Otsu thresholding method has been given for image segmentation. The custom approach maximizes a
modified between-class variance instead of maximizing the conventional between-class variance as a criterion. For M multilevel
threshold selection, we showed that maximizing the modified between-class variance has less computation than maximizing the
conventional between-class variance. The formulas for ω and µ for the modified between-class variance are written in recursive
form, which reduces the complexity of computation for ω and µ. Thus, for image segmentation using custom approach is better
than the iteration approach which has lots of computation.
REFERENCES
[1] Liao P.S., Chen T.S. and Chung P.C., “A fast algorithm for multilevel thresholding,” Journal of Information Science and Engineering, 2003, Vol. 17, pp.
713-727.
[2] Otsu N., “A threshold selection method from gray-level histogram,” IEEE Trans. On System Man Cybernetics, 1979, Vol. 9, No. 1, pp. 62- 66.
[3] Xiaolu Yang, Xuanjing Shen, Jianwu Long, Haipeng Chen,“An improved median-based Otsu image thresholding Algorithm”, AASRI Conference on
Modelling, Identification and Control, published by Elsevier B.V, 2012, volume 3, pp. 468 – 473.
[4] WANG Hongzhi and DONG Ying “ An Improved Image Segmentation Algorithm Based on Otsu Method ”, International Symposium on Photoelectronic
Detection and Imaging : Related Technologies and Applications, 2008, Vol. 6625, pp.1-8
[5] Ningbo Zhu, Gang Wang, Gaobo Yang, Weiming Dai “A Fast 2D Otsu Thresholding Algorithm Based on Improved Histogram”, IEEE, 2009
[6] J.Sauvola, M. Pietikainen, “Adaptive Document Image Binarization.” Pattern Recognition. 2000, volume 33, pp. 225-236.
[7] M.Sezgin, B.Sankur, “Survey over image thresholding techniques and quantitative performance evaluation.” ,Journal of Electronic Imaging, 2004, volume
13, pp. 146-165.
[8] A Z Arifin & Akira Asano,“Image thresholding by histogram segmentation using discriminant analysis” Journal Pattern Recognition Letters, 2011, Volume
27 Issue 13, pp. 1515-1521
[9] Ch. Hima Bindu & K. Satya Prasad “An Efficient Medical Image segmentation using Conventional Otsu Method”, International journal of advanced
science and technology, 2012, Vol 38, pp 67-73
[10] Wang Jianlai, Yang Chunling, Zhu Min, Wang Changhui, “Implementation of Otsu's Thresholding Process Based on FPGA”,IEEE, 2009, Vol. 7, pp479-
483
[11] R. C. Gonzalez and R. E. Woods. “Digital Image Processing”. 3rd ed. Prentice Hall, 2

More Related Content

PPTX
Image Segmentation using Otsu's Method - Computer Graphics (UCS505) Project PPT
PDF
Image Segmentation using Otsu's Method - Computer Graphics (UCS505) Project R...
PPTX
Otsu binarization
PDF
IMAGE SEGMENTATION BY USING THRESHOLDING TECHNIQUES FOR MEDICAL IMAGES
PDF
Region-based Semi-supervised Clustering Image Segmentation
PPT
Image segmentation
PDF
Image Segmentation (Digital Image Processing)
PDF
Review of Image Segmentation Techniques based on Region Merging Approach
Image Segmentation using Otsu's Method - Computer Graphics (UCS505) Project PPT
Image Segmentation using Otsu's Method - Computer Graphics (UCS505) Project R...
Otsu binarization
IMAGE SEGMENTATION BY USING THRESHOLDING TECHNIQUES FOR MEDICAL IMAGES
Region-based Semi-supervised Clustering Image Segmentation
Image segmentation
Image Segmentation (Digital Image Processing)
Review of Image Segmentation Techniques based on Region Merging Approach

What's hot (20)

PPT
Segmentation
PDF
A comparison of image segmentation techniques, otsu and watershed for x ray i...
PDF
Threshold Selection for Image segmentation
PPTX
Image segmentation
PPTX
Comparison of Segmentation Algorithms and Estimation of Optimal Segmentation ...
PPSX
Image segmentation 2
PPTX
various methods for image segmentation
PPTX
Comparison of image segmentation
PPTX
A study and comparison of different image segmentation algorithms
PPTX
Video Segmentation
PPTX
Watershed
PPTX
Image segmentation using wvlt trnsfrmtn and fuzzy logic. ppt
PPTX
Segmentation Techniques -I
PPT
Image segmentation ajal
PPTX
Image segmentation
PPT
Presentation on deformable model for medical image segmentation
PDF
AUTOMATIC THRESHOLDING TECHNIQUES FOR OPTICAL IMAGES
PPT
Fuzzy c-means clustering for image segmentation
PDF
Digital Image Processing: Image Segmentation
PPTX
IMAGE SEGMENTATION TECHNIQUES
Segmentation
A comparison of image segmentation techniques, otsu and watershed for x ray i...
Threshold Selection for Image segmentation
Image segmentation
Comparison of Segmentation Algorithms and Estimation of Optimal Segmentation ...
Image segmentation 2
various methods for image segmentation
Comparison of image segmentation
A study and comparison of different image segmentation algorithms
Video Segmentation
Watershed
Image segmentation using wvlt trnsfrmtn and fuzzy logic. ppt
Segmentation Techniques -I
Image segmentation ajal
Image segmentation
Presentation on deformable model for medical image segmentation
AUTOMATIC THRESHOLDING TECHNIQUES FOR OPTICAL IMAGES
Fuzzy c-means clustering for image segmentation
Digital Image Processing: Image Segmentation
IMAGE SEGMENTATION TECHNIQUES
Ad

Viewers also liked (9)

PPT
Image inpainting
PDF
Examplar-based inpainting
PDF
Region filling and object removal by exemplar based image inpainting
PPTX
Fuzzy c means manual work
PDF
Fuzzy c-Means Clustering Algorithms
PPTX
fuzzy image processing
PPTX
Fuzzy image processing- fuzzy C-mean clustering
PDF
Taming the ever-evolving Compliance Beast : Lessons learnt at LinkedIn [Strat...
PPTX
Slideshare ppt
Image inpainting
Examplar-based inpainting
Region filling and object removal by exemplar based image inpainting
Fuzzy c means manual work
Fuzzy c-Means Clustering Algorithms
fuzzy image processing
Fuzzy image processing- fuzzy C-mean clustering
Taming the ever-evolving Compliance Beast : Lessons learnt at LinkedIn [Strat...
Slideshare ppt
Ad

Similar to GRAY SCALE IMAGE SEGMENTATION USING OTSU THRESHOLDING OPTIMAL APPROACH (20)

PDF
OTSU Thresholding Method for Flower Image Segmentation
PPTX
Final Review
PDF
AUTOMATIC THRESHOLDING TECHNIQUES FOR SAR IMAGES
PDF
AUTOMATIC THRESHOLDING TECHNIQUES FOR SAR IMAGES
PDF
Lecture 9&10 computer vision segmentation-no_task
PPTX
Advanced 2D Otsu Method
PPTX
Digital Image Processing Global Thresholding Using Otsu’sMethod
PPTX
Global Thresholding algorithm Using Otsu’s Method
PDF
PDF
Tracking of Fluorescent Cells Based on the Wavelet Otsu Model
PDF
MRI IMAGES THRESHOLDING FOR ALZHEIMER DETECTION
PDF
MRI IMAGES THRESHOLDING FOR ALZHEIMER DETECTION
PPTX
08 cie552 image_segmentation
PDF
Ijetcas14 372
PPTX
PPTX
Cell calculation
PDF
A Survey of Image Processing and Identification Techniques
PDF
IRJET- Plant Disease Identification System
PDF
Comparative between global threshold and adaptative threshold concepts in ima...
PPTX
Segmentation is preper concept to hands.pptx
OTSU Thresholding Method for Flower Image Segmentation
Final Review
AUTOMATIC THRESHOLDING TECHNIQUES FOR SAR IMAGES
AUTOMATIC THRESHOLDING TECHNIQUES FOR SAR IMAGES
Lecture 9&10 computer vision segmentation-no_task
Advanced 2D Otsu Method
Digital Image Processing Global Thresholding Using Otsu’sMethod
Global Thresholding algorithm Using Otsu’s Method
Tracking of Fluorescent Cells Based on the Wavelet Otsu Model
MRI IMAGES THRESHOLDING FOR ALZHEIMER DETECTION
MRI IMAGES THRESHOLDING FOR ALZHEIMER DETECTION
08 cie552 image_segmentation
Ijetcas14 372
Cell calculation
A Survey of Image Processing and Identification Techniques
IRJET- Plant Disease Identification System
Comparative between global threshold and adaptative threshold concepts in ima...
Segmentation is preper concept to hands.pptx

More from Journal For Research (20)

PDF
Design and Analysis of Hydraulic Actuator in a Typical Aerospace vehicle | J4...
PDF
Experimental Verification and Validation of Stress Distribution of Composite ...
PDF
Image Binarization for the uses of Preprocessing to Detect Brain Abnormality ...
PDF
A Research Paper on BFO and PSO Based Movie Recommendation System | J4RV4I1016
PDF
IoT based Digital Agriculture Monitoring System and Their Impact on Optimal U...
PDF
A REVIEW PAPER ON BFO AND PSO BASED MOVIE RECOMMENDATION SYSTEM | J4RV4I1015
PDF
HCI BASED APPLICATION FOR PLAYING COMPUTER GAMES | J4RV4I1014
PDF
A REVIEW ON DESIGN OF PUBLIC TRANSPORTATION SYSTEM IN CHANDRAPUR CITY | J4RV4...
PDF
A REVIEW ON LIFTING AND ASSEMBLY OF ROTARY KILN TYRE WITH SHELL BY FLEXIBLE G...
PDF
LABORATORY STUDY OF STRONG, MODERATE AND WEAK SANDSTONES | J4RV4I1012
PDF
DESIGN ANALYSIS AND FABRICATION OF MANUAL RICE TRANSPLANTING MACHINE | J4RV4I...
PDF
AN OVERVIEW: DAKNET TECHNOLOGY - BROADBAND AD-HOC CONNECTIVITY | J4RV4I1009
PDF
LINE FOLLOWER ROBOT | J4RV4I1010
PDF
CHATBOT FOR COLLEGE RELATED QUERIES | J4RV4I1008
PDF
AN INTEGRATED APPROACH TO REDUCE INTRA CITY TRAFFIC AT COIMBATORE | J4RV4I1002
PDF
A REVIEW STUDY ON GAS-SOLID CYCLONE SEPARATOR USING LAPPLE MODEL | J4RV4I1001
PDF
IMAGE SEGMENTATION USING FCM ALGORITM | J4RV3I12021
PDF
USE OF GALVANIZED STEELS FOR AUTOMOTIVE BODY- CAR SURVEY RESULTS AT COASTAL A...
PDF
UNMANNED AERIAL VEHICLE FOR REMITTANCE | J4RV3I12023
PDF
SURVEY ON A MODERN MEDICARE SYSTEM USING INTERNET OF THINGS | J4RV3I12024
Design and Analysis of Hydraulic Actuator in a Typical Aerospace vehicle | J4...
Experimental Verification and Validation of Stress Distribution of Composite ...
Image Binarization for the uses of Preprocessing to Detect Brain Abnormality ...
A Research Paper on BFO and PSO Based Movie Recommendation System | J4RV4I1016
IoT based Digital Agriculture Monitoring System and Their Impact on Optimal U...
A REVIEW PAPER ON BFO AND PSO BASED MOVIE RECOMMENDATION SYSTEM | J4RV4I1015
HCI BASED APPLICATION FOR PLAYING COMPUTER GAMES | J4RV4I1014
A REVIEW ON DESIGN OF PUBLIC TRANSPORTATION SYSTEM IN CHANDRAPUR CITY | J4RV4...
A REVIEW ON LIFTING AND ASSEMBLY OF ROTARY KILN TYRE WITH SHELL BY FLEXIBLE G...
LABORATORY STUDY OF STRONG, MODERATE AND WEAK SANDSTONES | J4RV4I1012
DESIGN ANALYSIS AND FABRICATION OF MANUAL RICE TRANSPLANTING MACHINE | J4RV4I...
AN OVERVIEW: DAKNET TECHNOLOGY - BROADBAND AD-HOC CONNECTIVITY | J4RV4I1009
LINE FOLLOWER ROBOT | J4RV4I1010
CHATBOT FOR COLLEGE RELATED QUERIES | J4RV4I1008
AN INTEGRATED APPROACH TO REDUCE INTRA CITY TRAFFIC AT COIMBATORE | J4RV4I1002
A REVIEW STUDY ON GAS-SOLID CYCLONE SEPARATOR USING LAPPLE MODEL | J4RV4I1001
IMAGE SEGMENTATION USING FCM ALGORITM | J4RV3I12021
USE OF GALVANIZED STEELS FOR AUTOMOTIVE BODY- CAR SURVEY RESULTS AT COASTAL A...
UNMANNED AERIAL VEHICLE FOR REMITTANCE | J4RV3I12023
SURVEY ON A MODERN MEDICARE SYSTEM USING INTERNET OF THINGS | J4RV3I12024

Recently uploaded (20)

PPTX
PPH.pptx obstetrics and gynecology in nursing
PDF
102 student loan defaulters named and shamed – Is someone you know on the list?
PDF
FourierSeries-QuestionsWithAnswers(Part-A).pdf
PDF
Abdominal Access Techniques with Prof. Dr. R K Mishra
PDF
Origin of periodic table-Mendeleev’s Periodic-Modern Periodic table
PPTX
GDM (1) (1).pptx small presentation for students
PDF
Open folder Downloads.pdf yes yes ges yes
PPTX
PPT- ENG7_QUARTER1_LESSON1_WEEK1. IMAGERY -DESCRIPTIONS pptx.pptx
PPTX
Cardiovascular Pharmacology for pharmacy students.pptx
PDF
Business Ethics Teaching Materials for college
PPTX
Week 4 Term 3 Study Techniques revisited.pptx
PDF
Basic Mud Logging Guide for educational purpose
PPTX
human mycosis Human fungal infections are called human mycosis..pptx
PPTX
Introduction_to_Human_Anatomy_and_Physiology_for_B.Pharm.pptx
PDF
Mark Klimek Lecture Notes_240423 revision books _173037.pdf
PPTX
Renaissance Architecture: A Journey from Faith to Humanism
PDF
Insiders guide to clinical Medicine.pdf
PDF
O5-L3 Freight Transport Ops (International) V1.pdf
PPTX
Introduction to Child Health Nursing – Unit I | Child Health Nursing I | B.Sc...
PPTX
Pharmacology of Heart Failure /Pharmacotherapy of CHF
PPH.pptx obstetrics and gynecology in nursing
102 student loan defaulters named and shamed – Is someone you know on the list?
FourierSeries-QuestionsWithAnswers(Part-A).pdf
Abdominal Access Techniques with Prof. Dr. R K Mishra
Origin of periodic table-Mendeleev’s Periodic-Modern Periodic table
GDM (1) (1).pptx small presentation for students
Open folder Downloads.pdf yes yes ges yes
PPT- ENG7_QUARTER1_LESSON1_WEEK1. IMAGERY -DESCRIPTIONS pptx.pptx
Cardiovascular Pharmacology for pharmacy students.pptx
Business Ethics Teaching Materials for college
Week 4 Term 3 Study Techniques revisited.pptx
Basic Mud Logging Guide for educational purpose
human mycosis Human fungal infections are called human mycosis..pptx
Introduction_to_Human_Anatomy_and_Physiology_for_B.Pharm.pptx
Mark Klimek Lecture Notes_240423 revision books _173037.pdf
Renaissance Architecture: A Journey from Faith to Humanism
Insiders guide to clinical Medicine.pdf
O5-L3 Freight Transport Ops (International) V1.pdf
Introduction to Child Health Nursing – Unit I | Child Health Nursing I | B.Sc...
Pharmacology of Heart Failure /Pharmacotherapy of CHF

GRAY SCALE IMAGE SEGMENTATION USING OTSU THRESHOLDING OPTIMAL APPROACH

  • 1. Journal for Research| Volume 02| Issue 05 | July 2016 ISSN: 2395-7549 All rights reserved by www.journalforresearch.org 20 Gray Scale Image Segmentation using OTSU Thresholding Optimal Approach Patil Priyanka Vijay Prof. N. C. Patil Department of Electronics & Telecommunication Engineering Department of Electronics & Telecommunication Engineering D. N. Patel college of engineering, Shahada, MP-India D. N. Patel college of engineering, Shahada, MP-India Abstract Image segmentation is often used to distinguish the foreground from the background. Image segmentation is one of the difficult research problems in the machine vision industry and pattern recognition. Thresholding is a simple but effective method to separate objects from the background. A commonly used method, the Otsu method, improves the image segmentation effect obviously. It can be implemented by two different approaches: Iteration approach and Custom approach. In this paper both approaches has been implemented on MATLAB and give the comparison of them and show that both has given almost the same threshold value for segmenting image but the custom approach requires less computations. So if this method will be implemented on hardware in an optimized way then custom approach is the best option. Keywords: OTSU, Image Segmentation, Thresholding _______________________________________________________________________________________________________ I. INTRODUCTION Otsu's method [1][2] is a very popular global automatic thresholding technique, which can be applied to a wide range of applications. These applications demand real-time performance and a hardware implementation is essential to increase the computational efficiency of the Otsu's procedure. Many improved algorithms have been given till date. Xiaolu Yang has given an improved median-based Algorithm [3], WANG Hongzhi and DONG Ying has proposed new method for selection of optimal threshold value for defect detection[4], Ningbo Zhu1 and Gang Wang have proposed fast algorithm based on improved histogram[5]. In this paper, two different approaches have been implemented on MATLAB and given the comparison. The rest of this paper is organized as follows. Section 2 gives a brief review of Otsu method. In section 3,we describe the implementation of iteration approach and custom approach. Then, section 4 presents experimental results and analysis. Finally, the paper is summarized and conclusions are drawn in section 5 and section 6 gives future work. II. OTSU METHOD Otsu's method is based on the principle that the gray-level for which the between-class variance is maximum or within class variance is minimum is selected as the threshold [7]. Let the pixels of a given picture be represented in L gray levels [0, 1, …, L– 1]. The number of pixels at level i is denoted by ni and the total number of pixels by N = n0 + n1 + … + nL–1. In order to simplify the discussion, the gray-level histogram is normalized and regarded as a probability distribution: Now suppose that we dichotomize the pixels into two classes C0 and C1 (background and objects, or vice versa) by a threshold at level t; C0 denotes pixels with levels [0, …, t], and C1 denotes pixels with levels [t+1, … , L–1]. Then the probabilities of class occurrence and the class mean levels, respectively, are given by And
  • 2. Gray Scale Image Segmentation using OTSU Thresholding Optimal Approach (J4R/ Volume 02 / Issue 05 / 004) All rights reserved by www.journalforresearch.org 21 Where And are the zeroth- and the first-order cumulative moments of the histogram up to the t th level, respectively, and is the total mean level of the original picture. We can easily verify the following relation for any choice of t : The class variances are given by These require second-order cumulative moments (statistics). In order to evaluate the "goodness" of the threshold (at level t), we shall take the following discriminant criterion measures (or measures of class separability) used in the discriminant analysis as shown in (12) Then our problem is reduced to an optimization problem to search for a threshold t that maximizes the object functions (thecriterion measures) in (12). This standpoint is motivated by a conjecture that between class variance is a measurement to the difference between two parts. The greater the between-class variance is, the greater difference between the two parts. When we make a mistake between the objects and the background, between-class variance will decrease. As a result, making the between-class variance maximum means making the probability of error minimum, a threshold giving the best separation of classes in gray levels would be the best threshold. That is the Otsu algorithm. The optimal threshold t* that maximizes , is selected in the following sequential search for the values of t from 0 to L–1 by using the simple cumulative quantities (6) and (7), or explicitly using (2)-(5): and the optimal threshold t* is III. IMPLEMENTATION Iteration Approach Iteration Approach is exact representation of Otsu's method. The within-class variance is simply the sum of the two variances multiplied by their associated weights. Where, = The variance of the pixels in the background (below threshold) = The variance of the pixels in the foreground (above threshold) It has lot of computations.
  • 3. Gray Scale Image Segmentation using OTSU Thresholding Optimal Approach (J4R/ Volume 02 / Issue 05 / 004) All rights reserved by www.journalforresearch.org 22 Custom Approach It’s Easier using simple recurrence relations. The threshold with the maximum between class variance also has the minimum within class variance. So it can also be used for finding the best threshold and therefore due to being simpler is a much better approach to use. Threshold is calculated by optimized formula of Otsu's method. Between Class Variance (Where ) Implemented both approaches in MATLAB. The simulation results in MATLAB software for different images are shown in fig. (a), (b) and (c). IV. HISTOGRAM An image histogram is a type of histogram that acts as a graphical representation of the intensity distribution in a digital image. It plots the number of pixels for each intensity value. By looking at the histogram for a specific image a viewer will be able to judge the entire intensity distribution at a glance. The horizontal axis of the graph represents the intensity variations, while the vertical axis represents the number of pixels at that particular intensity. The left side of the horizontal axis represents the black and dark areas, the middle represents medium gray and the right hand side represents light and pure white areas. The vertical axis represents the size of the area that is captured in each one of these zones. Thus, the histogram for a very dark image will have the majority of its data points on the left side and center of the graph. Conversely, the histogram for a very bright image with few dark areas and/or shadows will have most of its data points on the right side and center of the graph. Fig. 1: Histogram V. EXPERIMENTAL RESULTS AND ANALYSIS In this section, the performance of the both approach has been evaluated and compared .To evaluate the practical performance, both approaches have been implemented in MATLAB under windows 7 system. Experiments are performed on nearly 10 images to compare the results of both approaches. The few images are given below to know how the segmentation takes place. As per the figures, figure (a) indicates the original images and figure (b) indicates the corresponding segmented images using Iteration approach and figure (c) indicates the corresponding segmented images using custom approach. d) Indicates the corresponding segmented image using MATLAB function as shown in Fig. The important point in this concept is in both the methods the obtained threshold value is nearly same, but these methods are differing in terms of computations. The iteration approach has lot of computations while custom approach has fewer computations. VI. SIMULATION RESULT & COMPARISON TABLES Design Otsu algorithm in MATLAB 7.0. MATLAB is a data analysis and visualisation tool designed to make matrix manipulation as simple as possible. In addition, it has powerful graphics capabilities and its own programming language. The basic MATLAB distribution can be expanded by adding a range of toolboxes, the one relevant to this course is the image- processing toolbox (IPT). Result carry out of different Image and compare with MATLAB function. The basic distribution and all of the currently available toolboxes are available in the labs. The basic distribution plus any installed toolboxes will provide a large selection of functions, invoked via a command line interface. Table – 1 Simulation Results
  • 4. Gray Scale Image Segmentation using OTSU Thresholding Optimal Approach (J4R/ Volume 02 / Issue 05 / 004) All rights reserved by www.journalforresearch.org 23 Image 1 Iteration Approach Custom Approach MATLAB function GRAY Image Histogram Histogram Of Binary Image Cumulative Sum Image 2 Iteration Approach Custom Approach MATLAB Function GRAY Image Histogram Histogram of Binary Image Cumulative sum Image 3 Iteration Approach Custom Approach MATLAB function GRAY image Histogram histogram of binary image Cumulative sum
  • 5. Gray Scale Image Segmentation using OTSU Thresholding Optimal Approach (J4R/ Volume 02 / Issue 05 / 004) All rights reserved by www.journalforresearch.org 24 Image 4 Iteration Approach Custom Approach Matlab Function GRAY image Histogram histogram of binary image Cumulative sum Table – 2 Comparison Table Sr. No. Input Image Threshold Value Iteration Approach Custom Approach MATLAB Function 1 Image 1 110 111 111 2 Image 2 114 115 115 3 Image 3 127 128 128 4 Image 4 154 155 155 VII.CONCLUSION The Otsu method is one of very efficient methods to threshold the gray images. Comparison of iteration approach and custom approach to implement Otsu thresholding method has been given for image segmentation. The custom approach maximizes a modified between-class variance instead of maximizing the conventional between-class variance as a criterion. For M multilevel threshold selection, we showed that maximizing the modified between-class variance has less computation than maximizing the conventional between-class variance. The formulas for ω and µ for the modified between-class variance are written in recursive form, which reduces the complexity of computation for ω and µ. Thus, for image segmentation using custom approach is better than the iteration approach which has lots of computation. REFERENCES [1] Liao P.S., Chen T.S. and Chung P.C., “A fast algorithm for multilevel thresholding,” Journal of Information Science and Engineering, 2003, Vol. 17, pp. 713-727. [2] Otsu N., “A threshold selection method from gray-level histogram,” IEEE Trans. On System Man Cybernetics, 1979, Vol. 9, No. 1, pp. 62- 66. [3] Xiaolu Yang, Xuanjing Shen, Jianwu Long, Haipeng Chen,“An improved median-based Otsu image thresholding Algorithm”, AASRI Conference on Modelling, Identification and Control, published by Elsevier B.V, 2012, volume 3, pp. 468 – 473. [4] WANG Hongzhi and DONG Ying “ An Improved Image Segmentation Algorithm Based on Otsu Method ”, International Symposium on Photoelectronic Detection and Imaging : Related Technologies and Applications, 2008, Vol. 6625, pp.1-8 [5] Ningbo Zhu, Gang Wang, Gaobo Yang, Weiming Dai “A Fast 2D Otsu Thresholding Algorithm Based on Improved Histogram”, IEEE, 2009 [6] J.Sauvola, M. Pietikainen, “Adaptive Document Image Binarization.” Pattern Recognition. 2000, volume 33, pp. 225-236. [7] M.Sezgin, B.Sankur, “Survey over image thresholding techniques and quantitative performance evaluation.” ,Journal of Electronic Imaging, 2004, volume 13, pp. 146-165. [8] A Z Arifin & Akira Asano,“Image thresholding by histogram segmentation using discriminant analysis” Journal Pattern Recognition Letters, 2011, Volume 27 Issue 13, pp. 1515-1521 [9] Ch. Hima Bindu & K. Satya Prasad “An Efficient Medical Image segmentation using Conventional Otsu Method”, International journal of advanced science and technology, 2012, Vol 38, pp 67-73 [10] Wang Jianlai, Yang Chunling, Zhu Min, Wang Changhui, “Implementation of Otsu's Thresholding Process Based on FPGA”,IEEE, 2009, Vol. 7, pp479- 483 [11] R. C. Gonzalez and R. E. Woods. “Digital Image Processing”. 3rd ed. Prentice Hall, 2