Step 10: Post Processing

Picture of Post Processing
There are two ways we can post-process these images before we make a PDF out of them:

The Lazy Way
Open up your favorite editor and rotate all of those images so they're the right way up :(

Or you can use some software Matti wrote to batch rotate them for you:
  • If you followed our instructions and took pictures of the right-hand side of the book all the way to the end, then flipped the book and took all the left-side pictures:
RotateAll.exe (Source code) will rotate the first half of the images clockwise, the second half counter-clockwise.
  • If you didn't use a tripod and instead took pictures of each page, alternating right then left, starting with the right-hand side of the book:
RotateEveryOther.exe (Source code) will rotate every other image clockwise, the remaining counter-clockwise.

To use these programs, just drag and drop a folder containing your images onto the .exe file of your choice, the program will automatically rotate your images and save them as 00001.jpg, etc. in the same folder as your images.

Make sure the (alphabetically) first image (RotateEveryOther) or set of images (RotateAll) is/are the right-hand side page, otherwise your images will be rotated wrong...

If you follow this procedure, your resulting images will be something like this: 

The Better Way
Over on the DIY Book Scanner forums, we prefer to use Scan tailor.

Scan Tailor was originally written by Joseph Artsimovich for processing scanned-in books from flatbed scanners; it does a wonderful job of automatically finding the content of the pages and generally makes them look a lot better than the original camera shots.

Following our directions, your images will be out of order (all right-hand pages first, then all left-hand pages.) It'd be a pain to rename all of these so they were in the right order, so Matti wrote a little utility to copy/rename all the images:

RenameAll.exe (Source code) copies and renames the first half of the images 000001-a.jpg, etc. then the second half 000001-b.jpg, etc.

To use this program, just drag and drop the folder containing your images onto the RenameAll.exe file, and the images will be copied and renamed into the same folder.

Using Scan Tailor
When you load up the Scan Tailor program, you'll want to create a new project, and then select the directory containing all of your images as the input directory, and some other (empty) directory for your output directory.

When the "Fix DPI" window pops op, select All Pages, change the DPI to 300 x 300, hit Apply, then OK.

Now we're in the main window. On the right you'll see the task list:
  Fix Orientation
  Split Pages (optional)
  Deskew (optional)
  Select Content
  Page Layout (optional)

At the bare minimum, you need to fix the orientations of the images, select the content boxes, (skipping split pages and deskew) then output the processed images.

After rotating the on-screen image to the correct orientation, use the "Apply to..." button and select how you'd like to fix the other images in the project. Use "Apply to..."->"This page and the following ones" if your images are all right-hand pages, then all left-hand pages. Use "Apply to..."->"Every other page" if your images are sequential pages.

In the "Select Content" tab, first hit the little arrow to automatically detect each page, then quickly scroll through each image to make sure the box is the right size in each image.

Finally, select the "Output" tab, and deselect the "despeckle" option, and hit "Apply to.."->"Every page". Hit the little arrow, and Scan Tailor will save all the nice, crisp output images to the output directory you specified.

Now you have all your pages ready to be turned into a PDF, or you could put the pictures into a zip file.

Your output will look something like this: 

I tried the Scan Tailor and it won't process jpg files. Anyone having the same problem? (I convert to tiff , it worked but would rather have the jpg files and save a step). By the way, thank you so much for the instruction for the book scanner, I am in the process of learning how to set it up and actually have a book in pdf.
D00M994 years ago
I may or may not do this project, but one thing is for sure;
daniel_reetz (author)  D00M994 years ago
You're welcome! Matti did most of the work for the small programs, and Scan Tailor was done by Joseph Artsimovich. I am just the camera/scanner guy. :)
Need2Relax4 years ago
Mac users can use the shareware GraphicConverter. If you pay the shareware fee that unlocks batch processing.Opens almost any format of graphic, and saves in almost any graphic format. Also great for cropping & adjusting. The batch processing is a wonderful thing.
mguima5 years ago
 Freeware Irfanview has plenty of features to process several pages: cropping, rotating, color enhancing (auto or user-defined),resolution changing, etc.
LimbusFarm5 years ago
I've been having an issue running the RenameAll.exe file. It will consistently lock up after ~90 images and Windows will close the program. Is anyone else having this issue or can see the issue in the code? Thanks.
daniel_reetz (author)  LimbusFarm5 years ago
Hey maxwellparish, I'll forward this on to Matti.

If you're in a hurrry, BulkRenameUtility is another good general purpose renamer. But we will get RenameAll working.