Salt and Pepper Noise: Effects and Removal

— Noises degrade image quality which causes information losing and unsatisfying visual effects. Salt and Pepper noise is one of the most popular noises that affect image quality. In RGB color image Salt and pepper noise changes the number of occurrences of colors combination depending on the noise ratio. Many methods have been proposed to eliminate Salt and Pepper noise from color image with minimum loss of information. In this paper we will investigate the effects of adding salt and pepper noise to RGB color image, the experimental noise ratio will be calculated and the color combination with maximum and minimum numbers of occurrence will be calculated and detected in RGB color image. In addition this paper proposed a methodology of salt and pepper noise elimination for color images using median filter providing the reconstruction of an image in order to accept result with minimum loss of information. The proposed methodology is to be implemented, tested and experimental results will be analyzed using the calculated values of RMSE and PSNR.


I. INTRODUCTION
Digital color image can be presented using deferent models.The most common model that used is RGB.In RGB color model colors described as a triple (Red, Green, and Blue).The RGB color space can be considered as a three-dimensional unit cube, in which each axis represents one of the primary colors [1,2,3].Figure 1 shows the RGB color model, where any color can be represented in three values.For example (0, 0, 255) stands for Blue color.

Salt-and-pepper noise
Salt-and-pepper noise is a sparsely occurring white and black pixels sometimes seen on images.Median filter or a morphological filter methods considered as a common reduction methods of this type noise of noise [4,5].
Image noise may be defined as any change in the image signal, caused by external disturbance.Digital images are often corrupted by impulse noise also known as Salt and Pepper noise due to transmission errors [10].Accordingly it is important to detect noisy pixels (using estimated calculations) and recover an efficient value for each, which known as image filters [6,9].The most commonly used filters are the Standard Median Filter (SMF), Adaptive Median Filter (AMF) [5], Decision Based Algorithm (DBA) [8], Progressive Switching Median Filter (PSMF) [12], and Detail preserving filter (DPF) [13].The filtering algorithm varies from one algorithm to another by the approximation accuracy for the noisy pixel from its surrounding pixels [6,9].Median Filter (MF) is used widely because of its effective noise suppression capability [7].Despite its main disadvantages of modifying both noisy and non-noisy pixels thus removing some fine details of the image.Image de-noising is the process of finding and recover unusual values in digital image, that represents unwanted information which spoils image quality.
The Salt & Pepper noise is generally caused by defect of camera sensor, software failure, or hardware failure in image capturing or transmission.Due to this situation, Salt & Pepper noise model, only a proportion of all the image pixels are corrupted whereas other pixels are non-noisy [12].A standard (1) 1.2 Median filtering Is a nonlinear method widely used to remove 'salt and pepper' type noise.The median filter works by moving through the image pixel by pixel, replacing each value with the median value of neighboring pixels within predefined window size.The median is calculated by first sorting all the pixel values from the window, and then replacing the pixel being considered with the middle (median) pixel value.Then the window slides, pixel by pixel over the entire image.
The following (Figure 2) example shows the application of a median filter to a simple 2 dimensional signal.A window size of 3x3 is used, with one entry immediately preceding and following each entry.
Where RMSE is the square root of the mean squared error for the entire image.PSNR is calculated using the first-captured image as the reference image, and the filtered image.The higher the PSNR value is the higher quality of noise reduction

II. SALT AND PEPPER NOISE EFFECTS
First part of this paper we will introduce an experimental method to investigate the affects a Salt and Pepper noise affecting RGB color image.The proposed method can implemented applying the following steps.
1. Acquire the source RGB image.2. Add Salt and Pepper noise to the image varying the noise ratio.3. Construct a RGB columns matrix by reshaping the color image.
4. Find the unique_colors combination by applying the Matlab function unique.5. Construct an array with accumulation to find the repetition of each color combination by applying the Matlab function accumarray.6. Find the color combination with maximum repetition.7. Find the color combination with minimum repetition.8. Detect the locations of the pixels with maximum repletion.9. Detect the locations of the pixels with minimum repletion.The program was implemented in deferent ways as follows: 1. First we create a black RGB color image with size (200x250x3).
Here we select deferent values of noise ratio associated with imnoise Matlab function; Table 1 shows the implementation results of this phase.Here the experimental noise ratio will be calculated as follows: Experimental noise ratio= Color combination with max occurrence/number of colors in the image.Number of colors in the image= 50000.Next figure shows the locations of the color combinations with minimum and maximum repletion.From the obtained results shown in Table 4 we can raise the following facts: 1. Median filter provides a high quality of salt and pepper noise reduction and elimination, because of the high values of PSNR and low values of RMSE. 2. Increasing noise ration leads to decreasing PSNR and increasing RMSE, thus reducing the quality of the median filter.

The relationship between PSNR and noise ratio is
closed to linear as shown in Figure 7. 4. The relationship between RMSE and noise ratio is also closed to linear relationship as shown in Figure 8.

The quality of median filter in noise reduction
decreased when the noise ratio increased.The second part of implementation was implemented taking deferent color images with deferent size fixing the noise ratio to 0.1.Table 5 shows the experimental results of this part: From the obtained results shown in table 5 we can see that there is no fixed relationship between PSNR and image size, RMSE and image size, and this quite correct due to the nature of salt and pepper noise and due to the steps 6m8m and 10

IV. CONCLUSIONS
The proposed method of investigation the effects of Salt and Pepper noise on RGB color image was implemented several times using deferent images and deferent values of noise ratio, and from the obtained results we can conclude the following facts:  The experimental calculated noise ratio is more accurate comparing with the noise ratio proposed in matlab. The experimental calculated noise ratio is very closed to the noise ratio proposed in Matlab. Varying the values of noise ratio leads to some changes in the number of color combinations.
 Varying the values of noise ratio leads to e change in the color combination of minimum repletion..  Varying the values of noise ratio leads to e change in the color combination of maximum repletion..  Using this method we can detect the locations of color combination with minimum repetition. Using this method we can detect the locations of color combination with maximum repetition.After using median filter to reduce salt and pepper noise was proposed, implemented and tested.It was shown that: • Median filter provides a high quality of salt and pepper noise reduction and elimination, because of the high values of PSNR and low values of RMSE.• Increasing noise ration leads to decreasing PSNR and increasing RMSE, thus reducing the quality of the median filter.• The relationship between PSNR and noise ratio is closed to linear relationship.• The relationship between RMSE and noise ratio is also closed to linear relationship.• The quality of median filter in noise reduction decreased when the noise ratio increased.There is no fixed relationship between PSNR and image size, RMSE and image size, and this quite correct due to the nature of salt and pepper noise.

Fig. 1 .
Fig. 1.RGB color model Noise encountered into RGB color image caused by images captured sensing devices and transmitted communication noises reduce the visual quality of an image.One of the common noises is Salt and Pepper noise.
maximum (255).The typical intensity value for pepper noise is close to 0 and for salt noise is close to 255.Furthermore, the unaffected pixels remain unchanged.

Fig 2 .
Fig 2. Median filter example 1.3 PSNR and RMSE PSNR uses a standard mathematical model to measure a quality of reducing noise from the image.It is commonly used in the development and analysis of compression algorithms, and for comparing visual quality between different compression systems.PSNR is calculated by the following formula: PSNR = 20*log10 (255 / RMSE) (2)

Fig 4 .
Fig 4. Relationship between number of color combinations and noise ratio

Fig. 5 .
Fig. 5. Locations of the color combinations with minimum and maximum repletion

Fig 8 .
Fig 8. Relationship between RMSE and noise ratio From the obtained results shown in Table1and Table2we can see that the experimental calculated noise ratio is closed to a theoretical one which is approved in Matlab, this is shown in Figure3.

TABLE IVV EXPERIMENTAL
RESULTS OF FIRST PART OF IMPLEMENTATION

TABLE V EXPERIMENTAL
RESULTS OF PHASE 2 OF IMPLEMENTATION