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

Building CLI branch on Windows

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

Building CLI branch on Windows

Post by nmi8080 » 06 Apr 2011, 13:00

Hi All -

I checked out the CLI branch of scantailor from GIT and had no problems getting it to work under Linux -- very pleased with how well it works. Unfortunately, I also need it on Windows. I checked it out under Windows 7 and compiled with VC 9 (Visual Studio 2008 Express). No obvious errors during the build process, other than having to manually nmake the qt jpeg plugin.

I used the resulting installer on another system and discovered that it did not install the CLI executable (scantailor-batch) -- only the GUI version (scantailor), which worked fine. When I went back to the development system I found that the Release directory (C:/build/scantailor-build/Release) has both the scantailor and scantailor-batch executables files, but only the scantailor.exe file works. If I run scantailor-batch.exe (with or without any command line params) it immediately terminates.

Any ideas? I've been working on this a couple of days without making any progress.

Thanks!

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

Re: Building CLI branch on Windows

Post by Tulon » 06 Apr 2011, 15:54

The current situation is that no one looks after the CLI version on Windows. Petr Kovář, the guy who implemented it, apparently doesn't run Windows. I don't run the CLI version. Ideally we would need someone else to take care of it on Windows.

The problems you reported were quick enough to fix, which I did. Next time that might not be the case.
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.

nmi8080

Re: Building CLI branch on Windows

Post by nmi8080 » 06 Apr 2011, 15:58

Figured it out myself: the linker was building a "Windows" application instead of a "Console" application. Changed it and everything seems to be working.

rdoug

Re: Building CLI branch on Windows

Post by rdoug » 19 Apr 2011, 08:56

Hi Folks,

First the request: Does anyone have a working binary of Scan Tailor for Windows with CLI? Would you be willing to share it with me?

Second the explanation: I am using ST for my dissertation to handle tens of thousands of pages of documents photographed in historical archives. I've been hoping for the command line version for 6 months now and cannot wait any longer for my project. I've tried compiling it on my own getting as far as Step 7 of the instructions "[VC++] Go to C:\build\scantailor-deps-build and open file "Scan Tailor Dependencies.sln". " which returns errors that are over my head. I have experience in C++, but on projects substantially smaller than this one.

Thanks in advance if anyone has any advice.

User avatar
daniel_reetz
Posts: 2797
Joined: 03 Jun 2009, 13:56
E-book readers owned: Used to have a PRS-500
Number of books owned: 600
Country: United States
Contact:

Re: Building CLI branch on Windows

Post by daniel_reetz » 19 Apr 2011, 10:20

I hope someone does post a copy - I'm not sure there is one out there right now.

What capabilities do you need from Scan Tailor? Perhaps we can rig a workflow for you using other software?

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

Re: Building CLI branch on Windows

Post by Tulon » 19 Apr 2011, 12:25

I can't provide a build right now, as I am switching ISPs and will be without broadband for a few days.
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.

rdoug

Re: Building CLI branch on Windows

Post by rdoug » 19 Apr 2011, 13:16

Re: Tulon
First, thanks for the quick response and for just being all around awesome. Second, if its appropriate to do so and no one has a build laying around, I'll ask again in a week or so after ISP craziness can be sorted out.

Re: daniel_reetz
My workflow right now looks like this

1) Take high resolution pictures of documents of arbitrary size and orientation laying in a folder on a table top, with varying light and background. (Custom console program to usb trigger a cannon rebel ti)
Results in thousands of jpegs spread across hundreds of folders where the folder name represents the location information for that document in the archive.

2) Do content selection, splitting, orientation, and cropping (Scan Tailor)
Results in color tiffs cropped nicely to just the text on the front/back of each document which generally fits in an letter-sized page. Still looking for a way to get rid of pages that contain only junk like my hand or a blank back of a document.

3) Use a script to convert those tiffs into a single pdf for each folder, taking the name from the folder.

4) Pull all the pdfs out and into a single folder.
Run ocr on the pdfs (Acrobat Professional /Omnipage)


Because the layout of information inside that folder can vary wildly, there's no manual way to go about it. It could be two A-sheets side by side, it could be a legal sheet laying horizontal, it could be a legal sheet laying vertical, the folder may be visible underneath or completely obscured, the table might be a clean white or these horrible speckled ones. I take about 10,000 pages in a week on my short visits, and the trick now is to get that from 100gb of jpegs into nice, small, skim-able, and searchable pdfs. The whole process works manually with Scan Tailor, I just need to be able to script it with a command line.

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

Re: Building CLI branch on Windows

Post by Tulon » 20 Apr 2011, 04:37

I was told today my broadband will be activated on May the 3rd. So it's going to be two weeks not a few days.
Meanwhile, you can try out the latest build of the Scan Tailor Plus mod: http://narod.ru/disk/10630100001/ScanTa ... 0.rar.html
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.

emmerick

Re: Building CLI branch on Windows

Post by emmerick » 20 Apr 2011, 11:17

Tulon wrote:I was told today my broadband will be activated on May the 3rd. So it's going to be two weeks not a few days.
Meanwhile, you can try out the latest build of the Scan Tailor Plus mod: http://narod.ru/disk/10630100001/ScanTa ... 0.rar.html
Hi friend how diferent ST and STplus mod

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

Re: Building CLI branch on Windows

Post by Tulon » 20 Apr 2011, 13:59

emmerick wrote:Hi friend how diferent ST and STplus mod
The announcement of the Plus branch explains the general idea.
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