ANNOUNCEMENT: Scan Tailor Command Line Interface

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

Moderator: peterZ

Hasher
Posts: 77
Joined: 26 Sep 2009, 03:05

Re: ANNOUNCEMENT: Scan Tailor Command Line Interface

Post by Hasher »

Just wonder what happened to this project . Did it ever get fully developed ?

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

Re: ANNOUNCEMENT: Scan Tailor Command Line Interface

Post by Tulon »

It's included in the main version now. The binary is called scantailor-cli.exe
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.
Hasher
Posts: 77
Joined: 26 Sep 2009, 03:05

Re: ANNOUNCEMENT: Scan Tailor Command Line Interface

Post by Hasher »

Thanks . Its an awesome app btw :-)
Hasher
Posts: 77
Joined: 26 Sep 2009, 03:05

Re: ANNOUNCEMENT: Scan Tailor Command Line Interface

Post by Hasher »

Hi

Been working with the CLI version of ST and its working very well. Only problem Im having is different size pages in the book like the image below. (taken from the GUI to give some idea of my problem)

Image

The A4 page gets distorted to the larger A3 size , giving it a stretched look with a lot of white space.

Is there anyway in the CLI version to enforce that it uses the original margins of the input page .Im cleaning previously scanned (badly) pages and dont have the originals.

In the GUI version I un-select the "Match size with other pages" in margins screen and that solves the problem

Thanks in advance

Paul
pejuko
Posts: 30
Joined: 17 Feb 2011, 17:06

Re: ANNOUNCEMENT: Scan Tailor Command Line Interface

Post by pejuko »

Try to set --match-layout-tolerance argument. Setting it to 0 is equal to uncheck "match size with other pages" for all pages. Value about 0.2 should keep similar pages matched and pages with different shape unmatched.
Hasher
Posts: 77
Joined: 26 Sep 2009, 03:05

Re: ANNOUNCEMENT: Scan Tailor Command Line Interface

Post by Hasher »

Thanks pejuko will try that tonight :-)


On another point is it possible to define a folder as a project . Currently using scantailor-cli [options] <image, image, ...> <output_directory> but seem to have problems when I get to about 500 images. Using Autoit to generate the Command line. Also after starting a project can I save the project via command line ?


Thanks
Paul
pejuko
Posts: 30
Joined: 17 Feb 2011, 17:06

Re: ANNOUNCEMENT: Scan Tailor Command Line Interface

Post by pejuko »

There's limit on the command line length, entering input directory instead of images sounds as a good idea. I'll try to do this asap. You can save your project file with -o=file.ScanTailor option. All those options are described in help if you run scantailor-cli -h from command line, read it please.
Hasher
Posts: 77
Joined: 26 Sep 2009, 03:05

Re: ANNOUNCEMENT: Scan Tailor Command Line Interface

Post by Hasher »

Hi pejuko

That was my next question . I had done the -h command and below is what it gave me . I know now im missing things:
Options:
--help, -h
--verbose, -v
--layout=, -l=<0|1|1.5|2> -- default: 0
0: auto detect
1: one page layout
1.5: one page layout but cutting is needed
2: two page layout
--layout-direction=, -ld=<lr|rl> -- default: lr
--orientation=<left|right|upsidedown|none>
-- default: none
--rotate=<0.0...360.0> -- it also sets deskew to manual mode
--deskew=<auto|manual> -- default: auto
--content-detection=<cautious|normal|aggressive>
-- default: normal
--content-box=<<left_offset>x<top_offset>:<width>x<height>>
-- if set the content detection is se to manual mode
example: --content-box=100x10
0:1500x2500
--margins=<number> -- sets left, top, right and bottom margins to same number.
--margins-left=<number>
--margins-right=<number>
--margins-top=<number>
--margins-bottom=<number>
--alignment=center -- sets vertical and horizontal alignment to center
--alignment-vertical=<top|center|bottom>
--alignment-horizontal=<left|center|right>
--dpi=<number> -- sets x and y dpi. default: 600
--dpi-x=<number>
--dpi-y=<number>
--output-dpi=<number> -- sets x and y output dpi. default: 600
--output-dpi-x=<number>
--output-dpi-y=<number>
--color-mode=<black_and_white|color_grayscale|mixed>
-- default: black_and_white
--white-margins -- default: false
--normalize-illumination -- default: false
--threshold=<n> -- n<0 thinner, n>0 thicker; default: 0
--despeckle=<off|cautious|normal|aggressive>
-- default: normal
--dewarping=<off|auto> -- default: off
--depth-perception=<1.0...3.0> -- default: 2.0
--start-filter=<1...6> -- default: 4
--end-filter=<1...6> -- default: 6
--output-project=, -o=<project_name>
pejuko
Posts: 30
Joined: 17 Feb 2011, 17:06

Re: ANNOUNCEMENT: Scan Tailor Command Line Interface

Post by pejuko »

Hasher wrote:That was my next question . I had done the -h command and below is what it gave me . I know now im missing things:
it's part of "Enhanced" version and wasn't merged into main yet. Checkout http://www.diybookscanner.org/forum/vie ... =21&t=1144 for more details on enhanced version and upcoming releases in future. Sorry I didn't mention it before.
User avatar
mellow-yellow
Posts: 46
Joined: 28 Jun 2010, 13:33
Number of books owned: 1
Country: USA
Location: Portland, OR, USA
Contact:

Re: ANNOUNCEMENT: Scan Tailor Command Line Interface

Post by mellow-yellow »

pejuko,

I'd like to try your scantailor-cli input enhancements (http://scantailor.git.sourceforge.net/g ... 7754b44754) (committed 5 days ago) but I don't see a windows binary (maybe I'm mistaken?). So, I'm trying to build one on XP but having trouble, despite the otherwise good instructions in packaging\windows\readme.en.txt. Long story short, could you (or somebody else with experience) create a windows binary?
Post Reply