ALE
Image Processing Software

Deblurring, Anti-aliasing, and Superresolution.


Local Operation
localhost
5393119533

[ Up | Monte Carlo ]

Error

Error calculations are used to determine whether a transformation is "good" or not, and in particular, whether one transformation is better or worse than another. A smaller error indicates a better transformation, from the perspective of the alignment algorithm.

ALE defines an error value for each pixel of the alignment reference image, and also comprehensive error, which summarizes the error over all pixels.

Pre-Alignment Exposure Registration

When exposure registration is enabled, ALE performs an exposure registration step prior to alignment. The result of this step is dependent on the initial alignment (this can be either the default initial alignment or an alignment loaded from a transformation data file). See the source for more details.

Per-Pixel Error

The per-pixel error for pixel (i, j) in the alignment reference image A, frame B, and transformation T, is:

p(i, j, A, B, T) = Abs( A(i, j) - B(T_inverse(i, j)) )metric_exponent

where Abs() is the absolute value function and B(T_inverse(i, j)) is determined by bilinear interpolation (unless a different interpolant is specified using --afilter). If not specified by the --metric option, metric_exponent defaults to 2.

For coordinates where B(T_inverse(i, j)) is not defined, the error is zero. (Feedback from Angelo Pesce led to clarification of this point.)

In addition to per-pixel error, a per-pixel maximum error estimator is calculated, as follows:

p_max(i, j, A, B, T) = Max( A(i, j), B(T_inverse(i, j)) )metric_exponent

For coordinates where B(T_inverse(i, j)) is not defined, the maximum error estimator is zero. (Feedback from Angelo Pesce led to clarification of this point.)

Comprehensive Error

There are two varieties of comprehensive error used by ALE: exhaustive error (enabled by --no-mc) and Monte Carlo error (enabled by --mc). Whereas the exhaustive approach evaluates the error for each pixel in the alignment reference image, the Monte Carlo approach evaluates only a subset of pixels.

If we consider Sum[] to provide the sum over whatever subset of pixels we are sampling (including possibly the set of all pixels), then the comprehensive error function, for alignment reference image A, frame B, and transformation T, is:

E(A, B, T) = (Sum [ p(i, j, A, B, T) ] / Sum [ p_max(i, j, A, B, T) ])(1/metric_exponent)



Copyright 2002, 2003, 2004 David Hilvert

Verbatim copying and distribution of this entire article is permitted in any medium, provided this notice is preserved.