Wednesday, September 16, 2009

Activity 18. Noise Model and Basic Image Restoration

An image with 3 different levels of grayscale values was processed using Scilab. Different kinds of noise were introduced to the image. The PDF of the original image and the image with noise was generated. The original image and the image with noise are shown in Figure 1. It can be seen that the amount of distortion in the image varies with the kind of noise introduced to the original image.



Figure1. Original image and images with different noise(from the left: Original, Exponential, Gamma, Gaussian, Salt and Pepper, Uniform Function and Rayleigh)

The PDF of the original image and the images with noise is shown in Figure 2. The PDF exhibits 3 peaks due to the different gray levels of the selected image.


Figure2. PDF of the original image and images with Noise((from the left: Original, Gaussian, Gamma, Exponential, Salt and Pepper and Uniform Function)


The image with noise was then enhanced using different filters. The image with gaussian noise were then subjected to different filters. The resulting images are shown in Figure 3.


Figure3. Enhanced images using different filters(Arithmetic, Contraharmonic, Geometric and Harmonic Mean Filter)
For the image with exponential noise:

Figure4. Enhanced images using different filters(Arithmetic, Contraharmonic, Geometric and Harmonic Mean Filter)

For the image with gamma noise:


Figure5. Enhanced images using different filters(Arithmetic, Contraharmonic, Geometric and Harmonic Mean Filter)


For the image with salt and pepper noise:

Figure6. Enhanced images using different filters(Arithmetic, Contraharmonic, Geometric and Harmonic Mean Filter)

For the image with uniform noise:

Figure7. Enhanced images using different filters(Arithmetic, Contraharmonic, Geometric and Harmonic Mean Filter)


For the image with Rayleigh noise:

Figure8. Enhanced images using different filters(Arithmetic, Contraharmonic, Geometric and Harmonic Mean Filter)


A grayscale image was then selected. The selected image were then subjected with different kinds of noise. The resulting images are shown in figure 9.



Figure9. Original image and images with different noise(from the left: Original, Exponential, Gamma, Gaussian, Salt and Pepper, Uniform Function and Rayleigh)

The generated images with noises were then subjected to different filters. For the image with gaussian noise:


Figure10. Enhanced images using different filters(Arithmetic, Contraharmonic, Geometric and Harmonic Mean Filter)

For the image with Gamma noise:

Figure11. Enhanced images using different filters(Arithmetic, Contraharmonic, Geometric and Harmonic Mean Filter)
For the image with Rayleigh noise:
Figure12. Enhanced images using different filters(Arithmetic, Contraharmonic, Geometric and Harmonic Mean Filter)
For the image with Salt and Pepper noise:
Figure13. Enhanced images using different filters(Arithmetic, Contraharmonic, Geometric and Harmonic Mean Filter)
For the image with Exponential noise:
Figure14. Enhanced images using different filters(Arithmetic, Contraharmonic, Geometric and Harmonic Mean Filter)
For the image with Uniform noise:
Figure15. Enhanced images using different filters(Arithmetic, Contraharmonic, Geometric and Harmonic Mean Filter)


In summary, different kinds of noise were introduced to a selected image. The images with noise were generated using some Scilab functions. Built-in filters in Scilab were then used to enhanced the noise containing image. From the generated filtered images, it was observed that there is no universal filter that can produce the best image for all kinds of noises. A certain filter is suited for a certain noise.

I will grade myself 10/10 for completing this activity.

***Earl helped a lot in formulating the Scilab code used in this activity.

No comments:

Post a Comment