Ubuntu – How to turn photos of paper documents into a scanned document

image processingscanning

My scanner has broken! I do have a good camera though so I've taken a few photos of the documents I want to scan… However they look like photos of paper, not scanned documents:

  • Images aren't flat
  • Lighting isn't even (shadows as the page warps, etc)
  • Text obviously isn't processed into copy-pasteable PDF text.

They simply aren't suitable for professional use, but they're close.

I'm looking for some thing (or method) that can do any or all of the above so I can go from a number of JPG files to a single [optionally] annotated PDF of the whole thing, that's in the right format (A4 typically).

Any suggestions (short of going out and buying a new scanner)?

Best Answer

There are several ways to do that. Though all my suggeed ways have one problem they won't really flatten your picture. A more or less good picture would be still required.

One easy way is that you try the software ScanTailor (scantailor.org)

sudo apt-get install scantailor 

It takes you through 6 steps to optimize your photos. At the last step you can select the option "Equalize illumination" this will give you a nice clean look!


Personally I usually just use GIMP. But you need some basic skills to reach your aim.

sudo apt-get install gimp 
  1. crop the picture in the wanted way
  2. use the Colors -> Curves option to manipulate the color output in a way you want it...

Adjust Color Curves to get a nice clean output.


Another nice little program is gscan2pdf, where you can also load photos and export them as PDF. There is is even a link to GIMP so you can improve the photo with the above described steps.

sudo apt-get install gscan2pdf