A typical problem faced by many when attempting to merge images is how to deal with slight variations in your materials. These variations can be a result of the hardware you use (scanner or camera), lighting conditions, software, or a myriad other factors.
In this scenario I'll use an image from a scanned book that has a lighting problem. This is a very common difficulty when scanning books on a flatbed; the book's gutter will raise up from the scanner's surface, giving it a darker tone and distorting the content. Applying pressure to the book may work sometimes, but often we do not want to risk damaging our books (or, worst-case-scenario, our equipment) that way. Much safer to work digitally.
The first step is identifying the cutoff point where the gutter begins to negatively affect image quality. As you can see from this image. As always, make sure you've saved a master version before making any edits.
In situations like this when we are dealing with an off-white paper, we'll want to make sure our background matches the paper's tone. Use the Eyedropper tool to select the page tone, and use the paint bucket to fill it in the background of the new base document.
What we are going to do next is create an amalgam of the image's two elements (page and background) to create a new version with improved legibility. To accomplish this we are going to use Photoshop's Layer Mask tool. Layer Mask is incredibly useful for photo editing, and best of all it is a non-destructive solution, meaning whatever you do with it can always be easily undone. The Layer Mask is very much what it sounds like: a layer placed on top of each image that can be "masked" or "unmasked," concealing or revealing the image's contents. Select the right side layer and click "Add Layer Mask" at the bottom of the Layer menu. You will now see a small white rectangle linked to that layer; that's your layer mask. The color white means "unmasked," so right now it's simply sitting on top of your original layer waiting for you to give it instructions.
Next, be sure you have the correct layer, AND your layer mask selected, or else you will alter the image itself. The Layer Mask functions in grayscale. Black is "masked," white is "unmasked," and grays are everything in between. Set your foreground color to black. Select the brush tool, and reduce the hardness to 0 (use whatever diameter you feel comfortable with). Check again to make sure you're still on your layer mask, and simply begin lightly touching up the problem spots along the gutter with your brush. Use single clicks rather than click-and-drag, that way you will make very minor adjustments while you get a feel for the technique.
As you can see, we've fixed the page to appear legible and flat. But be warned, this exact method won't work for every situation. If you have content that is deep in the book's gutters, you will likely have to accept a less-than-perfect image. However these techniques can still be used to improve the image quality in those situations, it is simply more difficult to get a "perfect" image. Vary your brush settings and color in the Layer Mask (experiment using a 50% grayscale) to find solutions that best suit your situation.
Written by Ryland Ianelli