Fuzzy Salt and Pepper Noise Removing for Color Images

. Within the field of digital image processing applications, observed images frequently exposed to noise corruption stemming from image acquisition or transmission processes. This noise degradation reduces image quality and yields unfavorable outcomes in subsequent processing stages (e.g., segmentation, pattern recognition, and enhancement). Consequently, the mitigation of noise in images assumes paramount importance in the domain of image processing. This study introduces an algorithm centered around fuzzy logic for removing impulse noise from color images. The efficiency of the proposed algorithms is assessed by comparing their performance against various noise reduction methods. Objective metrics, namely peak signal-to-noise ratio and mean square error, substantiate that the proposed algorithms yield commendable outcomes in noise reduction and the preservation of intricate image details across a wide spectrum of noise densities.


INTRODUCTION
Noise often described as undesired signals contaminating informative signals which pervades diverse environments to varying extents.In the field of images, noise frequently disrupts their integrity, whether during image acquisition, transmission, or even reproduction.The elimination of noise from images stands as a pivotal undertaking within image processing, representing a significant hurdle to achieving effective outcomes.Impulse noise, characterized by transient 'on/off' noise pulses of relatively short duration, occupies a prominent role among the prevalent and consequential noise types encountered in digital images.It emerges during image acquisition due to factors such as noisy sensors (resulting from switching or sensor temperature fluctuations), or during transmission as a result of channel imperfections (interference, atmospheric disturbances).It can also manifest due to hardware issues like faulty memory locations, or synchronization errors like those stemming from analog-to-digital conversion during image processing [1][2][3][4][5][6].
The concept of fuzzy logic, introduced by Zadeh in 1965, constitutes a mathematical tool for grappling with uncertainty.It introduces a crucial paradigm of computing with words and furnishes an approach for handling imprecision and information granularity within the realm of soft computing.Fuzzy theory offers a means to represent linguistic constructs such as "many," "low," "large," "dark," "bright," and the like [7][8][9][10].

NOISE MODEL
Impulse noise consistently maintains its independence and lack of correlation with the image's constituent pixels, leading to a subset of pixels within the image being affected by noise, while the remaining pixels remain unaffected.The impulse noise model can be described as follows [9]: with probability 1 −  Where, (,) is the noisy image pixel, (,) is the noisy impulsive pixel at position (,), and (,) is the uncorrupted (original) image pixel.

PROPOSED WORK
The proposed methodology encompasses two principal stages.Firstly, the process entails fuzzy noise detection, aimed at identifying noisy pixels through the application of suitable fuzzy sets and rules.Notably, each distinct model of impulse noise undergoes distinct processing within this stage, contingent upon the outcome of the noise identification process.Secondly, the methodology comprises fuzzy noise filtering, designed to recover pixels classified as noisy during the noise detection phase.This stage leverages suitable fuzzy sets and rules to accomplish the restoration process.

A. Impulse Noise Detection
In numerous scenarios, filtering impulse noise without initially distinguishing between noisy and noise-free pixels often results in the distortion of edges and the overall blurring of the image.As a result, the process of impulse noise detection assumes a crucial role as a preliminary step preceding noise filtering.Specifically, impulse noise arises from bit errors during the data transfer process and is commonly characterized by its random and sparse corruption patterns The specific type of impulse noise being If G_xy^d<1) , then the window size will be increased by incrementing the value of K.This procedure is repeated until the condition (  ≥ addressed in this work is Salt and Pepper noise (SPN).In the case of SPN, noisy pixels adopt either the highest intensity value, denoted as Lmax (corresponding to a gray level of 255), or the minimum intensity value,  (representing a gray level of 0).This manifests as white and black spots on the images.Consequently, the value of n(x,y) in Equation ( 1) can take on either 255 or 0. The total noise density for salt and pepper noise, denoted as (P), is divided equally   = max(  ) between salt and pepper noise, resulting in a noise density of (P/2).It's important to note that at times salt 4. The membership function   is used to noise and pepper noise might have different noise densities, denoted as P1 and P2 respectively, and the total noise density will then be expressed as P = P1 + P2.
In the presence of Salt and Pepper noise, when an determine whether the value of   is small as given in the following equation: −  image is corrupted, a noisy pixel assumes one of the extreme values either 0 or 255.Consequently, a pixel possessing a value equal to 0 or 255 is deemed a suspected pixel.However, if a suspected pixel closely resembles its noise-free neighbors, it can be reclassified as a noise-free pixel.The assessment of pixel similarity is based on their absolute difference in grey value, which should be small but not zero.This distinction is important because if both pixels are noisy, their absolute difference could indeed be zero.The notion of "small" is characterized by a fuzzy set termed "Small Absolute Difference," whose membership function  is depicted in figure 1.The membership function   is determined by the two predetermined parameters  and .Where, a=10 and  = 22 based on [11].
The required steps for SPN detection are summarized as follows: Assume that (2 + 1) × (2 + 1) starting with ( = 1) is a neighborhood around a central pixel  0,   >  5.A fuzzy set called "Noise-Free" is used to determine whether the current pixel (, )can be considered as noise free and which of the membership function is derived as follows:

B. Impulse Noise Filtering
Impulse noise filtering for the proposed color images algorithm consists of two steps.The first step is the color components differences estimation and the second step is the noise removing (filtering).The filtering process will be applied for each color components pixel that has a membership degree less than one in the fuzzy set "Noise-Free" (i.e., for the red component   ( R (, )) < 1 i is considered as a noisy pixel).These steps will be described in details in the following two subsections.

Color Components Differences Estimation
The color components differences are used instead of the pixels intensities for restoring the corrupted pixel in each color component.However, the output of noise detection stage for each color component, which is represented by the membership (, ) at position (, ) of an image I.If the value of the central pixel in the considered window doesn't degree (   ) is used for estimating the color matches one of the salt and pepper values (i.e.(, ) ≠ 0 or 255 , it is considered as a noise free pixel.Otherwise, the following steps will be performed: 1. Counting the number of noise free pixel in the observed window by using the binary matrix M_SP in Eq. (3.2) and the following equation: The estimation of color components difference is described for the red-green difference only (i.e. RG matrix) but it is implemented in an analogous way for the red-blue difference and green-blue difference.For each element in  RG matrix, a fuzzy set "Valid" is derived by the following fuzzy rule: Fuzzy Rule 1: Defined when  RG (, ) is a valid difference: IF (  R (, ) is noise-free) AND (  G (, ) is noise-free) THEN (  RG (, ) is valid) When the membership degree   ( RG (, )) < 1 for a certain red-green difference at position (, ) , this means that the current difference is incorrect and can be estimated by the following steps: Step1: Assume a sliding window of size (2 + 1) × (2 + 1) centered at  RG (, ), and then the number of the valid differences in this window is counted as given in the following equation: Where u represents the number of elements in the Where, u represents the number of elements in the observed window.

Noise Removing
The noise removing step is demonstrated for the red component only (i.e.,  R ) but it is implemented in an analogous way for the other components.Hence, assume that  R (, ) is a noisy pixel considered window hence,  = (2 + 1) 2 and the index  varies from 1 to  to select one of the window (i.e. (R(, ) < 1 )) and  R (, ) is the elements.
− 2 corresponding pixel of the filtered red component, and then one of the following cases will be applied for   ( ) =  −( 2 )  restoring the noisy pixel as follows: Case1: Function   is depicted in figure 2.
It is obvious from figure 4 that the proposed color image algorithm obtains the best result in low and high noise densities due to the following main reasons: 1) Using adaptive window size in the noise detection stage and noise filtering stage depending on number of noise-free pixel in the observed window.2) Utilizing the correlation between the color components in the noise filtering stage.So, for restoring a certain noisy pixel   (, ) at position(, ), the corresponding pixels in the other components i.e., (   (, ) and   (, )) are used instead of the neighbors pixels for   (, ). 3) Using powerful fuzzy noise detection scheme.
Comparative results of the proposed method is decipted in Table 1.
Where,  R ( + ,  + ) represents the pixels values in the considered window of size (2 + 1) × (2 + 1).The size of observed window is selected adaptively according to the number of the noise free pixel in that window starting with  = 1 .If the observed window is fully noisy, then the size of window will be increased until the condition ( 2 > with related works using the "Butterfly" image.0) is met.

EXPERIMENTAL RESULT
In this section, the performance of the proposed algorithm is compared to the following noise reduction methods: VMF [12], HFC [13], and AWTMF [14].Additionally, the same proposed method is applied for gray image without performing the color differences step and this scenario is referred as proposed (gray) in this section.Table 1 shows the numerical results of objective quality measurements in terms of PSNR and MSE [15][16][17] for the "Butterfly" image (see figure 4) corrupted with 10%, 30% and 50% SPN.It is clear from table 1 that the proposed color image algorithm has a superior performance as compared with the other noise reduction methods and with the proposed gray scale image algorithm as well.Figure 3 shows the noise density effect on the performance of the proposed algorithm and the performances of the related works in term of PSNR.Additionally, figure 4 shows that the proposed algorithm is the best in the noise suppression and detail preservation.
The comparison chart in term of PSNR of the proposed color image algorithm is decipted in Figure 3.
Fig. 3: Comparison chart in term of PSNR of the proposed color image algorithm with related works using the "Butterfly" image corrupted with wide range of SPN (10% -60%).

CONCLUSION
In conclusion, this study presents several significant findings: Firstly, the effectiveness of employing fuzzy techniques for image noise reduction hinges on the precision of selecting appropriate fuzzy sets, the suitability of fuzzy rules, the meticulous determination of membership function boundaries, and a careful defuzzification process.Secondly, a pivotal determinant of the proposed algorithms' success lies in the dynamic adjustment of the window size during both noise detection and noise filtering stages.This adaptation proves particularly influential under conditions of high noise density, leading to superior outcomes compared to alternative methodologies.Lastly, the customization of membership function contours within the "Similar" fuzzy set (as depicted in Figure 2) has been strategically tailored to align with homogeneity levels within the processed window.This strategic customization empowers the proposed algorithms to effectively differentiate between intricate image details and noisy pixels, thereby achieving remarkable advancements in noise reduction and the preservation of intricate image features.

Table 1 .
Comparative results of the proposed method