Search code examples
homebrewtesseracttiff

Tesseract .tr file empty


I'm trying to integrate text recognition into my app with TesseractOCR. I need it to learn a custom font. I have Tesseract installed on my Mac via Homebrew. I have a tiff file: eng.scout-cond.exp0.tiff that I'm converting into a ".box" file. When I run the command tesseract eng.scout-cond.exp0.tiff eng.scout-cond.box nobatch box.train.stderr It says Tesseract Open Source OCR Engine v4.1.1 with Leptonica Then generates a file called eng.scout-cond.box.tr

  1. I don't understand why it's a .tr extension instead of the .box extension shown to me in tutorials.

  2. When opening the .tr file in a text editor, it's empty.

What would be causing it to be empty?

eng.scout-cond.exp0.tiff

The tutorial I'm following


Solution

  • I missed a step, the command shown in the original post is to create a .tr file from the .box file and the .tiff file.

    SOLUTION: I used the command tesseract eng.scout-cond.exp0.png eng.scout-cond.exp0 batch.nochop makebox To make the .box file. Then I ran the command in the original post.