Hugin executor

From Wiki
Jump to navigation Jump to search

hugin_executor is a tool for command line stitching or for running the assistant from the command line. It generates a set of commands and subsequently runs the commands.

It is available in Hugin 2015.0 and later. (Hugin versions up to 2014.0 use pto2mk for command line stitching.)

Command line stitching

To stitch a project file from the command line use

   hugin_executor --stitching --prefix=prefix project.pto

It will use the settings in the project file and also in Hugins preferences dialog (e.g. exiftool settings). This is the same as using "Stitch!" from the stitcher tab.

When no prefix is specified it will use the output prefix found in Hugin's preferences dialog. The default value for the output prefix is the filename (inclusive path) of the project file.

When adding the switch --user-defined-output=executor_file the default stitching is disabled and the steps defined in the executor_file are used instead (see user defined output sequence for more details).

Command line assistant

The assistant can run on the command line with

   hugin_executor --assistant project.pto

This will run different other command line tools (like cpfind, linefind, autooptimiser) on the project and determine so the settings needed for the following stitching step. It expects a pto file with information about the images, the lenses and the stacks in this project. This pto file can e.g. be created with pto_gen.

The project file will be overwritten with the extended project file (e. g. with control point and optimized).

The settings of the assistant can be changed in Hugins preferences dialog.

Advanced options

  • --threads=NUM: Many of the individual tools are using as much threads as possible, e.g. on a 4 core processor it will use 4 threads. This behavior can be changed by setting the environment variable OMP_NUM_THREADS or set the switch --threads to reduce the CPU load. By default, all available threads will be used.
  • --dry-run: By default hugin_executor executes all commands in sequence. For special scripting purposes you may need the individual commands. For this use case call hugin_executor with --dry-run switch. This will print all commands to the console, from where you can use them in your own scripts.