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.

Moderator: peterZ

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 »

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: 464
Joined: 06 Mar 2010, 18:03

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

Post by dtic »

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 »

Isnt this script need gui as prestages for filters 1-5? If yes this is not solution for me.
dtic
Posts: 464
Joined: 06 Mar 2010, 18:03

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

Post by dtic »

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 »

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