Scanning documents into images is not a big deal, it is a matter of connecting the scanner, putting the document inside, clicking a button or two, and acquiring the image result… That easy.
But what if the physical size of the document you are trying to scan is larger than the size of the scanner? Well… that needs a bit of Orange Magic.
Website Management: Under the hood
In EtaBits, we offer website management solutions, which, in addition to developing the website, includes doing all the data entry and management of the website. It is a high level service, done by our web expert team, that aims at optimizing the data down to every bit. From formatting texts, to providing content with meta-data and optimizing images for faster load time while preserving quality…
So, as I started to scan the document, there was an “Oh no!”, the document was few centimeters wider than the scanner! I had the option to go somewhere where they offer document scanning services, they do have large scanners. But my decision was to keep that as plan B, with plan A to scan each page two times and then stitch them together using an image manipulation software (GIMP?).
Why not using a panorama software?
After getting the images, I though to my self “Hey, this is very similar to stitching individual panorama images!”. I started searching for softwares to do it, and found Hugin. I installed and launched it, tried a bit around, but did not find out how to do the task! I thought that maybe it is not very similar to panoramic images after all.
I started GIMP, opened first image and expanded canvas, added the other one. Few minutes later I had them aligned, but I had two problems: one of the scanned images was slightly rotated, besides that one of them is darker than the other. I started fixing the situation, but thought again: Why not look further into Hugin? It should be programmed to take care of all the differences, ones I found about and other ones.
I searched again, and found a tutorial on stitching scanned images on hugin’s website! I had to update to a newer Hugin version, and the steps used are a bit different, probably due that I had an even newer version, or because the documentation did not cover the all auto path.
Automatically stitching two images, step by step!
Upgrading to a newer Hugin
sudo apt-add-repository ppa:hugin/hugin-builds sudo apt-get update sudo apt-get install hugin
- Open Hugin, from the “Assistant” tab, Click on “1. Load Images”.
- Select the images and continue.
- You’ll be asked on the HFoV, enter 10, an the scanner actually scans the document flat, not like the camera len when taking a shot.
Auto, auto, and more auto
- Click on the “2. Align…” button, it will show an output window, wait until it finishes. This will align both images together.
- Go to the Move/Drag tab. Click on Center, Fit and then Straighten.
- From the Crop tab, click on Autocrop
- You can (optionally) expand the cropped area, from the bottom-right preview mode, while still on the Crop tab.
- Click on the “View” menu item, and choose “Ponorama editor”.
- In the “Photos” tab, select all images, then from the menu “Edit” choose “Optimize”.
- Go to “Stitcher” tab, click on Stitch!
If it gives an error about
enfusenot found, go to the “File” > “Preferences” menu, and go to the “Programs” tab, and enter full paths to the programs:
If it gives an error saying no input file, then the cropping area is small, increase it in the Crop tab.
Should you need any help, feel free to ask