First build with automatic dewarping

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

Re: First build with automatic dewarping

Postby spamsickle » 04 Mar 2011, 19:09

Ah, I understand.

You may be right, but my experience with the Photoshop scripts and Book Scan Wizard makes me think that, for keystone correction anyway, there's enough similarity from one same-side page to the next that the same manual grid would probably work well enough to satisfy me. Since you solved my compile problem, I can play around with the code to see if that thought is justified.

In the project file, I find this:

Code: Select all
  <distortion-model>                                                               
    <top-curve>                                                                     
      <xspline>                                                                     
        <point x="2899.653965154599" y="572.726352586418"/>                         
        <point x="2902.540373650997" y="912.3144924431959"/>                       
        <point x="2905.426782147395" y="1251.902632299974"/>                       
        <point x="2908.313190643795" y="1591.490772156753"/>                       
        <point x="2911.199599140193" y="1931.07891201353"/>                         
      </xspline>                                                                   
      <polyline>dzo1RX0uD0SlaDVFIRRkRNSWNUXifJxEA8U1RbTvxkQy8zVFhmLxRA==</polyline>
    </top-curve>                                                                   
    <bottom-curve>                                                                 
      <xspline>                                                                     
        <point x="534.3417606708167" y="552.08458569402"/>                         
        <point x="525.0791997189333" y="891.5667031006279"/>                       
        <point x="515.8166387670499" y="1231.048820507238"/>                       
        <point x="506.5540778151665" y="1570.530937913847"/>                       
        <point x="497.2915168632831" y="1910.013055320456"/>                       
      </xspline>                                                                   
      <polyline>35UFRGoFCkQSRQNEReReRET0AESQ4ZlE7Eb9Q/1QxERQpfhDa8DuRA==</polyline>
    </bottom-curve>                                                                 
  </distortion-model>                                                               


I've worked with splines before, so I think I understand that part, but the "polyline" format is new to me. Can you suggest a reference to help get me up to speed before I start digging through the code?
spamsickle
 
Posts: 572
Joined: 06 Jun 2009, 23:57

Re: First build with automatic dewarping

Postby spamsickle » 04 Mar 2011, 20:09

spamsickle
 
Posts: 572
Joined: 06 Jun 2009, 23:57

Re: First build with automatic dewarping

Postby spamsickle » 05 Mar 2011, 00:39

Tulon wrote: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.

Actually, this doesn't seem to be happening either. I shift-selected a group of 4 pages, changed one from "off" to "auto", and said "apply to selected", but only the page I changed had the dewarping mode set to "auto". On the other 3 pages, dewarping remained "off".
spamsickle
 
Posts: 572
Joined: 06 Jun 2009, 23:57

Re: First build with automatic dewarping

Postby Tulon » 05 Mar 2011, 04:23

spamsickle wrote:I've worked with splines before, so I think I understand that part, but the "polyline" format is new to me. Can you suggest a reference to help get me up to speed before I start digging through the code?

[/quote]
Actually I think looking through the source code is the only way to understand this custom encoding. Look here for serializePolyline and deserializePolyline.

spamsickle wrote:I shift-selected a group of 4 pages, changed one from "off" to "auto", and said "apply to selected", but only the page I changed had the dewarping mode set to "auto". On the other 3 pages, dewarping remained "off".

There indeed seems to be a bug in the Apply dialog when checking "Selected pages" doesn't uncheck the previously selected option. I'll fix that soon. It's easy to workaround though by manually unchecking the other option.
When Scan Tailor asks you to enter DPIs manually, never enter arbitrary values. The video tutorial shows how to estimate the real DPI.
Tulon
 
Posts: 536
Joined: 03 Oct 2009, 06:13
Location: London, UK

Re: First build with automatic dewarping

Postby spamsickle » 05 Mar 2011, 09:21

Huh, I didn't even notice that the "this page only" button wasn't being unchecked when I checked "selected". Yes, that work-around gets the job done. Thank you.
spamsickle
 
Posts: 572
Joined: 06 Jun 2009, 23:57

Re: First build with automatic dewarping

Postby Tulon » 09 Mar 2011, 19:10

Beta10 has arrived: http://depositfiles.com/files/hn4xr1ur2
The most important change is an edge tracer integrated into the dewarping algorithm. There are still some rough edges, including one or two introduced by this new feature, but it's an important milestone anyway. It brings new hope for cases previously considered hopeless:
distortion_model.jpg
distortion_model.jpg (49.69 KiB) Viewed 2042 times
When Scan Tailor asks you to enter DPIs manually, never enter arbitrary values. The video tutorial shows how to estimate the real DPI.
Tulon
 
Posts: 536
Joined: 03 Oct 2009, 06:13
Location: London, UK

Re: First build with automatic dewarping

Postby eL_PuSHeR » 10 Mar 2011, 04:02

Thank you very much.
eL_PuSHeR
 
Posts: 123
Joined: 28 Jun 2010, 15:25

Re: First build with automatic dewarping

Postby matt » 10 Mar 2011, 04:10

grab 2011-03-10 at 12.04.52 AM.PNG
grab 2011-03-10 at 12.04.52 AM.PNG (418.26 KiB) Viewed 2021 times
hi tulon, this new edge-tracing is very encouraging. thank you for your continued efforts!

please disregard if this is superfluous, but i found a pattern which seems to confuse the auto-dewarping algorithms, in particular the vertical line detection. as you can see in the attached image and project file, the non-aligned text in the top line distorts the otherwise very nice auto-dewarping-grid.

matt
Attachments
dewarping_test.zip
(539.98 KiB) Downloaded 106 times
matt
 
Posts: 27
Joined: 17 Mar 2010, 22:34

Re: First build with automatic dewarping

Postby Tulon » 10 Mar 2011, 04:37

That's a known problem. I do have an idea on how to handle cases like that. I'll try that idea before releasing version 1.0
When Scan Tailor asks you to enter DPIs manually, never enter arbitrary values. The video tutorial shows how to estimate the real DPI.
Tulon
 
Posts: 536
Joined: 03 Oct 2009, 06:13
Location: London, UK

Re: First build with automatic dewarping

Postby emmerick » 10 Mar 2011, 05:50

Tulon wrote:That's a known problem. I do have an idea on how to handle cases like that. I'll try that idea before releasing version 1.0


Hello, very good ta getting the SC, Tulon excellent work. Maybe if you put a bar top mark, equal to the sidebar of the last beta might help.
Iam Sorry for MY English, i am use GOOGLE translate. :)))))))
emmerick
 
Posts: 30
Joined: 06 Jan 2011, 14:35
Location: Rio de Janeiro/Brazil

PreviousNext

Return to Scan Tailor

Who is online

Users browsing this forum: No registered users and 0 guests