readme.html 6.0 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109
  1. <html>
  2. <head>
  3. <meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
  4. <title>jTessBoxEditor - Box Editor & Trainer for Tesseract OCR Data</title>
  5. <style type="text/css">
  6. .auto-style1
  7. {
  8. text-decoration: underline;
  9. }
  10. </style>
  11. </head>
  12. <body lang="EN-US">
  13. <div>
  14. <h2 style="text-align: center;">
  15. jTessBoxEditor</h2>
  16. <h3>
  17. DESCRIPTION</h3>
  18. <p>
  19. <a href="http://vietocr.sourceforge.net/training.html">jTessBoxEditor</a> is a box
  20. editor and trainer for <a href="https://github.com/tesseract-ocr/">Tesseract OCR</a>,
  21. providing editing of box data of both Tesseract 2.0x and 3.0x formats and full automation
  22. of Tesseract training. It can read common image formats, including multi-page TIFF.
  23. </p>
  24. <p>
  25. jTessBoxEditor is released and distributed under the <a href="http://www.apache.org/licenses/LICENSE-2.0.html">Apache License, v2.0</a>.
  26. </p>
  27. <h3>
  28. SYSTEM REQUIREMENTS</h3>
  29. <p>
  30. <a href="http://www.oracle.com/technetwork/java/javase/downloads/index.html">Java Runtime
  31. Environment 7.0</a> or later.
  32. </p>
  33. <h3>
  34. INSTRUCTIONS</h3>
  35. <p>
  36. Double-click on the JAR file to launch the program, or execute the following command:
  37. </p>
  38. <blockquote>
  39. <p>
  40. <code>java -Xms128m -Xmx1024m -jar jTessBoxEditor.jar</code>
  41. </p>
  42. </blockquote>
  43. <p>
  44. You will need to provide the TIFF/Box files as input to the editor. Images to be
  45. used in training should be of 300 DPI and 1 bpp (bit per pixel) black&amp;white
  46. or 8 bpp grayscale, uncompressed TIFF format; box files, encoded in UTF-8 format,
  47. are generated by Tesseract executables with appropriate command-line options (see
  48. <a href="https://github.com/tesseract-ocr/tesseract/wiki/TrainingTesseract">Tesseract Training Wiki</a>). Or
  49. they both can be created using the built-in <em>TIFF/Box Generator</em>.</p>
  50. <p>
  51. The following hotkeys are available in Box View for ease of editing:</p>
  52. <ul>
  53. <li><strong>W/S</strong> - move box up/down;<strong> A/D</strong> - move box left/right</li>
  54. <li><strong>Q/E</strong> - decrease/increase box width;<strong> R/F</strong> - decrease/increase box height</li>
  55. <li><strong>&lt;/&gt;</strong> - previous/next box</li>
  56. <li><strong>X</strong> - edit character in box</li>
  57. </ul>
  58. <p>
  59. Holding Shift when using hotkeys multiplies movement speed by 10.
  60. Pressing Enter or ESC when editing character focuses the box editor.</p>
  61. <p>
  62. Note that the coordinate system used in the box file has (0,0) at the bottom-left;
  63. on computer graphics devices, however, (0,0) is defined as top-left. jTessBoxEditor
  64. uses and displays in the graphics device coordinates. The edited box files are still
  65. read and written in proper format.
  66. </p>
  67. <p>
  68. The generator produces, for a given input UTF-8 text file, a TIFF/Box pair of files
  69. suitable for training with Tesseract. The generated image is, depending on anti-aliasing
  70. mode enabled, a binary or grayscale, uncompressed multi-page TIFF with 300 DPI resolution.
  71. Letter tracking, or spacing between characters, can be adjusted to eliminate bounding
  72. box overlapping issues. Note that the coordinates of some boxes could be slightly
  73. different (by 1 or 2 pixels) from the ones that would have been generated by Tesseract
  74. itself; nevertheless, the generated box file can be used to validate the one created
  75. by Tesseract with the use of a Unicode-compatible file compare tool, such as <a href="http://sourceforge.net/projects/winmerge/">
  76. WinMerge</a>.
  77. </p>
  78. <p>
  79. <span class="auto-style1">Tips</span>: Experiments indicate that the quality of
  80. training with images created by <em>TIFF/Box Generator</em> is higher with font
  81. sizes 24pt or greater and with some noise added.
  82. </p>
  83. <p>
  84. Combining symbols or diacritics, like those found in Devanagari or Indic scripts,
  85. that need to be combined with the main, base character can be specified by the user
  86. in a UTF-8 text file, specifically <code>data/combiningsymbols.txt</code>, which is
  87. read by the generator. This setup gives the users the flexibility in
  88. defining combining symbols/diacritics for their language scripts.</p>
  89. <p>
  90. Automated training is provided in latest version. Tesseract Windows training executables
  91. are bundled with the program; for other platforms, you will need to <a href="https://github.com/tesseract-ocr/tesseract/wiki/Compiling">
  92. build</a> them. Place all required source training data files, prefixed with
  93. an appropriate language code, in a specified directory (check <code>samples</code>
  94. folder for examples). The training operation can also be automated using the enclosed
  95. <code>train.ps1</code> Windows PowerShell script.
  96. </p>
  97. <p>
  98. The <em>Merge TIFF</em> function can save multiple images containing text of the
  99. same font into a single multi-page TIFF file to be used for training.
  100. A conversion function is included to convert numeric character reference (NCR) and
  101. escape sequence in the <em>Character</em> text field to Unicode characters.</p>
  102. <p>
  103. If there is any question, please post in <a href="http://sourceforge.net/projects/vietocr/forums">
  104. VietOCR Forums</a>.
  105. </p>
  106. <hr />
  107. </div>
  108. </body>
  109. </html>