Sie sind auf Seite 1von 22

Image Binarization

using Otsu Method


Xu Liang
Monday.
April 20
th
. 2009
NLPR-PAL Group
CASIA
Outline
Image Binarization
Example
Principle
Otsu Method
Conclusion
Image Binarization-Example(1)
Document part.bmp, T = 179
Image Binarization-Example(2)
Coins.bmp, T = 126
Image Binarization-Example(3)
Cameraman.bmp, T = 88
Image Binarization
PAPER
DOCUMENT
GRAY LEVEL
IMAGE
BINARY
IMAGE
FEATURE
VECTORS
CLASSIFIED
DIGITS
SCANNING
FEATURE EXTRACTION
BINARIZATION
CLASSIFICATION
Steps in a digit recognition system[1]
Image Binarization
Segmentation for object regions
Intensity property sharing
Also call Image Thresholding
Threshold a gray-level image to binary image
A simple but effective tool to separate objects from background
T is some global threshold

=
0
1
) , ( y x g
if f(x,y) >= T
Otherwise
Image Binarization-Application
Document image analysis
Extract printed characters, logos,
Medical image process
Find the illness part in the x-ray image
Scene processing
Detect a target
.
Outline
Image Binarization
Otsu Method
Example
Principle
Conclusion
Otsu Method
Title
A Threshold Selection Method from Gray-Level Histograms
Author
Nobuyuki Otsu
Affiliation
Electro-Technical Laboratory, Tokyo University(2007), Tokyo, Japan
Publish
IEEE Transactions on System, Man, and Cybernetics. SMC-9(1), 1979
Citation(Google Scholar)
3571
Otsu Method-Example
3 . 184 *) ( , 302 . 0 *) (
8 . 67 *) ( , 698 . 0 *) (
917 . 0 , 126
4 . 3123 , 0 . 103
* *
2
= =
= =
= =
= =
K K w
K K w
K
O O
B B

q
o
Otsu Method-Principle
Clustering
Object Background
Make each cluster as tight as possible
Hopefully minimize their overlap
Otsu Method-Principle-Algorithm(1)
Define the within-class variance
) ( ) ( ) ( ) (
2 2 2
T T T T
O O B B Within
o e o e o + =
) (T w
B

=
1
0
) (
T
i
i p
=
) (
2
T
B
o
) (T w
O
=

=
1
) (
L
T i
i p
=
The variance of the pixels in the
background (below threshold)
) (
2
T
O
o
=
The variance of the pixels in the
foreground (above threshold)
[0, L-1] the range of intensity levels
A lot of computation!
Otsu Method-Principle-Algorithm(2)
Easier for the between-class variance
) (
2
T
Between
o = ) (
2 2
T
Within
o o
=
2 2
] ) ( )[ ( ] ) ( )[ ( + T T w T T w
O O B B
) (
2
T
Between
o =
2
)] ( ) ( )[ ( ) ( T T T w T w
O B O B

By simplifying,
2
o
=
Combined variance

=
Combined mean
Maximizing
Optimal threshold T
Otsu Method-Principle-Algorithm(3)
Easier using simple recurrence relations
) ( ) ( ) 1 ( T p T w T w
B B
+ = +
) ( ) ( ) 1 ( T p T w T w
O O
= +
) 1 (
) ( ) ( ) (
) 1 (
+
+
= +
T w
T T p T w T
T
B
B B
B

) 1 (
) ( ) ( ) (
) 1 (
+

= +
T w
T T p T w T
T
O
O O
O

Otsu Method
Otsu method fails in this occasion.
170 ) ( , 01 . 0 ) (
90 ) ( , 99 . 0 ) (
135
4697 . 0 , 93
163 , 91
* *
2
= =
= =
=
= =
= =
K K w
K K w
K
K
O O
B B

q
o

Outline
Image Binarization
Otsu Method
Conclusion
Otsu Method
Image Binarization
Conclusion-Otsu Method
Motivation
Well-thresholded classes would be separated in gray levels
Histogram based clustering
Simplicity
Effectiveness
When the number of pixels in each class are close to each other
Drawbacks
Unimodality of Object Function may fail
When the object and background pixels are extremely unbalanced
Conclusion-Image Binarization
A lot of applications[3]
Document analysis
Medical image process
A lot of binarization methods
Histogram-based thresholding
Object attribute thresholding
Edge matching
Connectivity
Locally Adaptive thresholding
Variance of pixel neighborhood
Conclusion-Image Binarization
Unsolved issues[3]
Color image binarization
Degraded document binarization
Multilevel thresholding relevant to computer vision
Some sophisticated method
Random Markov methods

Reference
[1] Q.D. Trier, A.K. Jain. Goal-Directed Evaluation of Binarization Methods. IEEE Pattern
Analysis and Machine Intelligence. 17(12): 1191-1201. 1995
[2] N. Otsu. A Threshold Selection Method from Gray-Level Histograms. IEEE Transactions on
Systems, Man, and Cybernetics. 1979, 9(1): 62-66
[3] Mehmet Sezgin, Bulent Sankur. Survey over Image Thresholding Techniques and
Quantitative Performance Evaluation. Journal of Electronic Imaging. 13(1):146-165, 2004

Das könnte Ihnen auch gefallen