image binarization using otsu method
TRANSCRIPT
Image Binarizationusing Otsu Method
Xu Liang
Monday.April 20th. 2009
NLPR-PAL GroupCASIA
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
PAPERDOCUMENT
GRAY LEVELIMAGE
BINARYIMAGE
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),( yxg
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
KKw
KKw
K
OO
BB
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
)()()()( 222 TTTT OOBBWithin
)(TwB
1
0
)(T
i
ip
)(2 TB
)(TwO
1
)(L
Ti
ip
The variance of the pixels in the background (below threshold)
)(2 TO 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 TBetween )(22 TWithin
22 ])()[(])()[( TTwTTw OOBB
)(2 TBetween 2)]()()[()( TTTwTw OBOB
By simplifying,
2 Combined variance
Combined mean
Maximizing
Optimal threshold T
Otsu Method-Principle-Algorithm(3)
• Easier using simple recurrence relations
)()()1( TpTwTw BB
)()()1( TpTwTw OO
)1(
)()()()1(
Tw
TTpTwTT
B
BBB
)1(
)()()()1(
Tw
TTpTwTT
O
OOO
Otsu Method
Otsu method fails in this occasion.
170)(,01.0)(
90)(,99.0)(
135
4697.0,93
163,91
**
2
KKw
KKw
K
K
OO
BB
左右
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