First build with automatic dewarping

Scan Tailor specific announcements, releases, workflows, tips, etc. NO FEATURE REQUESTS IN THIS FORUM, please.

Moderator: peterZ

Tulon
Posts: 687
Joined: 03 Oct 2009, 06:13
Number of books owned: 0
Location: London, UK
Contact:

Re: First build with automatic dewarping

Post by Tulon »

Tulon wrote:Does this mean that software like qprc (http://diybookscanner.org/forum/viewtopic.php?f=3&t=784), PhotoShop or DxO are useless and that is better to do de-keystonne in ScanTailor?
Scan Tailor and any other software use the same mathematical model for dekeystoning - it's called homographic transformation. However, there are a couple of reasons you may want to correct keystoning before Scan Tailor:
1. Programs relying on pre-calibration (with a checkboard pattern, QR codes, etc.) won't generally make mistakes.
2. Content box and margins don't play well with significant keystoning, so either prepare for more manual adjustments or do your dekeystoning before Scan Tailor.
Scan Tailor experimental doesn't output 96 DPI images. It's just what your software shows when DPI information is missing. Usually what you get is input DPI times the resolution enhancement factor.
zamacam
Posts: 20
Joined: 04 Mar 2014, 00:53

Re: First build with automatic dewarping

Post by zamacam »

Thank you for this interesting answer Tulon. Even if I'm working in a law deparment, I'm working with programers and it is always interesting to understand how the magic works :-)

By the way, I had to say that Beta 9 works fine here. The only problem I have was examined here http://diybookscanner.org/forum/viewtopic.php?f=8&t=642 but it is over my skills to understand if it is a Qt's problem or a ScanTailor's one and even far my skills to understand if n9yty have found a workaround.
steve1066d
Posts: 296
Joined: 27 Nov 2010, 02:26
E-book readers owned: PRS-505
Number of books owned: 1250
Location: Minneapolis, MN
Contact:

Re: First build with automatic dewarping

Post by steve1066d »

Knk,

You might want to take a look at BookScanWizard. It can crop and dekeystone.

In your case, you'd want to copy your images to a l & r directory, then use the Perspective and Crop commands. You can fix the width of the document by either using the optional height & width commands of the Perspective command, or else using the Scale command.
Steve Devore
BookScanWizard, a flexible book post-processor.
Tulon
Posts: 687
Joined: 03 Oct 2009, 06:13
Number of books owned: 0
Location: London, UK
Contact:

Re: First build with automatic dewarping

Post by Tulon »

I thought I'd give you an update on what I am currently working on. That would be tracing top / bottom page edges, where available. The main complexity here is tracing the right thing:
right_trace.jpg
right_trace.jpg (21.04 KiB) Viewed 12074 times
Not the wrong one:
wrong_trace.jpg
wrong_trace.jpg (19.02 KiB) Viewed 12074 times
As you can see, I made some good progress. Still, there is a lot of of work ahead.
Scan Tailor experimental doesn't output 96 DPI images. It's just what your software shows when DPI information is missing. Usually what you get is input DPI times the resolution enhancement factor.
ahmad
Posts: 24
Joined: 28 Dec 2010, 11:26

Re: First build with automatic dewarping

Post by ahmad »

Wowzers!

So is this an alternative to line-based dewarping, a complement to it, or a replacement of it?
Tulon
Posts: 687
Joined: 03 Oct 2009, 06:13
Number of books owned: 0
Location: London, UK
Contact:

Re: First build with automatic dewarping

Post by Tulon »

ahmad wrote:So is this an alternative to line-based dewarping, a complement to it, or a replacement of it?
A complement. The traced vertical boundaries will be treated exactly the same as traced text lines. After all, we aren't after specifically text lines. We are after anything that's long and horizontal on the flat page.
Scan Tailor experimental doesn't output 96 DPI images. It's just what your software shows when DPI information is missing. Usually what you get is input DPI times the resolution enhancement factor.
matt

Re: First build with automatic dewarping

Post by matt »

oh, this sounds like great news about the edge tracing efforts. i'm very excited to see your progress with this, tulon.

do you expect this technique to significantly improve the accuracy of the dewarping on problematic pages (eg pages with non-rectangular text areas)? would a successful implementation reduce the need for de-keystoning preprocessing?

thanks again for all the work!
matt
Tulon
Posts: 687
Joined: 03 Oct 2009, 06:13
Number of books owned: 0
Location: London, UK
Contact:

Re: First build with automatic dewarping

Post by Tulon »

matt wrote:do you expect this technique to significantly improve the accuracy of the dewarping on problematic pages (eg pages with non-rectangular text areas)?
Yes, it's going to help such pages.
matt wrote:would a successful implementation reduce the need for de-keystoning preprocessing?
Dekeystoning is a special case of dewarping. If dewarping works well, it will dekeystone just as well. However, as I mentioned before, Content Box and Margins stages are not friendly to strongly keystoned pages, which is the reason you may want to dekeystone in a separate program.
Scan Tailor experimental doesn't output 96 DPI images. It's just what your software shows when DPI information is missing. Usually what you get is input DPI times the resolution enhancement factor.
spamsickle
Posts: 596
Joined: 06 Jun 2009, 23:57

Re: First build with automatic dewarping

Post by spamsickle »

I'm having a problem with the "apply to" for the dewarping. I have some images with mild keystoning on the left-hand pages. I go through and control-click every other image to select them, then modify the manual warp grid to correct the first one. I check "apply to selected images", but the apply doesn't seem to be propagating. I'm running the CLI version, which I've compiled without modification.
Tulon
Posts: 687
Joined: 03 Oct 2009, 06:13
Number of books owned: 0
Location: London, UK
Contact:

Re: First build with automatic dewarping

Post by Tulon »

You are only applying dewarping mode (off, manual, auto). Applying the grid itself is not implemented, as I don't think that will work well enough.
Scan Tailor experimental doesn't output 96 DPI images. It's just what your software shows when DPI information is missing. Usually what you get is input DPI times the resolution enhancement factor.
Post Reply