An Efficient Approach for Image Filtering by Using Neighbors

Image Processing refers to the use of algorithm to perform processing on digital image. Microscopic images like some microorganism images contain different type of noises which reduce the quality of the images. Removing noise is a difficult task. Noise removal is an issue of image processing. Images containing noise degrade the quality of the images. Removing noise is an important processing task. After removing noise from the images, the visual effect will not be proper. This paper presents an approach to de-noise based on averaging of pixels in 5X5 window is proposed.


INTRODUCTION
Images of microorganism are extensively used in the area of medicine and biotechnology.Microorganism image analysis is having very important role in modern diseases diagnosis.The study of microorganism needs identification of different type of microorganism.For that qualitative analysis is required.By the term qualitative analysis mean the differentiation of different type of microorganism that are present in industrial sludge.In microscopic image capturing, impulse noise is caused due to environmental conditions, system noise, and motion of the object and so on, there will be difference between the original image and the resulting image.Impulse Noise must be removed for its improvement so that real information about image will be obtained for special purpose.There are two types of impulse noise (i) salt and pepper noise (ii) random valued noise.Salt and Pepper Noise can have values either 0 or 255 but random valued impulse noise can have any value from 0 to 255 [2].There are number of algorithms for noise removal [1]- [5].
In this paper, a simple method of removal of impulse noise for gray scale image is presented.The proposed method includes two steps 1) Detection of noisy pixels and noise free pixels 2) Filtering of noisy pixels.Here noisy pixel and noise free pixels are separated based on averaging of neighborhood pixels along each direction.After that noisy pixels are removed and replaced by the pixel using adaptive median.Here optical microscope (400X) image of Cyanobacteria with a size of 583 X 345 has been taken for analysis.
The rest of the paper is organized as follows:-In the second section the impulse noise is described.In the third section detection algorithm and reduction algorithm is described and in fourth section assessment parameter is discussed.Experimental result and discussion is presented in section 5.Section 6 contains the conclusion.

II. IMAGE IMPULSE NOISE
The Image impulse noise is a very common noise in communication [7,8].Let x i, j be the grey level of noisy image x at (i, j) and can be described as follows:- Where b i,j ϵ [W min ,W max ] is the noisy pixel at location (i,j) with probability P. where W min and W max be the maximum and minimum intensity value.f i,j is the noise free pixel with probability (1-P).
Impulse noise alters at random the value of some pixels.In Binary image some white pixel become black and some black pixel become white [4].In binary image this means that some black pixels become white and white pixels become black.This is also called salt and pepper noise.

A. Detection Algorithm
In this paper, algorithm based on averaging of pixels in 5x5 windows is proposed.There will be four main directions that will include 7 pixels as shown in the figure 1.An edge aligned with each direction is considered separately.Pixels aligned with each direction will be considered to find average.There are four steps in detection algorithm and is followed.Four Directional Pixels in the 5x5 window www.ijacsa.thesai.org 1) Let Rk (k=1 to 4) denotes a set of seven pixels in kth direction, origin at (i, j) i.e.
2) Detection of pixels as noise candidates or noise free is done by temple window of size 5x5 centered at (i,j).The center pixel Xi,j is considered as noisy by comparing the maximum and minimum intensity value in the 5x5 temple window.The algorithm first gets the minimum and maximum intensity value in the temple window 5x5 of the central pixel.If the test pixel lies within the range of its neighbor it is considered as non impulsive otherwise it is considered as noisy pixel.Let S be the set of noise free pixel and NP is the set of noisy pixels.Wmin and Wmax be the maximum and minimum intensity value.
Once the noise free candidates are identified, they are separated and noisy pixels are separated.
For NP, algorithm goes second level detection.
3) For all noisy candidates, in each direction shown in the figure 1, average of the absolute difference between two closest pixels from the center pixel is denoted by Amcl.Average of absolute difference between two far pixels from the center pixel is denoted by Amfr.Average of absolute difference between two corner pixels from the center pixel is denoted by Amcr.
For an image the pixels in the set NP are considered as noisy pixels based on the value r i,j .For an image with grey label in the interval (0, 255), the pixel will be noisy if r i,j is in between 230 and 255.When r i,j is less than 230, the pixel is not noisy.In the case of an image with grey label (0, 1).r i,j should be less than 0.90 for noiseless pixel.So complete detection rule as

B. Reduction Algorithm
The signal pixels are kept same and only noisy pixels are corrected.There are number of filtering methods which can be adopted.When the noisy pixels are identified, they should be filtered.In this paper filtering is done as follows.Here adaptive median filter is used to remove noise.
If the processing pixel is noisy, it should be replaced by median of NXN window.But it may be possible that median itself will be noise i.e. maximum or minimum point and if this is the case then window size should be increased by 2 and median is calculated.This process will go on until the maximum window size is reached.So filtering process will be as follows Where adpmed is adaptive median filter.www.ijacsa.thesai.orgIV.ASSESSMENT PAPRAMETER FOR ANALYZING THE OUTPUT OF THE ALGORITHM There are number of parameters such as Noise Standard Deviation (NSD), Mean Square Error (MSE), Equivalent Numbers of Looks (ENL), and Peak Signal to Noise the algorithm.

A. Mean Square Error(MSE)
The Mean Square Error is used to find the total amount of difference between two images.It indicates average difference average difference of the pixels of throughout the image where K is the de noised image and I is the original image with noise.A lower MSE indicates that there is small difference between the original image with noise and de noised image.The formula is

B. Peak Signal to Noise Ratio
To assess the performance of the noise removal method, PSNR is used.The formula is

V. RESULT AND DISCUSSION
The microscopic image of Cyanobacteria with a size of 583 X 345 has been corrupted by salt and pepper noise at different density.In this section result are presented to illustrate the performance of proposed algorithm.An original noise free image shown in figure 2 is given as reference.A quantitative comparison is performed between different techniques in terms of PSNR. Figure 3 shows the result of Cyanobacteria corrupted by noise at different density.Noise of different densities ranging from 30% to 90%.The proposed method has been compared with simple median, progressive median and 3X3 median filter.Progressive median and 3x3 median filter is giving better result compare to simple median filter.Noisy image is filtered using proposed algorithm and result is shown in the figure 3, 4,5,6,7.Figure 3 is the image of Cyanobacteria which is corrupted by salt and pepper noise of different density.Figure 4 is filtered image of Cyanobacteria on which simple median filter is implemented..Figure 5 is filtered image of Cyanobacteria by progressive median filter..Figure 6 is filtered image of Cyanobacteria by 3x3 median algorithm.Figure 7 is filtered image of Cyanobacteria by proposed algorithm.It can be seen that result using the proposed are significantly better than other three methods when noise density is more than 30%.The results are measured quantitavely using PSNR.Table 1 shows the comparison table of PSNR of different techniques.
Figure 8 show the comparison graph of PSNR of different techniques for Cyanobacteria.

VI. CONCLUSION
Here an efficient approach for impulse noise removal is proposed.The algorithm goes in two stages.Stage one identifies noisy and noise free pixels.This stage separates those two sets of pixels.
Again in these stage noisy pixels is considered as undetected pixels and goes for second level detection.Second stage does filtering to restore the image.The noisy pixels are replaced by adaptive median which is calculated recursively by increasing the size of the window up to limited size of window.It shows that the method proposed in the paper is effective for microbiologist in digital image processing.With experimental result it is seen that proposed algorithm gives good result for noise removal, edge preservation and image detail preservation.The peak signal to noise ratio also shows improvement as compared to other methods.

Fig. 1
Fig.1Four Directional Pixels in the 5x5 window