13.07.2015 Views

Document Binarization with Automatic Parameter Tuning

Document Binarization with Automatic Parameter Tuning

Document Binarization with Automatic Parameter Tuning

SHOW MORE
SHOW LESS

You also want an ePaper? Increase the reach of your titles

YUMPU automatically turns print PDFs into web optimized ePapers that Google loves.

H2009-T1 H2009-T2 P2009-T1 P2009-T2Figure 4: <strong>Binarization</strong> instability (left in pair) anderror (right in pair) visualized <strong>with</strong> respect to varyingvalues of c (vertical axis; logarithmic range from20 to 5120) and t hi (horizontal axis; linear range from0.15 to 0.65) for four representative images. Despitethe very different patterns on display, the parameterneighborhoods <strong>with</strong> lower error coincide in each instance<strong>with</strong> higher stability (both indicated by lightershades). The converse does not always hold: the secondimage shows two areas of stability, <strong>with</strong> only themore central one corresponding to low error. Thesecond, more peripheral stability zone is rejected byAlgorithm 1.bility, measured using the simple unnormalized formulabelow.ζ ν,τ (c, t hi ) = 1 4 [∆(Bc,t hi, B νc,t hi)+∆(B c,t hi, B c/ν,t hi)+∆(B c,t hi, B c,t hi−τ )+∆(B c,t hi, B c,t hi+τ )] (9)Other DIBCO images not shown behave similarly.Full explanation of this phenomenon lies beyond thescope of this paper, which merely observes and seeksto exploit the pattern.2.3 Computational EfficiencyCompleting Algorithm 2 requires 363 trial binarizationcomputations (33 candidates for c times 11 candidatesfor t hi ) and thus runs much more slowly thana single binarization <strong>with</strong> static parameter settings.However, two modifications to the algorithm can substantiallymitigate the speed difference.The first takes advantage of the fact that the binarizationresult does not usually change substantiallybetween successive values of c. Data structures builtto minimize Equation 1 for one value of c can bemodified and reused <strong>with</strong> a similar c value, achievingnoticeable economies. This strategy, introduced byBoykov and Kolmogorov [5], minimizes Equation 1by finding the minimum cut on a graph derived fromthe image. The method grows search trees from boththe source and the sink of the image graph to helpfind augmenting paths, and it turns out that the treesgrown for one value of c can be largely reused atnearby values to realize significant time savings. Empiricaltests of this implementation show that it canspeed computation by a factor of fifteen or more. Inother words, it computes all 33 trial binarizations requiredfor one iteration of Algorithm 1 in little morethan the time that it would normally take to computejust two or three.The second modification relies on a heuristic trick,and stems from the observation that the presenceor absence of ink bleed-through significantly influencesthe optimal value of t hi . Images showing bleedthroughtypically require a larger t hi to avoid identifyingthe spurious bled ink components as real. Bycontrast, in images <strong>with</strong>out bleed-through the algorithmachieves its best results <strong>with</strong> a lower t hi , becausethis allows it to detect fainter edges. Thus itappears that an explicitly bimodal algorithm allowingonly two possible values {τ 1 , τ 2 } for t hi might stillperform well as compared <strong>with</strong> Algorithm 2, whichtests eleven. The experimental results below confirmthis hypothesis.Detecting the presence or absence of bleed-throughin a document is a nontrivial task in the general case,so it might seem impossible to determine which ofeven two candidate t hi values to use. Fortunately, anextension of the stability criterion provides a simpleheuristic that does fairly well empirically. In additionto the two candidate values, Algorithm 3 computesthe binarization using their mean value τ 0 = (τ 1 +τ 2 )/2. This midpoint binarization can be comparedto the other two, and the closer is judged the morestable and thus selected for the final result.Algorithm 3 computes results for only three t hi valuesand thus runs more than three times as fast as9

Hooray! Your file is uploaded and ready to be published.

Saved successfully!

Ooh no, something went wrong!