I have a hi-res scan of some paper, where you can see the grain. However, the scanner has made some parts of the page darker than others—for example, it is a lot darker near the page edges. This can be seen when repeating a section of the image (shown below)
How can I even out the colour differences in the page, but retain the existing grain?
My current attempt was to get the average of the page, and then blend this colour via colour burn to the page texture. Gaussian blurring this would give a map of the lighter and darker areas in the page. Inverting that and applying with soft blend to the original page would get close to removing the irregularities.
However, the method described is definitely not the correct way to get an overall map of the light and dark areas, and did not perform as well as hoped. It must be as exact as possible, as I want to be able to move parts of the page around without having a sudden break in the gradients on the page (again, shown in the image).
Any help here would be hugely appreciated!
Edit: I’m not looking to regenerate a paper grain, no matter how close it is, a generated paper grain won’t have the right look-and-feel. I need to use the existing grain of the paper.
To get the paper grain,
- Duplicate the original layer
Select -> Color Range, click on some black in the page and drag the slider up until you can see you’re selecting all the ink
Select -> Modify -> Expand selectionby a few pixels or so
Edit -> Filland use content aware
To find the shadows,
- Duplicate the paper grain layer
Filters -> Blur -> Average
Image -> Apply Image, select the paper grain layer, and use the subtract operation using an offset of 128 and a scale of 1
This will now give you a layer that is mostly mid-grey with darker and lighter areas corresponding to shadows and other blemishes in the picture. Ensure the grey image is both darker and lighter by going into the levels tool and checking that the brightness curve appears on both sides of the midpoint. If it does not, the next stages will not work.
Applying this image in a similar manner as before but to the original scan will change the paper to the average paper colour determined in step 2. However, this will also remove the grain, so to avoid this,
Filters -> Blur -> Gaussian Blurand adjust the settings such that the grain disappears but the shadows are still visible
Finally, to apply this back to the original image and remove the shadows, hide all layers but the original scan, go to
Image -> Apply Image, select the shadow layer, and use subtract with an offset of 128 and a scale of 1. Depending on the order of subtractions, this will either remove the shadows, or double them. If it is doubling them, select the
invertoption in the Apply Image window. Click okay, and it should remove the shadows.
As a last clean-up, you may to reimport the original scan, select just the ink (via select color range), and copy and paste-in-place the ink over the top of the adjusted scan. This is because it is theoretically possible that the edges of the ink will get affected by the transformation described above.
This is a perfect situation for the smart-blur tool since the text information is high-contrast with respect to the background.
I have a sample below where I applied a mild smart blur just enough to flatten out the grainy nature of the scan.
I then added a layer filled with RGB(128,128,128) and used the noise filter with color on and gaussian distribution. I then blurred that layer to enlarge the grain a little and desaturated it back to greys. I set that layer to multiply at about 30% opacity. (the sample below shows the layer prior to adjusting layer opacity and blend mode)
Next I placed an exposure adjustment layer overall and brought the exposure up so that it matched the original.
To sum up, smart blur to eliminate the grain and unify the background and then simulate the paper grain.
Others have hinted in comments that the “proper” way to do this is with a fourier transform that isolates the frequencies. You would then smooth certain frequencies and then reverse the transform. I think there may actually be a post buried from a few years ago on this stackexchange that deals with this. I have played with it in the past and it is pretty close to magic IMO.
The manual way to eliminate grain is to blur the low frequencies by somehow doing a high-frequency cut filter and then blur. Then do an overlay of the same image with a low-cut filter and sharpen. You might find tutorials on how to clean up skin blemishes in photos that use this technique.