Proposed Algorithm for Image Noise Detection Based on Recursive Matrix

: The noise is any undesired signal that contaminates an image. This paper proposes an algorithm for color image noise detection of several types of noise, namely; Gaussian, Salt and Pepper and Speckle. This algorithm uses a method of generating a square matrix from original image, called a Recursive Matrix ( RM ) This RM was used successfully in detecting the noisy or noisy-free image. The first step is to analyze the three bands monochrome image (color image) to Red, Green and Blue images, then deal with each image as a grey-scale image which is represented as 2-Dimenssion matrix. The second Step is to construct the RM to each monochrome image, then to calculate the standard deviation (std.) for each RM to distinguish between noisy and pure image by using objective test depending on Std. threshold. In the third step, the subjective test is used to the same image by plotting the image with its RM in 3-Dimensions, for both pure and noisy images. The proposed algorithm gives a perfect detection of noise in 50 color images as a case study used in this algorithm.


INTRODUCTION
mage processing is the fastest growing area of computer science. The concern of most researchers in this area has been to improve the quality of the images and/or to compute some semantic information contained in them with the aim of understanding their contents [1]. The classical method of noise detection in an image is the human visual system, (i.e., by eye). In real time applications like astronomical and medical, the time is a critical issue. Hence in these applications one always tries to minimize the time of the task as short as possible, but it is found longer than the required critical times of these applications to classify them as real time. To build a real time identification type of noise algorithm, not every observed image is entered to identify the type of noise. This is because in some cases, the observed image may be clean (noise-free), so identification of noise will be trivial and waste of time [2]. Images are often corrupted by impulse noise when they are recorded by noisy sensors or sent over noisy transmission channels. To suppress the noise while preserving image details, many impulse noise removal techniques have been developed. These types of noise include: (i) salt and pepper noise is a form of noise sometimes seen on images. It presents itself as sparsely occurring white and black pixels [3].

901
(ii) Gaussian noise is statistical noise having a probability density function (PDF) equal to that of the normal distribution, which is also known as the Gaussian distribution [4]. In the other words, the values that the noise can take on are Gaussian-distributed. (iii) Speckle noise in conventional radar results from random fluctuations in the return signal from an object that is not bigger than a single image-processing element. It increases the mean grey level of a local area [5]. This paper presents two types of tests to distinguish between noisy and pure images, these types include (i) Subjective test which refers to personal perspective. This can be shown by plotting the manipulated matrix in 3-dimensions form and observes the Z-coordinates of points above X, Y coordinates. (ii) Objective test which uses a statistical algorithm based on RM which is a square matrix generated from original grey scale level of image.

The Recursive Matrix (RM)
The RM is a square matrix generated from original grey scale level of the image, whereby its dimension is equal to the dimension of original image. This matrix is produced by segmentation of the image into a number of pixel frames such that each pixel frame (PF) consists of two neighbor pixels. Thee frames will overlap when they are viewed in a row vector wise. This means that the second pixel from the first frame represents the first pixel in the second frame in this vector. After completing segmentation process, the first pixel is subtracted from the second pixel in each pixel frame and must set the last column of matrix to zero. The resultant matrix is called (Subtraction matrix). Another segmentation process will be performed on subtraction matrix to produce a large number of submatrices of size (2 x 2) without overlapping in both sides (horizontal, vertical), and then each submatrix is multiplied by a filter with similar size of submatrix (2 x 2). The element of filter has values [1 0 ;0 1] [6] .

The Proposed algorithm
The following algorithm covers the calculation of RM elements: Step 1: Input a monochrome image (Red, Blue or Green) of any size of color image.
Step 2: Segment the image into a large number of pixel frames such that each (PF) consists of two neighbor pixels.
Step 3: Take these frames and subtract the first pixel from the second pixel in every frame and set the last column of the resultant matrix of step 2 to zero. The resultant matrix is called subtraction matrix.
Step4: Decompose the subtraction matrix into square segments of dimension (2x2) without overlapping.
Step 6: The resultant matrix is called the RM, and will be used later after further processing for noise detection. This RM can be used to distinguish between noisy and pure images in both human visual systems (Subjective rest) and Objective Test. For more information, see the following example. Example: Calculate the RM for a given matrix:- -Decompose the given matrix into pixel frames (PF), each frame consists of two neighbor pixels with overlapping in horizontal side only.

Pixel Frames
-Subtract the first pixel from the second pixel in each frame and store the result of the subtraction in the location of first pixel in each frame.  Subjective refers to personal perspectives, feelings, or opinions entering the decision making process. Objective refers to the elimination of subjective perspectives, a process that is purely based on hard facts.

Noise Detection Using Subjective Test
This algorithm can be applied to the RM to distinguish between the noisy and pure images. By plotting the RM in 3-dimensional form, the noise in pure image can be distinguished by looking at the Z-coordinates of points above a grid in the X-Y of the RM. From the plot (figures 1, 2, 3 and 4), if the elements of the RM approach stability (few numbers of spikes), then the image is pure, but for noisy image the elements of RM approach instability (higher numbers of spikes). Figure (1) shows the results of plotting the RM of pure color image for all three monochrome sub-bands (Red, Green and Blue), and how the elements of RM approach stability (few numbers of spikes). Figure (2) shows the results of plotting the RM of noisy color image (contaminated with Gaussian noise of variance equal to 0.1) for all three monochrome sub-bands (Red, Green and Blue), and how the elements of RM approach instability (higher numbers of spikes). Figure (3) shows the results of plotting the RM of noisy color image (contaminated with Salt and Pepper noise of variance equal to 0.1) for all three monochrome sub-bands (Red, Green and Blue), and how the elements of RM approach instability (higher numbers of spikes). Finally, Figure (4) shows the results of plotting the RM of noisy color image (contaminated with Speckle noise of variance equal to 0.1) for all three monochrome sub-bands (Red, Green and Blue), and how the elements of RM approach instability (higher numbers of spikes).

Noise Detection Using Objective Test
This algorithm uses the RM to distinguish between noisy and pure images using objective tests. The procedure of the proposed algorithm followed in this detection is given below: Step 1: Input a color image of any size.
Step 2: Analyze the color image into Three-monochrome band (Red band, Green band, Blue band).
Step 3: Generate the RM for all Three-bands by the same procedures given in section (2).
Step 4: Calculate the standard deviation of RM for all three-bands using the following equation [6]:

904
Step 5: Compare the standard deviation of the RM for each sub-band with the threshold value.
If the standard deviation is less than the threshold, then the image is pure. If it is more than the threshold, then the image is noisy. The choice of the threshold depends on experimental tests and it is found that the typical value is between 0.08 and 0.1. Figure (5) shows the flowchart of noise detection algorithm using objective test. Figure (6) shows the pure and noisy images for testing noise detection using objective test, and table (1) shows the calculations of the standard deviation of RM for each monochrome band of these images which must be compared with the experimental threshold value which is equal to 0.09.

CONCLUSIONS:
In this work, two noise detection algorithms have been introduced to detect noise in color images. First algorithm depends on the subjective test, by plotting each monochrome band with its RM in three-dimensions. Second, the objective test algorithm, which depends on the value of the standard deviation of the generated RM for each monochrome band of color image. The following issues are concluded from the test of the proposed algorithms.

1)
A perfect detection of noise in 50 color images as a case study is achieved.

2)
Most important types of noise are covered in this work, Gaussian, Salt & Pepper, and Speckle, and the results of detection was perfect with different values of variance, starting from 0.01.

3)
For mixed types of noise, also the result of noise detection was perfect.

4)
It is found that, it is enough to check one monochrome band only in color image to detect the noise in the original image.

5)
In subjective test, it is found that the noisy image can be easily distinguished by looking at the 3-dimension plot and the number of spikes in that plot.

6)
It is found that the practical value of threshold that can be compared with the value of standard deviation of RM is equal to 0.09.