Install:
(Ubuntu 9.10)
sudo apt-get install tesseract-ocr tesseract-ocr-eng
Preparing Images for Tesseract with GIMP:
- Load an image with text into GIMP
- Image > Mode > make the image RGB or Grayscale.
- Tools > Color Tools > Threshold > pick a value which best shows the text
- Image > Mode > Indexed > choose 1-bit & no dithering.
- Save the image as .tif (TIFF but make sure the extension is only .tif and not .tiff)
Use:
The input file MUST be .tif (not .tiff) and the output will be a .txt (extension is automatically added by tesseract) so simply typing the following should export the input image (input.tif) as a text file (output.txt).
tesseract input.tif output
Example:
Example Output:
Hello World
Alex Sleat
Testing test
All this information was found on the following Ubuntu documentation, I just had some trouble finding it so I have re-wrote as a clean simple guide for anyone else having the same trouble. All thanks goes to whoever wrote the following link. :)
https://help.ubuntu.com/community/OCR