Greg's Hugin project file
description
Greg's diary
Photo index
Greg's home page
Network link stats
Greg's other links
Copyright information
Groogle
Work in progress
Work in progress

This page attempts to document the Hugin project file. The main source is the rather unexpectedly named http://hugin.sourceforge.net/docs/nona/nona.txt.

General format

The project file is in plain text with a mixture of lines and comments. There are some suggestions that not everything that looks like a comment (line starting with #) is in fact a comment. There's something in old messages (2011?) in the mailing list to suggest subtle differences.

Each line starts with a single letter from the set 'p','o', i', 'm' and 'k'. The stitcher requires one p line (panorma description), one i (image) line per input image, and one m line per input image.

p line

# w1000        width in pixels
# h600         height in pixels
# f0           projection format,
#                  0 - rectilinear (for printing and viewing)
#                  1 - Cylindrical (for Printing and QTVR)
#                  2 - Equirectangular ( for Spherical panos), default
#                  3 - full-frame fisheye
#                  4 - Stereographic
#                  5 - Mercator
#                  6 - Transverse Mercator
#                  7 - Sinusoidal
#                  8 - Lambert Cylindrical Equal Area
#                  9 - Lambert Equal Area Azimuthal
#                 10 - Albers Equal Area Conic
#                 11 - Miller Cylindrical
#                 12 - Panini
#                 13 - Architectural
#                 14 - Orthographic
#                 15 - Equisolid
#                 16 - Equirectangular Panini
#                 17 - Biplane
#                 18 - Triplane
#                 19 - Panini General
#                 20 - Thoby Projection
#                 21 - Hammer-Aitoff Projection
# v360         horizontal field of view of panorama (default 360)
# nPICT        Panorama file format, one of:
#                  PNG           png-format, 8 & 16 bit supported
#                  PNG_m         png-format, multi-file, one image per file
#                                  alpha layer with non-feathered clip mask at image border
#                  TIFF          tiff-format, all tiff types supported (8,16,32 bit int, float, double)
#                  TIFF_m        tiff-format, multi-file, one image per file
#                                  alpha layer with non-feathered clip mask at image border
#                  TIFF_multilayer  tiff-format, multi-image-file, all files in one image
#                                  alpha layer with non-feathered clip mask at image border
#                                  This filetype is supported by The GIMP
#                  JPEG          Panoramic image in jpeg-format.
#                  JPEG_m        jpeg-format, multi-file, one image per file
#                                  without alpha layer, not suitable for further blending or fusing
#               some more supported file formats (mostly only 8 bit support)
#                  PNM, PGM, BMP, SUN, VIFF
#
#              Special options for TIFF output:
#              n"TIFF c:NONE"
#                  c - select TIFF compression, possible options: NONE, LZW, DEFLATE
#
#              Special options for TIFF_m and TIFF_multilayer output:
#              n"TIFF c:NONE r:CROP"
#                  c - TIFF compression, possible options NONE, LZW, DEFLATE
#                  r - output only used image area (cropped output). The crop offsets
#                      are stored in the POSITIONX and POSITONY tiff tags
#                  p1 - save coordinate images (useful for further programs, like vignetting correction)
#
#              Special options for JPEG output:
#              n"JPEG q95"
#                  q - jpeg quality
#
# E12.3        exposure value for final panorama
# R1           stitching mode: 0: normal LDR mode, 1: HDR mode
# T"UINT8"     bitdepth of output images, possible values are
#               UINT8  -  8 bit unsigned
#               UINT16 - 16 bit unsigned
#               FLOAT  - 32 bit floating point
#              By default the bit depth of the input images is use.
#
# S100,600,100,800   Selection(left,right,top,bottom), Only pixels inside the rectangle
#                    will be rendered. Images that do not contain pixels in this area
#                    are not rendered/created.
#
# k1           Image number of reference image for photometric correction
#
# P"100 12"    Parameters for tuning projection, number of parameters depends on projection
#
p w1000 h600 f0 v360 E12.3

m (mode) line

# 'm'-line options
# ----------------
# Set mode for stitcher, not required
#
#
# g2.5         Set gamma value for internal computations (default 1.0)
#                  See <http://www.fh-furtwangen.de/~dersch/gamma/gamma.html>
#               This is especially useful in conjunction with the vignetting correction
#               by division
#
# i2           Set interpolator, See <http://www.fh-furtwangen.de/~dersch/interpolator/interpolator.html>
#                one of:
#                   0 - poly3 (default)
#                   1 - spline16,
#                   2 - spline36,
#                   3 - sinc256,
#                   4 - spline64,
#                   5 - bilinear,
#                   6 - nearest neighbor,
#                   7 - sinc1024
#
m i2

i line

i lines each describe a single input image.

# f0           projection format,
#                  0 - rectilinear (normal lenses)
#                  1 - Panoramic (Scanning cameras like Noblex)
#                  2 - Circular fisheye
#                  3 - full-frame fisheye
#                  4 - PSphere, equirectangular
#                  8 - orthographic fisheye
#                 10 - stereographic fisheye
#                 21 - Equisolid fisheye
#                 20 - Fisheye Thoby (Nikkor 10.5)
# v82          horizontal field of view of image (required)
# y0           yaw angle (required)
# p43          pitch angle (required)
# r0           roll angle (required)
# a,b,c        lens correction coefficients (optional)
#                  (see http://www.fh-furtwangen.de/~dersch/barrel/barrel.html)
# d,e          initial lens offset in pixels(defaults d0 e0, optional).
#                  Used to correct for offset from center of image
#                  d - horizontal offset,
#                  e - vertical offset
# g,t          initial lens shear.  Use to remove slight misalignment
#                  of the line scanner relative to the film transport
#                  g - horizontal shear
#                  t - vertical shear
#
# Eev          exposure of image in EV (exposure values)
# Er           white balance factor for red channel
# Eb           white balance factor for blue channel
#
# Vm           vignetting correction mode (default 0):
#                  0: no vignetting correction
#                  1: radial vignetting correction (see j,k,l,o options)
#                  2: flatfield vignetting correction (see p option)
#                  4: proportional correction: i_new = i / corr.
#                       This mode is recommended for use with linear data.
#                       If the input data is gamma corrected, try adding g2.2
#                       to the m line.
#
#                      default is additive correction: i_new = i + corr

#                    Both radial and flatfield correction can be combined with the
#                     proportional correction by adding 4.
#                 Examples: i1 - radial polynomial correction by addition.
#                                 The coefficients j,k,l,o must be specified.
#                           i5 - radial polynomial correction by division.
#                                 The coefficients j,k,l,o must be specified.
#                           i6 - flatfield correction by division.
#                                 The flatfield image should be specified with the p option
#
# Va,Vb,Vc,Vd  vignetting correction coefficients. (defaults: 1,0,0,0)
#               ( 0, 2, 4, 6 order polynomial coefficients):
#                corr = ( i + j*r^2 + k*r^4 + l*r^6), where r is the distance from the image center
#              The corrected pixel value is calculated with: i_new = i_old + corr
#              if additive correction is used (default)
#   for proportional correction (h5): i_new = i_old / corr;
#
# Vx,Vy        radial vignetting correction offset in pixels (defaults Vx0 Vy0, optional).
#                 Used to correct for offset from center of image
#                  Vx - horizontal offset
#                  Vy - vertical offset
#
# Vf           filename of flatfield image.
#               For additive correction the image will be used as it is.
#               In the case of correction by division, the flatfield will be divided by
#               its mean value.
#
# Ra,Rb,Rc,Rd,Re EMoR photometric model parameters. (defaults: 0,0,0,0,0)
#
# TrX,TrY,TrZ  mosaic mode translation offsets.
#
# Tpy, Tpp     orientation of remapping plane for translation offsets.
#                (have no effect if TrX, TrY and TrZ are zero)
#
# S100,600,100,800   Selection(l,r,t,b), Only pixels inside the rectangle will be used for conversion.
#                       Original image size is used for all image parameters
#                       (e.g. field-of-view) refer to the original image.
#                       Selection can be outside image dimension.
#                       The selection will be circular for circular fisheye images, and
#                       rectangular for all other projection formats
#
# j0           stack number
#
# nName        file name of the input image.

i f2 r0   p0    y0     v183    a0 b-0.1 c0  S100,600,100,800 n"photo1.jpg"
i f2 r0   p0    y180   v183    a0 b-0.1 c0  S100,600,100,800 n"photo1.jpg"

Greg's home page Greg's diary Greg's photos Copyright

Valid XHTML 1.0!

$Id: skel.php,v 1.7 2014/02/16 02:49:28 grog Exp $