SlideShare a Scribd company logo
3
Most read
6
Most read
7
Most read
Digital Image Processing
Image Segmentation:
Thresholding
2
of
17
Contents
Today we will continue to look at the problem
of segmentation, this time though in terms of
thresholding
In particular we will look at:
– What is thresholding?
– Simple thresholding
– Adaptive thresholding
3
of
17
Thresholding
Thresholding is usually the first step in any
segmentation approach
We have talked about simple single value
thresholding already
Single value thresholding can be given
mathematically as follows:






T
y
x
f
if
T
y
x
f
if
y
x
g
)
,
(
0
)
,
(
1
)
,
(
4
of
17
Thresholding Example
Imagine a poker playing robot that needs to
visually interpret the cards in its hand
Original Image Thresholded Image
5
of
17
But Be Careful
If you get the threshold wrong the results
can be disastrous
Threshold Too Low Threshold Too High
6
of
17
Basic Global Thresholding
Based on the histogram of an image
Partition the image histogram using a single
global threshold
The success of this technique very strongly
depends on how well the histogram can be
partitioned
7
of
17
Basic Global Thresholding Algorithm
The basic global threshold, T, is calculated
as follows:
1. Select an initial estimate for T (typically the
average grey level in the image)
2. Segment the image using T to produce two
groups of pixels: G1 consisting of pixels
with grey levels >T and G2 consisting
pixels with grey levels ≤ T
3. Compute the average grey levels of pixels
in G1 to give μ1 and G2 to give μ2
8
of
17
Basic Global Thresholding Algorithm
4. Compute a new threshold value:
5. Repeat steps 2 – 4 until the difference in T
in successive iterations is less than a
predefined limit T∞
This algorithm works very well for finding
thresholds when the histogram is suitable
2
2
1 
 

T
9
of
17
Thresholding Example 1
Images
taken
from
Gonzalez
&
Woods,
Digital
Image
Processing
(2002)
10
of
17
Thresholding Example 2
Images
taken
from
Gonzalez
&
Woods,
Digital
Image
Processing
(2002)
11
of
17
Problems With Single Value
Thresholding
Single value thresholding only works for
bimodal histograms
Images with other kinds of histograms need
more than a single threshold
Images
taken
from
Gonzalez
&
Woods,
Digital
Image
Processing
(2002)
12
of
17
Problems With Single Value
Thresholding (cont…)
Let’s say we want to
isolate the contents
of the bottles,
Think about what the
histogram for this
image would look like,
What would happen if we used a single
threshold value?
Images
taken
from
Gonzalez
&
Woods,
Digital
Image
Processing
(2002)
13
of
17
Single Value Thresholding and
Illumination
Uneven illumination can really upset a single
valued thresholding scheme
Images
taken
from
Gonzalez
&
Woods,
Digital
Image
Processing
(2002)
14
of
17
Basic Adaptive Thresholding
An approach to handling situations in which
single value thresholding will not work is to
divide an image into sub images and
threshold these individually
Since the threshold for each pixel depends
on its location within an image this technique
is said to adaptive
15
of
17
Basic Adaptive Thresholding Example
The image below shows an example of using
adaptive thresholding with the image shown
previously
As can be seen success is mixed
But, we can further subdivide the troublesome
sub images for more success
16
of
17
Basic Adaptive Thresholding Example
(cont…)
These images show the
troublesome parts of the
previous problem further
subdivided
After this sub division
successful thresholding
can be
achieved
17
of
17
Summary
In this lecture we have begun looking at
segmentation, and in particular thresholding
We saw the basic global thresholding algorithm
and its shortcomings
We also saw a simple way to overcome some
of these limitations using adaptive thresholding

More Related Content

What's hot (20)

PDF
Image processing fundamentals
Dr. A. B. Shinde
 
PDF
4.intensity transformations
Yahya Alkhaldi
 
PPSX
Edge Detection and Segmentation
Dr. A. B. Shinde
 
PPTX
Image feature extraction
Rushin Shah
 
PPTX
Chapter 9 morphological image processing
Ahmed Daoud
 
PPT
Image segmentation ppt
Gichelle Amon
 
PDF
Image Segmentation (Digital Image Processing)
VARUN KUMAR
 
PPTX
Image segmentation in Digital Image Processing
DHIVYADEVAKI
 
PPTX
Image compression .
Payal Vishwakarma
 
PDF
Morphological operations
National Institute of Technology Durgapur
 
PPT
Spatial filtering using image processing
Anuj Arora
 
PPTX
Color image processing Presentation
Revanth Chimmani
 
PPTX
Edge detection
Ishraq Al Fataftah
 
PPT
Spatial domain and filtering
University of Potsdam
 
PPT
Chapter10 image segmentation
asodariyabhavesh
 
PPT
Frequency Domain Image Enhancement Techniques
Diwaker Pant
 
PPTX
Transform coding
Nancy K
 
PPTX
Image feature extraction
Rishabh shah
 
PPTX
Watershed
Amnaakhaan
 
Image processing fundamentals
Dr. A. B. Shinde
 
4.intensity transformations
Yahya Alkhaldi
 
Edge Detection and Segmentation
Dr. A. B. Shinde
 
Image feature extraction
Rushin Shah
 
Chapter 9 morphological image processing
Ahmed Daoud
 
Image segmentation ppt
Gichelle Amon
 
Image Segmentation (Digital Image Processing)
VARUN KUMAR
 
Image segmentation in Digital Image Processing
DHIVYADEVAKI
 
Image compression .
Payal Vishwakarma
 
Spatial filtering using image processing
Anuj Arora
 
Color image processing Presentation
Revanth Chimmani
 
Edge detection
Ishraq Al Fataftah
 
Spatial domain and filtering
University of Potsdam
 
Chapter10 image segmentation
asodariyabhavesh
 
Frequency Domain Image Enhancement Techniques
Diwaker Pant
 
Transform coding
Nancy K
 
Image feature extraction
Rishabh shah
 
Watershed
Amnaakhaan
 

Similar to ImageProcessing10-Segmentation(Thresholding) (1).ppt (14)

PPT
Image processing9 segmentation(pointslinesedges)
John Williams
 
PPT
Image processing
abuamo
 
PPTX
Digital Image Processing
lalithambiga kamaraj
 
DOCX
Himadeep
meher dheeraj
 
PPTX
Segmentation is preper concept to hands.pptx
AniruddahBiswas1
 
PDF
BMVA summer school MATLAB programming tutorial
potaters
 
PDF
0 Image Processing & Remote Sernsing.pdf
ayushisug21ec
 
PPTX
JPEG
RajatKumar471
 
PPTX
Dip day1&2
nakarthik91
 
PPT
Image processing3 imageenhancement(histogramprocessing)
John Williams
 
PDF
Analysis and Design of Algorithms notes
Prof. Dr. K. Adisesha
 
PPTX
Data compression
Sherif Abdelfattah
 
PPTX
primal and dual problem
Yash Lad
 
PDF
Introduction to Applied Machine Learning
SheilaJimenezMorejon
 
Image processing9 segmentation(pointslinesedges)
John Williams
 
Image processing
abuamo
 
Digital Image Processing
lalithambiga kamaraj
 
Himadeep
meher dheeraj
 
Segmentation is preper concept to hands.pptx
AniruddahBiswas1
 
BMVA summer school MATLAB programming tutorial
potaters
 
0 Image Processing & Remote Sernsing.pdf
ayushisug21ec
 
Dip day1&2
nakarthik91
 
Image processing3 imageenhancement(histogramprocessing)
John Williams
 
Analysis and Design of Algorithms notes
Prof. Dr. K. Adisesha
 
Data compression
Sherif Abdelfattah
 
primal and dual problem
Yash Lad
 
Introduction to Applied Machine Learning
SheilaJimenezMorejon
 
Ad

Recently uploaded (20)

PDF
A Strategic Analysis of the MVNO Wave in Emerging Markets.pdf
IPLOOK Networks
 
PPTX
AI and Robotics for Human Well-being.pptx
JAYMIN SUTHAR
 
PPTX
OA presentation.pptx OA presentation.pptx
pateldhruv002338
 
PPTX
AI in Daily Life: How Artificial Intelligence Helps Us Every Day
vanshrpatil7
 
PPTX
AI Code Generation Risks (Ramkumar Dilli, CIO, Myridius)
Priyanka Aash
 
PDF
Data_Analytics_vs_Data_Science_vs_BI_by_CA_Suvidha_Chaplot.pdf
CA Suvidha Chaplot
 
PPTX
Agile Chennai 18-19 July 2025 | Workshop - Enhancing Agile Collaboration with...
AgileNetwork
 
PPTX
Applied-Statistics-Mastering-Data-Driven-Decisions.pptx
parmaryashparmaryash
 
PPTX
Dev Dives: Automate, test, and deploy in one place—with Unified Developer Exp...
AndreeaTom
 
PPTX
Farrell_Programming Logic and Design slides_10e_ch02_PowerPoint.pptx
bashnahara11
 
PDF
Economic Impact of Data Centres to the Malaysian Economy
flintglobalapac
 
PDF
State-Dependent Conformal Perception Bounds for Neuro-Symbolic Verification
Ivan Ruchkin
 
PDF
NewMind AI Weekly Chronicles – July’25, Week III
NewMind AI
 
PDF
Lecture A - AI Workflows for Banking.pdf
Dr. LAM Yat-fai (林日辉)
 
PDF
How ETL Control Logic Keeps Your Pipelines Safe and Reliable.pdf
Stryv Solutions Pvt. Ltd.
 
PDF
Per Axbom: The spectacular lies of maps
Nexer Digital
 
PDF
Market Insight : ETH Dominance Returns
CIFDAQ
 
PDF
The Past, Present & Future of Kenya's Digital Transformation
Moses Kemibaro
 
PDF
Generative AI vs Predictive AI-The Ultimate Comparison Guide
Lily Clark
 
PDF
Structs to JSON: How Go Powers REST APIs
Emily Achieng
 
A Strategic Analysis of the MVNO Wave in Emerging Markets.pdf
IPLOOK Networks
 
AI and Robotics for Human Well-being.pptx
JAYMIN SUTHAR
 
OA presentation.pptx OA presentation.pptx
pateldhruv002338
 
AI in Daily Life: How Artificial Intelligence Helps Us Every Day
vanshrpatil7
 
AI Code Generation Risks (Ramkumar Dilli, CIO, Myridius)
Priyanka Aash
 
Data_Analytics_vs_Data_Science_vs_BI_by_CA_Suvidha_Chaplot.pdf
CA Suvidha Chaplot
 
Agile Chennai 18-19 July 2025 | Workshop - Enhancing Agile Collaboration with...
AgileNetwork
 
Applied-Statistics-Mastering-Data-Driven-Decisions.pptx
parmaryashparmaryash
 
Dev Dives: Automate, test, and deploy in one place—with Unified Developer Exp...
AndreeaTom
 
Farrell_Programming Logic and Design slides_10e_ch02_PowerPoint.pptx
bashnahara11
 
Economic Impact of Data Centres to the Malaysian Economy
flintglobalapac
 
State-Dependent Conformal Perception Bounds for Neuro-Symbolic Verification
Ivan Ruchkin
 
NewMind AI Weekly Chronicles – July’25, Week III
NewMind AI
 
Lecture A - AI Workflows for Banking.pdf
Dr. LAM Yat-fai (林日辉)
 
How ETL Control Logic Keeps Your Pipelines Safe and Reliable.pdf
Stryv Solutions Pvt. Ltd.
 
Per Axbom: The spectacular lies of maps
Nexer Digital
 
Market Insight : ETH Dominance Returns
CIFDAQ
 
The Past, Present & Future of Kenya's Digital Transformation
Moses Kemibaro
 
Generative AI vs Predictive AI-The Ultimate Comparison Guide
Lily Clark
 
Structs to JSON: How Go Powers REST APIs
Emily Achieng
 
Ad

ImageProcessing10-Segmentation(Thresholding) (1).ppt

  • 1. Digital Image Processing Image Segmentation: Thresholding
  • 2. 2 of 17 Contents Today we will continue to look at the problem of segmentation, this time though in terms of thresholding In particular we will look at: – What is thresholding? – Simple thresholding – Adaptive thresholding
  • 3. 3 of 17 Thresholding Thresholding is usually the first step in any segmentation approach We have talked about simple single value thresholding already Single value thresholding can be given mathematically as follows:       T y x f if T y x f if y x g ) , ( 0 ) , ( 1 ) , (
  • 4. 4 of 17 Thresholding Example Imagine a poker playing robot that needs to visually interpret the cards in its hand Original Image Thresholded Image
  • 5. 5 of 17 But Be Careful If you get the threshold wrong the results can be disastrous Threshold Too Low Threshold Too High
  • 6. 6 of 17 Basic Global Thresholding Based on the histogram of an image Partition the image histogram using a single global threshold The success of this technique very strongly depends on how well the histogram can be partitioned
  • 7. 7 of 17 Basic Global Thresholding Algorithm The basic global threshold, T, is calculated as follows: 1. Select an initial estimate for T (typically the average grey level in the image) 2. Segment the image using T to produce two groups of pixels: G1 consisting of pixels with grey levels >T and G2 consisting pixels with grey levels ≤ T 3. Compute the average grey levels of pixels in G1 to give μ1 and G2 to give μ2
  • 8. 8 of 17 Basic Global Thresholding Algorithm 4. Compute a new threshold value: 5. Repeat steps 2 – 4 until the difference in T in successive iterations is less than a predefined limit T∞ This algorithm works very well for finding thresholds when the histogram is suitable 2 2 1     T
  • 11. 11 of 17 Problems With Single Value Thresholding Single value thresholding only works for bimodal histograms Images with other kinds of histograms need more than a single threshold Images taken from Gonzalez & Woods, Digital Image Processing (2002)
  • 12. 12 of 17 Problems With Single Value Thresholding (cont…) Let’s say we want to isolate the contents of the bottles, Think about what the histogram for this image would look like, What would happen if we used a single threshold value? Images taken from Gonzalez & Woods, Digital Image Processing (2002)
  • 13. 13 of 17 Single Value Thresholding and Illumination Uneven illumination can really upset a single valued thresholding scheme Images taken from Gonzalez & Woods, Digital Image Processing (2002)
  • 14. 14 of 17 Basic Adaptive Thresholding An approach to handling situations in which single value thresholding will not work is to divide an image into sub images and threshold these individually Since the threshold for each pixel depends on its location within an image this technique is said to adaptive
  • 15. 15 of 17 Basic Adaptive Thresholding Example The image below shows an example of using adaptive thresholding with the image shown previously As can be seen success is mixed But, we can further subdivide the troublesome sub images for more success
  • 16. 16 of 17 Basic Adaptive Thresholding Example (cont…) These images show the troublesome parts of the previous problem further subdivided After this sub division successful thresholding can be achieved
  • 17. 17 of 17 Summary In this lecture we have begun looking at segmentation, and in particular thresholding We saw the basic global thresholding algorithm and its shortcomings We also saw a simple way to overcome some of these limitations using adaptive thresholding