Tesseract (software) explained

Tesseract
Logo Size:250px
Screenshot Size:250px
Author:Ray Smith, Hewlett-Packard[1]
Developer:Google and others
Programming Language:C and C++
Operating System:Linux, Windows, and macOS
Language:Interface: English
Recognition: Afrikaans, Albanian, Arabic, Azerbaijani, Basque, Belarusian, Bengali, Bulgarian, Catalan, Czech, Cherokee, Croatian, Danish, Dutch, English, Esperanto, Estonian, Finnish, French, Galician, German, Greek, Hindi, Hebrew, Hungarian, Indonesian, Italian, Japanese, Kannada, Korean, Latvian, Lithuanian, Malayalam, Macedonian, Maltese, Malay, Norwegian, Polish, Portuguese, Romanian, Russian, Serbian, Slovak, Slovenian, Spanish, Swahili, Swedish, Tagalog, Tamil, Telugu, Thai, Turkish, Ukrainian & Vietnamese[2] (more can be added using included training files)[3]
Genre:Optical character recognition
License:Apache License 2.0

Tesseract is an optical character recognition engine for various operating systems.[4] It is free software, released under the Apache License.[1] [5] [6] Originally developed by Hewlett-Packard as proprietary software in the 1980s, it was released as open source in 2005 and development was sponsored by Google in 2006.[7]

In 2006, Tesseract was considered one of the most accurate open-source OCR engines available.[6] [8]

History

The Tesseract engine was originally developed as proprietary software at Hewlett-Packard labs in Bristol, England and Greeley, Colorado between 1985 and 1994, with more changes made in 1996 to port to Windows, and some migration from C to C++ in 1998. A lot of the code was written in C, and then some more was written in C++. Since then, all the code has been converted to at least compile with a C++ compiler. Very little work was done in the following decade. It was then released as open source in 2005 by Hewlett-Packard and the University of Nevada, Las Vegas (UNLV). Tesseract development was sponsored by Google in 2006.[7]

Version 4 adds LSTM-based OCR engine and models for many additional languages and scripts, bringing the total to 116 languages.[9] Additionally 37 scripts are supported. So it is for example possible to recognize text with a mix of Western and Central European languages by using the model for the Latin script it is written in.

Version 5 was released in 2021, after more than two years of testing and developing.[10]

Features

Tesseract was in the top three OCR engines in terms of character accuracy in 1995.[11] It is available for Linux, Windows and Mac OS X.[5] [6]

Tesseract up to and including version 2 could only accept TIFF images of simple one-column text as inputs. These early versions did not include layout analysis, and so inputting multi-columned text, images, or equations produced garbled output. Since version 3.00 Tesseract has supported output text formatting, hOCR[12] positional information and page-layout analysis. Support for a number of new image formats was added using the Leptonica library. Tesseract can detect whether text is monospaced or proportionally spaced.[6]

The initial versions of Tesseract could only recognize English-language text.

Tesseract v2 added six additional Western languages (French, Italian, German, Spanish, Brazilian Portuguese, Dutch).

Version 3 extended language support significantly to include ideographic (Chinese & Japanese) and right-to-left (e.g. Arabic, Hebrew) languages, as well as many more scripts. New languages included Arabic, Bulgarian, Catalan, Chinese (Simplified and Traditional), Croatian, Czech, Danish, German (Fraktur script), Greek, Finnish, Hebrew, Hindi, Hungarian, Indonesian, Japanese, Korean, Latvian, Lithuanian, Norwegian, Polish, Portuguese, Romanian, Russian, Serbian, Slovak (standard and Fraktur script), Slovenian, Swedish, Tagalog, Tamil, Thai, Turkish, Ukrainian and Vietnamese.

V3.04, released in July 2015, added an additional 39 language/script combinations, bringing the total count of support languages to over 100. New language codes included: amh (Amharic), asm (Assamese), aze_cyrl (Azerbaijana in Cyrillic script), bod (Tibetan), bos (Bosnian), ceb (Cebuano), cym (Welsh), dzo (Dzongkha), fas (Persian), gle (Irish), guj (Gujarati), hat (Haitian and Haitian Creole), iku (Inuktitut), jav (Javanese), kat (Georgian), kat_old (Old Georgian), kaz (Kazakh), khm (Central Khmer), kir (Kyrgyz), kur (Kurdish), lao (Lao), lat (Latin), mar (Marathi), mya (Burmese), nep (Nepali), ori (Oriya), pan (Punjabi), pus (Pashto), san (Sanskrit), sin (Sinhala), srp_latn (Serbian in Latin script), syr (Syriac), tgk (Tajik), tir (Tigrinya), uig (Uyghur), urd (Urdu), uzb (Uzbek), uzb_cyrl (Uzbek in Cyrillic script), yid (Yiddish).[13]

In addition, Tesseract can be trained to work in other languages.[6]

Tesseract can process right-to-left text such as Arabic or Hebrew, many Indic scripts as well as CJK quite well. Accuracy rates are shown in this presentation for Tesseract tutorial at DAS 2016, Santorini by Ray Smith.[14]

Tesseract is suitable for use as a backend and can be used for more complicated OCR tasks including layout analysis by using a frontend such as OCRopus.[15]

Tesseract's output will have very poor quality if the input images are not preprocessed to suit it: Images (especially screenshots) must be scaled up such that the text x-height is at least 20 pixels,[16] any rotation or skew must be corrected or no text will be recognized, low-frequency changes in brightness must be high-pass filtered, or Tesseract's binarization stage will destroy much of the page, and dark borders must be manually removed, or they will be misinterpreted as characters.[17]

User interfaces

Tesseract is executed from the command-line interface.[18] While Tesseract is not supplied with a GUI, there are many separate projects which provide a GUI for it.[19] One common example is OCRFeeder.[20]

Reception

In a July 2007 article on Tesseract, Anthony Kay of Linux Journal termed it "a quirky command-line tool that does an outstanding job". At that time he noted "Tesseract is a bare-bones OCR engine. The build process is a little quirky, and the engine needs some additional features (such as layout detection), but the core feature, text recognition, is drastically better than anything else I've tried from the Open Source community. It is reasonably easy to get excellent recognition rates using nothing more than a scanner and some image tools, such as The GIMP and Netpbm."

In November 2020, Brewster Kahle from the Internet Archive praised Tesseract saying:

See also

Notes and References

  1. Web site: tesseract-ocr. 2016-03-08. ((Google)). . Google. 2008.
  2. Web site: Languages supported in different versions of Tesseract . 2022-11-21 . live . https://web.archive.org/web/20220808044714/https://tesseract-ocr.github.io/tessdoc/Data-Files-in-different-versions.html . 8 August 2022 .
  3. Web site: Tesseract documentation – Traineddata files ... – Language data files for Tesseract . 2022-11-21 . live . https://web.archive.org/web/20220905230942/https://tesseract-ocr.github.io/tessdoc/Data-Files . 5 September 2022 .
  4. News: Tesseract: an Open-Source Optical Character Recognition Engine. 28 September 2011. Kay. Anthony. July 2007. Linux Journal.
  5. Web site: Announcing Tesseract OCR . 2008-06-26 . Vincent . Luc . August 2006 . dead . https://web.archive.org/web/20061026075310/http://google-code-updates.blogspot.com/2006/08/announcing-tesseract-ocr.html . October 26, 2006 .
  6. Web site: OCR. 2011-02-11. Canonical Ltd.. February 2011.
  7. http://googlecode.blogspot.com/2006/08/announcing-tesseract-ocr.html Announcing Tesseract OCR
  8. Web site: Google's Tesseract OCR engine is a quantum leap forward. 2008-07-18. Willis . Nathan. September 2006. https://archive.today/20220528002829/https://www.linux.com/news/googles-tesseract-ocr-engine-quantum-leap-forward/. 28 May 2022. live.
  9. Web site: TESSERACT(1) Manual Page. . 15 March 2018.
  10. Web site: Schmidt. Julia. 2021-12-01. OCR Engine Tesseract 5.0 converts to float for faster training and recognition • DEVCLASS. 2021-12-20. DEVCLASS. en-GB.
  11. Rice Stephen V., Frank R. Jenkins, and Thomas A. Nartker The Fourth Annual Test of OCR Accuracy, expervision.com, retrieved 21 May 2013
  12. Web site: Issue 263: patch to enable hOCR output . 26 February 2011 . Tesseract Project . February 2011 . dead . https://web.archive.org/web/20121113065732/http://code.google.com/p/tesseract-ocr/issues/detail?id=263 . November 13, 2012 .
  13. Web site: langdata - Source training data for Tesseract for lots of languages. . 6 November 2016.
  14. Web site: Training LSTM networks on 100 languages and test results . . 18 March 2018.
  15. http://google-code-updates.blogspot.com/2007/04/announcing-ocropus-open-source-ocr.html Announcing the OCRopus Open Source OCR System
  16. Web site: FAQ - tesseract-ocr - Frequently Asked Questions - An OCR Engine that was developed at HP Labs between 1985 and 1995... and now at Google. - Google Project Hosting . 2014-05-30. https://web.archive.org/web/20151223054041/https://code.google.com/p/tesseract-ocr/wiki/FAQ#Is_there_a_Minimum_Text_Size?_%28It_won%27t_read_screen_text!%29. 23 December 2015. dead.
  17. Web site: ImproveQuality - tesseract-ocr - Advice on improving the quality of your output. - An OCR Engine that was developed at HP Labs between 1985 and 1995... and now at Google. - Google Project Hosting . 2014-01-27 . 2014-05-30. https://web.archive.org/web/20150920054025/https://code.google.com/p/tesseract-ocr/wiki/ImproveQuality. 20 September 2015. dead.
  18. http://code.google.com/p/tesseract-ocr/wiki/ReadMe Google Code – Tesseract Readme
  19. Web site: 3rdParty - tesseract-ocr - GUIs and Other Projects using Tesseract OCR. . 2024-03-09 . github.com.
  20. Web site: OCRFeeder. 12 January 2019. GNOME wiki.