XnView 2.34 & XnConvert 1.70 running under Win 7 Professional x64 SP1.
I have a scanned book (jpeg files) and the pages are slightly skew. Auto Deskew in XnView does an excellent job of batch processing and straightening the pages but I would like to tidy them up by removing the narrow black triangles that the operation leaves on each side. At present I use XnConvert to crop a few pixels off each side but this does narrow the margins. Is there any way of making the black triangles white? I was hoping that changing the background colour from black to white would do the job, but I was wrong.
Tidying up straightened book pages
Moderators: XnTriq, helmut, xnview
Re: Tidying up straightened book pages
Presumably where new canvas has been added to maintain a rectangular image, otherwise could you please post a screenshot...Daguerre wrote:XnView 2.34 & XnConvert 1.70 running under Win 7 Professional x64 SP1.
I have a scanned book (jpeg files) and the pages are slightly skew. Auto Deskew in XnView does an excellent job of batch processing and straightening the pages but I would like to tidy them up by removing the narrow black triangles that the operation leaves on each side.
You changed the background colour using Edit > Background colour... in the viewer and there was no change? I would expect that to overcome the problem without actually testing it, but if it doesn't could you please upload an example image to test?Daguerre wrote:Is there any way of making the black triangles white? I was hoping that changing the background colour from black to white would do the job, but I was wrong.
Re: Tidying up straightened book pages
As requested, here is an example. I hope it helps.
Re: Tidying up straightened book pages
NOTE: The above figures are appearing in reverse order. The first one is the final cropped figure. The second one is the auto deskewed figure. The third one is the original figure, as scanned.
Re: Tidying up straightened book pages
No problem for me using XnView Classic 2.36 with Edit > Background colour... set to white:Daguerre wrote:NOTE: The above figures are appearing in reverse order. The first one is the final cropped figure. The second one is the auto deskewed figure. The third one is the original figure, as scanned.
I don't know what could be causing your problem...
You might note that there may be a different way of achieveing the overall result you want: if you crop the page images inside the scan you can then resize the canvas to any desired size using Image > Canvas size... with both operations available as batch operations.
Book pages normally have different margin widths for left and right pages, but when I step through the pages of a scanned book on screen I prefer to see equal margins so that the pages stay centered, rather than jump alternately left and right.
Edit:
Here's a screenshot of my Background colour settings:
Re: Tidying up straightened book pages
Many thanks for the replies.
Yes, now I've discovered how to use it, resetting the canvas size seems to be the way forward. My procedure now is to straighten the pages in XnView with Auto Deskew, then tidy up the results in XnConvert with Actions set consecutively to Crop and then Canvas resize. With my current example I cropped 100 pixels of each of the 4 edges of the straightened image then reset the canvas size to the original values. I'm sure that if I could be bothered to do the trigonometry I would find a very small, and totally insignificant, change in the size of the text.
Re using a white background; I'll see if I can work out what I was doing wrong.
And, finally, can I just say that since I discovered XnConvert and XnView some while ago I am constantly amazed by their versatility - and I haven't even scratched the surface of the menus yet! And when it comes to batch processing they have so far solved all my problems. I could do a lot of the operations with my copy of Photoshop Elements 9, but only if I worked on a page at a time.
Yes, now I've discovered how to use it, resetting the canvas size seems to be the way forward. My procedure now is to straighten the pages in XnView with Auto Deskew, then tidy up the results in XnConvert with Actions set consecutively to Crop and then Canvas resize. With my current example I cropped 100 pixels of each of the 4 edges of the straightened image then reset the canvas size to the original values. I'm sure that if I could be bothered to do the trigonometry I would find a very small, and totally insignificant, change in the size of the text.
Re using a white background; I'll see if I can work out what I was doing wrong.
And, finally, can I just say that since I discovered XnConvert and XnView some while ago I am constantly amazed by their versatility - and I haven't even scratched the surface of the menus yet! And when it comes to batch processing they have so far solved all my problems. I could do a lot of the operations with my copy of Photoshop Elements 9, but only if I worked on a page at a time.
Re: Tidying up straightened book pages
I appreciate that you've done the image-capture already, but it might be worth starting again and saving yourself all the processing discovered here.
The vehicle I'd suggest your doing the job again with is Office Lens - an app. Windows Phone, iPhone, other.
It straightens up trapeziums that the camera sees, cleans up text, evens out contrast, and presents an orderly rectangle.
Hold your phone in a 'retort stand', place your book under it, and away you snap ...copyright notwithstanding.
Highly recommended.
The vehicle I'd suggest your doing the job again with is Office Lens - an app. Windows Phone, iPhone, other.
It straightens up trapeziums that the camera sees, cleans up text, evens out contrast, and presents an orderly rectangle.
Hold your phone in a 'retort stand', place your book under it, and away you snap ...copyright notwithstanding.
Highly recommended.