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 - cli problems and how to use multithread cpu from cli

Scan Tailor specific announcements, releases, workflows, tips, etc. NO FEATURE REQUESTS IN THIS FORUM, please.
Post Reply
foler
Posts: 9
Joined: 15 Apr 2016, 06:24
Number of books owned: 0
Country: Croatia

Scan Tailor experimental - cli problems and how to use multithread cpu from cli

Post by foler » 18 Apr 2016, 07:32

Hi
Cant get output from cli version. Cant find parameters for multithread speed up.
Script work under older enhanced 32bit version.

"C:\Program Files\Scan Tailor\scantailor-cli.exe" -v --layout=1 --deskew=auto --content-detection=normal --alignment-vertical=bottom --alignment-horizontal=center --dpi=600 --output-dpi=600 --despeckle=off --tiff-compression=lzw C:\input C:\output

Script run to filter 4 than skip 5-6, no output produced. GUI work.

Need cli version for automation.

dtic
Posts: 458
Joined: 06 Mar 2010, 18:03

Re: Scan Tailor experimental - cli problems and how to use multithread cpu from cli

Post by dtic » 18 Apr 2016, 07:53

From first post in Scan Tailor Experimental thread
Tulon wrote:the command line mode is broken.
As you point out the older Scan Tailor Enhanced still works in command line mode. You can use the ScanTailor_multi_core helper script to use multiple cores.

foler
Posts: 9
Joined: 15 Apr 2016, 06:24
Number of books owned: 0
Country: Croatia

Re: Scan Tailor experimental - cli problems and how to use multithread cpu from cli

Post by foler » 18 Apr 2016, 07:57

Isnt this script need gui as prestages for filters 1-5? If yes this is not solution for me.

dtic
Posts: 458
Joined: 06 Mar 2010, 18:03

Re: Scan Tailor experimental - cli problems and how to use multithread cpu from cli

Post by dtic » 18 Apr 2016, 10:52

It uses GUI yes.

It is pretty easy to make a script for command line without GUI that uses multiple cores in parallel. The script needs a loop that keeps checking the number of scantailor enhanced processes currently running and start a new one if less than 4 are running (or whatever number of parallel process you wish for) until all the input files have been processed. If you know a bit of scripting then take a look around line 268 in the .ahk source of QuickPicZone for inspiration. However a drawback with such a strategy is that if you don't have same size input files and/or don't set content to use the whole image then your output files can differ in size and shape.

foler
Posts: 9
Joined: 15 Apr 2016, 06:24
Number of books owned: 0
Country: Croatia

Re: Scan Tailor experimental - cli problems and how to use multithread cpu from cli

Post by foler » 19 Apr 2016, 06:10

Why client version stops at filter 4? Here is answer..all 6 parameters need to be defined:
https://bbs.archlinux.org/viewtopic.php?id=207478

now my script looks like this and cli version work :)

"C:\Program Files\Scan Tailor\scantailor-cli.exe" -v --margins=0 --layout=1 --deskew=auto --content-detection=normal --alignment-vertical=bottom --alignment-horizontal=center --white-margins=true --color-mode=black_and_white --dpi=600 --output-dpi=600 --despeckle=off --tiff-compression=lzw --start-filter=1 --end-filter=6 C:\input\ C:\output

Post Reply