An Advanced Neural Network based Method for Noise Removal and Edge Detection

Edge detection is an important pre-processing step for any image processing application, object recognition and emotion detection. Edge detection is very helpful in case of noise free images. But in case of noisy images it is a challenging task. Noisy images are corrupted images. Their parameters are difficult to analyze and detect. In this research work different filters are used for the filtration of the image and to analyze that what exact difference it makes when it comes to detect the edge of the image. It includes the comparative study of various image denoising filters. These Filters are then applied with BFO Algorithm and they are compared with one another which help to calculate the parameters of noisy images. The comparison parameters which have been taken into contrast are Peak Signal to Noise Ratio, Mean Square Error and Noise Suppression Rate.


INTRODUCTION
It is quite difficult to predict the edges if the image is noisy. A noise is the disturbance which gets introduced to the image due to the medium. There are several kinds of noise like Gaussian Noise, Salt and Pepper Noise, Blurred Noise etc. There are an extremely large number of edge detection operators available, each designed to be sensitive to certain types of edges [7]. Variables involved in the selection of an edge detection operator include: 1) Edge orientation: The geometry of the operator determines a characteristic direction in which it is most sensitive to edges. Operators can be optimized to look for horizontal, vertical, or diagonal edges. 2) Noise environment: Edge detection is difficult in noisy images, since both the noise and the edges contain highfrequency content. Reducing the noise will result in blurred and distorted edges. Operators used in noisy images are typically larger in scope, so they can average enough data to discount localized noisy pixels. This results in less accurate localization of the detected edges.
3) Edge structure: Not all edges involve a step change in intensity. Effects such as refraction or poor focus can result in objects with boundaries defined by a gradual change in intensity. The operator needs to be chosen to be responsive to such a gradual change in those cases. Newer wavelet-based techniques actually characterize the nature of the transition for each edge in order to distinguish, for example, edges associated with hair from edges associated with a face. There are many ways to perform edge detection. However, the majority of different methods may be grouped into two categories:  Gradient: The gradient method detects the edges by looking for the maximum and minimum in the first derivative of the image.  Laplacian: The Laplacian method searches for zero crossings in the second derivative of the image to find edges. An edge has the one-dimensional shape of a ramp and calculating the derivative of the image can highlight its location.

Sobel Operator
It performs 2-D spatial gradient measurement on an image and so emphasizes regions of high spatial frequency that correspond to edges [10].The operator consists of a pair of 3×3 convolution kernels as shown in Figure 1. One kernel is simply the other rotated by 90°.

Figure 1: Masks used by Sobel Operator
These kernels are designed to respond maximally to edges running vertically and horizontally relative to the pixel grid, one kernel for each of the two perpendicular orientations. The kernels can be applied separately to the input image, to produce separate measurements of the gradient component in each orientation (call these Gx and Gy). These can then be combined together to find the absolute magnitude of the gradient at each point and the orientation of that gradient. The gradient magnitude is given by: Typically, an approximate magnitude is computed using: | | | | | | This is much faster to compute.

Robert's cross operator:
The Roberts Cross operator performs a simple, quick to compute, 2-D spatial gradient measurement on an image. Pixel values at each point in the output represent the estimated absolute magnitude of the spatial gradient of the input image at that point. The operator consists of a pair of 2×2 convolution kernels as shown in Figure 2.

Figure 2: Masks used by Robert's Cross Operator
These kernels are designed to respond maximally to edges running at 45° to the pixel grid, one kernel for each of the two perpendicular orientations. The kernels can be applied separately to the input image, to produce separate measurements O c t o b e r , 2 0 1 3 of the gradient component in each orientation (call these Gx and Gy). These can then be combined together to find the absolute magnitude of the gradient at each point and the orientation of that gradient.
The gradient magnitude is given by: An approximate magnitude is computed using: | | | | | | This is much faster to compute.

Prewitt's operator:
Prewitt operator is similar to the Sobel operator and is used for detecting vertical and horizontal edges in images [10]. Prewitt filter is a fast method for edge detection. The difference with respect to Sobel filter is the spectral response. It is only suitable for well-contrasted noiseless images [7].

Laplacian of Gaussian:
The Laplacian is a 2-D isotropic measure of the 2nd spatial derivative of an image. The Laplacian of an image highlights regions of rapid intensity change and is therefore often used for edge detection [10]. The Laplacian is often applied to an image that has first been smoothed with something approximating a Gaussian Smoothing filter in order to reduce its sensitivity to noise. The operator normally takes a single gray level image as input and produces another gray level image as output.
The Laplacian L(x,y) of an image with pixel intensity values I(x,y) is given by: L(x,y)= + Since the input image is represented as a set of discrete pixels, we have to find a discrete convolution kernel that can approximate the second derivatives in the definition of the Laplacian. Three commonly used small kernels are shown in Figure 4. Because these kernels are approximating a second derivative measurement on the image, they are very sensitive to noise. To counter this, the image is often Gaussian Smoothed before applying the Laplacian filter. This pre-processing step reduces the high frequency noise components prior to the differentiation step.

Canny's Edge Detection Algorithm
The Canny edge detector is widely considered the standard method of edge detection. The image is smoothed with a Gaussian filter where 'σ' is the standard deviation of the filter. Then, the edge direction and strength are computed. The edges are refined with non maximal suppression for thin edges and hysteresis thresholding (low and high) for continuous edges. The Canny edge detection algorithm is known to many as the optimal edge detector. Canny's intentions were to enhance the many edge detectors already out at the time he started his work [10].

Figure 5: Masks used by Canny Edge Detector
The magnitude, or edge strength, of the gradient is then approximated using the formula: |G| = |Gx| + |Gy| Canny's edge detection algorithm is computationally more expensive compared to Sobel, Prewitt and Robert's operator. However, the Canny's edge detection algorithm performs better than all these operators under almost all scenarios. O c t o b e r , 2 0 1 3 The four steps of edge detection are: 1. Smoothing: suppress as much noise as possible, without destroying the true edges. 2. Enhancement: apply a filter to enhance the quality of the edges in the image (sharpening). 3. Detection: determine which edge pixels should be discarded as noise and which should be retained (usually, thresholding provides the criterion used for detection). 4. Localization: determine the exact location of an edge (sub-pixel resolution might be required for some applications, that is, estimate the location of an edge to better than the spacing between pixels). Edge thinning and linking are usually required in this step.

IMAGE NOISE
Noise is any undesired information that contaminates an image. Noise appears in image from various sources. The digital image acquisition process, which converts an optical image into a continuous electrical signal that is then sampled, is primary process by which noise appears in digital image. There are several ways through which noise can be introduced into an image, depending on how the image is created [2]. Satellite image, containing the noise signals lead to a distorted image and not being able to understand and study it properly, requires the use of appropriate filters to limit or reduce much of the noise. It helps the possibility of better interpretation of the content of the image. Noise gets introduced into the data via any electrical system used for storage, transmission, and/or processing. Some examples of noise are: Gaussian or White, Rayleigh, Shot or Impulse, periodic, sinusoidal or coherent, uncorrelated, and granular.

Types of Noise
Following are the different types of image noise:-

(a) Random Variation Impulsive Noise (RVIN)
This type of noise is also called the Gaussian noise or normal noise and it randomly occurs as white intensity values [2].

(b) Salt & Pepper Noise (SPN)
This type contains random occurrences of both black and white intensity values, and often caused by threshold of noise image. Salt and pepper noise is an impulse type of noise, which is also referred to as intensity spikes. This is caused generally due to errors in data transmission.

(c) Speckle Noise (SPKN)
Speckle noise is a multiplicative noise. If the multiplicative noise is added in the image, speckle noise is a ubiquitous artifact that limits the interpretation of optical coherence of remote sensing image. This type of noise occurs in almost all coherent imaging systems such as laser, acoustics and SAR (Synthetic Aperture Radar) imagery. The source of this noise is attributed to random interference between the coherent returns [2].

Mean Filter (MF)
Mean Filter (MF) is a simple linear filter, intuitive and easy to implement method of smoothing images, i.e. reducing the amount of intensity variation between one pixel and the next. It is often used to reduce noise in images. The idea of mean filtering is simply to replace each pixel value in an image with the mean (average) value of its neighbours, including itself. Moreover, Mean Filter is a linear filter which uses a mask over each pixel in the signal. Each of the components of the pixels which fall under the mask are averaged together to form a single pixel. This filter is also called as average filter.

Standard Median Filter (SMF)
Median filter is the non-linear filter which changes the image intensity mean value if the spatial noise distribution in the image is not symmetrical within the window. Median filter reduce is the variance of the intensities in the image. Median filter is a spatial filtering operation, so it uses a 2-D mask that is applied to each pixel in the input image. To Apply the mask means to centre it in a pixel, evaluating the covered pixel brightness and determining which brightness value is the median value.

Adaptive Wiener Filter (AWF)
Adaptive Wiener Filter (AWF) changes its behaviour based on the statistical characteristics of the image inside the filter window. Adaptive filter performance is usually superior to non-adaptive counterparts. But the improved performance is at the cost of added filter complexity. Mean and variance are two important statistical measures using which adaptive filters can be designed.

Gaussian Filter (GF)
Gaussian low pass filter is the filter which is impulse responsive, Gaussian filters are designed to give no overshoot to a step function input while minimizing the rise and fall time. Gaussian is smoothing filter in the 2D convolution operation tha t is used to remove noise and blur from image. The Adaptive Median Filter (AMF) is designed to eliminate the problems faced with the Standard Median Filter. The basic difference between the two filters is that in the Adaptive Median Filter, the size of the window surrounding each pixel is variable. This variation depends on the median of the pixels in the present window. If the median value is an impulse, then the size of the window is expanded.

Trilateral filters
Trilateral filter smoothes images towards a sharply-bounded, piecewise-linear approximation. Unlike bilateral filters or anisotropic diffusion methods that smooth towards piecewise constant solutions, the trilateral filter provides stronger noise reduction and better outlier rejection in high-gradient regions, Like the bilateral filter, the trilateral filter easily extends to Ndimensional signals, yet it also offers better performance for many visual applications including appearance-preserving contrast reduction problems for digital photography and denoising polygonal meshes.
Threshold Selection using BFO: BFO: Bacterial Foraging Optimization (BFO) is a fascinating artificial intelligence (AI) technique that can be used to find approximate solutions to extremely difficult or impossible numeric maximization or minimization problems. The BFO methods proceeds through one wave to another and generates the threshold accordingly for every wavelet and finally the threshold is decided by summing up of the entire threshold and dividing them by total number of wavelets found in the region.

RESEARCH METHODOLOGY
In our research work we have taken several filters for the filtration of the images .Our filters involve Adaptive mean, Haar denoising Method and Hybrid Filter. The threshold is generated according to the BFO which sets the threshold according to the regions of the noisy area as a filter and then we compare the PSNR, MSE and Noise Suppression Rate of every image after the application of the filters. Further on we compute the edges using Canny edge detector.

CONCLUSION
Edges characterize boundaries and are therefore a problem of fundamental importance in image processing. Edges in images are areas with strong intensity contrastsa jump in intensity from one pixel to the next. Edge detecting an image significantly reduces the amount of data and filters out useless information, while preserving the important structural properties in an image. In this paper, various filters for filtering the images has been used. It involves filters like Adaptive Mean filter, Haar Denoising method and Hybrid filter and then compare the PSNR, MSE and Noise Suppression Rate of every image. Further on the edges are computed using Canny edge detector and Sobel Edge Detector. Table 1 depicts the PSNR, MSE, Noise Suppression Rate of images in figure 6 at density level 10%.