0% found this document useful (0 votes)
55 views5 pages

Overviewofthresholding

This document discusses different thresholding methods in image processing. Thresholding involves converting a grayscale image to a binary image by setting pixels above a threshold to white and others to black. The document categorizes thresholding methods into histogram-based, clustering-based, entropy-based, object attribute-based, spatial-based, and local methods. It focuses on clustering-based thresholding like K-means and Otsu's method, which uses between-class variance to automatically determine the threshold. Otsu's method assumes a bi-modal histogram and finds the threshold that maximizes the inter-class variance between the foreground and background pixels.

Uploaded by

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

Overviewofthresholding

This document discusses different thresholding methods in image processing. Thresholding involves converting a grayscale image to a binary image by setting pixels above a threshold to white and others to black. The document categorizes thresholding methods into histogram-based, clustering-based, entropy-based, object attribute-based, spatial-based, and local methods. It focuses on clustering-based thresholding like K-means and Otsu's method, which uses between-class variance to automatically determine the threshold. Otsu's method assumes a bi-modal histogram and finds the threshold that maximizes the inter-class variance between the foreground and background pixels.

Uploaded by

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

See discussions, stats, and author profiles for this publication at: https://www.researchgate.

net/publication/342038946

OVERVIEW OF DIFFERENT THRESHOLDING METHODS IN IMAGE


PROCESSING

Conference Paper · June 2020

CITATION READS

1 8,409

1 author:

Prathima Guruprasad
RVITM
30 PUBLICATIONS   27 CITATIONS   

SEE PROFILE

Some of the authors of this publication are also working on these related projects:

Word image identification for handwritten scripts using data visualization View project

All content following this page was uploaded by Prathima Guruprasad on 09 June 2020.

The user has requested enhancement of the downloaded file.


OVERVIEW OF DIFFERENT THRESHOLDING
METHODS IN IMAGE PROCESSING
Parthima Guruprasad1 , Vivekananda Institute of Technology , Bangalore-74
Kushal S Mahalingpur2, Vivekananda Institute of Technology , Bangalore-74
Manjesh.T.N2, Vivekananda Institute of Technology , Bangalore-74

Abstract: Thresholding is the simplest method (sets of pixels, also known as super pixels). The goal
of image segmentation. From a grayscale image, of segmentation is to simplify and/or change the
thresholding can be used to create binary representation of an image into something that is
images. Thresholding methods are categorized more meaningful and easier to analyze.
into six groups based on the information the Object recognition : The task of finding and
algorithm manipulates, in this paper we focus on identifying objects in an image or video sequence.
different clustering-based Thresholding
methods. We analyze various image pre-
processing methods, categorize them, and
IMAGE
express their formulas under a uniform notation.
ACQUISITION
The description on Otsu thresholding method
along with histogram (based on intensity) and
result is documented. And according to our
survey Otsu thresholding is better.
IMAGE
PREPROCESSING

1. INTRODUCTION
Computer vision is a field that include methods
for acquiring, processing , analyzing and SEGMENTATION
understanding of images.
The computer vision includes various stages as
shown in flow diagram.
Image Acquisition: Image acquisition is the REPRESENTATION
creation of digital images, such as of a physical AND
scene or of the interior structure of an object. DESCRIPTION
Image preprocessing: The technique of
enhancing data images which involves removing
low-frequency background noise, normalizing the
intensity of the individual particles images, OBJECT
removing reflections, and masking portions of RECOGNITION
images.
Image segmentation : The process of
partitioning a digital image into multiple segments Fig-1 : Basic steps in Image Processing
. 6) Local methods: adapt the threshold value on
each pixel to the local image characteristics. In
1.1 THRESHOLDING
these methods, a different threshold-value T is
Thresholding is the process of creating black and selected for each pixel in the image.
white image out of a gray scale image by setting
exactly those pixels to white whose value is above a 2 Clustering-based Methods:
given threshold, setting other pixels to black.
Grayscale image by thresholding can be used to The K-means algorithm is an iterative technique
create binary images. that is used to partition an image into K clusters.
The simple thresholding methods involves
replacing each pixel in an image with a black pixel Algorithm:
if the image intensity src(x,y) less than some fixed
constant T (that is, src(x,y) <T), or a white pixel if 1. Pick K cluster centers, either randomly or
the image intensity is greater than that constant. based on some heuristic.

Categorizing Thresholding Methods: To make 2. Assign each pixel in the image to the cluster
thresholding completely automated, it is necessary that minimizes the distance between the
for the computer to automatically select the pixel and the cluster center.
threshold T.
3. Re-compute the cluster centers by averaging
Sezgin and Sankur (2004) categorize thresholding all of the pixels in the cluster.
methods into the following six groups based on the
information the algorithm manipulates. 4. Repeat steps 2 and 3 until convergence is
attained (i.e. no pixels change clusters).
1) Histogram shape-based methods: where, for
example, the peaks, valleys and curvatures of the In this case, distance is the squared or absolute
smoothed histogram are analyzed to calculate difference between a pixel and a cluster center. The
threshold value. difference is typically based on pixel color,
intensity, texture, and location, or a weighted
2) Clustering-based methods: where the gray- combination of these factors. K can be selected
level samples are clustered in two parts as manually, randomly, or by a heuristic. This
background and foreground (object), or alternately algorithm is guaranteed to converge, but it may not
are modeled as a mixture of two Gaussians return the optimal solution. The quality of the
solution depends on the initial set of clusters and the
3) Entropy-based methods: result in algorithms
value of K.
that use the entropy of the foreground and
background regions, the cross-entropy between the 2.1 Types of thresholding methods :
original and binarized image, etc.
1) Threshold Binary
4) Object Attribute-based methods: search a
measure of similarity between the gray-level and Formula:
the binarized images, such as fuzzy shape
max Val if src( x, y )  thresh
similarity, edge coincidence, etc. dst( x, y )  
0 otherwise
5) Spatial methods: use higher-order probability
distribution and/or correlation between pixels. Implementation:
value = value > threshold ? maxVal : 0 processing, Otsu's method is named after Nobuyuki
Otsu, is used to automatically perform the reduction
2) Threshold Binary, Inverted of a gray level image to a binary image.
The algorithm assumes that the image contains two
Formula: classes of pixels following bi-modal histogram
(foreground pixels and background pixels), it then
0 if src( x, y )  thresh calculates the optimum threshold separating the two
dst( x, y )  
max Val otherwise classes so that their combined spread (intra-class
variance) is minimal, or equivalently (because the
Implementation: sum of pair wise squared distances is constant), so
that their inter-class variance is maximal.
value = value > threshold ? 0 : max_Val
3.1 Algorithm:
3) Truncate
1) Compute histogram and probabilities of
Formula: each intensity level.

threshold if src( x, y )  thresh


dst( x, y )   2) Set up initial  i and  i .Step through all
src( x, y ) otherwise possible thresholds.
Implementation: 3) Step through all possible thresholds

value = value > threshold ? threshold : value maximum intensity


4) Threshold to Zero
3.1) Update i (weight) and  i (mean).
3.2) Compute  b (t ) (variance)
Formula: 2

0 if src( x, y )  thresh 4) Desired threshold corresponds to the


dst( x, y )  
maximum  b (t ) .
2
max Val otherwise
5) You can compute two maxima (and two
Implementation:
corresponding thresholds)  b21 (t ) is the
value = value > threshold ? value : 0
greater max and is the greater or  b 2 (t )
2
5) Threshold to zero, Inverted
equal maximum.
Formula: threshold1  threshold2
6) Desired threshold=
src( x, y ) if src( x, y )  thresh 2
dst( x, y )  
0 otherwise
3.2 Histogram
Histograms are collected counts of data organized
into a set of predefined bins. Matrix containing
Implementation: information of an image (i.e. intensity in the range
0-255):
value = value > threshold ? 0 : value
0,255  0,15  16,31  240,255
3 Otsu Thresholding:
Otsu method is example for clustering-based range  bin1  bin2    binn 15
image thresholding. In computer vision and image
The number of pixel that fall in the range of each useful information and Otsu method which is
bini is counted and the resultant image is obtain. example for cluster based method seems to choose
(axis x represents the bins and axis y the number the optimal threshold value. Thus clustering method
of pixels in each of them). is one the robust technique which is used to binarize
the documents even if they are in degraded form.
3.3 Parameters of the histogram:
6. References
Dims: The number of parameters of image. In our
[1] Ravi Shekhar and C.V. Jawahar, “2012 10th
example, dims = 1 (Intensity values of each pixel in
IAPR International Workshop on Document
a gray scale image).
Analysis Systems” 2012 IEEE, DOI
Bins: Is the number of subdivisions in each dim. In 10.1109/DAS.2012.96.
our example, bins = 16 [2] Mehmet Sezgin, Bulent Sankur, "Survey over
image thresholding techniques and quantitative
Range: The limits for the values. In our example, performance evaluation", Journal of Electronic
range= [0,255]. Imaging 13(1), 146–165 (January 2004).
[3] A. Balasubramanian, M. Meshesha, and C. V.
4. Experimental Results: Jawahar, “Retrieval from document image
collections,” in DAS, 2006, pp.1–12.
Thresholding using Otsu method is as shown below [4] Jain et al., Petrou et al.,
in Fig- 2.For analyzing the result of thresholding “Thresholding”,www.cse.unr.edu/~bebis/CS791E/N
Handwritten Devanagari words of different otes/Thresholding.pdf.
illuminations are taken. Otsu Thresholding is
showing good results even for degraded documents
compared to other methods discussed above.

(a) (b)

Threshold Value: 137

Fig -2 : (a) Input Image (b) Otsu Thresholding

5.Conclusion
In our above study on image pre-processing, we
found that Otsu method eliminate the unwanted and
redundant data from the image by retaining only

View publication stats

You might also like