Techniqueadvanced
Phase diversity
Also called phase diverse imaging.
Estimate an unknown wavefront aberration and the object together from two or more images that differ by a known aberration, such as a defocus.
Phase diversity is a technique to measure the unknown aberration of an imaging system from images of an unknown object. You record two or more images of the same object at the same time, and each one has an extra aberration that you add on purpose and know exactly, most often a defocus. One image alone cannot separate the object from the blur, because any blur can be explained by a suitable object. With several images, the object is the same in all of them, and only the aberration changes in a known way, so the unknown aberration is overdetermined. Gonsalves (1982) showed that for Gaussian noise the object can be eliminated in closed form, which leaves an error metric of the aberration alone. You minimize it over a few aberration parameters with a standard nonlinear optimizer, and then recover the object by a Wiener-type filter with the estimated point spread functions. It is used as a wavefront sensor and as a blind deconvolution method in which the PSF is constrained by optics.
In plain words
A blurred photo of an unknown scene does not tell you what is wrong with the lens: a sharp scene behind a bad lens and a soft scene behind a good lens can give the same photo. Now take a second photo of the same scene at the same time, through the same lens, but slightly out of focus by an amount you know. The scene is the same in both photos. Only the lens error changes, and it changes in a way you control. A wrong guess of the lens error now fails to explain the two photos together, even with the best scene for that guess. So you search for the lens error under which one scene explains both photos. That search also gives you the scene.
When it applies
- Incoherent imaging with a known pupil. The PSF of channel is , scaled to sum 1, where is the known pupil amplitude (the aperture), is the unknown phase aberration and is the known diversity phase. The optical transfer function is the DFT of , the normalized autocorrelation of the generalized pupil .
- The same object in every channel. The images are taken at the same time, for example by a beam splitter and two cameras at different focus, or the object does not change between exposures.
- The aberration is common to the channels. It is the same field angle and the same optics up to the known diversity. For a wide field, the aberration changes across the field, and you must work on patches.
- Shift-invariant blur on each patch, so that .
- The aberration has a few parameters, for example the coefficients of in a basis of smooth modes on the pupil. A phase value at each pupil sample is also possible but needs more data and a regularizer.
The template
On a periodic grid, write , and for the DFTs of , and . With Gaussian noise of equal variance in all channels, the maximum likelihood estimate minimizes . By Parseval this is , a separate least squares problem for at each frequency. Its minimizer is . Put it back, and times the minimum is
where a frequency with contributes . This is a theorem (a projection onto one complex dimension at each frequency). For two channels the Lagrange identity gives the form of Gonsalves,
The numerator says it directly: if , then . So with no noise the true aberration gives , its smallest value (a theorem). The object never has to be known.
PHASE-DIVERSITY(d_1..d_K, A, θ_1..θ_K, Z_1..Z_J, γ)- 1
D_k ← DFT(d_k) for every channel k - 2
a ← 0 ▷ or a start from another sensor - 3
repeat until L_M stops falling - 4
φ ← Σ_j a_j Z_j - 5
for every k: s_k ← |IDFT(A e^{i(φ + θ_k)})|², scaled to sum 1; S_k ← DFT(s_k) - 6
L_M(a) ← Σ_u [Σ_k |D_k|² - |Σ_k conj(S_k) D_k|² / (γ + Σ_k |S_k|²)] - 7
a ← one step of a quasi-Newton method on L_M(a) - 8
F ← Σ_k conj(S_k) D_k / (γ + Σ_k |S_k|²); return a, IDFT(F)
The weight is a Tikhonov term on the object. It keeps the division stable at frequencies where all OTFs are small, and with the metric is the minimum of over , by the same argument. Paxman, Schulz and Fienup (1992) gave the metric for any number of channels and the gradient of with respect to the parameters, which costs a few FFTs. Line L7 can then be L-BFGS or another gradient method. Finite differences also work for a few modes, at the cost of extra evaluations per step.
What cannot be measured. Three things are hidden for any data (theorems, each a short computation).
- Piston. A constant added to multiplies the field by and does not change any .
- Tilt. A linear phase shifts every PSF by the same vector , and a shift of the object by undoes it in all channels. So with an unknown object, the tilt is lost too. Remove both modes from the basis .
- The sign of the even part, with one image. Let . For a phase that is even, , the field is even, and the field for is . Both have the same intensity, so one image cannot tell from even when the object is known. A known even diversity breaks this, because of the fields for and differ in general. This is why defocus, an even mode, is the usual diversity.
Example. Take a pupil of three samples at with on a grid of points, and the even phase , a crude defocus of size . With the field is , and
This depends on only through , so and give the same PSF. Add the known diversity . The second PSF is , and . This is not zero when and , so the pair of PSFs fixes the sign of . The sum of over the grid is in all cases, so the scaling to sum 1 does not change the argument.
Classic examples
- Wavefront sensing for adaptive optics. Gonsalves proposed an in-focus and a defocused image of an extended scene as a wavefront sensor that needs no reference star and no extra optics beyond a beam splitter. Compare a slope sensor, whose data are inverted by zonal reconstruction.
- Solar telescopes. The Sun has no point source to use as a reference, but it has fine granulation. Phase diversity on short exposures estimates the aberrations of the telescope and the atmosphere together with the scene, and then restores it. With many frames through changing turbulence it becomes phase-diverse speckle imaging, a relative of speckle interferometry.
- Alignment of optics. Defocused images of a star, taken on purpose, give the aberrations of a telescope with a segmented or deformable mirror. When the object is a point, the problem is focus-diverse phase retrieval, and algorithms of the Gerchberg-Saxton type also apply.
- Calibration of microscopes and cameras. Images of a fixed sample at a few focus settings give the pupil phase, which then feeds a PSF model for deconvolution.
Variations
- More channels. The metric above holds for any . More channels with different diversities make the minimum better defined and reduce the effect of noise.
- Other noise models. For photon counting, Paxman, Schulz and Fienup derived the Poisson likelihood. The object no longer drops out in closed form, so it is estimated jointly with the aberration.
- Parameters. A few low-order modes, a phase value per pupil sample with a smoothness penalty, or the parameters of a deformable mirror. Amplitude errors of the pupil can be added in the same way.
- Other diversities. Any known change works in principle: a known astigmatism, a shift of the pupil, or a change of wavelength. Defocus is the most common because it is even and easy to make.
- Joint object priors. Positivity of the object, or a regularizer stronger than , when the object is estimated after the aberration.
Pitfalls
- Local minima. is not convex in the aberration. For aberrations of more than about a wave, start from a coarse estimate, fit low-order modes first, or start from several points. This is a heuristic, with no proof of a threshold.
- Wrong diversity. The method trusts the known diversity exactly. An error in the defocus distance moves into the estimate of the even modes. Calibrate the diversity, or fit its size as one more parameter.
- Sampling. The PSF is the squared modulus of the field, so its spectrum is twice as wide as the pupil. Embed the pupil in a grid at least twice its diameter, or the periodic model wraps the OTF around and the metric is wrong.
- Registration and gain. The channels must be aligned to a fraction of a pixel and scaled to the same flux. A relative shift between the cameras looks like a tilt difference, and a gain difference looks like a change of the PSF.
- Edges of the field. The periodic model assumes that the scene wraps around. On a patch of a larger scene, apodize the patch edges or the metric fits the edge jumps.
- Noise at high frequencies. With , frequencies where all OTFs are small add noise to the metric and to the object. Use , or limit the sum to frequencies inside the cutoff of the optics.
- Hidden modes. Piston and tilt are not observable, and a basis that contains them makes the problem singular.
Exercises
- Show that for fixed the minimizer of over the complex number is , and derive .
- Prove the Lagrange identity used for two channels, and show that when the data have no noise.
- In the example, compute the two PSFs for on a grid of points, and check that the pair for is different.
- Show that a linear phase in the pupil shifts the PSF, and explain why the tilt cannot be found when the object is unknown.
- Show that with one channel and an unknown object, every aberration whose OTF has no zeros fits the data exactly. What does a second channel add?
- With , derive the minimizing of and the corresponding metric.
References
- Gonsalves 1982, pages 829 to 832 (an in-focus and a defocused image, and the error metric in which the object is eliminated)
- Paxman, Schulz and Fienup 1992, pages 1072 to 1085 (the metric for any number of images under Gaussian noise, the Poisson case, and the gradients for the aberration parameters)
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 | H0 no proof |
|
| Lean | L0 no Lean part |
|
| Visual | V0 none |
|
| Writing | W3 standard |
|
Tag 3P3S66 Edit this page History Report an error Markdown