Image Restoration

#### Image restoration principle

If everything was perfect (perfect optics - perfect seeing - perfect telescope tracking) the image from a star would be a single pixel on the CCD, like this:

In fact, because of all imperfections, the observed star image is spread over several pixels. This is known as the Point Spread Function (PSF). A star image, together with the star luminosity function along horizontal axis typically looks like this:

The transform between the expected image (the single pixel) and the observed image (the PSF) being known, one could expect that applying the invert transform would result in a perfectly restored image. This is not true because of the noise in the image, which will be strongly emphasized by the invert transform. Taking an analogy in the audio field, suppose you make a tape recording with treble control at minimum. When replaying the tape, if you attempt to "restore" it by setting the treble control at maximum, you will get hiss from the tape.

This is why iterative restoration algorithms have been developped. At each pass, they tend to ameliorate the PSF towards a single pixel. When the best compromise between image detail enhancement and noise has been reached, the iterations should be stopped.

Two image restoration algorithms are widely used in astronomy: Lucy-Richardson and Maximum Entropy.

Lucy-Richardson is a linear algorithm, in the sense that it equally restores high and low luminosity portions of the image.

Maximum Entropy first restores the high luminosity portions of the image  then, on successive passes, the low luminosity portions. On deep sky images, this means that bright stars are first restored then the core details of the object.

The following experiments use non-astronomical images. A reference image is used with an added single pixel "perfect" star. This image is "deteriorated" in several ways, which transforms the perfect star into a PSF. Then, using the PSF, attempts are done to restore the image.

#### Image 1

This is our test reference image.
It has some texture (the wall) some patterns (the roses, no flowers yet...), some vertical and horizontal lines.
An artificial "perfect" single star was added as a single pixel on a dark background. The X and Y profiles of the "star" are shown on the right.

#### Image 2

Our first experiment is to blurr Image 1 through a gaussian convolution filter. Now the star profile looks much like a real astronomy picture, with a FWHM (full width at half maximum) of 4 pixels.

#### Image 3

This is Image 2 restored using Lucy-Richardson algorithm. Vertical and horizontal lines are much sharper, however, the wall texture is incorrectly restored. This is known as an artefact. Star profile is back to a FWHM of 1.

#### Image 4

This is Image 2 restored using Maximum Entropy algorithm. This image is very close to the reference Image 1.

#### Image 5

Our next experiment is to simulate telescope tracking error. Now our reference image 1 is blurred, but more in the horizontal direction.

#### Image 6

This is Image 5 restored using Lucy-Richardson algorithm. Interestingly, this is a better result than Image 3, with very little artefact. The horizontal motion blurr is nearly fully corrected as shown by the star profile.

#### Image 7

This is Image 5 restored using Maximum Entropy. Obviously, this algorithm is weak in compensating for motion blurr.

#### Image 8

The last experiment is to restore noisy images.
Astronomy CCD images exhibit random noise. A significant part of this noise can be removed by dark frame subtraction and averaging several shots, but some noise always remain, especially on faint objects. This image is the same blurred image as Image 2, but with some strong noise added.

#### Image 9

This is Image 8 restored by Lucy-Richardson algorithm. The noise is also restored, which produces strong artefacts on the wall texture.

#### Image 10

This is Image 8 restored by Maximum Entropy. Here also the noise strongly influences the restoration process.

#### Conclusion

Image restoration can be a powerfull tool to restore image reality if used properly. The big enemy to a good restoration is random image noise. With astronomy images, noise can be reduced by longer exposures, dark frame subtraction, lower CCD temperature and averaging of multiple exposures.

Low noise images which exhibit some blurr due to optic limitations and/or poor seeing can be efficiently restored using Maximum Entropy.

Low noise images with poor guiding can be efficiently restored by using Lucy-Richardson deconvolution.