Skip to main content

Skew Angle Detection and Correction in Text Images Using RGB Gradient

  • Conference paper
  • First Online:

Part of the book series: Lecture Notes in Computer Science ((LNCS,volume 13232))

Abstract

Detecting and correcting skew angles is critical to success in document layout analysis and optical character recognition tasks, as they are more susceptible to failure when on uneven skews. In automation such as postal systems, library management, office business, and banking data entry, skew angle estimation is crucial to improve procedures response. Although different works have addressed this subject, due to the variability in the input data, many solutions are restricted to a specific language, texts whose contents are within a controlled scope, and entries that differentiate printed from handwritten texts. This paper introduces a new method based on RGB gradient capable of detecting and correcting skew angles in different types of documents. We evaluate the proposed method using two public databases and compare our results with other techniques cited in the literature. In general, our proposal achieved results superior to the approaches compared in all groups of documents in the database. Furthermore, we show that our method can work accurately in various text orientations, and it can work efficiently against documents containing short and sparse text lines, non-textual objects, and image noises caused by imperfect scanning.

This is a preview of subscription content, log in via an institution.

Buying options

Chapter
USD   29.95
Price excludes VAT (USA)
  • Available as PDF
  • Read on any device
  • Instant download
  • Own it forever
eBook
USD   89.00
Price excludes VAT (USA)
  • Available as EPUB and PDF
  • Read on any device
  • Instant download
  • Own it forever
Softcover Book
USD   119.99
Price excludes VAT (USA)
  • Compact, lightweight edition
  • Dispatched in 3 to 5 business days
  • Free shipping worldwide - see info

Tax calculation will be finalised at checkout

Purchases are for personal use only

Learn about institutional subscriptions

Notes

  1. 1.

    https://gmic.eu/oldtutorial/_gradient2rgb.shtml.

References

  1. Al-Khatatneh, A., Pitchay, S.A., Al-Qudah, M.: A review of skew detection techniques for document. In: 17th UKSim-AMSS International Conference on Modelling and Simulation, pp. 316–321. IEEE, Cambridge (2015)

    Google Scholar 

  2. Antonacopoulos, A., Clausner, C., Papadopoulos, C., Pletschacher, S.: Historical document layout analysis competition. In: 2011 International Conference on Document Analysis and Recognition, pp. 1516–1520 (2011). https://doi.org/10.1109/ICDAR.2011.301

  3. Avila, B., Lins, R.: A fast orientation and skew detection algorithm for monochromatic document images. In: ACM Symposium on Document Engineering, pp. 118–126 (2005)

    Google Scholar 

  4. Bafjaish, S.S., Sanusi, M., Nasser, M., Ramzani, A., Mahdin, H.: Skew detection and correction of Mushaf Al-Quran script using Hough transform. Int. J. Adv. Comput. Sci. Appl. 9(8), 402–409 (2018)

    Google Scholar 

  5. Bezmaternykh, P., Nikolaev, D.P.: A document skew detection method using fast Hough transform. In: Twelfth International Conference on Machine Vision (ICMV 2019), vol. 11433, p. 114330J. International Society for Optics and Photonics (2020)

    Google Scholar 

  6. Boiangiu, C.A., Dinu, O.A., Popescu, C., Constantin, N., Petrescu, C.: Voting-based document image skew detection. Appl. Sci. 10(7), 2236 (2020)

    Article  Google Scholar 

  7. Boudraa, O., Hidouci, W.K., Michelucci, D.: Using skeleton and Hough transform variant to correct skew in historical documents. Math. Comput. Simulat. 167, 389–403 (2020)

    Article  MathSciNet  Google Scholar 

  8. Cai, C., Meng, H., Qiao, R.: Adaptive cropping and deskewing of scanned documents based on high accuracy estimation of skew angle and cropping value. Visual Comput. 37(7), 1917–1930 (2020). https://doi.org/10.1007/s00371-020-01952-z

    Article  Google Scholar 

  9. Clausner, C., Antonacopoulos, A.: Efficient and effective OCR engine training. Int. J. Doc. Anal. Recogn. 23(1), 73–88 (2020)

    Article  Google Scholar 

  10. Delibasis, K.: Efficient implementation of Gaussian and Laplacian Kernels for feature extraction from IP fisheye cameras. J. Imaging 4(6), 1–21 (2018)

    Article  Google Scholar 

  11. Dengel, A., Ahmad, R.: A novel skew detection and correction approach for scanned documents. In: International IAPR Workshop on Document Analysis Systems (2016)

    Google Scholar 

  12. Epshtein, B.: Determining document skew using inter-line spaces. In: 2011 International Conference on Document Analysis and Recognition, pp. 27–31 (2011). https://doi.org/10.1109/ICDAR.2011.15

  13. Huang, K., Chen, Z., Yu, M., Yan, X., Yin, A.: An efficient document skew detection method using probability model and Q test. Electronics 9(1), 55 (2020)

    Article  Google Scholar 

  14. Kar, R., Saha, S., Bera, S.K., Kavallieratou, E., Bhateja, V., Sarkar, R.: Novel approaches towards slope and slant correction for tri-script handwritten word images. Imag. Sci. J. 67(3), 159–170 (2019)

    Article  Google Scholar 

  15. Khidhir, D.A.M.: Use of Radon transform in orientation estimation of printed text. In: 5th International Conference on Information Technology, pp. 1–5 (2011)

    Google Scholar 

  16. Khuman, Y.L.K., Devi, H.M., Singh, N.A.: Entropy-based skew detection and correction for printed meitei/meetei script ocr system. Mater. Today Proc. 37, 2666–2669 (2021)

    Article  Google Scholar 

  17. Lewis, D., Agam, G., Argamon, S., Frieder, O., Grossman, D., Heard, J.: Building a test collection for complex document information processing. In: Proceedings of the 29th Annual International ACM SIGIR Conference on Research and Development in Information Retrieval, pp. 665–666 (2006)

    Google Scholar 

  18. Liu, Y., Zheng, C., Zheng, Q., Yuan, H.: Removing Monte Carlo noise using a Sobel operator and a guided image filter. Visual Comput. 34(4), 589–601 (2018)

    Article  Google Scholar 

  19. Obaidullah, S.M., Halder, C., Santosh, K., Das, N., Roy, K.: Phdindic_11: page-level handwritten document image dataset of 11 official indic scripts for script identification. Multim. Tools Appl. 77(2), 1643–1678 (2018)

    Article  Google Scholar 

  20. Papandreou, A., Gatos, B., Louloudis, G., Stamatopoulos, N.: ICDAR 2013 document image skew estimation contest (DISEC 2013). In: 2013 12th International Conference on Document Analysis and Recognition, pp. 1444–1448. IEEE (2013)

    Google Scholar 

  21. Pramanik, R., Bag, S.: A novel skew correction methodology for handwritten words in multilingual multi-oriented documents. Multim. Tools Appl. 80(18), 27323–27342 (2021). https://doi.org/10.1007/s11042-021-10822-2

    Article  Google Scholar 

  22. Ptak, R., Żygadło, B., Unold, O.: Projection-based text line segmentation with a variable threshold. Int. J. Appl. Math. Comput. Sci. 27(1), 195–206 (2017)

    Article  MathSciNet  Google Scholar 

  23. Ramegowda, D.: A novel method for document skew detection and correction: application to handwritten document and bank documents. Int. J. Appl. Eng. Res. 10 (2015)

    Google Scholar 

  24. Salagar, Rajashekhar, Patil, Pushpa: Analysis of PCA usage to detect and correct skew in document images. In: Joshi, Amit, Mahmud, Mufti, Ragel, Roshan G.., Thakur, Nileshsingh V.. (eds.) Information and Communication Technology for Competitive Strategies (ICTCS 2020). LNNS, vol. 191, pp. 687–695. Springer, Singapore (2022). https://doi.org/10.1007/978-981-16-0739-4_65

    Chapter  Google Scholar 

  25. Sauvola, J., Kauniskangas, H.: Mediateam Document Database II, A CD-rom Collection of Document Images. University of Oulu, Finland (1999)

    Google Scholar 

  26. Smith, A.R.: Color gamut transform pairs. ACM Siggraph Comput. Graph. 12(3), 12–19 (1978)

    Article  Google Scholar 

  27. Sobel, I., Feldman, G.: A 3x3 Isotropic Gradient Operator for Image Processing. Stanford Artificial Intelligence Project (SAIL) (1968)

    Google Scholar 

  28. Stamatopoulos, N., Gatos, B., Louloudis, G., Pal, U., Alaei, A.: ICDAR 2013 handwriting segmentation contest. In: 2013 12th International Conference on Document Analysis and Recognition, pp. 1402–1406. IEEE (2013)

    Google Scholar 

  29. Sun, C., Si, D.: Skew and slant correction for document images using gradient direction. In: Proceedings of the Fourth International Conference on Document Analysis and Recognition, vol. 1, pp. 142–146 (1997)

    Google Scholar 

  30. Tzogka, C., et al.: OCR workflow: facing printed texts of ancient, medieval and modern greek literature. In: Paschke, A., Rehm, G., Qundus, J.A., Neudecker, C., Pintscher, L. (eds.) Proceedings of the CEUR Workshop, Conference on Digital Curation Technologies (Qurator 2021), Berlin, 8th–12th February 2021, vol. 2836. CEUR-WS.org (2021)

    Google Scholar 

  31. Wang, D., Wang, X., Liu, J.: A skew angle detection algorithm based on maximum gradient difference. In: International Conference on Transportation, Mechanical, and Electrical Engineering, pp. 1747–1750. IEEE, ChangChun (2011)

    Google Scholar 

  32. Zhang, D., Liu, Y., Wang, Z., Wang, D.: OCR with the deep CNN model for ligature script-based languages like Manchu. Sci. Program. 2021, 1–9 (2021)

    Google Scholar 

Download references

Acknowledgments

Authors thank to Coordination for the Improvement of Higher Education Personnel (CAPES Finance Code #001) and Instituto Federal Goiano, câmpus Urutaí (Process Number: 23219.000404.2022-67), for their financial support.

Author information

Authors and Affiliations

Authors

Corresponding author

Correspondence to Fabrizzio Soares .

Editor information

Editors and Affiliations

Rights and permissions

Reprints and permissions

Copyright information

© 2022 The Author(s), under exclusive license to Springer Nature Switzerland AG

About this paper

Check for updates. Verify currency and authenticity via CrossMark

Cite this paper

Rocha, B. et al. (2022). Skew Angle Detection and Correction in Text Images Using RGB Gradient. In: Sclaroff, S., Distante, C., Leo, M., Farinella, G.M., Tombari, F. (eds) Image Analysis and Processing – ICIAP 2022. ICIAP 2022. Lecture Notes in Computer Science, vol 13232. Springer, Cham. https://doi.org/10.1007/978-3-031-06430-2_21

Download citation

  • DOI: https://doi.org/10.1007/978-3-031-06430-2_21

  • Published:

  • Publisher Name: Springer, Cham

  • Print ISBN: 978-3-031-06429-6

  • Online ISBN: 978-3-031-06430-2

  • eBook Packages: Computer ScienceComputer Science (R0)

Publish with us

Policies and ethics