Daniel Reetz, the founder of the DIY Book Scanner community, has recently started making videos of prototyping and shop tips. If you are tinkering with a book scanner (or any other project) in your home shop, these tips will come in handy. https://www.youtube.com/channel/UCn0gq8 ... g_8K1nfInQ

Scan Tailor "Experimental"

Scan Tailor specific announcements, releases, workflows, tips, etc. NO FEATURE REQUESTS IN THIS FORUM, please.
d14b0ll0s
Posts: 31
Joined: 17 Aug 2015, 19:37
Number of books owned: 3000
Country: Poland

Re: Scan Tailor "Experimental"

Post by d14b0ll0s » 22 Aug 2015, 16:32

I was only able to get past the cmake stage of building STE under OS X.
There was a bunch of errors that surpass my compiling skills, since this is meant for someone more familiar with CPP and ST instelf. Tulon, perhaps it will be of some interest to you -- see the error log attached.
Attachments
error-d14b0ll0s.log
STE build 20.08 not compiling under Yosemite 10.10.5
(14.35 KiB) Downloaded 103 times

joseph73
Posts: 17
Joined: 10 Jan 2013, 22:02
Number of books owned: 1000
Country: USA

Re: Scan Tailor "Experimental"

Post by joseph73 » 22 Aug 2015, 16:55

Hi,

I've been using this new experimental program and noticed that the program will crash if there are any question marks left in the dewarping, deskewing step. If you try to go on to step 4, it will crash each time. The program sometimes does not dewarp every page. I do not know if that has been fixed in the latest version.
For the page dewarping part, it has been a big improvement. There are a few bugs I've found. First, it doesn't handle index pages or content pages well. I normally deselect those. If I try to generate margins and the page dewarping grid is strange, the video card driver will crash and restart in windows 10. I assume it generates nonsense mathematical outputs. There are a few small things that throw off the dewarping part. Any time there is a T in the beginning top line of the page, or a quote sign ( " ) the line will not be in the middle but start from the top and curve down to the rest of the text. It must misdetect the T and/or the " as the middle of line.

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

Re: Scan Tailor "Experimental"

Post by Tulon » 22 Aug 2015, 17:05

d14b0ll0s wrote:There was a bunch of errors that surpass my compiling skills, since this is meant for someone more familiar with CPP and ST instelf. Tulon, perhaps it will be of some interest to you -- see the error log attached.
Try adding -std=c++11 to CMAKE_CXX_FLAGS. You can use the CMake GUI to do that (tick the Advanced checkbox first).
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.

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

Re: Scan Tailor "Experimental"

Post by Tulon » 22 Aug 2015, 17:25

joseph73 wrote:Hi,

I've been using this new experimental program and noticed that the program will crash if there are any question marks left in the dewarping, deskewing step. If you try to go on to step 4, it will crash each time. The program sometimes does not dewarp every page. I do not know if that has been fixed in the latest version.
This one should be fixed in the latest version.
joseph73 wrote: For the page dewarping part, it has been a big improvement. There are a few bugs I've found. First, it doesn't handle index pages or content pages well. I normally deselect those.
Index pages are a hard case for automatic dewarping. Just do those manually.
joseph73 wrote: If I try to generate margins and the page dewarping grid is strange, the video card driver will crash and restart in windows 10. I assume it generates nonsense mathematical outputs.
This should be fixed in the latest version as well. It's a non-trivial problem to deal with, so I can't guarantee my fix handles all cases. If you find a crash in the latest version, feel free to submit a small project that reproduces it. If you are curious, here is the commit that's supposed to fix this issue.
joseph73 wrote: There are a few small things that throw off the dewarping part. Any time there is a T in the beginning top line of the page, or a quote sign ( " ) the line will not be in the middle but start from the top and curve down to the rest of the text. It must misdetect the T and/or the " as the middle of line.
Those are hard cases as well. Fine-tuning the coupled-snakes algorithm may help (increasing the stiffness of a snake), though any such tuning may hurt other cases (large curvature near the spine). I'd rather leave it as is for now.
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.

joseph73
Posts: 17
Joined: 10 Jan 2013, 22:02
Number of books owned: 1000
Country: USA

Re: Scan Tailor "Experimental"

Post by joseph73 » 22 Aug 2015, 18:15

Tulon wrote:Those are hard cases as well. Fine-tuning the coupled-snakes algorithm may help (increasing the stiffness of a snake), though any such tuning may hurt other cases (large curvature near the spine). I'd rather leave it as is for now.
Many books have little to no curvature owing to deep margins. It would be interesting to have control of this parameter for large margin books. I can see how it is a tradeoff, trying to make a default setting that works to cover the majority of book scans. My books are 98% flat and only the top lines are slightly curved, or in many cases, the text from the book was not printed straight but the page was scanned flat. The attachment is an example. I wonder if there's a way to stiffen the snake on one side (the left side of the left page) but leave the right side alone (where the curves normally are)? This would only work on the left pages however. On the right page, you'd want the left side to curve (where the margin is).
Attachments
screencapturebook.jpg

d14b0ll0s
Posts: 31
Joined: 17 Aug 2015, 19:37
Number of books owned: 3000
Country: Poland

Re: Scan Tailor "Experimental"

Post by d14b0ll0s » 22 Aug 2015, 18:40

Tulon wrote:
d14b0ll0s wrote:There was a bunch of errors that surpass my compiling skills, since this is meant for someone more familiar with CPP and ST instelf. Tulon, perhaps it will be of some interest to you -- see the error log attached.
Try adding -std=c++11 to CMAKE_CXX_FLAGS. You can use the CMake GUI to do that (tick the Advanced checkbox first).
I managed to do it without GUI; now I get only these:

Code: Select all

[  5%] Building CXX object foundation/CMakeFiles/foundation.dir/GridLineTraverser.cpp.o
/Users/sirat/Downloads/scantailor-EXPERIMENTAL_2015_08_20/foundation/GridLineTraverser.cpp:29:17: error: use of undeclared identifier 'abs'
        if ((h_spans = abs(p1.x() - p2.x())) > (v_spans = abs(p1.y() - p2.y()))) {
                       ^
/Users/sirat/Downloads/scantailor-EXPERIMENTAL_2015_08_20/foundation/GridLineTraverser.cpp:29:52: error: use of undeclared identifier 'abs'
        if ((h_spans = abs(p1.x() - p2.x())) > (v_spans = abs(p1.y() - p2.y()))) {
                                                          ^
2 errors generated.
make[2]: *** [foundation/CMakeFiles/foundation.dir/GridLineTraverser.cpp.o] Error 1
make[1]: *** [foundation/CMakeFiles/foundation.dir/all] Error 2
make: *** [all] Error 2

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

Re: Scan Tailor "Experimental"

Post by Tulon » 22 Aug 2015, 18:48

I wonder if there's a way to stiffen the snake on one side (the left side of the left page) but leave the right side alone (where the curves normally are)?
This can be done, at least in theory. I remember looking into this particular issue before and trying various remedies I could think of. None of them worked too well.
In most cases it's not a problem to have poor tracing of lines starting with a capital letter, as long as such lines are not in the majority. The model only needs two representative lines and will likely pick the ones that fit well with the majority.
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.

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

Re: Scan Tailor "Experimental"

Post by Tulon » 22 Aug 2015, 18:55

d14b0ll0s wrote: I managed to do it without GUI; now I get only these:
Fix pushed to git.
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.

d14b0ll0s
Posts: 31
Joined: 17 Aug 2015, 19:37
Number of books owned: 3000
Country: Poland

Re: Scan Tailor "Experimental"

Post by d14b0ll0s » 22 Aug 2015, 19:01

Tulon wrote:Fix pushed to git.
We're making progress -- stopped at 12% ;)
Tell me if it's too distracting to go through this at this point.

Code: Select all

[ 12%] Building CXX object imageproc/CMakeFiles/imageproc.dir/GaussBlur.cpp.o
In file included from /Users/sirat/Downloads/scantailor-EXPERIMENTAL_2015_08_20/imageproc/GaussBlur.cpp:19:
In file included from /Users/sirat/Downloads/scantailor-EXPERIMENTAL_2015_08_20/imageproc/GaussBlur.h:44:
/Users/sirat/Downloads/scantailor-EXPERIMENTAL_2015_08_20/imageproc/RasterOpGeneric.h:158:20: error: no member
      named 'invalid_argument' in namespace 'std'
        throw std::invalid_argument("ropGeneric: inconsistent image dimensions");
              ~~~~~^
/Users/sirat/Downloads/scantailor-EXPERIMENTAL_2015_08_20/imageproc/RasterOpGeneric.h:170:20: error: no member
      named 'invalid_argument' in namespace 'std'
        throw std::invalid_argument("ropGeneric: invalid image dimensions");
              ~~~~~^
2 errors generated.
make[2]: *** [imageproc/CMakeFiles/imageproc.dir/GaussBlur.cpp.o] Error 1
make[1]: *** [imageproc/CMakeFiles/imageproc.dir/all] Error 2
make: *** [all] Error 2

joseph73
Posts: 17
Joined: 10 Jan 2013, 22:02
Number of books owned: 1000
Country: USA

Re: Scan Tailor "Experimental"

Post by joseph73 » 22 Aug 2015, 19:08

Tulon wrote:
I wonder if there's a way to stiffen the snake on one side (the left side of the left page) but leave the right side alone (where the curves normally are)?
This can be done, at least in theory. I remember looking into this particular issue before and trying various remedies I could think of. None of them worked too well.
In most cases it's not a problem to have poor tracing of lines starting with a capital letter, as long as such lines are not in the majority. The model only needs two representative lines and will likely pick the ones that fit well with the majority.
The other method would be to go in deeper and grab the first anchor point there, excluding the true edge of the text. I don't know how the code is set up to know if that is a viable method. In this example, all the full lines start with capital letters, so there's no alternate full line to pick.

Post Reply