match-n-shift man page

match-n-shift — generate a Hugin .pto project from a list of photos


match-n-shift [options] --output project.pto image1 image2 [...]

  -o | --output name    Filename of created panorama project
  -i | --input name     Filename of CSV file specifying input images (optional, see below)
  -f | --projection     Panotools style input projection number. Use
                          0 for rectilinear (default), 2 for circular fisheye and
                          3 for full-frame fisheye images.  Note, this has to be
                          specified for fisheye lenses as this can't be determined
                          from EXIF metadata
  -v | --fov            Horizontal field of view in degrees, this value is
                          only used if FoV can't be determined from EXIF
                          metadata, defaults to 50
  -k | --selection      Crop selection boundary, eg -459,2459,-57,2861
  -l | --linkstacks     Hard link positions of stacked photos.
  -a | --align          Generate control points (default no).
  -h | --help           Outputs help documentation.
 Deprecated options (have no effect when using cpfind):
  -s | --size number    Downsize images until width and height is
                          smaller than number, default 1600
  -p | --points number  Number of generated control points between,
                          each pair, default: 25
  -n | --noransac       No ransac detection, useful for fisheye images
  -r | --refine         Refine the found control points using the
                          original images, delete unrefinable.


match-n-shift takes a list of image files and creates a hugin compatible project file (optionally containing control points linking the images together, though there are better ways of doing this).

As much information as possible is extracted from photo EXIF data.  So photo orientation, exposure, angle of view and white balance will all be initialised if possible.

An optional input file can be chosen with the --input option, this can be a simple list of photo filenames, or full paths, one per line:


..or a CSV file specifying "filename, yaw, pitch, roll" (in degrees):


..or optionally specify XYZ translation parameters as well:

  DSC_0001.JPG, 0, 20, 0, 0.5, 0.0, 1.0
  DSC_0002.JPG, 0, 20, 0, 1.4, 0.0, 1.0
  DSC_0003.JPG, 0, 20, 0, 2.3, 0.0, 1.0
  DSC_0004.JPG, 0, 20, 0, 3.2, 0.0, 1.0

If the roll field is ommitted then it will be set to zero or any value obtainable from EXIF data, similarly if the pitch field is ommitted then pitch will be set to zero.  So this should also work:



This program is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation; either version 2 of the License, or (at your option) any later version.

See Also



Bruno Postle - February 2008.


2013-07-22 perl v5.24.1 User Contributed Perl Documentation