320 lines
13 KiB
HTML
320 lines
13 KiB
HTML
<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
|
|
<html>
|
|
<head>
|
|
<title>ALE User Manual: Alignment</title>
|
|
<style type="text/css">
|
|
TABLE.ba { max-width: 678; text-align: center; padding-bottom: 15; padding-top: 5}
|
|
TABLE.inline { padding-right: 300; clear: left}
|
|
TD.text_table {padding-left: 2; padding-right: 2; border-width: 1}
|
|
H2 {clear: left}
|
|
P {max-width: none; padding-right: 300; clear: left}
|
|
BLOCKQUOTE {padding-right: 400 }
|
|
LI {max-width: 640; clear: left}
|
|
P.footer {max-width: none; width: auto; padding-left: 0}
|
|
P.header {max-width: none; width: auto; padding-left: 0}
|
|
HR.main {max-width: 640; clear: left; padding-left: 0; margin-left: 0}
|
|
HR.footer {clear: both}
|
|
</style>
|
|
|
|
</head>
|
|
<body>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
<table align=right valign=top width=160>
|
|
<td valign=top height=600 width=160>
|
|
<a href="http://auricle.dyndns.org/ALE/">
|
|
<big>ALE</big>
|
|
<br>
|
|
Image Processing Software
|
|
<br>
|
|
<br>
|
|
<small>Deblurring, Anti-aliasing, and Superresolution.</small></a>
|
|
<br><br>
|
|
<big>
|
|
Local Operation
|
|
</big>
|
|
<hr>
|
|
localhost<br>
|
|
2684415918<br>
|
|
</table>
|
|
|
|
|
|
|
|
|
|
<p><b>[ <a href="../">Up</a> ]</b></p>
|
|
<h1>Alignment</h1>
|
|
|
|
<p>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.
|
|
|
|
<p>This manual page offers an overview of alignment options; linked from this
|
|
page is a sub-page offering more detail on <a href="file/">transformation
|
|
data files</a>.
|
|
|
|
<h2>Transformations</h2>
|
|
|
|
<p>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).
|
|
|
|
<p>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.
|
|
|
|
<h3>Transformation Class Options</h3>
|
|
|
|
<pre>
|
|
--translation Only adjust the position of images
|
|
--euclidean Adjust the position and orientation of images [default]
|
|
--projective Use projective transformations. Best quality, but slow.
|
|
</pre>
|
|
|
|
For more information on barrel distortion correction, see the sub-page on
|
|
<a href="file/">transformation data files</a>.
|
|
|
|
<h3>Transformation data file options</h3>
|
|
|
|
<p>Transformations used in alignment can be loaded from, or saved to, a <a
|
|
href="file/">transformation data file</a>. 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.
|
|
|
|
<pre>
|
|
--trans-load=x Load initial transformation settings from file x
|
|
--trans-save=x Save final transformation data in file x
|
|
</pre>
|
|
|
|
<h3>Alignment following</h3>
|
|
|
|
<p>The --follow option hints that frames tend to be more closely aligned with
|
|
adjacent frames in the sequence than with the original frame. This hint can be
|
|
useful even when initial alignment information is loaded from a file.
|
|
|
|
<pre>
|
|
--identity Frames align closely with the original frame. [default]
|
|
--follow Frames align closely with their immediate predecessor.
|
|
</pre>
|
|
|
|
<h2>Match statistics</h2>
|
|
|
|
<p>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%.
|
|
|
|
<h3>Match threshold</h3>
|
|
|
|
<p>A match threshold can be specified; no images with final match statistics
|
|
falling below this threshold will contribute to the final output.
|
|
|
|
<pre>
|
|
--threshold=x Min. match threshold; a perfect match is 100. (0 is default)
|
|
</pre>
|
|
|
|
<h3>Alignment failure</h3>
|
|
|
|
<p>When an image fails to meet the match threshold, a transformation is still
|
|
assigned to the frame (e.g., for writing to a <a href="file/">transformation
|
|
data file</a>). The assigned transformation can be either the optimal
|
|
alignment found (this is default) or the default transformation.
|
|
|
|
<pre>
|
|
--fail-optimal Frames beneath threshold are aligned optimally. [default]
|
|
--fail-default Frames beneath threshold keep their default alignment.
|
|
</pre>
|
|
|
|
<h3>Alignment error metric exponent</h3>
|
|
|
|
<p>The function calculated at each pixel to determine the match statistic is called
|
|
the alignment error metric, and is of the form <i>(a-b)<sup>x</sup></i>.
|
|
The value <i>x</i> is called the error metric exponent, and is 2 by default.
|
|
Larger numbers indicate that alignment will be more influenced by smaller
|
|
image features.
|
|
|
|
<pre>
|
|
--metric=x Set the alignment error metric exponent. (2 is default)
|
|
</pre>
|
|
|
|
<h3>Alignment Channel Options</h3>
|
|
|
|
<p>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.
|
|
|
|
<pre>
|
|
--align-all Align images using all color channels
|
|
--align-green Align images using the green channel
|
|
--align-sum Align images using a sum of channels [default]
|
|
</pre>
|
|
|
|
<h3>Monte Carlo Alignment</h3>
|
|
|
|
<p>Aligning large images can take a very long time if all pixels are examined in
|
|
determining the match statistic, so it is often desirable to examine a smaller
|
|
subset of pixels. The Monte Carlo alignment option allows this. The number of
|
|
pixels used is specified as a percentage, and smaller numbers usually mean
|
|
faster, but less precise, alignment. For defaults, see the <a href="../defaults/">
|
|
default settings</a> page.
|
|
|
|
<pre>
|
|
--mc <x> Align using, on average, x% of available pixels (0 < x < 100)
|
|
--no-mc Align using all pixels.
|
|
</pre>
|
|
|
|
<h3>Alignment weight map</h3>
|
|
|
|
<p>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 <a
|
|
href="../exclusion/">exclusion regions</a>.
|
|
|
|
<pre>
|
|
--wm <f> <x> <y> Use weight map image <f> at offset (<x>, <y>)
|
|
</pre>
|
|
|
|
<h3>Frequency weighting</h3>
|
|
|
|
<p>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.</p>
|
|
|
|
<pre>
|
|
--fl <h> <v> <a> High-pass filters: horizontal <h>, vertical <v>, average <a>.
|
|
--flshow <o> Write high-pass filtered data to file <o>.
|
|
</pre>
|
|
|
|
<h3>Algorithmic weighting</h3>
|
|
|
|
<p>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.</p>
|
|
|
|
<pre>
|
|
--wmx <e> <r> <d> Write reference <r>, definition <d>, execute `<e> <f> <d>`,
|
|
read weights <r> back.
|
|
</pre>
|
|
|
|
<h2>Perturbation</h2>
|
|
|
|
<p>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.
|
|
|
|
<h3>Perturbation bounds</h3>
|
|
|
|
<p>These options determine the upper and lower bounds for perturbation size. The
|
|
perturb-upper and perturb-lower bounds apply to rotation (in degrees),
|
|
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 (0.7.1-patch1 and later). The rot-upper bound disables rotational
|
|
perturbation above a certain perturbation size (in degrees). To disable
|
|
alignment, set perturb-upper to zero.
|
|
|
|
<pre>
|
|
--perturb-upper=x Perturbation upper bound in pixels/degrees (14% is default) [0.7.1, and earlier, default to 32.0]
|
|
('x%' uses a fraction of the smallest image dimension.) [0.7.1-patch1 and later]
|
|
--perturb-lower=x Perturbation lower bound in pixels/degrees (.125 is default)
|
|
('x%' uses a fraction of the smallest image dimension.) [0.7.1-patch1 and later]
|
|
--rot-upper=x Rotation-specific perturbation upper bound (32.0 is default)
|
|
</pre>
|
|
|
|
<h3>Barrel/pincushion distortion adjustment multiplier and rate</h3>
|
|
|
|
<p>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.
|
|
|
|
<pre>
|
|
--bda-mult=x Barrel distortion adjustment multiplier (0.0001 is default)
|
|
--bda-rate=x Barrel distortion rate of change maximum (0.0004 is default)
|
|
</pre>
|
|
|
|
<h3>Level of detail</h3>
|
|
|
|
<p>Alignment at large perturbation sizes is usually carried out on
|
|
reduced-detail images. To disable this, set lod-max to
|
|
log<sub>2</sub>(perturb-upper).
|
|
|
|
<pre>
|
|
--lod-max=x LOD scale factor is max(1, (2^floor(x))/perturb) (1 is def.)
|
|
</pre>
|
|
|
|
<h3>Perturbation Types (experimental; 0.7.1-patch1 and later)</h3>
|
|
|
|
<p>Perturbations are normally performed in output image coordinates. To perform
|
|
perturbations in source image coordinates, specify <code>--perturb-source</code>.
|
|
|
|
<pre>
|
|
--perturb-output Apply perturbations in output image coordinates. [default] [0.7.1-patch1 and later]
|
|
--perturb-source Apply perturbations in source image coordinates. [0.7.1-patch1 and later]
|
|
</pre>
|
|
|
|
<h3>Global Searching (experimental; 0.7.0-patch1 and later)</h3>
|
|
|
|
<p>In cases where important image features do not have sufficient overlap using
|
|
default alignment parameters (determined by <code>--identity</code> and
|
|
<code>--follow</code>), a number of translations can be applied to the default
|
|
parameters in order to find a new alignment starting point. Since this process
|
|
searches the entire region of the alignment reference image, it is called a
|
|
global (as opposed to local) search. To avoid misalignment, a minimum overlap
|
|
area can be specified [0.7.1-patch2 and later].
|
|
|
|
<pre>
|
|
--gs <type> Set global search to <type>, one of: [0.7.0-patch1 and later]
|
|
local Local alignment only [default]
|
|
inner Alignment reference image inner region
|
|
outer Alignment reference image outer region
|
|
all Union of inner and outer
|
|
central inner if below threshold or better; else, outer.
|
|
|
|
--gs-mo <x> Set <x> pixel min. overlap for global search. (16 is default) [0.7.1-patch2 and later]
|
|
</pre>
|
|
|
|
<br>
|
|
<hr>
|
|
<i>Copyright 2003, 2004 <a href="mailto:dhilvert@auricle.dyndns.org">David Hilvert</a></i>
|
|
<p>Verbatim copying and distribution of this entire article is permitted in any medium, provided this notice is preserved.
|
|
|
|
|
|
</body>
|
|
</html>
|