Improving the quality of a scanned old book

Ask for help and post your question on how to use XnView Classic.

Moderators: XnTriq, helmut, xnview

Post Reply
Daguerre
Posts: 22
Joined: Sat Oct 01, 2016 12:33 pm

Improving the quality of a scanned old book

Post by Daguerre »

I have scanned the pages of an old paperback of mine. The results are grayscale, 200dpi jpegs. Whilst the results are readable their general appearance leaves something to be desired; there are large areas of light brown (is this what is called foxing?). Is there any way of "whitening" the pages. Pushing up the contrast in Map>Adjust to the maximum of 127 does whiten the pages but it also markedly decreases the quality of the individual letters to such an extent that the original is preferable.

Examples of original (70A) and increased contrast (70B) are attached. Is there anything else I could try?
Attachments
70A.JPG
70B.JPG
cday
XnThusiast
Posts: 3976
Joined: Sun Apr 29, 2012 9:45 am
Location: Cheltenham, U.K.

Re: Improving the quality of a scanned old book

Post by cday »

Daguerre wrote:I have scanned the pages of an old paperback of mine. The results are grayscale, 200dpi jpegs. Whilst the results are readable their general appearance leaves something to be desired; there are large areas of light brown (is this what is called foxing?). Is there any way of "whitening" the pages. Pushing up the contrast in Map>Adjust to the maximum of 127 does whiten the pages but it also markedly decreases the quality of the individual letters to such an extent that the original is preferable.
I find a Levels adjustment on a grayscale image [as yours already is] is generally a good start:
70A_cday.jpg
I used XnView MP which allows the white point, black point, and also the gamma value to be adjusted directly, in my quick test I used these values which you may be able to improve on:

Black point = 55 ; Gamma = 0.30 ; White point = 130.

I also took the chance to erase two gray areas at the top of the page by, very quickly, copying and pasting a small area of clean background over the affected areas.

The limit to what can be achieved when enhancing a book page image like yours is ultimately set by the evenness [or rather unevenness...] of the illumination and the lower than ideal DPI value of 200.

Edit:

Not obviously a significant improvement on your result...

You might also look at reducing the colour depth to black and white (1-bit): although lower-DPI text generally degrades noticeably, that isn't particularly apparent on the above images, and there can be a large reduction in file size when saved as a TIFF with 'Fax' CCITT G4 compression, if that could be useful, 26kB for my image above. In general, though, the grayscale image will be better unless the scan DPI is raised significantly.
70A_cday_CCITT G4.tif
(25.94 KiB) Downloaded 75 times
User avatar
XnTriq
Moderator & Librarian
Posts: 6336
Joined: Sun Sep 25, 2005 3:00 am
Location: Ref Desk

Re: Improving the quality of a scanned old book

Post by XnTriq »

Here's my shot at it:
  1. Image » Map » Posterize... » 2
  2. Image » Convert to Binary » Binary (No Dither)
  3. File » Export... » TIFF » CCITT G4
p136115.tif
EXIF metadata is preserved.
(26.98 KiB) Downloaded 129 times
Daguerre
Posts: 22
Joined: Sat Oct 01, 2016 12:33 pm

Re: Improving the quality of a scanned old book

Post by Daguerre »

Thanks for the replies. I shall have a look at XnView MP. However, I am starting to wonder if what I want is really possible. As far as I've ever been aware, increasing the contrast lightens the light areas and darkens the dark areas. Whilst this whitens the background, viewing the letters at increased magnification shows that the lighter bits that surround the letters are also removed which results in a much more jagged outline for the letters. Anyway, I'll persevere for a bit longer and see if I can find a happy medium
cday
XnThusiast
Posts: 3976
Joined: Sun Apr 29, 2012 9:45 am
Location: Cheltenham, U.K.

Re: Improving the quality of a scanned old book

Post by cday »

Daguerre wrote:I am starting to wonder if what I want is really possible. As far as I've ever been aware, increasing the contrast lightens the light areas and darkens the dark areas. Whilst this whitens the background, viewing the letters at increased magnification shows that the lighter bits that surround the letters are also removed which results in a much more jagged outline for the letters.
As all pixels of a particular darkness value are treated equally, as far as I know, I think that is inevitable to an extent...

Nonetheless, it is often possible to substantially enhance scans using these adjustments, whitening the background without seriously degrading the quality of the text.

You should be able to obtain noticeably better results if you scan at a slightly higher resolution such as 300 DPI, although using a flatbed scanner that will of course take longer. If file size is a consideration, scanning at 400 to 600 DPI should produce images that will reproduce satisfactorily in black, and white and have much smaller file sizes when suitable compression is used.

You may also well be able to obtain better results if you experiment to find the optimum scanner settings before making a series of scans, rather than as many people do simply using the default scanner settings.
User avatar
XnTriq
Moderator & Librarian
Posts: 6336
Joined: Sun Sep 25, 2005 3:00 am
Location: Ref Desk

Re: Improving the quality of a scanned old book

Post by XnTriq »

  1. Download George Fournaris' High Pass Sharpening filter.
  2. Extract the content of pphps.zip to the folder where you keep your Photoshop-compatible plug-ins.
  3. Open 70A.JPG in XnView.
  4. Increase the color depth of the greyscale image with ImageTrue Colour.
  5. Go to FilterAdobe Photoshop Plug-In...Photo-Plugins, select High Pass Sharpening... and hit the Start... button.
  6. Apply the filter with the following settings:
    • Range (x10): 150
    • Strength: 255
    • Drop-down list: Normal
    • High Pass view: Deactivated
  7. Go to ImageAdjustLevels...:
    • Black point: 0
    • White point: 72
  8. Reduce the color depth with ImageConvert to Grey256 Grey scale.
  9. Go to EditBackground colour... and choose R255/G255/B255.
  10. Optional: Go to ImageRotateAuto de-skew.
p136161.gif
p136161.gif (85.15 KiB) Viewed 2382 times
View full-res Image
Result w/o de-skewing
Result w/o de-skewing
User avatar
XnTriq
Moderator & Librarian
Posts: 6336
Joined: Sun Sep 25, 2005 3:00 am
Location: Ref Desk

Re: Improving the quality of a scanned old book

Post by XnTriq »

Same method applied to 8168203700_1353405175.jpg
p138356.gif
p138356.gif (108.34 KiB) Viewed 2382 times
View full-res Image
p138356.png
… and adaptive-local-contrast-original.jpg
p138356_2.gif
p138356_2.gif (79.91 KiB) Viewed 2382 times
View full-res Image
p138356_2.png
… and text-from-book-big.jpg (sans Auto de-skew):
p138356_3.gif
p138356_3.gif (114.74 KiB) Viewed 2374 times
View full-res Image
p138356_3.png
Post Reply