ALE
Image Processing Software
Deblurring, Anti-aliasing, and Superresolution.
Local Operation

localhost
5393119533

[ Up ]

# ALE Rendering Chains

In cases of spatially non-uniform resolution, rendering chains can maintain low aliasing in poorly-resolved regions while preserving detail in well-resolved regions. Each chain is based on a sequence of rendering invariants, each allowing first, last, average, minimum, or maximum pixel values to be rendered. For a given invariant, exclusion regions are honored by default, but can optionally be ignored. Finally, for a given invariant, resolution can be limited to the minimum of the input and output images, to prevent aliasing, or can use the full resolution of the output image, to prevent loss of fine details.

## Parameters

Parameters for rendering chain or rendering invariant r are as follows:

> r(n, n', i, j, i', j', E0, ..., En, G, P0, ..., Pn, B0, ..., Bn, d0, ..., dn)

> Parameter

> Description

> n |  | the number of images contributing to output
> n' |  | the current image index
> (i, j) |  | the output pixel position
> (i', j') |  | the pixel position in the current image
> Ex |  | linear exposure adjustment for image x
> G |  | gamma correction
> Px |  | projective transformation for image x
> Bx |  | barrel distortion for image x
> dx |  | image x

Parameters for scaled sampling filter with exclusion (SSFE) e are as follows:

> e(n', i, j, i', j', E, G, P, B, d)

> Parameter

> Description

> n' |  | the current image index
> (i, j) |  | the output pixel position
> (i', j') |  | the input pixel position
> E |  | linear exposure adjustment
> G |  | gamma correction
> P |  | projective transformation
> B |  | barrel distortion
> d |  | image

Parameters for scaled sampling filter (SSF) s are as follows:

> s(i, j, i', j', P, B, k)

> Parameter

> Description

> (i, j) |  | the output pixel position
> (i', j') |  | the input pixel position
> P |  | projective transformation
> B |  | barrel distortion
> k |  | certainty values

Parameters for sampling filter f are as follows:

> f(p)

> Parameter

> Description

> p |  | position offset p = (i, j)

## Chains

A chain c is based on a sequence of rendering invariants v1, v2, ..., vmax. For each vx, define wx:

> wx(n, i, j, E0, ..., En, G, P0, ..., Pn, B0, ..., Bn, d0, ..., dn) = ∑n'∈0..n ∑(i', j')∈Dom[dn'] vx(n, n', i, j, i', j', E0, ..., En, G, P0, ..., Pn, B0, ..., Bn, d0, ..., dn)

If wt is the weight threshold (ALE option 'wt'), and there exists a smallest x such that:

> wx(n, i, j, E0, ..., En, G, P0, ..., Pn, B0, ..., Bn, d0, ..., dn) ≥ wt

Then c gives:

> c(n, n', i, j, i', j', E0, ..., En, G, P0, ..., Pn, B0, ..., Bn, d0, ..., dn) = vx(n, n', i, j, i', j', E0, ..., En, G, P0, ..., Pn, B0, ..., Bn, d0, ..., dn) / wx(n, i, j, E0, ..., En, G, P0, ..., Pn, B0, ..., Bn, d0, ..., dn)

Otherwise, c gives:

> c(n, n', i, j, i', j', E0, ..., En, G, P0, ..., Pn, B0, ..., Bn, d0, ..., dn) = vmax(n, n', i, j, i', j', E0, ..., En, G, P0, ..., Pn, B0, ..., Bn, d0, ..., dn) / wmax(n, i, j, E0, ..., En, G, P0, ..., Pn, B0, ..., Bn, d0, ..., dn)

If both of the expressions above are undefined, then c gives:

> c(n, n', i, j, i', j', E0, ..., En, G, P0, ..., Pn, B0, ..., Bn, d0, ..., dn) = 0

## Invariants

There are five types of rendering invariants, all of which are parameterized with a scaled sampling filter with exclusion, denoted here by the symbol e. In particular, an invariant can be of initial, final, maximal, minimal, or average type.

### Initial

If an invariant v is of initial type, then choose the smallest m such that the following expression is non-zero:

> ∑(i',j')∈Dom[dm] e(m, i, j, i', j', Em, G, Pm, Bm, dm)

If such an m can be chosen, then, using the C trinary if-else operator to express condition:

> v(n, n', i, j, i', j', E0, ..., En, G, P0, ..., Pn, B0, ..., Bn, d0, ..., dn) = (n' == m) ? e(m, i, j, i', j', Em, G, Pm, Bm, dm) : 0

Otherwise:

> v(n, n', i, j, i', j', E0, ..., En, G, P0, ..., Pn, B0, ..., Bn, d0, ..., dn) = 0

### Final

If an invariant v is of final type, then choose the largest m such that the following expression is non-zero:

> ∑(i',j')∈Dom[dm] e(m, i, j, i', j', Em, G, Pm, Bm, dm)

If such an m can be chosen, then, using the C trinary if-else operator to express condition:

> v(n, n', i, j, i', j', E0, ..., En, G, P0, ..., Pn, B0, ..., Bn, d0, ..., dn) = (n' == m) ? e(m, i, j, i', j', Em, G, Pm, Bm, dm) : 0

Otherwise:

> v(n, n', i, j, i', j', E0, ..., En, G, P0, ..., Pn, B0, ..., Bn, d0, ..., dn) = 0

### Minimal

If an invariant v is of minimal type, then choose m such that the following expression is defined and minimal:

> ∑(i',j')∈Dom[dm] Em-1G-1dm(i',j') * e(m, i, j, i', j', Em, G, Pm, Bm, dm) / ∑(i',j')∈Dom[dm] e(m, i, j, i', j', Em, G, Pm, Bm, dm)

If such an m can be chosen, then, using the C trinary if-else operator to express condition:

> v(n, n', i, j, i', j', E0, ..., En, G, P0, ..., Pn, B0, ..., Bn, d0, ..., dn) = (n' == m) ? e(m, i, j, i', j', Em, G, Pm, Bm, dm) : 0

Otherwise:

> v(n, n', i, j, i', j', E0, ..., En, G, P0, ..., Pn, B0, ..., Bn, d0, ..., dn) = 0

### Maximal

If an invariant v is of maximal type, then choose m such that the following expression is defined and maximal:

> ∑(i',j')∈Dom[dm] Em-1G-1dm(i',j') * e(m, i, j, i', j', Em, G, Pm, Bm, dm) / ∑(i',j')∈Dom[dm] e(m, i, j, i', j', Em, G, Pm, Bm, dm)

If such an m can be chosen, then, using the C trinary if-else operator to express condition:

> v(n, n', i, j, i', j', E0, ..., En, G, P0, ..., Pn, B0, ..., Bn, d0, ..., dn) = (n' == m) ? e(m, i, j, i', j', Em, G, Pm, Bm, dm) : 0

Otherwise:

> v(n, n', i, j, i', j', E0, ..., En, G, P0, ..., Pn, B0, ..., Bn, d0, ..., dn) = 0

### Average

If an invariant v is of average type, then:

> v(n, n', i, j, i', j', E0, ..., En, G, P0, ..., Pn, B0, ..., Bn, d0, ..., dn) = e(n', i, j, i', j', En', G, Pn', Bn', dn')

## Scaled Sampling Filter with Exclusion (SSFE)

A scaled sampling filter with exclusion e is parameterized with a scaled sampling filter s, and can be of two types: it can either honor exclusion regions or not. Define is_exclude(n', i, j) to be false if point (i, j) is not excluded for frame n', or if exclusion regions are not being honored. Then, using the C trinary if-else operator to express condition:

> e(n', i, j, i', j', E, G, P, B, d) = is_exclude(n', i, j) ? 0 : s(i, j, i', j', P, B, κG-1E-1d)

Where κ is the operator for certainty.

## Scaled Sampling Filter (SSF)

Define bayer(i, j) to be a function that returns an RGB value whose channels are either zero or one, depending on whether that color is sampled at (i, j).

A scaled sampling filter s is parameterized with a sampling filter f, and can be one of two types: fine or coarse. If it is fine, then, using P and B as functions:

> s(i, j, i', j', P, B, k) = bayer(i', j') * k(i', j') * f(B(P(i', j')) - (i, j))

If SSF s is coarse, then color channels are handled separately, depending on their density relative to the output image, at point (i, j) in the output image. In particular, bayer patterns can cause some colors to be more dense than others. If the local density of channel h is lower in each dimension than the density of channel h in the output image, then:

> [s(i, j, i', j', P, B, k)]h = [bayer(i', j') * k(i', j') * f((i', j') - P-1(B-1(i, j)))]h

Otherwise, if channel h is locally less dense by a factor d in exactly one dimension of the input image, then set d_pair equal to (1, d) or (d, 1), according to the dimension, and:

> [s(i, j, i', j', P, B, k)]h = [bayer(i', j') * k(i', j') * f(d_pair * (B(P(i', j')) - (i, j)))]h

Otherwise, channel h is locally at least as dense in both dimensions of the input image as it is dense in the output image. In this case:

> [s(i, j, i', j', P, B, k)]h = [bayer(i', j') * k(i', j') * f(B(P(i', j')) - (i, j))]h

## Sampling Filter

Sampling filters can be one of the following:

Type

Description

sinc |  | Sinc filter: (sin πx) / (πx)
lanc:<x> |  | Lanczos, diameter x.
triangle:<x> |  | Triangle, diameter x.
box:<x> |  | Box, diameter x.
zero |  | Zero function
<f>*<f> |  | Pointwise multiplication (windowing)

Copyright 2002, 2003, 2004 David Hilvert

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