101

I'd like to scan a good amount of papers I have lying around, with the least possible hassle. I would like to convert them to images using Simple Scan, then convert them to text using OCR. Is there a good OCR app with a GUI that will give me good results at the push of a button?

Eliah Kagan
  • 117,780
Bou
  • 4,502
  • We really need a lot rework in this thread. So many old/depreciated/... things. No one-liner tests. Mostly copy-pasted results/lists here. No quality-assurance. – Léo Léopold Hertz 준영 Jun 14 '16 at 21:16
  • In 2018, the by far simplest OCR solution is using an online ocr api: Google Vision OCR, Azure OCR or the free OCR.space OCR API all provide highly quality OCR results - of course only if your application/use case allows a cloud solution. – Nic Endo Mar 15 '18 at 09:35

9 Answers9

86
  • GOCR from is an OCR (Optical Character Recognition) program.It converts scanned images of text back to text files.

  • CLARA is another good graphical option.

  • OCRAD from is an OCR can be used as a stand-alone console application,or as a backend to other programs.

  • KOOKA from is a KDE application but works fine,in addition you have to install actual OCR programs like GOCR and OCRAD.After installing Kooka and the OCR programs,you have to point Kooka to the OCR install location in order for it to be able to convert the JPEG to text.

  • OCRFeeder from is a document layout analysis and optical character recognition system.

  • Tesseract from is Command line utility and it is very simple to use.You can install language package tesseract-ocr-eng from here.

Have a look at this page.

Note:
To run tesseract goto terminal and type the following

tesseract imagefile.tif outputfile.txt

Tesseract can only read a TIFF file - if you've got a JPEG or PDF or whatever, you'll have to convert it. Also, the filename extension must be .tif, not .tiff, otherwise tesseract errors out.

Sparhawk
  • 6,929
karthick87
  • 81,947
  • 1
    If your spoken language isn't English? is any extensions for other language? – Vassilis Dec 05 '10 at 11:30
  • karthick, that was a great answer. Could you please add some info on OCRFeeder to mark it as the accepted answer? – Bou Dec 05 '10 at 11:31
  • @Vassilis Sorry i cant get you?? – karthick87 Dec 05 '10 at 11:35
  • 3
    @Vassilis: OCR systems are language independent because they recognise characters, not words. However if your alphabet has not-Latin1 characters ( like cyrillic ) then it may miss those. – OpenNingia Dec 05 '10 at 11:41
  • 1
    Some times I need to convert images with none English text (Greek), is any extensions to read the Greek letters, with this programs? – Vassilis Dec 05 '10 at 11:42
  • 1
    @Vassilis: You can install tesseract-ocr-* for the languages you want. – karthick87 Dec 05 '10 at 12:44
  • 2
    @OpenNingia : The language can be important, even with writing systems only using latin letters. It helps the OCR to discriminate between ambiguous letters. – Frédéric Grosshans Dec 05 '10 at 14:27
  • 17
    Such questions/answers really mess up askubuntu. The person asked for "What's the best, simplest OCR solution" not "what are all the OCR apps available for Linux". This solution shouldn't have been accepted! Really confusing and not helpful. – Alin Andrei Mar 17 '11 at 11:58
  • For Greek, and plenty other languages, you can use tesseract with the correct language pack. To have a GUI you can use gscan2pdf which can use the different ocr systems you've installed. I recommend adding their ppa or downloading the latest version since ubuntu is way behind on this program. – Victor Oct 12 '13 at 08:13
  • 1
    @Vassilis http://manpages.ubuntu.com/manpages/precise/man1/tesseract.1.html ←It lists a lot of languages after the OPTIONS section. – isomorphismes May 24 '15 at 20:12
  • 3
    Current Ubuntu tesseract (3.04.00 on Ubuntu 15.10) has no problems with PNG input files. it accepts JPG files, but gives worse result for them, as one would expect from additional artifacts of compression. – Volker Siegel Apr 25 '16 at 21:42
  • It would be great to get separation of the programs by fileformats. Tesseract cannot handle PDF Image file %PDF-1.6 cannot be read!. – Léo Léopold Hertz 준영 Jun 14 '16 at 20:34
  • It would be great also to get one-liner example about gocr. Nothing with gocr -i test.pdf because too big. – Léo Léopold Hertz 준영 Jun 14 '16 at 20:36
  • 1
    There are some many packages broken in your list etc kooda and clara without proper maintenance. We really need better answers here! – Léo Léopold Hertz 준영 Jun 14 '16 at 20:38
  • tesseract-ocr is the package name – Gabor Aug 23 '16 at 02:00
  • I tried GOCR and Tesseract on a small sample file, and had far fewer errors with Tesseract. My one minor gripe is that it appends ".txt" to the output filename, changing "foo" to "foo.txt", and "foo.txt" to "foo.txt.txt". – Huw Walters Jan 05 '18 at 11:59
  • Actually, Tesseract supports various output formats: plain-text, hocr(html), pdf, tsv, invisible-text-only pdf. ref here – jasonleonhard Jan 26 '18 at 03:45
  • Here's a wrapper I just wrote around tesseract. It automatically converts an input pdf into a bunch of TIFF files, then uses tesseract on them to generate a searchable PDF. Installation & usage info: https://askubuntu.com/questions/473843/how-to-turn-a-pdf-into-a-text-searchable-pdf/1187881#1187881. It deletes temporary files when done. Usage is super simple: pdf2searchablepdf input.pdf. This generates input_searchable.pdf. Source code is here: https://github.com/ElectricRCAircraftGuy/PDF2SearchablePDF. – Gabriel Staples Nov 11 '19 at 09:30
  • Have a look at lightweight CROW, which also can do translation of OCR text https://github.com/crow-translate/crow-translate – pymen Nov 17 '21 at 10:01
14

There are few popular OCR command-line tools you can use (I'm not sure if they've GUI):

  • Tesseract (ReadMe, FAQ) (Python)

    Also available for: Tesseract .NET, Tesseract iOS

    An OCR Engine that was developed at HP Labs between 1985 and 1995... and now at Google. Tesseract is probably the most accurate open source OCR engine available.

    Usage:

    tesseract [inputFile] [outputFile] [-l optionalLanguageFile] [PathTohOCRConfigFile]
    
  • GOCR

    Open-source character recognition. It converts scanned images of text back to text files. GOCR can be used with different front-ends, which makes it very easy to port to different OSes and architectures. It can open many different image formats, and its quality have been improving in a daily basis.

  • OCRopus™ (FAQ) (written in Python, NumPy, and SciPy)

    OCR system focusing on the use of large scale machine learning for addressing problems in document analysis, featuring pluggable layout analysis, pluggable character recognition, statistical natural language modeling, and multi-lingual capabilities.

    The OCRopus engine is based on two research projects: a high-performance handwriting recognizer developed in the mid-90's and deployed by the US Census bureau, and novel high-performance layout analysis methods.

    OCRopus is development is sponsored by Google and is initially intended for high-throughput, high-volume document conversion efforts. We expect that it will also be an excellent OCR system for many other applications.

  • Tessnet2 (Open source, OCR, Tesseract, .NET, DOTNET, C#, VB.NET, C++/CLI)

    Tesseract is a C++ open source OCR engine. Tessnet2 is .NET assembly that expose very simple methods to do OCR. Tessnet2 is under Apache 2 license (like tesseract), meaning you can use it like you want, included in commercial products.

Few others: ABBYY CLI OCR for Linux, Asprise OCR

For more complete list, check: List of optical character recognition software at Wikipedia

See also: wanghaisheng/awesome-ocr - A curated list of promising OCR resources at GitHub.

kenorb
  • 10,347
14

Gscan2PDF

OCR on multi page PDF or scanned documents

This is probably the easiest way. Gscan2pdf is a graphical tool which lets you not only scan files, but also import files and perform OCR on them. Install gscan2pdf from here Install gscan2pdf, from Ubuntu Software Center or running this command in a terminal:

sudo apt-get install gscan2pdf
  • Run gscan2pdf
  • Import the pdf (Ctrl+O)
  • Optional: Tools > Clean up
  • Choose Tools > OCR Save (Ctrl+S)

Gscan2PDF can use customizable OCR engines, default is tesseract-ocr

You might consider selecting the appropriate language. In that case you will need to install tesseract-ocr-LANG package, where LANG is the three letter ISO 639-2 language code. Right now you have 108 languages on 16.04 repo.

mxdsp
  • 3,818
  • I cannot do anything with this software. No sufficient detection at all. It would be great to get any test samples about apps before their recommendations. – Léo Léopold Hertz 준영 Jun 14 '16 at 20:32
  • gscan2pdf for 16.04 at least has no Ctrl+i option shortcut. Opening a pdf file correctly identifies the "pages to extract", but selecting "ok" does nothing. – Mark D Nov 16 '16 at 19:51
11

Just because it works very nicely and should definitely be in the list:

gimageReader
Example from a screenshot:

enter image description here

It is in the repos (answered on 18.10, but have been using it for ages)

Jacob Vlijm
  • 83,767
  • 4
    When I first launched gimageReader, it gave me a "No languages available" message for tesseract. The "How do I install a new language pack for tesseract" answer fails to list eng as an option ... but I worked it out! :) Running sudo apt install tesseract-ocr-eng in the terminal did the trick. It would be nice if this was documented in gimageReader's help file or "README" on github ... or somewhere. Like here, perhaps. – Dɑvïd Apr 04 '19 at 13:28
9

linux-intelligent-ocr-solution

disclaimer - I am closely connected with the development of this opensource solution

Lios can convert print to text using either scanner or a camera.

It can also produce text out of scanned images from other sources such as Pdf, Image or Folder containing Images.

Program is given total accessibility for visually impaired.

Since I'm closely connected - I would love feedback.

Pablo Bianchi
  • 15,657
Nalin.x.Linux
  • 91
  • 1
  • 1
7

Best and easyest way out there is to use pypdfocr it doesn't change the pdf. pypdfocr is a python module link here.

pypdfocr your_document.pdf

At the end you will have another your_document_ocr.pdf the way you want it with searchable text. The app doesn't change the quality of the image. Increases the size of the file a bit by adding the overlay text.

I think the command is pretty easy that it doesn't need any GUI. Maybe installing pypdfocr is a bit more verbose:

sudo apt install tesseract-ocr 
pip install pypdfocr 

Update 3rd november 2018:

pypdfocr is no longer supported since 2016 and I noticed some problems due to not being mentained. ocrmypdf(module does a symiliar job and can be used like this:

ocrmypdf in.pdf out.pdf

To install:

pip install ocrmypdf

or

apt install ocrmypdf
3

I have just had success (under 16.04) with pdfocr.rb. This is listed on Ubuntu wiki

Here is a ppa but the repository for 16.04 is not updated. The ruby script above from github though still works with 16.04.

You can download it from Github. You will need the following packages installed:

ruby tesseract-ocr pdftk exactimage

then made pdfocr.rb executable and ran:

./pdfocf.rb -i source.pdf -o output.pdf

Optionally you can use the -l LANG parameter. In that case you will need to install tesseract-ocr-LANG package, where LANG is the three letter ISO 639-2 language code. Right now you have 108 languages on 16.04 repo.

Pablo Bianchi
  • 15,657
Mark D
  • 463
1

gscan2pdf includes 3 different ocr engines. You can scan right to the program or import your pdf into the program. I've found the Tesseract engine works great, and very easy to use

0

OCRFeeder has already been mentioned as one of many options, but I thought it would be worth mentioning why it fulfills your requirements:

  • It has a GUI (unlike some of the applications mentioned in some of the other answers)
  • It's easy to use (click Add Image then click Recognize Document)

In addition, it has other qualities that make it an excellent choice:

bmaupin
  • 4,930