Deconvolution is a common technique in digital image (signal) processing that aims to restore an original image from one that was distorted by various factors such as diffraction, motion blur, and noise. By attempting to reverse or minimize these effects, deconvolution can enhance image clarity or remove unwanted effects. The process of deconvolution, detailed below, involves the estimation of the PSF, and typically a technique to mitigate noise.
Goal of deconvolution: Given a captured image such as one provided from the JWST, can we estimate a PSF which will approximate the original image?
Given g(x,y), we want to approximate h(x,y) such that the deconvolution results in the original image f(x,y).
Let f' be the recovered image, note that f and f' may be different, since f, the original image may never be known.
Take the Fourier transform, solve for F', then compute the inverse Fourier transform to get f'.
While this is good in theory, most signals in the real world have some component of noise, which can be amplified by the deconvolution process. Luckily, there already exist several filters which are designed to account for this. One of such is the Wiener deconvolution process. Here, the original result is multiplied by a special term which contains the noise to signal ratio, defined as the power of noise divided by the power of the signal. Admittedly, we do not know the power of noise and power of the signal at any particular value, but we know if the noise is high at a particular value, or the PSF is small for a particular value, attenuation occurs. Since the NSR is unknown, in Weiner deconvolution, we use a constant, λ.
[13]
Admittedly, we do not know the power of noise and power of the signal at any particular value, but we know if the noise is high at a particular value, or the PSF is small for a particular value, attenuation occurs. Since the NSR is unknown, in Weiner deconvolution, we use a constant, λ. Thus, the final equation is:
PSF is an acronym for point spread function. The PSF is a function which attempts to describe the distortion of, in our case, the optical system of the JWST. It can be thought of as the response of an optical system to a point source or impulse. The difficulty in the generation of PSF's lies in the fact that (1): the PSF may not be linear, and (2): an optical system may have different PSF's at different focal and spacial locations. Unfortunately, in the case of a nonlinear PSF, the system properties we know such as causality and shift invariance may not apply. Couple that with the fact that the Webb has different imaging systems that have different optical properties and we see the difficulty in the generation of the PSF.
Captured by JWST and uploaded on July 11, 2022. The size of Webb's view in this image is as if you held a grain of sand up at the sky at arms length!
Here, we used Weiner deconvolution with a Gaussian PSF and λ = 0.1. An interesting result, the Gaussian PSF was not an effective description of the diffraction pattern, and as a result the difference in the images is negligable.
The Prewitt PSF is a horizontal edge-emphasizing filter which approximates a vertical gradient. We performed Weiner deconvolution using the Prewitt PSF and experimented with varying the value of λ and observing the effect.
With a large value of λ, the Prewitt filter was rather aggressive, removing almost all of the light from the original image. It did remove the diffraction pattern, but also removed most of the color from the entire star. With a large NSR, at small values of the PSF, the entire function is attenuated, which is why much of the image is dark.
The middle-ground value for λ, where the tradeoff can be observed. We viewed this to be the best image resulting from the Prewitt PSF. With this NSR, minimal blurring occurs while still removing the majority of the diffraction pattern. However, the image is still much darker than the original, suggesting power loss and incapability of the Prewitt PSF to define the diffraction pattern.
A smaller value of λ resulted in better color contrast, but appeared to add blur to the image, and some elements of the diffraction pattern were not removed. With a smaller NSR, less attenuation occurred due to the inversely proportional relationship of the NSR with the Fourier transform of the original image, F'.
Visual representation of a 17x17 matrix where the black represents a 0 and the white represents a normalized value.
Visual representation of a 17x17 matrix, inverted from the original. Black represents a 0, white represents a normalized value.
We experimented with varying the size of the PSF, and the value of λ. The deconvolution did not work as well as expected, it appears as though additional artifacts were created and it did not remove the diffraction pattern as intended
The image appears to be more blurred, and additional square shaped artifacts were generated. Again, the diffraction pattern was not removed, but appeared to be slightly altered.
We decided to size down the PSF's to 7x7 and continue to experiment, drawing inspiration from established PSF's with known effects such as the Prewitt PSF, which has horizontal edge detecting capabilities. We rationalized that the overall shape of the first iterations of the custom PSF's could be effective, however we needed to continue to experiment and tune the parameters. We found that the 'inverted' version of our original idea was the most effective.
Normalized values where the top 3 rows are negative.
Normalized values where the bottom 3 rows are negative.
Normalized values where the right 3 columns are negative.
Here, we can see the effect of the PSF with seemingly vertical stretching or warping of many of the smaller stars. The vertical spikes of the diffraction pattern actually appeared to be duplicated.
After experimentation with NSR using the above PSF, this was our best result. The diffraction pattern was nearly completely removed for the vertical and horizontal spikes, and had minimal overall image blurring.
Again, we can observe the effects of this PSF, there now appears to be stretching or warping in the horizontal direction for many of the smaller stars. The diffraction pattern in the horizontal was dimmed slightly, but duplicated. Additionally, the diffraction pattern in the vertical was slightly diminished. The angled diffraction pattern spikes appear to be unaffected.