0

Edit2: The config-file must have Unix Line Ending: Only "\n" and not "\r\n".

Edit: duplication How to set tessedit_write_images in python-tesseract?

Tesseract has an option to output the processed image, the so called Tesseract Eye. I use for first test the command line and I'm not able to get the output of the config parameter: tessedit_write_images

I have made a config file c:/tmp/config.txt with the only content:

tessedit_write_images true 

Here's my command line:

   C:\Program Files (x86)\Tesseract-OCR>tesseract c:/tmp/textscan11.tif     c:/tmp/textscan -psm 7  c:/tmp/config.txt
    Tesseract Open Source OCR Engine v3.05.01 with Leptonica
    Page 1

I get c:/tmp/textscan.txt as output and that's all. The second file as result of the Eye-parameter is missing. I have searched the complete disk for the exspected file tessinput.tif.

-- Tesseract v3.05.01 Windows10 64 bit --

What's wrong?

Thanks in advance

CarpeDiemKopi
  • 316
  • 3
  • 13

1 Answers1

1

Try to check if c:/tmp/config.txt has expected line break (just '\n').

user898678
  • 2,994
  • 2
  • 18
  • 17
  • The \n newline dec 10 or 0x0A is there. See the file in hex: 74 65 73 73 65 64 69 74 5f 77 72 69 74 65 5f 69 6d 61 67 65 73 20 74 72 75 65 0d 0a – CarpeDiemKopi Oct 15 '17 at 15:44
  • 0d 0a is windows EOL (\r\n) and it has to be just \n. You can use e.g. notepad++ for changin EOL to unix style. – user898678 Oct 19 '17 at 09:12
  • Thanks a lot. Output file is in directory (Windows 10): C:\Users\CarpeDiemKopi\AppData\Local\VirtualStore\Program Files (x86)\Tesseract-OCR named tessinput.tif – CarpeDiemKopi Oct 19 '17 at 10:17