Skip to article frontmatterSkip to article content
Site not loading correctly?

This may be due to an incorrect BASE_URL configuration. See the MyST Documentation for reference.

  • Load the image 5.1.13. It will be called xx in the sequel.

  • Generate a circular PSF hh of radius 10 with skimage.morphology.disk.

  • Perform the convolution of xx by hh to obtain the image yy. To do this, use the function scipy.ndimage.convolve with the argument mode="wrap" so that the convolution is circular.

  • Apply the inverse filter on yy to get an estimate x^\widehat{x} of xx. What do you see?

  • Add a small noise to the blurred image, then apply the inverse filter again. What do you see?

  • Now replace the inverse filter with Wiener filter (skimage.restoration.wiener with argument clip=False).

  • Study the influence of the regularization parameter: first by observing the result obtained for some values, then by representing the evolution of a restoration quality measure (which one?) with respect to the values of the regularization parameter.

  • What is the optimal value of the regularization parameter? Do you agree that it is actually the best value when you look at the estimation?

  • Finally, can you conclude on the optimal choice of the regularization parameter, whatever the image?

Correction

The objectives of this exercise are:

  • know how to apply a specific degradation to an image

  • understand why naive deconvolution does not work

  • implement a Wiener filter

Original and noisy images

<Figure size 1080x720 with 2 Axes>

The “USAF 1951” resolution chart is a tool for measuring the resolution of optical instruments. It was designed by the U.S. Air Force. Its interest in image processing is to measure the resolution capacity of methods. Here, it is interesting because once blurred, it is difficult to count the lines and read the figures.

Inverse filter on the non-noisy image

<Figure size 1080x720 with 3 Axes>

In the absence of noise, the inverse filter works perfectly (except for a translation, due to the PSF size).

Inverse filter with noise

<Figure size 1080x720 with 3 Axes>

On the contrary, when the image is noisy (even slightly: here SNR equals 40 dB), the restoration is not at all acceptable!

Wiener filter with noise

Be careful, there is another wiener function (skimage.filters.wiener), but it is more tricky. Instead, use skimage.restoration.wiener, not forgetting to add clip=False.

<Figure size 1080x720 with 2 Axes>
<Figure size 1080x720 with 3 Axes>

These first results have been obtained for three values of λ\lambda. They show that in terms of MSE, there is a compromise to be made between denoising and deconvolution. If λ\lambda is too low, the restored image is deconvolved but remains very noisy; if λ\lambda is too large then the image remains blurry.

For a better analysis, we represent the MSE with respect to λ\lambda.

<Figure size 432x288 with 1 Axes>
The best restoration is obtained for lambda = 80 and gives MSE = 1327.96.
<Figure size 1080x720 with 1 Axes>

I find personally that this value of λ\lambda gives a less clear picture than for lower values of λ\lambda (as presented above). This shows that the MSE does not perfectly represent the perceived quality. But the perceived quality is subjective and depend on the desired objective, whereas MSE is an objective measure.

Finally, as for denoising methods, it is very difficult to set a priori the value of the parameter λ\lambda.