Algorithmadvanced
Iterative back-projection super-resolution
Also called Irani-Peleg super-resolution.
Refine a high resolution estimate by simulating each low resolution frame and back-projecting the differences. With the mirrored PSF as kernel it is Landweber on the stacked frames.
- Time
- Θ(T K n m) worst · average · best
- Space
- Θ(n) extra
- Where
- K = the number of frames; T = the number of iterations; m = the number of nonzero PSF entries; n = the number of high resolution pixels
- Model
- Real RAM
- Properties
- deterministiciterativelinearneeds early stoppingneeds registration
- Evidence
- Proof sketchCode in 1 languages
- Origin
- Michal Irani, Shmuel Peleg, 1991
Iterative back-projection (IBP) is the method of Irani and Peleg (1991) for multi-frame super-resolution. It starts from a guess of the high resolution image. It simulates each low resolution frame from the guess: shift, blur, keep every -th pixel. It compares each simulated frame with the observed frame, spreads the difference back onto the high resolution grid with a back projection kernel, and adds the average of these corrections to the guess. With the mirrored PSF as the kernel, the update is for the stacked frame operator , which is the Landweber iteration with the step . So all the Landweber facts apply: convergence to the minimum norm least squares solution for a small enough step, a monotone error with exact data, and semi-convergence with noise. When the subpixel shifts cover every position of the high resolution grid once, the method is a deblurring filter with the factors , the same as in Van Cittert deconvolution in its Landweber form. The shifts must be known; in practice they come from image registration.
In plain words
You have several small, blurred photos of the same scene. Each one is taken from a slightly different position, by a fraction of a pixel. You want one large, sharp picture. Start with any large picture, for example a plain gray one. For each small photo, ask what the camera would have recorded if the scene were your large picture: move it, blur it, and take every second or third pixel. Compare this with the real photo. Where they differ, spread the difference back over the large picture, at the right position. Average the corrections from all photos, add them, and repeat. After many rounds, your large picture explains all photos. If the photos are noisy, stop earlier, because late rounds start to copy the noise.
The problem
The unknown is a high resolution (HR) signal or image with pixels on a periodic grid. Frame is
- is the motion. Here it is an integer shift on the HR grid, , so a shift of one HR pixel is a shift of of a low resolution (LR) pixel. In 2D, is a pair.
- is the blur: periodic convolution with the PSF , stored with its center at index . Its OTF is . The PSF includes the optics and the integration over the area of the sensor pixel.
- is the decimation by the factor : . A frame has pixels ( in 2D).
- is noise.
Stack the frames into with . The goal is an estimate of . The problem page explains when is determined by the frames.
The algorithm
puts each LR pixel at its place on the HR grid and fills the rest with zeros. is the back projection kernel, applied by periodic convolution. The default is the mirrored PSF .
IBP(y_1..y_K, s_1..s_K, h, p, L, beta, T, x0) ▷ default p = mirror of h, x0 = 0- 1
x ← x0 - 2
repeat T times - 3
g ← 0 - 4
for k = 1 .. K - 5
r_k ← y_k - D(h * W_k x) ▷ simulate frame k and compare - 6
g ← g + W_k^T (p * U r_k) ▷ back-project the residual - 7
x ← x + (beta / K) · g - 8
return x
Line L5 is the forward model of one frame. Line L6 zero-fills the residual, convolves it with and undoes the shift. Line L7 adds the average correction with the step . A common start is an average of the frames, interpolated to the HR grid; this changes only the start point.
Example
Take , , the PSF , , and the true signal . Two frames have the shifts and . The blurred signal is , so the frames are , its even samples, and , its odd samples. The shifts and cover both residues mod 2, so the frames together see every sample of the blurred signal.
The OTF is , which is , , , and for . With the mirrored PSF and , the step is , and the error at frequency is multiplied by in each step, at worst by . The iterates from :
| (rounded) | ||
|---|---|---|
| 1 | 3.5512 | |
| 2 | 2.7630 | |
| 5 | 1.6013 | |
| 10 | 0.7580 | |
| 20 | 0.2071 | |
| 50 | 0.0059 |
The error falls in every step, and after 100 steps it is below . The first iterate is , where is the interlaced data. With only the first frame (), the odd samples are never observed. The same iteration then converges, after 2000 steps, to , which fits the one frame exactly but has the error : more iterations cannot replace a missing shift.
Correctness
The full proof is in proofs/correctness.md. The main facts:
- Landweber form (theorem). With the mirrored PSF, , so the update is with . For and the iterates converge to the minimum norm least squares solution . With exact data the error never grows.
- Complete set of shifts (theorem). If the shifts take each residue mod exactly once (each pair of residues in 2D), then , so . The iterate is then the spectral filter of the interlaced data : the Landweber factor with .
- The kernel condition (theorem, for a complete set of shifts). For any kernel , the error at frequency is multiplied by in each step. The method converges for every if and only if at every . This is the frequency form of the condition on the back projection kernel that Irani and Peleg give. It fails for and a PSF whose OTF is negative somewhere: for the box of width 5 on 16 points, and the error grows by per step with .
- Identifiability (theorem). If a residue mod is missing, has a null space and no method recovers from the frames alone. If every residue is present and for all , is injective.
Proof: Iterative back-projection is Landweber for the stacked frame operator, and with a complete set of shifts it is a spectral filterfull
Setting. The high resolution signal has samples, with dividing (an image is the same with two indices, the 2D DFT and pairs of residues). Frame is with , where for an integer shift , is periodic convolution with a real PSF (center at index ), and for . puts at index and zeros elsewhere. is periodic convolution with a real back projection kernel . The iteration of lines L1 to L7, from , is
The DFT is , and .
Lemma 1 (adjoints). is the shift by , , and for the convolution with is . So with , .
Proof. is a permutation matrix, so its transpose is its inverse, the shift by . selects the rows of the identity, so puts the entries back at those rows. , so . Then .
Claim 1 (Landweber). Let be the stacked operator with the blocks and the stacked data. With , the iteration is , the Landweber iteration for with step . Hence for and , converges to the minimum norm least squares solution , the residual norm never grows, and for the error never grows.
Proof. By Lemma 1, . The convergence and monotonicity statements are the standard properties of Landweber. In the singular basis of (singular values ), from the iterate has the filter factors , which tend to for , and the components in the null space of stay . The error component along a right singular vector with is multiplied by in each step, so its modulus does not grow; the residual components are multiplied by the same factors.
The test compares the code with the dense Landweber iteration on the stacked matrix in rational arithmetic, and the two agree exactly.
Lemma 2 (complete set of shifts). Let , the diagonal mask that keeps the indices . Then keeps the indices with . So if the residues take each value of exactly times, .
Proof. . Summing over counts, for each , the frames with , which is .
Claim 2 (spectral filter). Let the residues take each value exactly once, so ( pairs in 2D). Then for any kernel the error for exact data satisfies
So for every if and only if at every frequency . With the factor is , and from
for every data (not only exact data), at each with .
Proof. , and are circulant, so they commute. With , the update of the error is by Lemma 2 with . In the Fourier basis is multiplication by . The factor tends to if and only if its modulus is below ; if it is or more at some , the error with only that frequency (and for a real signal) does not tend to . For general data and , and by Lemma 2, so the iteration is . By induction , and in the Fourier basis this is , whose geometric sum is the formula.
So with a complete set of shifts the multiframe problem is a deblurring problem on the high resolution grid, and the factors are the Landweber factors with . The kernel condition is the frequency form of the condition on the back projection kernel; it fails for and a PSF whose OTF is negative somewhere, as for the Van Cittert iteration.
Claim 3 (identifiability). If the residues of the shifts do not cover , has a nontrivial null space. If they cover it and for all , is injective.
Proof. If is singular, any with gives . Otherwise, let the residue be missing, let be the unit vector at index , and let . Since and commute, , which reads at the indices , where is . So . If the residues are covered, for a subset with each residue once, and is invertible when every .
A shift by a multiple of (a whole low resolution pixel) gives no new information. In the test, two frames with the shifts and for give the same data for two signals that differ at the odd indices, and the iterate from keeps those entries at .
Complexity
In the real-RAM model, one iteration costs, for each frame, one shift (), one direct periodic convolution with nonzero PSF entries (), the decimation, the zero fill, one convolution with (also entries for the mirrored PSF) and one shift. So one iteration costs , and iterations cost . With the FFT each convolution costs for a power of two. The extra space is for and , plus one frame for the residual.
The number of iterations follows the Landweber rules. With exact data and a complete set of shifts, the error at frequency falls like , so a relative error at that frequency takes about steps for small . With noise of level , is the regularization parameter; the discrepancy principle chooses it when is known.
Properties
- Linear in the data for fixed shifts and a fixed . The method has no noise model and does not keep the estimate nonnegative; the example has negative entries.
- With the mirrored PSF it is a gradient method for , so each step does not increase this sum for .
- The components of in the null space of stay at their values in . With they stay .
- The result depends on the registration. A wrong shift puts the residual of a frame at the wrong place, and the iteration then fits an inconsistent model.
Variants and improvements
- Other back projection kernels. Irani and Peleg allow a kernel different from the PSF; a sharper speeds up the high frequencies but must keep . Only the mirrored PSF makes the method a gradient method for general shifts.
- Regularized forms. Add or the gradient of a smoothness term to the step. This is gradient descent on the Tikhonov or a total variation objective, and the iteration then needs no early stopping. Elad and Feuer (1997) put the multiframe problem in the maximum likelihood, MAP and projection onto convex sets frameworks.
- Robust data term. Farsiu, Robinson, Elad and Milanfar (2004) replace the squared residual by its L1 norm. For pure translation the L1 fit of the stacked frames is a pixelwise median on the HR grid (robust shift-and-add), and the L2 fit is the pixelwise mean, followed by deblurring. This makes the method robust to outliers and registration errors.
- Faster solvers. The same least squares problem can be solved by CGLS on the stacked operator, which needs far fewer iterations than Landweber.
- Projection onto constraints. Clip to after each step, which is projected Landweber.
When to use it
Use IBP when you have several registered frames of a static scene with subpixel shifts, a known PSF and moderate noise, and you want a simple method that is easy to check. It is a good baseline and a teaching example of the forward model . For pure translations and many frames, shift-and-add followed by deblurring is cheaper and gives the same least squares answer. For astronomical data with flux to keep and bad pixels, use drizzle. For noisy data use a regularized form, and for few iterations use CGLS.
Pitfalls
- Missing shifts. Frames whose shifts are equal mod add no new samples. A shift by a whole LR pixel is useless for resolution.
- Wrong registration. Errors of a fraction of an HR pixel blur the result, and outliers in the motion estimate create ghosts. Register on the frames with a method that reaches subpixel accuracy.
- A kernel that breaks the condition. With the method is the Van Cittert iteration on the HR grid and diverges where the OTF is negative, as for a box pixel integration with a large fill factor.
- Too large a step. above makes the iteration diverge. With and and a complete set of shifts, , so any works.
- Semi-convergence. With noise, the error first falls and then rises. Without a known noise level, any stopping rule is a heuristic.
- Boundaries. Real frames are not periodic. The periodic model gives ringing at the border unless you pad the HR grid.
Implementations
Each implementation follows the pseudocode above. A comment @line links a line of code to a line of the pseudocode. Point at a line of the pseudocode to see the matching code. The build runs the native tests of each language.
# SPDX-License-Identifier: MIT
# Part of https://algorithm.tamnd.com/iterative-back-projection-super-resolution/. The authors are listed in prov/KACAK6.jsonl.
"""Iterative back-projection (Irani-Peleg) super-resolution.
The high resolution (HR) unknown x is a signal of length n or an image of
n1 x n2 pixels. Frame k is y_k = D B W_k x: W_k is an integer shift of the HR
grid, (W_k x)_j = x_{(j + s_k) mod n}; B is periodic convolution with the PSF
h (center at index 0); D keeps every L-th sample, (D v)_j = v_{j L}. So a
frame has n / L samples (n1 / L x n2 / L for an image). The update is
x <- x + (beta / K) sum_k W_k^T (p * U (y_k - D B W_k x)),
with U = D^T (zero fill) and p the back projection kernel. With p = mirror(h)
it is the Landweber iteration for the stacked operator A = (D B W_k)_k with
the step omega = beta / K. Works with float and with fractions.Fraction values.
"""
def _is_image(x):
return bool(x) and isinstance(x[0], (list, tuple))
def _conv1(x, h):
n = len(x)
nz = [(j, v) for j, v in enumerate(h) if v != 0]
return [sum(v * x[(i - j) % n] for j, v in nz) for i in range(n)]
def _conv2(x, h):
n1, n2 = len(x), len(x[0])
nz = [(p, q, h[p][q]) for p in range(len(h)) for q in range(len(h[0])) if h[p][q] != 0]
return [[sum(v * x[(i - p) % n1][(j - q) % n2] for p, q, v in nz) for j in range(n2)] for i in range(n1)]
def blur(x, h):
"""The periodic convolution h * x (signal or image), kernel centered at index 0."""
return _conv2(x, h) if _is_image(x) else _conv1(x, h)
def mirror(h):
"""The kernel h(-r), so that blur(., mirror(h)) is the adjoint of blur(., h) for real h."""
if _is_image(h):
n1, n2 = len(h), len(h[0])
return [[h[(-i) % n1][(-j) % n2] for j in range(n2)] for i in range(n1)]
n = len(h)
return [h[(-j) % n] for j in range(n)]
def warp(x, s):
"""(W x)_j = x_{(j + s) mod n}; s is an int for a signal and a pair for an image."""
if _is_image(x):
n1, n2 = len(x), len(x[0])
a, b = s
return [[x[(i + a) % n1][(j + b) % n2] for j in range(n2)] for i in range(n1)]
n = len(x)
return [x[(j + s) % n] for j in range(n)]
def warp_adjoint(x, s):
"""W^T, the shift by -s."""
if _is_image(x):
return warp(x, (-s[0], -s[1]))
return warp(x, -s)
def decimate(x, factor):
"""D: keep the samples with index j L (rows and columns i L, j L for an image)."""
if _is_image(x):
return [row[::factor] for row in x[::factor]]
return x[::factor]
def upsample(y, factor):
"""U = D^T: put y_j at index j L and zeros elsewhere."""
if _is_image(y):
n2 = len(y[0]) * factor
zero = 0 * y[0][0]
out = []
for row in y:
full = [zero] * n2
full[::factor] = row
out.append(full)
out.extend([zero] * n2 for _ in range(factor - 1))
return out
zero = 0 * y[0]
out = [zero] * (len(y) * factor)
out[::factor] = y
return out
def forward(x, shift, h, factor):
"""Simulate one low resolution frame: D B W_k x."""
return decimate(blur(warp(x, shift), h), factor)
def back_project(r, shift, p, factor):
"""W_k^T (p * U r): spread a low resolution residual back onto the HR grid."""
return warp_adjoint(blur(upsample(r, factor), p), shift)
def _sub(a, b):
if _is_image(a):
return [[u - v for u, v in zip(ra, rb)] for ra, rb in zip(a, b)]
return [u - v for u, v in zip(a, b)]
def _axpy(x, c, g):
if _is_image(x):
return [[u + c * v for u, v in zip(ra, rb)] for ra, rb in zip(x, g)]
return [u + c * v for u, v in zip(x, g)]
def _zeros_like(x):
if _is_image(x):
return [[0 * v for v in row] for row in x]
return [0 * v for v in x]
def hr_zeros(frames, factor):
"""The zero HR signal or image for frames decimated by factor."""
return _zeros_like(upsample(frames[0], factor))
def ibp(frames, shifts, h, factor, p=None, beta=1, iters=10, x0=None, callback=None):
"""Run iters steps of iterative back-projection.
frames[k] is y_k and shifts[k] is s_k. p is the back projection kernel
(default mirror(h), which gives Landweber). The step is beta / K.
callback(t, x) is called after step t, if given. Returns the last x.
"""
if p is None:
p = mirror(h)
big_k = len(frames)
x = hr_zeros(frames, factor) if x0 is None else x0 # @line L1
for t in range(iters): # @line L2
g = _zeros_like(x) # @line L3
for y, s in zip(frames, shifts): # @line L4
r = _sub(y, forward(x, s, h, factor)) # @line L5
g = _axpy(g, 1, back_project(r, s, p, factor)) # @line L6
x = _axpy(x, beta / big_k, g) # @line L7
if callback is not None:
callback(t + 1, x)
return x # @line L8
def shift_and_add(frames, shifts, factor):
"""sum_k W_k^T U y_k divided by the number of frames that hit each HR pixel (0 where none)."""
acc = hr_zeros(frames, factor)
hits = hr_zeros(frames, factor)
for y, s in zip(frames, shifts):
acc = _axpy(acc, 1, warp_adjoint(upsample(y, factor), s))
ones = [[1] * len(y[0]) for _ in y] if _is_image(y) else [1] * len(y)
hits = _axpy(hits, 1, warp_adjoint(upsample(ones, factor), s))
if _is_image(acc):
return [[a / c if c else a for a, c in zip(ra, rc)] for ra, rc in zip(acc, hits)]
return [a / c if c else a for a, c in zip(acc, hits)]
def residual_norm2(x, frames, shifts, h, factor):
"""sum_k ||y_k - D B W_k x||^2."""
total = 0
for y, s in zip(frames, shifts):
r = _sub(y, forward(x, s, h, factor))
vals = [v for row in r for v in row] if _is_image(r) else r
total += sum(abs(v) ** 2 for v in vals)
return total
def covers_all_residues(shifts, factor):
"""True when the shifts take every residue mod L (every pair of residues for an image)."""
if shifts and isinstance(shifts[0], (list, tuple)):
got = {(a % factor, b % factor) for a, b in shifts}
return len(got) == factor * factor
return len({s % factor for s in shifts}) == factor
test_iterative_back_projection_super_resolution.py 183 lines
# SPDX-License-Identifier: MIT
# Part of https://algorithm.tamnd.com/iterative-back-projection-super-resolution/. The authors are listed in prov/KACAK6.jsonl.
import cmath
import math
import random
from fractions import Fraction as F
from iterative_back_projection_super_resolution import (
back_project,
covers_all_residues,
forward,
ibp,
mirror,
residual_norm2,
shift_and_add,
)
def dft(x):
n = len(x)
return [sum(x[j] * cmath.exp(-2j * math.pi * j * k / n) for j in range(n)) for k in range(n)]
def norm(v):
if v and isinstance(v[0], list):
v = [t for row in v for t in row]
return math.sqrt(sum(abs(t) ** 2 for t in v))
def sub(a, b):
if a and isinstance(a[0], list):
return [[p - q for p, q in zip(ra, rb)] for ra, rb in zip(a, b)]
return [p - q for p, q in zip(a, b)]
def psf(n, taps):
h = [0] * n
for d, v in taps.items():
h[d % n] += v
return h
def frames_of(x, shifts, h, factor):
return [forward(x, s, h, factor) for s in shifts]
def test_back_projection_is_the_adjoint_for_the_mirrored_kernel():
rng = random.Random(1)
n, factor = 12, 3
h = [rng.random() for _ in range(n)]
for s in (0, 1, 5, 11):
x = [rng.gauss(0, 1) for _ in range(n)]
r = [rng.gauss(0, 1) for _ in range(n // factor)]
ax = forward(x, s, h, factor)
lhs = sum(a * b for a, b in zip(ax, r))
rhs = sum(a * b for a, b in zip(x, back_project(r, s, mirror(h), factor)))
assert abs(lhs - rhs) <= 1e-10 * norm(ax) * norm(r)
h2 = [[rng.random() for _ in range(6)] for _ in range(6)]
for s in ((0, 0), (1, 4), (5, 3)):
x = [[rng.gauss(0, 1) for _ in range(6)] for _ in range(6)]
r = [[rng.gauss(0, 1) for _ in range(3)] for _ in range(3)]
ax = forward(x, s, h2, 2)
lhs = sum(a * b for ra, rb in zip(ax, r) for a, b in zip(ra, rb))
bp = back_project(r, s, mirror(h2), 2)
rhs = sum(a * b for ra, rb in zip(x, bp) for a, b in zip(ra, rb))
assert abs(lhs - rhs) <= 1e-10 * norm(ax) * norm(r)
def test_equals_landweber_on_the_stacked_matrix_exactly():
rng = random.Random(2)
for _ in range(3):
n, factor = 6, 2
raw = [rng.randint(0, 3) for _ in range(n)]
raw[0] += 2
h = [F(v, sum(raw)) for v in raw]
shifts = rng.sample(range(n), 3)
rows = []
for s in shifts:
cols = [forward([F(int(i == j)) for i in range(n)], s, h, factor) for j in range(n)]
rows.extend([cols[j][r] for j in range(n)] for r in range(n // factor))
y = [F(rng.randint(-4, 4)) for _ in rows]
frames = [y[k * (n // factor):(k + 1) * (n // factor)] for k in range(len(shifts))]
beta = F(rng.randint(1, 3), 2)
omega = beta / len(shifts)
iters = rng.randint(1, 4)
x = [F(0)] * n
for _ in range(iters):
res = [yi - sum(a * b for a, b in zip(row, x)) for yi, row in zip(y, rows)]
x = [x[j] + omega * sum(rows[i][j] * res[i] for i in range(len(rows))) for j in range(n)]
assert ibp(frames, shifts, h, factor, beta=beta, iters=iters) == x
def test_filter_factors_with_a_complete_set_of_shifts():
# With every residue mod L once, A^T A = B^T B, so the iterate is a spectral
# filter of z = sum_k W_k^T U y_k with factors 1 - (1 - omega |H_q|^2)^T.
rng = random.Random(3)
n, factor = 12, 3
h = psf(n, {0: 0.5, 1: 0.2, -1: 0.2, 2: 0.05, -2: 0.05})
shifts = [5, 1, 9]
assert covers_all_residues(shifts, factor)
y = [[rng.gauss(0, 1) for _ in range(n // factor)] for _ in shifts]
beta, iters = 2.5, 7
omega = beta / len(shifts)
xq = dft(ibp(y, shifts, h, factor, beta=beta, iters=iters))
zq = dft(shift_and_add(y, shifts, factor))
hq = dft(h)
for q in range(n):
f = 1 - (1 - omega * abs(hq[q]) ** 2) ** iters
expect = f * zq[q] / hq[q]
assert abs(xq[q] - expect) <= 1e-9 * (1 + abs(expect))
def test_exact_data_converges_and_the_error_never_grows():
n, factor = 16, 2
h = psf(n, {0: F(2, 3), 1: F(1, 6), -1: F(1, 6)})
hf = [float(v) for v in h]
rng = random.Random(4)
xt = [rng.choice([0.0, 0.0, 1.0, 4.0]) for _ in range(n)]
shifts = [0, 1]
y = frames_of(xt, shifts, hf, factor)
errs = []
ibp(y, shifts, hf, factor, beta=2.0, iters=220, callback=lambda t, x: errs.append(norm(sub(x, xt))))
for a, b in zip(errs, errs[1:]):
assert b <= a * (1 + 1e-12)
assert errs[-1] < 1e-8 * norm(xt)
def test_delta_blur_and_a_complete_set_is_solved_in_one_step():
rng = random.Random(5)
n, factor = 9, 3
delta = [F(1)] + [F(0)] * (n - 1)
xt = [F(rng.randint(0, 9)) for _ in range(n)]
shifts = [0, 4, 8]
y = frames_of(xt, shifts, delta, factor)
assert shift_and_add(y, shifts, factor) == xt
assert ibp(y, shifts, delta, factor, beta=3, iters=1) == xt
def test_one_residue_twice_is_not_identifiable():
n, factor = 8, 2
delta = [F(1)] + [F(0)] * (n - 1)
shifts = [0, 2]
assert not covers_all_residues(shifts, factor)
xt = [F(v) for v in (1, 2, 3, 4, 5, 6, 7, 8)]
other = [v + (5 if j % 2 else 0) for j, v in enumerate(xt)]
assert frames_of(xt, shifts, delta, factor) == frames_of(other, shifts, delta, factor)
x = ibp(frames_of(xt, shifts, delta, factor), shifts, delta, factor, beta=1, iters=5)
assert all(x[j] == 0 for j in range(1, n, 2))
assert residual_norm2(x, frames_of(xt, shifts, delta, factor), shifts, delta, factor) == 0
def test_the_kernel_condition_decides_convergence():
# Box of width 5 on 16 points: H_4 = -1/5. With a complete set of shifts and
# beta = K the error at frequency q is multiplied by 1 - P_q H_q.
n, factor = 16, 2
h = psf(n, {d: 0.2 for d in range(-2, 3)})
delta = [1.0] + [0.0] * (n - 1)
shifts = [0, 1]
xt = [math.cos(2 * math.pi * 4 * j / n) for j in range(n)]
y = frames_of(xt, shifts, h, factor)
e10 = norm(sub(ibp(y, shifts, h, factor, p=delta, beta=2.0, iters=10), xt))
e20 = norm(sub(ibp(y, shifts, h, factor, p=delta, beta=2.0, iters=20), xt))
assert abs(e20 / e10 - 1.2 ** 10) < 1e-6 * 1.2 ** 10
errs = [norm(sub(ibp(y, shifts, h, factor, beta=2.0, iters=k), xt)) for k in (0, 5, 10, 30)]
for a, b in zip(errs, errs[1:]):
assert b <= a * (1 + 1e-12)
assert errs[-1] < 0.5 * errs[0]
def test_two_dimensional_frames():
n, factor = 8, 2
w = {0: 0.8, 1: 0.1, n - 1: 0.1}
h = [[w.get(i, 0.0) * w.get(j, 0.0) for j in range(n)] for i in range(n)]
rng = random.Random(6)
xt = [[rng.choice([0.0, 1.0, 2.0]) for _ in range(n)] for _ in range(n)]
shifts = [(0, 0), (0, 1), (1, 0), (1, 1)]
assert covers_all_residues(shifts, factor)
y = frames_of(xt, shifts, h, factor)
x = ibp(y, shifts, h, factor, beta=4.0, iters=150)
assert norm(sub(x, xt)) < 1e-7 * norm(xt)
# Three of the four shifts leave a quarter of the HR pixels unseen.
assert not covers_all_residues(shifts[:3], factor)
History
Irani and Peleg (1991) built an HR image from several LR frames of a scene. They first registered the frames, then improved the estimate by iterative back-projection of the simulation errors. The name recalls the back projection of computed tomography. Their 1993 paper combined it with motion analysis to handle occlusion and transparency. Elad and Feuer (1997) wrote the general model with warp, blur and decimation in matrix form and solved it by maximum likelihood, MAP and projection onto convex sets, which showed that IBP is one member of a family of least squares methods. Farsiu, Robinson, Elad and Milanfar (2004) made the method robust with an L1 data term.
References
- Michal Irani and Shmuel Peleg, Improving resolution by image registration, CVGIP: Graphical Models and Image Processing 53(3), 1991, 231 to 239, the iterative back-projection update and the choice of the back projection kernel
- Michal Irani and Shmuel Peleg, Motion analysis for image enhancement: resolution, occlusion, and transparency, Journal of Visual Communication and Image Representation 4(4), 1993, 324 to 335, the back-projection method with motion analysis, and its convergence condition on the back projection kernel (general locator)
- Michael Elad and Arie Feuer, Restoration of a single superresolution image from several blurred, noisy, and undersampled measured images, IEEE Transactions on Image Processing 6(12), 1997, 1646 to 1658, the model with warp, blur and decimation for each frame, and the maximum likelihood, MAP and POCS solutions
- Sina Farsiu, M. Dirk Robinson, Michael Elad and Peyman Milanfar, Fast and robust multiframe super resolution, IEEE Transactions on Image Processing 13(10), 2004, 1327 to 1344, the robust L1 data term, shift-and-add for pure translation, and the comparison with earlier methods
About this page
The build computes these levels from the evidence in the repository. Each row says what the next level needs. Read what the levels mean.
| Ladder | Level | What the next level needs |
|---|---|---|
| Human proof | H1 sketch |
|
| Lean | L0 no Lean part |
|
| Code (python) | I0 not checked yet |
|
| Visual | V0 none |
|
| Writing | W2 basic |
|
Tag KACAK6 Edit this page History Report an error Markdown