Page 10 of 14

Re: First build with automatic dewarping

Posted: 03 Feb 2011, 17:51
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.

Re: First build with automatic dewarping

Posted: 03 Feb 2011, 19:21
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.

Re: First build with automatic dewarping

Posted: 03 Feb 2011, 19:31
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.

Re: First build with automatic dewarping

Posted: 22 Feb 2011, 18:10
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 5291 times
Not the wrong one:
wrong_trace.jpg
wrong_trace.jpg (19.02 KiB) Viewed 5291 times
As you can see, I made some good progress. Still, there is a lot of of work ahead.

Re: First build with automatic dewarping

Posted: 22 Feb 2011, 18:18
by ahmad
Wowzers!

So is this an alternative to line-based dewarping, a complement to it, or a replacement of it?

Re: First build with automatic dewarping

Posted: 22 Feb 2011, 18:37
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.

Re: First build with automatic dewarping

Posted: 23 Feb 2011, 04:27
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

Re: First build with automatic dewarping

Posted: 23 Feb 2011, 04:59
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.

Re: First build with automatic dewarping

Posted: 04 Mar 2011, 17:25
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.

Re: First build with automatic dewarping

Posted: 04 Mar 2011, 17:47
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.