Difference between revisions of "Hugin Batch Processor"

From PanoTools.org Wiki
Jump to navigation Jump to search
(Short instructions for installation and usage of the batch processor regarding MacOS.)
(Extended documentation of PTBatcherGUI)
Line 1: Line 1:
 
Batch Processor is a component of [[hugin]] that provides functionality to stitch multiple projects in a batch queue. Its goal is to make stitching of multiple projects faster. The process of stitching multiple projects is simplified using a queue of projects. User can add/edit/delete projects in the queue.
 
Batch Processor is a component of [[hugin]] that provides functionality to stitch multiple projects in a batch queue. Its goal is to make stitching of multiple projects faster. The process of stitching multiple projects is simplified using a queue of projects. User can add/edit/delete projects in the queue.
 +
The Batch Processor can also queue the creation of the final project. In this case it runs the same steps as in the [[Hugin Assistant tab]].
  
 
'''Hugin Batch Processor''' consists of a list of projects. Projects in the list are ordered in sequential order. By default, the list is reinstated every time you open the application. What is more, entire queue of projects can be saved and reopened later using buttons Clear Batch, Open Batch, Save Batch.
 
'''Hugin Batch Processor''' consists of a list of projects. Projects in the list are ordered in sequential order. By default, the list is reinstated every time you open the application. What is more, entire queue of projects can be saved and reopened later using buttons Clear Batch, Open Batch, Save Batch.
 +
 +
There are 2 interfaces to the queue: '''PTBatcherGUI''' provides a graphical user interface, '''PTBatcher''' provides a command line interface.
  
 
= Installation =
 
= Installation =
Line 22: Line 25:
 
* '''Shutdown when done''': Turn off computer when batch process ends.
 
* '''Shutdown when done''': Turn off computer when batch process ends.
  
= Buttons =
+
= Functions =
 +
 
 +
== Queue management ==
 +
 
 +
The management of the queue can done by the appropriate menu items or by the corresponding toolbar buttons.
 +
* Add project files to queue
 +
* Remove project file from queue (you need to select the project file in the list)
 +
* The complete queue list can be saved and loaded from disc (The current active list is automatically saved at the end. You don't need to save it explicitly.)
 +
* The complete list can be cleared.
 +
 
 +
== Item management ==
 +
 
 +
The single items in the queue can be modified by the buttons on the right side of the window
 +
* '''Remove complete''' will remove all items form the queue which were successfully finished.
 +
* '''Change prefix''' will change the output prefix. This is only possible if the item is in the stitching queue. It does not work for items in the assistant queue.
 +
* '''Reset project'''/'''Reset all''' resets the status of the selected project/all projects to default value. This allows to execute the stitching again.
 +
* '''Edit with Hugin''' opens the selected in Hugin to modify it.
 +
* The order of the items can be change with '''Move project up''' and '''Move project down'''
 +
* You can also add an arbitrary command to the queue with '''Add application'''.
 +
 
 +
== Executing queue ==
 +
 
 +
The queue can be started, paused/resumed and stopped with the toolbar buttons.
 +
You can also skip one project.
 +
 
 +
== Automation ==
 +
 
 +
PTBatcherGUI provides some more features for automation. This can be accessed by File->Search directory for.
 +
 
 +
=== Existing project files ===
 +
 
 +
With File->Search directory for...->Projects you can search recursively in the given folder for (existing) project files and appends them to (stitching) queue.
  
== [[Image:Hugin_clear_batch.png]] Clear batch ==
+
=== New project files ===
  
Removes all projects from the list.
+
First select a folder in which should be searched. After pressing start is searches for image files in the folder (and optionally its sub folders). It uses the information stored in the EXIF data to decide which images could belong to a panorama. This works only in one folder level, it does not match images in different folders. (It uses camera maker, camera model, focal length, image size and date/time for this decision.)
  
== [[Image:Hugin_open_batch.png]] Open batch ==
+
After the search has finished it shows a list of the found panoramas. With '''Send selected panoramas to queue''' the project files are created and send to the assistant queue. You can deselect individual panoramas from this processing step by untick the panorama.
  
Open a batch file with a list of projects that was saved earlier.
+
The project files are named with the selected name scheme
 +
* PanoramaXX.pto: This will generate project files: panorama0.pto, panorama1.pto,...
 +
* First file - last file.pto: The project files will by named by the first and last image of the panorama.
 +
* Foldername.pto: In this case the project file is named like the containing folder.
 +
Existing project files will not be overwritten, instead it appends an increasing number.
  
== [[Image:Hugin_save_batch.png]] Save batch ==
+
If the images are shoot with auto bracketing it tries to generate the appropriate stacks. In this case check that you default control point generator setting is one which works with stacks (check [[Hugin_Preferences#Control_Point_Detectors|Preferences in Hugin]] and [[Hugin Parameters for Control Point Detectors dialog|control point detector parameters]]).
 +
If you shoot from a tripod then you can select also '''Create links'''. This will link the positions of all images of one stack. If you deselect this option, it will create the stacks but will not link the positions of the images (e.g. when shooting free hand).
  
Save current list of projects to a file. File can later be opened using the Open batch button
+
= Command line switches =
  
== [[Image:Hugin_start_batch.png]] Start ==
+
== PTBatcherGUI ==
  
Starts the batch process and stitches all projects in the queue.
+
To add a project to the (stitching) queue use
  
== [[Image:Hugin_skip_batch.png]] Skip ==
+
    PTBatcherGUI project.pto output_prefix
  
Stops stitching of current project in batch process and starts stitching next project in the queue. This button is inactive when batch process is not running.
+
You can also add several projects
  
== [[Image:Hugin_pause_batch.png]] Pause ==
+
    PTBatcherGUI project1.pto prefix1 project2.pto prefix2
  
Pauses the current batch process. In order to continue the process press the Start button. This button is inactive when batch process is not running.
+
The prefix is optionally. If you don't provide a prefix, the filename (without extension) of the project file is used as prefix.
  
== [[Image:Hugin_cancel_batch.png]] Cancel ==
+
You can also add a project to the assistant queue.
  
Stops batch execution. This button is active only when batch process is running.
+
    PTBatcherGUI --assistant project.pto
  
== [[Image:Hugin_add_project.png]] Add project ==
+
Some of the above described options can be accessed also by command line switches:
  
Adds projects to the list. A file browser appears where users can select one or multiple .pto or .pts files.
+
*  /h, --help            show this help message
 +
*  /b, --batch          run batch immediately
 +
*  /p, --parallel        run batch projects in parallel
 +
*  /d, --delete          delete *.pto files after stitching
 +
*  /o, --overwrite      overwrite previous files without asking
 +
*  /s, --shutdown        shutdown computer after batch is complete
 +
*  /v, --verbose        show verbose output when processing projects
  
== [[Image:Hugin_remove_project.png]] Remove project ==
+
Please keep in mind that only one instance of PTBatcherGUI can run at one time. Starting PTBatcherGUI a second time with command line switches will influence the already running instance and not start a second instance with own options.
  
Removes selected project from the list.
+
== PTBatcher ==
  
== [[Image:Hugin_folder_search.png]] Folder search ==
+
PTBatcher provide a very similar interface like the GUI version. It works with the same list as the GUI version.
 +
Attention: Only the short name of the switches are recognized.
  
Recursively searches given folder for project files and appends them to project list.
+
*  -a file        add project to queue. Unless -o option is present, the default prefix is appointed.
 +
*  -o              output prefix (together with -a option)
 +
*  -l              list all projects in batch queue
 +
*  -c              clear all projects from batch queue
 +
*  -x id          remove project with specified id
 +
*  -r              reset all projects to waiting status
 +
*  -b              start batch process
 +
*  -p              use parallel processing (together with -b option)
 +
*  -d              delete .pto files when complete (together with -b option)
 +
*  -s              shutdown computer when complete (together with -b option)
 +
*  -v              verbose mode
 +
*  -h              print this
  
 +
 
__NOTOC__
 
__NOTOC__
 
[[Category:Software:Hugin]]
 
[[Category:Software:Hugin]]

Revision as of 13:37, 2 June 2011

Batch Processor is a component of hugin that provides functionality to stitch multiple projects in a batch queue. Its goal is to make stitching of multiple projects faster. The process of stitching multiple projects is simplified using a queue of projects. User can add/edit/delete projects in the queue. The Batch Processor can also queue the creation of the final project. In this case it runs the same steps as in the Hugin Assistant tab.

Hugin Batch Processor consists of a list of projects. Projects in the list are ordered in sequential order. By default, the list is reinstated every time you open the application. What is more, entire queue of projects can be saved and reopened later using buttons Clear Batch, Open Batch, Save Batch.

There are 2 interfaces to the queue: PTBatcherGUI provides a graphical user interface, PTBatcher provides a command line interface.

Installation

At least on MacOS you have to download and install the BatchProcessor separately. You will find it at the Sourceforge page inside the lastest version, e.g. here. Just copy the app into the same folder as hugin and run it.

Usage

Just create several project files (do everything and just skip the export step), load them in the batch processor and start the process. This way you can run several large project unattended. The output filename will be the same as the projects name (xyz.pto -> xyz.tif) in the same folder.

At least on MacOS there are some minor things to pay attention to:

You should only add the project files you want to process by using the "add project" (see below) or the menu "File - Add Project". Be aware that you will not be able to delete or deactivate a single project from the list - you will have to clean up the whole list using the menu "File - Clean List". If you want to process all projects inside a folder, just use the "folder search" (see below). Apart from this, all works fine.

Flag options

Batch process is also influenced by the following check boxes:

  • parallel execution: Execute stitching of projects in the list parallel rather than in sequential order. Check this only if you are certain your computer is up for the task of stitching multiple projects at the same time.
  • delete .pto files: After stitching of each projects ends, Batch Processor will delete the project file of the currently processed project. Be careful, deleted files are lost!
  • overwrite always: Always(for each project) overwrite output filename if it exists. Otherwise, you will get a dialog box whether you want to overwrite files or not.
  • Shutdown when done: Turn off computer when batch process ends.

Functions

Queue management

The management of the queue can done by the appropriate menu items or by the corresponding toolbar buttons.

  • Add project files to queue
  • Remove project file from queue (you need to select the project file in the list)
  • The complete queue list can be saved and loaded from disc (The current active list is automatically saved at the end. You don't need to save it explicitly.)
  • The complete list can be cleared.

Item management

The single items in the queue can be modified by the buttons on the right side of the window

  • Remove complete will remove all items form the queue which were successfully finished.
  • Change prefix will change the output prefix. This is only possible if the item is in the stitching queue. It does not work for items in the assistant queue.
  • Reset project/Reset all resets the status of the selected project/all projects to default value. This allows to execute the stitching again.
  • Edit with Hugin opens the selected in Hugin to modify it.
  • The order of the items can be change with Move project up and Move project down
  • You can also add an arbitrary command to the queue with Add application.

Executing queue

The queue can be started, paused/resumed and stopped with the toolbar buttons. You can also skip one project.

Automation

PTBatcherGUI provides some more features for automation. This can be accessed by File->Search directory for.

Existing project files

With File->Search directory for...->Projects you can search recursively in the given folder for (existing) project files and appends them to (stitching) queue.

New project files

First select a folder in which should be searched. After pressing start is searches for image files in the folder (and optionally its sub folders). It uses the information stored in the EXIF data to decide which images could belong to a panorama. This works only in one folder level, it does not match images in different folders. (It uses camera maker, camera model, focal length, image size and date/time for this decision.)

After the search has finished it shows a list of the found panoramas. With Send selected panoramas to queue the project files are created and send to the assistant queue. You can deselect individual panoramas from this processing step by untick the panorama.

The project files are named with the selected name scheme

  • PanoramaXX.pto: This will generate project files: panorama0.pto, panorama1.pto,...
  • First file - last file.pto: The project files will by named by the first and last image of the panorama.
  • Foldername.pto: In this case the project file is named like the containing folder.

Existing project files will not be overwritten, instead it appends an increasing number.

If the images are shoot with auto bracketing it tries to generate the appropriate stacks. In this case check that you default control point generator setting is one which works with stacks (check Preferences in Hugin and control point detector parameters). If you shoot from a tripod then you can select also Create links. This will link the positions of all images of one stack. If you deselect this option, it will create the stacks but will not link the positions of the images (e.g. when shooting free hand).

Command line switches

PTBatcherGUI

To add a project to the (stitching) queue use

   PTBatcherGUI project.pto output_prefix

You can also add several projects

   PTBatcherGUI project1.pto prefix1 project2.pto prefix2

The prefix is optionally. If you don't provide a prefix, the filename (without extension) of the project file is used as prefix.

You can also add a project to the assistant queue.

   PTBatcherGUI --assistant project.pto

Some of the above described options can be accessed also by command line switches:

  • /h, --help show this help message
  • /b, --batch run batch immediately
  • /p, --parallel run batch projects in parallel
  • /d, --delete delete *.pto files after stitching
  • /o, --overwrite overwrite previous files without asking
  • /s, --shutdown shutdown computer after batch is complete
  • /v, --verbose show verbose output when processing projects

Please keep in mind that only one instance of PTBatcherGUI can run at one time. Starting PTBatcherGUI a second time with command line switches will influence the already running instance and not start a second instance with own options.

PTBatcher

PTBatcher provide a very similar interface like the GUI version. It works with the same list as the GUI version. Attention: Only the short name of the switches are recognized.

  • -a file add project to queue. Unless -o option is present, the default prefix is appointed.
  • -o output prefix (together with -a option)
  • -l list all projects in batch queue
  • -c clear all projects from batch queue
  • -x id remove project with specified id
  • -r reset all projects to waiting status
  • -b start batch process
  • -p use parallel processing (together with -b option)
  • -d delete .pto files when complete (together with -b option)
  • -s shutdown computer when complete (together with -b option)
  • -v verbose mode
  • -h print this