100

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?

2
  • 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. Jun 14, 2016 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, 2018 at 9:35

9 Answers 9

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.

19
  • 1
    If your spoken language isn't English? is any extensions for other language?
    – Vassilis
    Dec 5, 2010 at 11:30
  • 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 5, 2010 at 11:41
  • 2
    @OpenNingia : The language can be important, even with writing systems only using latin letters. It helps the OCR to discriminate between ambiguous letters. Dec 5, 2010 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. Mar 17, 2011 at 11:58
  • 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. Apr 25, 2016 at 21:42
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.

13

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.

2
  • 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. Jun 14, 2016 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, 2016 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)

1
  • 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 4, 2019 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.

3
  • Where is documentation on usage? lios is not as intuitive as I'd hoped.
    – a coder
    Dec 29, 2014 at 13:32
  • The project has moved here.
    – Suzana
    Oct 18, 2015 at 15:28
  • Is it possible to run it through command line only in headless mode on server?
    – Deadlock
    Nov 16, 2015 at 13:04
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
9
  • This is a very interesting tool, albeit I think OP wanted a GUI tool to produce a text file, not a PDF sandwich. It would be nice if you could include the project website. Feb 3, 2018 at 19:10
  • @AndreaLazzarotto Yes I saw but since the comand is that simple I guess many people can use the terminal for that. so I tought to include the solution here Feb 3, 2018 at 19:19
  • 1
    As a coincidence, just recently I discovered "ocrmypdf". Did you check it out? It's very nice. :) Feb 3, 2018 at 20:01
  • 1
    @EduardFlorinescu sudo apt install ocrmypdf works like a charm. I do not think the "not that straightforward" comment is true anymore.
    – Lexible
    May 22, 2020 at 15:01
  • 1
    OCRMyPDF suffers from massive file bloat in the output (e.g., 600Kb ==> 3.3MB is a typical >5× size increase example, regardless of -s, --redo-ocr, etc. options).
    – Lexible
    Feb 1, 2022 at 6:56
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.

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:

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .