Text area segmentation from document images by novel adaptive thresholding and template matching using texture cues

  • Seba SusanEmail author
  • K. M. Rachna Devi
Short paper


This paper presents a new perspective of text area segmentation from document images using a novel adaptive thresholding for image enhancement. Using sliding windows, the texture of the enhanced image is matched with that of a fixed training template image containing the typed letters ‘dB.’ The affine-invariant, low-dimensional difference theoretic texture feature set is used for the texture measurement. The distance matrix is binarized using Otsu threshold, and the ‘0’ pixels indicate the text area. One primary contribution of this paper is the novel adaptive thresholding for document image enhancement prior to the extraction of texture cues. The proposed adaptive thresholding mimics the ability of the human eye to iteratively adjust to varying light intensities through iterative gamma correction followed by contrast stretching so that the text becomes well defined against the background clutter. The text blobs so segmented are binarized using Yanowitz and Bruckstein method of text binarization, and the results are applied for evaluation with respect to the ground-truth annotations. We tested our algorithm on the benchmark DIBCO 2009, 2010, 2011, 2012, 2013 document image datasets in comparison with the state of the art. The high precision–recall and F-score values establish the efficiency of our approach.


Adaptive thresholding for document images Thresholding Gamma correction Text binarization Text area localization Difference theoretic texture features 


Compliance with ethical standards

Conflict of interest

The authors declare that they have no conflict of interest.


  1. 1.
    Jamal AT, Suen CY (2013) Shape-based analysis for automatic segmentation of Arabic handwritten text. In: Advances in artificial intelligence, Springer, Berlin, Heidelberg, pp 334–339Google Scholar
  2. 2.
    Eskenazi S, Gomez-Krämer P, Ogier J-M (2017) A comprehensive survey of mostly textual document segmentation algorithms since 2008. Pattern Recognit 64:1–14CrossRefGoogle Scholar
  3. 3.
    Lucas SM (2005) ICDAR 2005 text locating competition results. In: Eighth international conference on document analysis and recognition, 2005. Proceedings, IEEE, pp 80–84Google Scholar
  4. 4.
    Bukhari SS, Kadi A, Jouneh MA, Mir FM, Dengel A (2017) anyOCR: an open-source OCR system for historical archives. In: 2017 14th IAPR international conference on document analysis and recognition (ICDAR), IEEE, vol 1, pp 305–310Google Scholar
  5. 5.
    Sulaiman A, Omar K, Nasrudin MF (2017) A database for degraded Arabic historical manuscripts. In: 2017 6th international conference on electrical engineering and informatics (ICEEI), IEEE, pp 1–6Google Scholar
  6. 6.
    Leedham G, Chen Y et al (2003) Comparison of some thresholding algorithms for text/background segmentation in difficult document images. In: Proceedings of the seventh international conference on document analysis and recognition, vol 2Google Scholar
  7. 7.
    Likforman-Sulem L, Zahour A, Taconet B (2007) Text line segmentation of historical documents: a survey. Int J Doc Anal Recognit 9(2-4):123–138CrossRefGoogle Scholar
  8. 8.
    Shi Z, Govindaraju V (2004) Historical document image enhancement using background light intensity normalization. In: ICPR 2004, Proceedings of the 17th international conference on pattern recognition, 2004, IEEE, vol 1Google Scholar
  9. 9.
    Chamchong R, Fung CC (2011) Character segmentation from ancient palm leaf manuscripts in Thailand. In: Proceedings of the 2011 workshop on historical document imaging and processing, ACMGoogle Scholar
  10. 10.
    Yuan Q, Tan CW (2001) Text extraction from gray scale document images using edge information. In: Proceedings, sixth international conference on document analysis and recognition, 2001, IEEEGoogle Scholar
  11. 11.
    Rumley SD (1990) Document scanner. U.S. Patent 4,961,117. Issued 2 October 1990Google Scholar
  12. 12.
    Maurer RP, Barash D (2004) Method for enhancing compressibility and visual quality of scanned document images. U.S. Patent 6,731,821. Issued 4 May 2004Google Scholar
  13. 13.
    Bovik AC, Clark M, Geisler WS (1990) Multichannel texture analysis using localized spatial filters. IEEE Trans Pattern Anal Mach Intell 12(1):55–73CrossRefGoogle Scholar
  14. 14.
    Li M et al (2010) Conditional random field for text segmentation from images with complex background. Pattern Recognit Lett 31(14):2295–2308CrossRefGoogle Scholar
  15. 15.
    Yamron JP, et al (1998) A hidden Markov model approach to text segmentation and event tracking. In: Proceedings of the 1998 IEEE international conference on acoustics, speech and signal processing, IEEE, vol 1Google Scholar
  16. 16.
    Chen D, Odobez J-M (2002) Comparison of support vector machine and neural network for text texture verification. IDIAP, MartignyGoogle Scholar
  17. 17.
    Fletcher LA, Kasturi R (1988) A robust algorithm for text string separation from mixed text/graphics images. IEEE Trans Pattern Anal Mach Intell 10(6):910–918CrossRefGoogle Scholar
  18. 18.
    Jain AK, Karu K (1996) Learning texture discrimination masks. IEEE Trans Pattern Anal Mach Intell 18(2):195–205CrossRefGoogle Scholar
  19. 19.
    Namboodiri AM, Jain AK (2007) Document structure and layout analysis. In: Chaudhuri BB (ed) Digital document processing. Springer, London, pp 29–48CrossRefGoogle Scholar
  20. 20.
    Kim KI, Jung K, Kim JH (2003) Texture-based approach for text detection in images using support vector machines and continuously adaptive mean shift algorithm. IEEE Trans Pattern Anal Mach Intell 25(12):1631–1639CrossRefGoogle Scholar
  21. 21.
    Jain AK, Zhong Yu (1996) Page segmentation using texture analysis. Pattern Recognit 29(5):743–770CrossRefGoogle Scholar
  22. 22.
    Jain AK, Bhattacharjee S (1992) Text segmentation using Gabor filters for automatic document processing. Mach Vis Appl 5(3):169–184CrossRefGoogle Scholar
  23. 23.
    Ye Q, Huang Q, Gao W, Zhao D (2005) Fast and robust text detection in images and video frames. Image Vis Comput 23(6):565–576CrossRefGoogle Scholar
  24. 24.
    Yanowitz SD, Bruckstein AM (1989) A new method for image segmentation. Comput Vis Graph Image Process 46(1):82–95CrossRefGoogle Scholar
  25. 25.
    Gonzalez RC, Woods RE (2002) Digital image processing, 2nd edn. Publishing House of Electronics Industry, Beijing, p 455Google Scholar
  26. 26.
    Drago F, Myszkowski K, Annen T, Chiba N (2003) Adaptive logarithmic mapping for displaying high contrast scenes. Comput Graph Forum 22(3):419–426CrossRefGoogle Scholar
  27. 27.
    Iida H, King P-S (1983) Video system having an adjustable digital Gamma correction for contrast enhancement. U.S. Patent 4,394,688. Issued 19 July 1983Google Scholar
  28. 28.
    Jennifer Ranjani J (2014) Bi-level thresholding for binarisation of handwritten and printed documents. IET Comput Vis 9(1):41–50CrossRefGoogle Scholar
  29. 29.
    Otsu N (1979) A threshold selection method from gray-level histograms. IEEE Trans Syst Man Cybernet 9(1):62–66CrossRefGoogle Scholar
  30. 30.
    Zhang H, Liu G, Chow TWS, Liu W (2011) Textual and visual content-based anti-phishing: a Bayesian approach. IEEE Trans Neural Netw 22(10):1532–1546CrossRefGoogle Scholar
  31. 31.
    Susan S, Hanmandlu M (2013) Difference theoretic feature set for scale-, illumination-and rotation-invariant texture classification. IET Image Process 7(8):725–732CrossRefGoogle Scholar
  32. 32.
    Susan S, Hanmandlu M (2013) A non-extensive entropy feature and its application to texture classification. Neurocomputing 120:214–225CrossRefGoogle Scholar
  33. 33.
    Cross GR, Jain AK (1983) Markov random field texture models. IEEE Trans Pattern Anal Mach Intell 1:25–39CrossRefGoogle Scholar
  34. 34.
    Unser M (1995) Texture classification and segmentation using wavelet frames. IEEE Trans Image Process 4(11):1549–1560MathSciNetCrossRefGoogle Scholar
  35. 35.
    Ojala T, Pietikaenen M, Maenepae T (2002) Multi-resolution gray scale and rotation invariant texture classification with LBP. IEEE Trans Pattern Anal Mach Intell 24(7):971–987CrossRefGoogle Scholar
  36. 36.
    Guo Z, Zhang L, Zhang D (2010) Rotation invariant texture classification using LBP variance with global matching. Pattern Recognit 43:706–719CrossRefzbMATHGoogle Scholar
  37. 37.
    Leung T, Malik J (2001) Representing and recognizing the visual appearance of materials using three-dimensional textons. Int J Comput Vis 43(1):29–44CrossRefzbMATHGoogle Scholar
  38. 38.
  39. 39.
  40. 40.
    Gatos B, Ntirogiannis K, Pratikakis I (2009) ICDAR 2009 document image binarization contest (DIBCO 2009). In: ICDAR, vol 9, pp 1375–1382Google Scholar
  41. 41.
    Pratikakis I, Gatos B, Ntirogiannis K (2010) H-DIBCO 2010-handwritten document image binarization competition. In: 2010 international conference on frontiers in handwriting recognition (ICFHR), IEEE, pp 727–732Google Scholar
  42. 42.
    Pratikakis I, Gatos B, Ntirogiannis K (2012) ICFHR 2012 competition on handwritten document image binarization (H-DIBCO 2012). In: 2012 international conference on frontiers in handwriting recognition (ICFHR), IEEE, pp 817–822Google Scholar
  43. 43.
    Pratikakis I, Gatos B, Ntirogiannis K (2013) ICDAR 2013 document image binarization contest (DIBCO 2013). In: 2013 12th international conference on document analysis and recognition (ICDAR), IEEE, pp 1471–1476Google Scholar
  44. 44.
    Trier OD, Taxt T (1995) Evaluation of binarization methods for document images. IEEE Trans Pattern Anal Mach Intell 17(3):312–315CrossRefGoogle Scholar
  45. 45.
    Niblack W (1985) An introduction to digital image processing. Strandberg Publishing Company, BirkeroedGoogle Scholar
  46. 46.
  47. 47.
    Sauvola J, Pietikäinen M (2000) Adaptive document image binarization. Pattern Recognit 33(2):225–236CrossRefGoogle Scholar
  48. 48.

Copyright information

© Springer-Verlag London Ltd., part of Springer Nature 2019

Authors and Affiliations

  1. 1.Department of Information TechnologyDelhi Technological UniversityNew DelhiIndia

Personalised recommendations