# Identify the Type of Image Distortion (On Lena Image)

I want to understand the distortions in each of the lena images shown in the image below. I see that the first one is a blur. How can undo the blur. The second one is colored salt and pepper noise. This is different from the gray salt and pepper. How can remove that from the image. And for the last one, I don't know that kind of distortion is in that image.

1. Blur
If you want to reverse Blur applied on an image (Using Convolution, namely Linear Spatial Invariant Blur) you should use Deconvolution which, as name suggests, the inverse operation of Convolution.
Have a look at What Are the Types of Deconvolution, Sharpen Defocused Image (Deconvolution / Image Restoration), Deconvolution by Convolution and 1D Deconvolution with Gaussian Kernel (MATLAB).

2. Salt and Pepper Noise
Salt and Pepper noise is usually treated with Median Filter.
In the case of Color what you can do is either work on each channel on its own or generalize the cost function the Median minimizes to vectors (Namely minimize the ${L1}$ Norm of the neighborhood of RGB vectors.

3. Contrast
The last degradation seems to be some kind of contrast removal from the image.
In order to reverse is normalize the image into the range $[0, 1]$ (Black to White). You can do that by the following method:

• Find the Minimum Value of the image, lets' call it minVal.
• Find the Maximum Value of the image, let's call it maxVal.
• Set the output value of the $i, j$ pixel as following: mOuptutImage(i, j) = (mInputImage(i, j) - minVal) / (maxVal - minVal).