Edge-Detection in Noisy Images Using Independent Component Analysis

Edges in a digital image provide important information about the objects contained within the image since they constitute boundaries between objects in the image. This paper proposes a new approach based on independent component analysis (ICA) for edge-detection in noisy images. The proposed approach works in two phases—the training phase and the edge-detection phase. The training phase is carried out only once to determine parameters for the ICA. Once calculated, these ICA parameters can be employed for edge-detection in any number of noisy images. The edge-detection phase deals with transitioning in and out of ICA domain and recovering the original image from a noisy image. Both gray scale as well as colored images corrupted with Gaussian noise are studied using the proposed approach, and remarkably improved results, compared to the existing edgedetection techniques, are achieved. Performance evaluation of the proposed approach using both subjective as well as objective methods is presented.


Introduction
In typical images, edges characterize the object boundaries with sharp changes in intensity levels.Edges are useful for segmentation, registration, and identification of objects in a given scene.Most of these operations have edge-detection as the preprocessing step.Consequently, the success of these image processing tasks depends strictly on the performance of edge-detection step.Detection of these edges, therefore, not only helps in more accurate representation of an image, but it also significantly simplifies its processing.The edge detection usually involves calculation of derivative of the image intensity function at a given pixel location owing to the fact that image intensity shows sudden changes at edges.Pixels with relatively higher magnitude of derivative of the image intensity function are classified into edge pixels.To this end, Gradient and Laplacian operators/masks such as Prewitt, Roberts, Sobel, Canny [1][2][3] are usually employed for the purpose of edge-detection.These operators work well for specific cases; however, they fail for others.For instance, the Prewitt edge detector works quite well for digital images corrupted with Poisson noise, whereas its performance decreases sharply for other kinds of noise [4].Moreover, these operators/masks are chosen independent of the image under consideration.As such, the performance of these operators masks degrades considerably with the increase in noise levels in images [2].Unfortunately, digital images are inevitably degraded by noise during acquisition and/or transmission.Furthermore, most of the edge-detection operators assume that images contain regions separated by clear boundaries.However, this assumption is not valid for images corrupted with noise.Alternatively, better results can be obtained if the images are denoised employing an appropriate filter (e.g., linear/smoothing filter, nonlinear filter) before applying the operators/masks [2,4].However, filters while smoothing out the noise also remove genuine high-frequency edge features, degrade localization and detection of low-contrast edges, and, therefore are incapable of providing satisfactory results [2][3][4].This paper proposes a new approach for edge-detection in noisy images.Proposed approach employs the independent component analysis (ICA) concept [5][6][7] in conjunction with the traditional edge-detection methods to obtain much better results for images corrupted with Gaussian noise.ICA has been previously applied for the purpose of edgedetection [8][9][10][11].In the proposed approach, basic edgedetection method (i.e., Canny) is used along with ICA for the first time to improve the accuracy of edge-detection in noisy gray-scale and colored images.ICA provides a linear representation of non-Gaussian (i.e., super-Gaussian and sub-Gaussian) data making all the components statistically independent [12][13][14][15][16].The proposed approach functions in two phases.In the first phase, FastICA algorithm which is a neural network learning algorithm based on a Gradient approach is used to find the separation matrix.In second phase, this obtained separation matrix is used for transitioning in and out of ICA domain, thereby facilitating denoising of noisy images.We apply the proposed approach to several gray-scale and colored images corrupted with high levels of Gaussian noise.Edge-detection results obtained from the proposed approach illustrate better performance than those obtained using Canny along with the nonlocal means filter.
A brief introduction of ICA followed by the information regarding basis functions, fast ICA algorithm, and edgedetection are given in Section 2. Section 3 presents the proposed approach and discusses key points involved in obtaining the improved results.Illustration of the proposed approach applied to gray scale as well as colored images is presented in Section 4, and conclusions with possible future work are included in Section 5.

Independent Component Analysis (ICA)
Typically, ICA is used for blind source separation [14], which facilitates separation of a set of signals from mixed signals, with very little information about the source signals or the mixing process.In contrast to the correlation-based transformations, like principal component analysis (PCA) [15], ICA decorrelates the signals (2nd-order statistics) and also reduces higher-order statistical dependencies, in attempt to make signals as independent as possible [7].Since all the natural images contain similar statistical information, a set of noise-free images can be used for the training phase of ICA [12].The transform obtained from ICA is then employed for denoising a noisy image.

Definition of ICA.
Let x m×1 = [x 1 , x 2 , x 3 , . . ., x m ] be a linear mixture vector with m linear mixtures of n independent sources, s n×1 = [s 1 , s 2 , s 3 , . . ., s n ].The relation between mixture vector x and the source vector s can be expressed as where A is called the mixing matrix of size (m × n), and each column a j is called basis function.As such, basis functions project the independent sources to produce linear mixtures.Thus, (1) can be expressed mathematically as The above model ( 2) is known as the ICA model.Figure 1 illustrates a block diagram for ICA where s has two elements s 1 and s 2 .Mixtures x 1 and x 2 obtained from s are fed to ICA as inputs.Therefore, only mixture vector x is available, from which A and s are estimated by the ICA.ICA starts with an assumption that elements of vector s are statistically independent.The distributions of elements of s, although unknown, are assumed to be non-Gaussian.Furthermore, for the sake of simplicity, mixing matrix A is assumed to be a square matrix.The objective of ICA is to find a matrix W which, when multiplied with the observed mixture vector x, gives the source vector s, that is, W is referred to as the separation matrix, and its inverse results in the mixing matrix A. There are numerous ways of finding matrix W, but we employed "fixed-point FastICA algorithm" as it is computationally efficient and robust [5][6][7].

Implementation of Fixed-Point
FastICA.Sample image data obtained from the noise-free images is whitened, in order to make W and A unitary and then fed to FastICA algorithm.The computation steps for matrix W are detailed below.
Step 1. Random image samples of size 8 × 8 each, from the database that we have created, are fed to FastICA.
Step 2. Matrix W (size 64×64) is obtained from FastICA that performs orthogonalization during each iteration.
Step 3.Each row vector of W corresponds to a basis function, and kurtosis k is computed, as explained in the next section, for all the basis functions.
Step 4. Row vectors of W, that is, the basis functions, are then arranged in descending order of computed k value.
In this paper, we use m = n = 64.As such, both W and A have size of 64 × 64.Obtained matrix W from FastICA is an orthogonal matrix, and therefore A is simply W T .A detailed explanation of the use of FastICA algorithm and MATLAB code can be obtained from [17].

Edge-Detection.
Signal mixtures tend to have Gaussian probability density functions (PDFs), while source signals have non-Gaussian pdf [18].Hence, ICA is optimized to obtain non-Gaussian signals at the output.In practice, there are two types of non-Gaussian signals, commonly referred to as Platykurtotic (i.e., super-Gaussian) and Leptokurtotic (i.e., sub-Gaussian) [18].The super-Gaussian signals have most of the values centered at zero, unlike sub-Gaussian signals.This implies that the former signals have relatively higher peaks compared to the latter.Peaky nature of the signals is formally described by what is called kurtosis of the signal's PDF, which is the 4th moment of PDF.The kurtosis of row vector w of matrix W is computed as [18] where w m is the mean of w.Constant "3" guarantees that the Gaussian, super-Gaussian (sparse), and sub-Gaussian signals have, respectively, zero, positive, and negative values of k.
Essentially, kurtosis provides a measure for the 4th central moment, which takes a given signal's variance into account.
The proposed algorithm (as explained below) arranges the rows of W in descending order of their k values.This is to select the sparse components of an image as they represent edges of the image.

Proposed Approach
As mentioned earlier, the proposed approach works in two phases-the training phase and the edge-detection phase.
Training phase is carried out only once to find the matrix W, which is then employed for edge-detection in any number of noisy images.Both the phases are described below.

Training Phase.
Training phase of the proposed approach consists of two main steps, that is, database creation and ICA followed by kurtosis computation.

Database Creation.
Selective images are taken from a website [19] to serve as a database.As can be seen in Figure 2, natural images are selected, since the ICA filters have more sparsely distributed (kurtotic) outputs on natural scenes [20].

ICA and Kurtosis Computation.
A detailed flow chart of the training phase is given in Figure 3(a).Random image samples, each of size 8 × 8, are selected and fed to FastICA as input.FastICA algorithm, as explained earlier, computes the separation matrix W of size 64×64.This W is orthogonalized during each iteration to avail several benefits stated in [20].
Reduced arithmetic operations, and relatively easier matrix inversion, are a few of the benefits.Orthogonalization of W is carried out using Kurtosis k (i.e., the degree to which a statistical frequency curve is peaked) is then computed for each row vector w of matrix W. Positive values of k are required for sparsity of the elements.Constant "3" in (4) ensures high sparseness of the elements.The row vectors of W are arranged in descending order of their corresponding computed k values.This ensures use of sparse components that represent edges.Separation matrix W obtained after above-mentioned processing can be used for edge-detection in any noisy image [20].

Edge-Detection Phase.
The flowchart for edge-detection in noisy images is given in Figure 3(b).This phase makes use of the separation matrix W, computed in training phase, to transition the given noisy image in and out of the ICA domain.A major advantage of ICA domain is that a set of adaptive basis functions can be obtained from the image alone.The sparse code shrinkage is employed for denoising in the ICA domain.

Transitioning
In and Out of the ICA Domain.As described above, processing in ICA domain allows stating of a set of adaptive basis functions from the image alone.Windowing approach is employed where an image sample is processed and replaced.An image sample x of size 8 × 8 is first projected in the ICA domain by multiplying it with W. We denote the projection of the image in ICA domain as s.For transitioning out of the ICA domain, s is to be multiplied by W −1 .However, W is orthogonal, that is, W −1 = W T ; therefore, s is simply multiplied by W T .For computational purpose, x is reshaped to 64 × 1 while entering and again 8 × 8 while exiting ICA domain.

Denoising.
Recovering the original image from a noisy image is complex.This work, therefore, aims at estimating an image, which is significantly better than the noisy image.
Probability densities encountered in image denoising can be classified as (i) mildly sparse and (ii) strongly sparse [7].In this work, we employ the strongly sparse density, which, for any s i in s, is given by [21,22] Here, d is the standard deviation, and α controls the sparseness.We first estimate p(0) and d, using which, α is evaluated as where Next, the maximum a posteriori (MAP) estimation of the density model ( 6) is found using the shrinkage function given by where In (10), σ represents noise level.Using the above equations, the value of p( 0) is approximated to be 0.707.

Discussion.
The edge-detection phase implemented in this work is based on the sparse code shrinkage algorithm [8], where a sample is initially transformed into the ICA domain using W. Thereafter, these components are shrunk using the shrinkage function given in (9), and the sample is then taken out of the ICA domain using W T .Finally, Canny edge-detection algorithm [1] is applied to the image.

Illustration
The proposed approach is applied to both gray-scale and colored images, and the results obtained are compared with those obtained using Canny and mean filters.We have also studied the effects of step size as well as noise levels on the performance of our approach.

Training.
For the training phase, a set of images are chosen from an image database [19] to create a local database (see Figure 2).Using the algorithm given in Figure 3(a), orthogonalized matrix W is estimated.Training phase can be accomplished with any set of noise-free images.Noise-free images for the image on hand are not required, since matrix W remains same for all known/unknown images [20].

Effects of Noise and
Step Size.Before proceeding to application of the proposed approach to gray-scale and colored images, we consider the effects of step size and noise levels on edge-detection.
Step size is the distance between two successive image samples (i.e., sample windows).To study the effects of step size, the proposed approach is applied to an image with various step sizes (see Figure 4).As expected, the test image becomes increasingly susceptible to noise with increase in step size.However, increasing the step size improves the computational speed.As such, it is crucial to select a step size, which offers a compromise between the speed and immunity to noise of the proposed approach.For instance, for the image in Figure 4, a maximum step size of 4 can be used (for a step size of 8, the edges become indistinguishable).Processing of image is 16 times faster with step size 4 compared to that of step size 1.   Figure 5 illustrates the results of the proposed approach on an image corrupted with different levels of white Gaussian noise.From the results obtained, it appears that the proposed approach gives satisfactory results for noise levels as high as 6 dB.It would be of interest to test the proposed approach with real data, that is, data for which noise-free images are unavailable.However, such results are difficult to obtain and comment upon.As such, performance of the algorithm for images artificially corrupted with noise is shown.Images not used during training are tested with the proposed approach.

Application to Gray-Scale Images.
The proposed approach is applied to a number of gray-scale images, with step size of 1.For illustration, consider Figure 6.Here, three gray-scale images shown in Figures 6(a), 6(e), and 6(i) are tested with the proposed approach.Figures 6(b), 6(f), and 6(j) show the respective gray-scale images with artificially added 3 dB white Gaussian noise.nonlocal means filter [23] is used for denoising followed by Canny method for edge-detection, and the results obtained using this approach (NLMCanny) are depicted in Figures 6(c), 6(g), and 6(k).Finally, Figures 6(d), 6(h), and 6(l) show the results of the proposed approach.As can be seen from the images, due to high level of Gaussian noise (i.e., 3 dB) in the images, Canny method fails to provide satisfactory results.However, the proposed approach offers considerably better results.

Application to Colored Images.
The proposed approach is extended to colored images.Matrix W, computed for gray scale images, is employed for the colored images as well.Apart from these subjective methods, there are objective methods which are used for the evaluation of edge detectors.However, these do not necessarily correlate with the human perception of the image quality.For example, an image with relatively lower error might look much worse than an image with relatively higher error.These objective measures are root-mean-square error (e RMS ), peak signal-to-noise ratio (SNR Peak ), signalto-noise ratio (SNR RMS ), and Pratt's figure of merit (FOM) (refer to ( 12), ( 13), (14), and (15), resp.)[4,24].FOM is normalized such that FOM = 1 represents a perfectly detected edge.The value of α is set to 1/9.Table 1 shows the performance comparison between NLMCanny and proposed approach using the objective methods.It can be seen that the proposed approach outperforms NLMCanny since values for SNR RMS , SNR Peak , e RMS , and FOM for the proposed approach are higher.

Conclusion
A new approach based on ICA has been proposed for edgedetection in noisy images and has been applied to both gray-scale and colored images.Compared to the NLMCanny method, that is, Canny coupled with a state-of-the-art nonlocal means filter, the proposed approach has yielded considerably improved results.Several step sizes have been examined, and the results for the same have been presented.Moreover, the proposed approach exhibits higher immunity to noise levels.Since all the natural images contain same type of statistics, shrinkage algorithm parameters can be computed from any set of noise-free images for denoising an image.As such, the proposed approach is very robust in the noisy environment.Results for noise levels of 1 dB, 2 dB, 5 dB, 6 dB, and so forth have been depicted.The proposed approach allows step sizes as high as 4 to be employed,

2 Figure 1 :
Figure 1: Representative block diagram of ICA for the case of two sources.

WFigure 3 :
Figure 3: Flowchart of the proposed approach with (a) training phase for estimating the sparse matrix and (b) edge-detection in the noisy gray-scale image are shown.

Figure 5 :
Figure 5: Proposed approach applied to the Barbara image with various noise levels and step size 1.

Figure 6 :
Figure 6: Application of the proposed approach to gray-scale images with step size of 1.

Figure 7 :
Figure 7: Application of the proposed approach to colored images with step size of 1.