Page 2 of 5

Re: Progress on dewarping functionality

Posted: 08 Aug 2010, 19:02
by Tulon
So, I've made another progress update video and a test build you may try out.

Re: Progress on dewarping functionality

Posted: 08 Aug 2010, 20:57
by n9yty
Mac test build for those who would care to try it as well.

MD5 (ScanTailor-dewarpTest.dmg) = 3d1ce98fc7dce7221b213141569d9753


[Also new - I think I have figured out enough quirks to build a Tiger / 10.4 binary ]

http://www.4shared.com/file/1Tp_AhBX/Sc ... Tiger.html

MD5 (ScanTailor-dewarpTest-Tiger.dmg) = 7e5e778ef2498d120d788dfac7b9361a

Re: Progress on dewarping functionality

Posted: 08 Aug 2010, 23:01
by univurshul
n9yty wrote:Mac test build for those who would care to try it as well.

MD5 (ScanTailor-dewarpTest.dmg) = 3d1ce98fc7dce7221b213141569d9753
n9yty,

You and Tulon are my heros. Much respect.

Re: Progress on dewarping functionality

Posted: 09 Aug 2010, 07:42
by knappen
Awesome work.

Looks very promising indeed.

Re: Progress on dewarping functionality

Posted: 10 Aug 2010, 08:11
by Tim
Tulon wrote:So, I've made another progress update video and a test build you may try out.
Excellent work. I was wondering about the algorithm. On the Ocropus mailing list I saw a suggestion from the lead developer that if someone wanted to work on page dewarping for scans they should consider choosing an algorithm that takes into account the ways a physical piece of paper can actually warp. Since there are relatively limited ways a piece of paper can warp (or especially is likely to), the idea is that the constrained algorithm could be much accurate and possibly faster. It didn't have a link to any recommended mathematics to take this into account though, so I didn't look into it further. I could dig up the post if you're interested.

Re: Progress on dewarping functionality

Posted: 10 Aug 2010, 08:53
by Tulon
Tim wrote:they should consider choosing an algorithm that takes into account the ways a physical piece of paper can actually warp.
Exactly. I implemented the distortion model from this paper: http://lear.inrialpes.fr/people/triggs/ ... 28_cao.pdf
It considers a page to be a cylindrical surface, that is consisting of parallel lines. I added homography into the model to (kind of) handle perspective distortion. I say "kind of" because it doesn't (correctly) handle the most complex case when the page is curved and was shot from an arbitrary angle. There was another paper (can't find it right now) that generalizes the above model to correctly handle perspective distortion, but they actually patented their method. I can't believe they were granted that patent, as their modifications to the original model were very insignificant.

Update: found the paper and the patent. Actually now I am not sure if it was granted or not.

Re: Progress on dewarping functionality

Posted: 10 Aug 2010, 09:16
by Tim
No surprise that you were way ahead of me. Those are extremely appropriate articles.

Re: Progress on dewarping functionality

Posted: 12 Aug 2010, 23:23
by Hamid
Thank you very much Tulon, ScanTailor is a great software, always better at each following version. I've tried the dewarping feature, it's working great. So, thank you again.

Re: Progress on dewarping functionality

Posted: 13 Aug 2010, 15:10
by matt
Big thanks, Tulon, for the continued great work on ScanTailor! The manual dewarping is working wonderfully in my testing and I'm looking forward to trying the automated version.

A quick question: is there any way to apply the manually set dewarping parameters defined on one page to the rest pages? My thought was that most pages are probably deformed in similar if not exactly the same ways. It tried and it appears not to be implemented, but I wonder if that functionality would be a useful intermediate step until fully automated per-page dewarping is finished.

Thanks again for your generous contributions!

Re: Progress on dewarping functionality

Posted: 13 Aug 2010, 15:22
by Tulon
matt wrote:A quick question: is there any way to apply the manually set dewarping parameters defined on one page to the rest pages? My thought was that most pages are probably deformed in similar if not exactly the same ways. It tried and it appears not to be implemented, but I wonder if that functionality would be a useful intermediate step until fully automated per-page dewarping is finished.
That wouldn't work in practice. Even on specialized hardware, things like varying left / right thickness in the spine area will make pages different enough for this approach to fail.