Autocropping and adding margins for scanned book pages

XnConvert Multi Platform - Windows, MacOSX, Linux

Moderators: XnTriq, helmut, xnview

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

Autocropping and adding margins for scanned book pages

Post by Daguerre »

I am proceeding in teaching myself how to edit scanned book pages and there are a couple of aspects that you may be able to advise on.

1) I am now au fait (I think!) with the use of tolerance in Autocropping but my experience with my particular setup (flatbed scanner, one page at a time, household dust (and probably dandruff) floating about, and some of the paperbacks not very high quality) is that I need to set the tolerance at, or near maximum (200), in order to avoid an inordinate number of pages that need hand editing. This means that very small amounts of characters are sometimes cropped off. OK, it’s barely noticeable, and I may be being a perfectionist, but it would be nice to avoid this. Is it possible to automatically add a thin white border around the autoscanned page. The program Scan Tailor will do this, but I have found it a bit hit and miss – I’d much prefer to keep on using XnConvert.

2) It is more or less essential to add borders around the autocropped pages. The majority of pages are no great problem, simply resize the canvas with the position Centred. However, this results in pages at the ends of chapters and first pages of chapters (which often have extra white space at the top) becoming centred on the page. This is perfectly readable but extremely ugly. I solve this by collecting these pages and then doing a two step canvas resize. I first resize to a bit less than the final size with the text at Top position or Bottom position, as necessary, and then resizing to the final page size with the Centre position selected. It’s doable, but it’s rather clumsy and requires sitting there with pencil and paper working out the various sizes. What would be nice would be what you might call a “negative” crop where you enter the number of pixels for each border but white space is added rather than cropping. Is there any way of doing this?
cday
XnThusiast
Posts: 3976
Joined: Sun Apr 29, 2012 9:45 am
Location: Cheltenham, U.K.

Re: Autocropping and adding margins for scanned book pages

Post by cday »

Daguerre wrote:I am proceeding in teaching myself how to edit scanned book pages and there are a couple of aspects that you may be able to advise on.

1) I am now au fait (I think!) with the use of tolerance in Autocropping but my experience with my particular setup (flatbed scanner, one page at a time, household dust (and probably dandruff) floating about, and some of the paperbacks not very high quality) is that I need to set the tolerance at, or near maximum (200), in order to avoid an inordinate number of pages that need hand editing. This means that very small amounts of characters are sometimes cropped off. OK, it’s barely noticeable, and I may be being a perfectionist, but it would be nice to avoid this. Is it possible to automatically add a thin white border around the autoscanned page. The program Scan Tailor will do this, but I have found it a bit hit and miss – I’d much prefer to keep on using XnConvert.
That as you may realise is likely because in a grayscale image some pixels on the edge of characters have intermediate shades of gray, which is why text at lower resuloutions generally looks better in a grayscale image than in a black and white (1-bit depth) image.

Two possible solutions you could consider: enhance the grayscale image slightly using a Levels (for example) adjustment to darken nominally black pixels on the edge of characters, or convert the image to black and white (if the DPI is high enough to produce good quality text) or scan at a higher DPI to produce a better quality black and white image (which will be slower).
Daguerre wrote:2) It is more or less essential to add borders around the autocropped pages. The majority of pages are no great problem, simply resize the canvas with the position Centred. However, this results in pages at the ends of chapters and first pages of chapters (which often have extra white space at the top) becoming centred on the page. This is perfectly readable but extremely ugly. I solve this by collecting these pages and then doing a two step canvas resize. I first resize to a bit less than the final size with the text at Top position or Bottom position, as necessary, and then resizing to the final page size with the Centre position selected. It’s doable, but it’s rather clumsy and requires sitting there with pencil and paper working out the various sizes.
I think I generally follow what you mean...
Daguerre wrote:What would be nice would be what you might call a “negative” crop where you enter the number of pixels for each border but white space is added rather than cropping. Is there any way of doing this?
If I follow that, it is possible to add a border of a fixed number of pixels using Canvas resize with the Relative option selected and pixel width and height values entered, and the desired Background color of white selected...
Daguerre
Posts: 22
Joined: Sat Oct 01, 2016 12:33 pm

Re: Autocropping and adding margins for scanned book pages

Post by Daguerre »

Thanks for the replies.

I'll try converting to black and white, although I think that the problem could possibly be connected with scanning a page at a time in a bedroom. I shall consider the options of carefully cleaning the platen after each page versus not having to put the rest of my life on hold. :)

I'll look into this Relative option. It's something I've vaguely noticed, but have not looked into.
Post Reply