I know it isn't free, but I've seen Photoshop CS2 selling on eBay for around $100, so it isn't necessarily exorbitant either. I thought I'd share a quick tutorial on the batch processing which is available in Photoshop to automate post-processing of DIY Book Scanner scans. While different people are using different hardware, these scanners tend to produce scans in which right-hand pages are generally consistent with each other as far as size, keystoning, illumination, etc.. The same is true for left-hand pages. The right-hand pages are usually not consistent with the left-hand pages, but Photoshop can help correct the inconsistencies.
I start by creating a new folder on my computer for the book. Within that folder, I create 5 sub-folders: RRAW, LRAW, R, L, and Both. I begin by loading the right-hand images from my camera's SD card to RRAW, and the left-hand images to LRAW. Then, I'll create a Photoshop action which will process the images in RRAW and write the processed images to R, and run that as a batch process to automatically process each page.
Begin by opening a regular page from the RRAW directory. I generally wouldn't choose the cover of a hardback book, because it will be a bit bigger than the pages you want to process. If the "Actions" panel is not visible, you can add it from the Window menu, or toggle it on with Alt-F9.
Click on the "Create New Action" button at the bottom of the "Actions" panel. It's the square-within-a-square next to the trash can.
That will open the "New Action" dialogue.
I give the new action a descriptive name ("Right"), and just for the heck of it, associate it with Shift-F2 as a hotkey. The set to which the action belongs remains "Default Actions". Click the "Record" button to begin recording the new action.
The first thing I want to do is rotate the page into an upright orientation. This is done from the "Image" menu.
Next, I want to get rid of that greywash background. There are many possible ways to accomplish this in Photoshop. I've seen folks contemplate taking a "blank" page, subracting it from a "white" page, and adding the difference to the target page. Or something like that. My own approach is quite a bit cruder: I just use a "Curves" adjustment.
And not a particularly sophisticated curve either.
Which yields this result:
It's not as washed-out as it appears, though there is obviously room for improvement. It's a bit brighter toward the edge than toward the center; maybe a gradient would fix that, but I'm blessed with low standards, and as it is it's good enough for me. Those whose standards are more exacting can work out this bit for themselves.
Now -- finally -- we're ready to address the keystoning. Photoshop CS2 was the first release which offered perspective correction, and this is the first time I've had occasion to use it. Choose the "crop" tool:
Drag a quick selection from corner to corner -- no need to be too precise, we'll refine it in a moment. Once the selection is made, click the "perspective" box in the toolbar to enable each of the corners to be dragged independently.
Now I zoom way in, scroll to all four corners, and drag my selection points into place.
Then zoom back out and see how it looks.
Looks okay to me (there's those standards again), so I press "Enter" to complete the perspective crop.
Bingo! Let's zoom in again and see what we have.
See? I told you it wasn't as washed-out as it looked. Nice crisp anti-aliased text on a nice bright background. Easy on the eyes. And it looks like it's lined up right, too. Good enough for spamsickle, anyway.
Before I save it and close it, there's one more thing I want to do. I mentioned earlier that there may be discrepancies between the left pages and the right pages, and one of those discrepancies may be in the size of the images, due to camera placement, zoom, whatever. I'd like to make the images the same in the final product, and I do that here by modifying image size.
I specify the width, and let the length stay proportional. I'll specify the same width on the left side, so at least my output images will have the same width. The length may vary a bit, but, well, you know...
And that's the meat of it. Now I just save the file...
... to a different directory (we got it from RRAW, and we'll save it in R) ...
--- with the quality I want.
When I close the file, this is how my completed action looks:
I click on the little square beside the red "Recording" indicator to stop recording, and my new action is ready to use. To use it, I choose "Automatic ... Batch" from the "File" menu.
That brings up the "Batch" dialogue, with my new action ("Right") already selected. I want to apply this action to all the files in my RRAW directory, so I choose Source as "Folder" and click "Choose" to specify which one it is. I'll be saving the images to a new folder ("R"), so I also specify Destination as "Folder" and choose that one too. All that's left to do now is to click "Okay" and go get a cup of coffee.
It runs fairly fast (on my not-so-speedy laptop, it takes just over 15 minutes to do 175 pages), and if your images are consistent, the output will be pretty much what you want. If they're not -- well, that's a hardware problem, isn't it? Get your scanner straight...
I create a separate "Left" action, and run that too, so I have anti-aliased de-keystoned formatted-just-like-the-originals images in two separate directories. At this point, you can go different ways -- convert them to PDFs, run OCR software, process them some more with an eye to making DJVu files or some other format. For me, I just run a script to rename them and faro-shuffle them into my "Both" directory, and I'm done. I'm perfectly happy reading my new book with IRFanView or some other image viewing program, and my design objectives have already been met.
There are some things you can do if your images aren't quite aligned and you can't (or don't want to) reshoot them -- the "Crop" step can be made interactive for every image by clicking the "modal" box next to that step in the script, or you can process them in smaller batches -- but this little tutorial is already too long, and who knows if anyone will even be interested.
I will say, setting up the action and running it takes no time at all, despite the fact that reading about it may have caused you to nod off. If you have Photoshop CS2 or later, and have any interest at all in quick-and-dirty get-it-done post-processing, you owe it to yourself to at least give it a try.