0% found this document useful (0 votes)
17 views

Computer Vision: Thresholding (Image Processing)

The document discusses different methods of thresholding in image processing, including manual, automatic, global, and local thresholding. Some specific thresholding methods discussed include histogram, Riddler, Otsu, Kittler-Illingworth, Sauvolla-Pietikainen, and Niblack thresholding.
Copyright
© © All Rights Reserved
Available Formats
Download as PPTX, PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
17 views

Computer Vision: Thresholding (Image Processing)

The document discusses different methods of thresholding in image processing, including manual, automatic, global, and local thresholding. Some specific thresholding methods discussed include histogram, Riddler, Otsu, Kittler-Illingworth, Sauvolla-Pietikainen, and Niblack thresholding.
Copyright
© © All Rights Reserved
Available Formats
Download as PPTX, PDF, TXT or read online on Scribd
You are on page 1/ 19

1

Computer
Vision
Lecture 2
Thresholding (Image Processing)
Hendrawan A.
Sekolah Tinggi Teknik Surabaya
What Is
Thresholding?
A labeling operation on a gray
scale image.
Thresholding distinguishes
pixels that have higher gray
values from pixels that have
lower gray value.
Pixels whose gray values are
high enough are given the
binary value 1.
2
Pixels whose gray values are
not high enough are given the
Sekolah Tinggi Teknik Surabaya
What Is
Thresholding?
100 100 100 100
100
100 100
100 50 50
50 50

30 30
40 40 20 20 20 20
20 20

Sekolah Tinggi Teknik Surabaya


What Is
Thresholding?
1 1 1 1
1
1 1
1 1 1
1 1

0 0
0 0 0 0 0 0
0 0

Sekolah Tinggi Teknik Surabaya


Thresholding
Category
Manual Thresholding
Automatic Thresholding
Global Thresholding
Local Thresholding

Sekolah Tinggi Teknik Surabaya


Global Thresholding
Histogram
Riddler
Otsu
Kittler-Illingworth

Sekolah Tinggi Teknik Surabaya


Local Thresholding
Sauvolla-Pietikainen
Niblack

Sekolah Tinggi Teknik Surabaya


Histogram
Calculate the amount of each
pixel in the image
100 100 100 100
100
100 100
100 50 50
50 50

30 30
40 40 20 20 20 20
20 20

8

Sekolah Tinggi Teknik Surabaya


Histogram
Make a graphics from pixel
calculation
Histogram
90
80
70
60
50 Quantity
40
30
20
10
0
0 20 30 40 50 100

Sekolah Tinggi Teknik Surabaya


Histogram
Find the first peak
Find the second peak
But sometime, there is a problem
when histogram have more than 2
peak.
To solve this problem:
Use Mathematic Calculation
MAX[(k-j)2*h[k]]
k : Checking Pixel
j : Pixel from First Peak
h[k] : Quantity of Pixel-k 1
Use Smoothing 0
Sekolah Tinggi Teknik Surabaya
Histogram
Find the lowest value between 2
peak
Histogram
90
80
70
60
50 Quantity
40
30
20
10
0
0 20 30 40 50 100

1
1
Sekolah Tinggi Teknik Surabaya
Riddler
Calculate the amount of each
pixel in the image
100 100 100 100
100
100 100
100 50 50
50 50

30 30
40 40 20 20 20 20
20 20

1
2
Sekolah Tinggi Teknik Surabaya
Riddler
Pick 1 pixel as Estimated
Threshold
For example: 70
Calculate the average of pixel
higher than estimated threshold
and pixel lower than estimated
threshold

1
i : Pixel in Image 3

h[i] : Quantity of Pixel-i


Sekolah Tinggi Teknik Surabaya
Riddler
Calculate new estimated
threshold
(Tb + To) / 2
Tb : Average of Pixel Higher
than
Estimated Threshold
To : Average of Pixel Lower
than
Estimated Threshold
1
Calculate average and 4

estimated threshold again until


Sekolah Tinggi Teknik Surabaya
Otsu
Calculate the amount of each
pixel in the image
100 100 100 100
100
100 100
100 50 50
50 50

30 30
40 40 20 20 20 20
20 20

1
5
Sekolah Tinggi Teknik Surabaya
Otsu
Calculate for each pixel-t

1
6
Sekolah Tinggi Teknik Surabaya
Otsu
Calculate for each pixel-t

Find MIN[] for the best


threshold 1
7
Sekolah Tinggi Teknik Surabaya
Sauvolla-
Pietikainen
Determine the coefficient K, N,
and R
N must be odd
The best K is 0.34
The best R for grey level is 128
Calculate threshold t for each pixel

m : Mean
s : Standard Deviation 1
8
Sekolah Tinggi Teknik Surabaya
Sauvolla-
Pietikainen
The example region for
calculate threshold
100 100 100 100
100
100 100
100 50 50
50 50

30 30
40 40 20 20 20 20
20 20

1
9
Sekolah Tinggi Teknik Surabaya

You might also like