tesseract - консольный OCR движок.

Описание

Tesseract является качественным консольным OCR движком с открытым исходным кодом. В настоящий момент программа работает с UTF-8, поддержка языков (включая русский с версии 3.0) осуществляется с помощью дополнительных модулей.

Существуют несколько графических интерфейсов (GUI) для программы: gImageReader, OCRFeeder, YAGF.

Синтаксис

tesseract imagename outbase [-l язык] [-psm N] [configfile ...]

Опции

imagename

The name of the input image. Most image file formats (anything readable by Leptonica) are supported.

outbase

The basename of the output file (to which the appropriate extension will be appended). By default the output will be named outbase.txt.

-l lang

The language to use. If none is specified, English is assumed. Multiple languages may be specified, separated by plus characters. Tesseract uses 3-character ISO 639-2 language codes. (See LANGUAGES)

-psm N

Set Tesseract to only run a subset of layout analysis and assume a certain form of image. The options for N are:

  • 0 = Orientation and script detection (OSD) only.
  • 1 = Automatic page segmentation with OSD.
  • 2 = Automatic page segmentation, but no OSD, or OCR.
  • 3 = Fully automatic page segmentation, but no OSD. (Default)
  • 4 = Assume a single column of text of variable sizes.
  • 5 = Assume a single uniform block of vertically aligned text.
  • 6 = Assume a single uniform block of text.
  • 7 = Treat the image as a single text line.
  • 8 = Treat the image as a single word.
  • 9 = Treat the image as a single word in a circle.
  • 10 = Treat the image as a single character.
-v

Returns the current version of the tesseract(1) executable.

configfile

The name of a config to use. A config is a plaintext file which contains a list of variables and their values, one per line, with a space separating variable from value. Interesting config files include:

 o   hocr - Output in hOCR format instead of as a text file.
Nota Bene: The options -l lang and -psm N must occur before any configfile.

Языки

There are currently language packs available for the following languages:

  1. ara (Arabic),
  2. aze (Azerbauijani),
  3. bul (Bulgarian),
  4. cat (Catalan),
  5. ces (Czech),
  6. chi_sim (Simplified Chinese),
  7. chi_tra (Traditional Chinese),
  8. chr (Cherokee),
  9. dan (Danish),
  10. dan-frak (Danish (Fraktur)),
  11. deu (German),
  12. ell (Greek),
  13. eng (English),
  14. enm (Old English),
  15. epo (Esperanto),
  16. est (Estonian),
  17. fin (Finnish),
  18. fra (French),
  19. frm (Old French),
  20. glg (Galician),
  21. heb (Hebrew),
  22. hin (Hindi),
  23. hrv (Croation),
  24. hun (Hungarian),
  25. ind (Indonesian),
  26. ita (Italian),
  27. jpn (Japanese),
  28. kor (Korean),
  29. lav (Latvian),
  30. lit (Lithuanian),
  31. nld (Dutch),
  32. nor (Norwegian),
  33. pol (Polish),
  34. por (Portuguese),
  35. ron (Romanian),
  36. rus (Russian),
  37. slk (Slovakian),
  38. slv (Slovenian),
  39. sqi (Albanian),
  40. spa (Spanish),
  41. srp (Serbian),
  42. swe (Swedish),
  43. tam (Tamil),
  44. tel (Telugu),
  45. tgl (Tagalog),
  46. tha (Thai),
  47. tur (Turkish),
  48. ukr (Ukrainian),
  49. vie (Vietnamese)

To use a non-standard language pack named foo.traineddata, set the TESSDATA_PREFIX environment variable so the file can be found at TESSDATA_PREFIX/tessdata/foo.traineddata and give Tesseract the argument -l foo.

История

Tesseract был разработан компанией HP между 1985 и 1995, а затем десять лет не изменялся. В 2005 году были открыты исходные тексты. С 2006 года разработку движка спонсирует компания Google.

     The engine was developed at Hewlett Packard Laboratories Bristol and at
     Hewlett Packard Co, Greeley Colorado between 1985 and 1994, with some
     more changes made in 1996 to port to Windows, and some C++izing in
     1998. A lot of the code was written in C, and then some more was
     written in C++. The C\++ code makes heavy use of a list system using
     macros. This predates stl, was portable before stl, and is more
     efficient than stl lists, but has the big negative that if you do get a
     segmentation violation, it is hard to debug.
     Version 2.00 brought Unicode (UTF-8) support, six languages, and the
     ability to train Tesseract.
     Tesseract was included in UNLV's Fourth Annual Test of OCR Accuracy.
     See http://www.isri.unlv.edu/downloads/AT-1995.pdf. With Tesseract
     2.00, scripts are now included to allow anyone to reproduce some of
     these tests. See
     http://code.google.com/p/tesseract-ocr/wiki/TestingTesseract for more
     details.
     Tesseract 3.00 adds a number of new languages, including Chinese,
     Japanese, and Korean. It also introduces a new, single-file based
     system of managing language data.
     Tesseract 3.02 adds BiDirectional text support, the ability to
     recognize multiple languages in a single image, and improved layout
     analysis.
     For further details, see the file ReleaseNotes included with the
     distribution.

Ресурсы

Смотрите также

     ambiguous_words(1), cntraining(1), combine_tessdata(1),
     dawg2wordlist(1), shape_training(1), mftraining(1), unicharambigs(5),
     unicharset(5), unicharset_extractor(1), wordlist2dawg(1)

Авторы

Разработка tesseract была возглавлена Hewlett-Packard и Ray Smith от Google. Команда разработчиков состоит из: 1)

     Ahmad Abdulkader, Chris Newton, Dan Johnson, Dar-Shyang Lee, David
     Eger, Eric Wiseblatt, Faisal Shafait, Hiroshi Takenaka, Joe Liu, Joern
     Wanke, Mark Seaman, Mickey Namiki, Nicholas Beato, Oded Fuhrmann, Phil
     Cheatle, Pingping Xiu, Pong Eksombatchai (Chantat), Ranjith
     Unnikrishnan, Raquel Romano, Ray Smith, Rika Antonova, Robert Moss,
     Samuel Charron, Sheelagh Lloyd, Shobhit Saxena, and Thomas Kielbus.

Копирование

Зарегистрирован под лицензией Apache License, Version 2.0

1)
Tesseract development was led at Hewlett-Packard and Google by Ray Smith. The development team has included: