Alignment compares each supplemental frame in the sequence with an intermediate incremental rendering known as the alignment reference image. Based on this comparison, a transformation is assigned to the supplemental frame. Many different transformations can be assigned before alignment of the frame is complete.
This manual page offers an overview of alignment options; see also
The variables used to adjust alignment are called transformations; they map points from the source image coordinate system to a target coordinate system (the rendering coordinate system).
ALE supports three transformation classes -- translational, euclidean, and projective -- as well as barrel/pincushion distortion correction. The translational class applies only translations to the inputs, changing only the positions of images; the Euclidean class applies translations and rotations; and the projective class applies general projective transformations. Additionally, barrel/pincushion distortion correction can be applied to each frame. The Euclidean class is most appropriate for use with scanners, or as a first pass for projective transformations. The projective class and barrel/pincushion distortion correction are most appropriate for use with cameras. Except when capturing flat scenes, ALE does not correct perspective changes, so movement of cameras should ideally be constrained so that no large translations occur.
For more information on barrel distortion correction, see
Transformations used in alignment can be loaded from, or saved to, a
transformation data file.. This can be useful when performing alignment in
several passes, or when refining rendering options. A transformation data file
is required for barrel/pincushion distortion correction. For more information,
see
The --follow option hints that frames tend to be more closely aligned with adjacent frames in the sequence than with the original frame. --identity indicates that frames tend to closely align with the original frame. These hints can be useful even when initial alignment information is loaded from a file.
The match statistic indicates how well a transformed frame aligns with the alignment reference image; it is used to select or reject transformations during alignment. After alignment of a particular frame is complete, ALE displays the corresponding final match statistic. If the value is close to 100%, then the frames are well aligned; very low values can indicate misalignment; but even frames that are very well aligned typically do not achieve 100% alignment. For improving image quality, ALE works most effectively when match values are lower than 100%.
A match threshold can be specified; no images with final match statistics falling below this threshold will contribute to the final output.
When an image fails to meet the match threshold, a transformation is still assigned to the frame (e.g., for writing to a transformation data file). The assigned transformation can be either the optimal alignment found (this is default) or the default transformation.
The function calculated at each pixel to determine the match statistic is of the form (a-b)x. The exponent value x is 2 by default. Larger numbers give greater influence to smaller image features.
In calculating the per-pixel error metric, there are three ways in which ALE can handle color channels. By default, ALE adds the channels before calculating the match, but it can also be configured to rely solely on the green color channel, or to use all three channels separately.
As aligning large images can take a long time if all pixels are examined, it
is often desirable to examine a smaller subset of pixels. The Monte Carlo
alignment option samples a subset of pixels, specified as a percentage of the
total pixel count, with smaller numbers providing faster, but less precise,
alignment. For defaults, see
Typically, measured differences at each pixel in the alignment reference
image contribute equally to the match statistic. To weight pixels differently,
a weight map can be used. The scale of the map should correspond with that of
the alignment reference image, and if the upper-left corner of the map does not
coincide with the upper-left corner of the first frame in the sequence, then a
non-zero offset should be specified to indicate the difference. See also
If ALE is compiled with FFTW support, then a high-pass-filtered version of the alignment reference image can be used to weight reference image pixels' contributions to the match statistic. Frequency limiting can occur as a fraction of the highest horizontal frequency, the highest vertical frequency, or the highest average frequency. Limit values should range between 0 (pass all) and 1 (pass none). If any limit is assigned a value of 1, no alignment will occur, since all frequencies will have been excluded. An output file can optionally be specified for high-pass filtered data.
Certainty weighting causes contributions to alignment error to be weighted by certainty values.
This option writes the current alignment reference image and definition map to specified files, executes a specified program with these arguments, and then reads back alignment weights. This option requires POSIX libraries, and requires that ALE have been built with POSIX support enabled.
The perturbation size determines the magnitude by which alignment parameters are changed. The size is initially set to be large, allowing large changes in alignment to be evaluated, and is reduced as the locally optimal alignment is found for each size. When this size drops below a specified lower bound, the frame is considered to be aligned.
These options determine the upper and lower bounds for perturbation size. The perturb-upper and perturb-lower bounds apply to rotation (in arclength), translation (in pixels), and the movement of the boundaries of a projected frame (in pixels). By appending the '%' character, values may optionally be specified as a percentage of the number of pixels in the smallest image dimension. The rot-upper bound disables rotational perturbation above a certain perturbation size (in degrees). To disable alignment, set perturb-upper to zero.
When using barrel/pincushion distortion parameters, any frame-to-frame adjustments to these parameters are made in a manner dependent on the perturbation size. A multiplier, the barrel distortion adjustment multiplier, is used to determine the perturbation of these parameters, based on the generic perturbation size. Additionally, the frame-to-frame rate of change of each barrel distortion parameter can be limited to a specified maximum. To disable frame-to-frame adjustment of barrel/pincushion distortion parameters, set bda-mult to zero. Setting bda-rate to zero disables rate limitation.
Alignment at large perturbation sizes is usually carried out on reduced-detail images. To disable this, set lod-max to log2(perturb-upper).
Perturbations are normally performed in output image coordinates. To perform
perturbations in source image coordinates, specify
In cases where important image features do not have sufficient overlap using
default alignment parameters (determined by