Abstract

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 edge-detection techniques, are achieved. Performance evaluation of the proposed approach using both subjective as well as objective methods is presented.

1. 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 [13] 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 [24].

This paper proposes a new approach for edge-detection in noisy images. Proposed approach employs the independent component analysis (ICA) concept [57] 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 edge-detection [811]. In the proposed approach, basic edge-detection 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 [1216]. 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 edge-detection 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.

2. 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.

2.1. Definition of ICA

Let 𝑥𝑚×1=[𝑥1,𝑥2,𝑥3,,𝑥𝑚] be a linear mixture vector with 𝑚 linear mixtures of 𝑛 independent sources, 𝑠𝑛×1=[𝑠1,𝑠2,𝑠3,,𝑠𝑛]. The relation between mixture vector 𝐱 and the source vector 𝐬 can be expressed as𝑥𝑗=𝑎𝑗1𝑠1+𝑎𝑗2𝑠2+𝑎𝑗3𝑠3++𝑎𝑗𝑛𝑠𝑛,for𝑗=1,2,,𝑚,(1) where 𝐀 is called the mixing matrix of size (𝑚×𝑛), and each column 𝐚𝑗 is called basis function. As such, basis functions project the independent sources to produce linear mixtures. Thus, (1) can be expressed mathematically as𝐱=𝐀𝐬.(2) The above model (2) is known as the ICA model. Figure 1 illustrates a block diagram for ICA where 𝐬 has two elements – 𝑠1 and 𝑠2. Mixtures 𝑥1 and 𝑥2 obtained from 𝐬 are fed to ICA as inputs. Therefore, only mixture vector 𝐱 is available, from which 𝐀 and 𝐬 are estimated by the ICA.

ICA starts with an assumption that elements of vector 𝐬 are statistically independent. The distributions of elements of 𝐬, although unknown, are assumed to be non-Gaussian. Furthermore, for the sake of simplicity, mixing matrix 𝐀 is assumed to be a square matrix. The objective of ICA is to find a matrix 𝐖 which, when multiplied with the observed mixture vector 𝐱, gives the source vector 𝐬, that is, 𝐬=𝐖𝐱.(3)𝐖 is referred to as the separation matrix, and its inverse results in the mixing matrix 𝐀. There are numerous ways of finding matrix 𝐖, but we employed “fixed-point FastICA algorithm” as it is computationally efficient and robust [57].

2.2. Implementation of Fixed-Point FastICA

Sample image data obtained from the noise-free images is whitened, in order to make 𝐖 and 𝐀 unitary and then fed to FastICA algorithm. The computation steps for matrix 𝐖 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 𝐖 (size 64×64) is obtained from FastICA that performs orthogonalization during each iteration.

Step 3. Each row vector of 𝐖 corresponds to a basis function, and kurtosis 𝑘 is computed, as explained in the next section, for all the basis functions.

Step 4. Row vectors of 𝐖, that is, the basis functions, are then arranged in descending order of computed 𝑘 value.

In this paper, we use 𝑚=𝑛=64. As such, both 𝐖 and 𝐀 have size of 64×64. Obtained matrix 𝐖 from FastICA is an orthogonal matrix, and therefore 𝐀 is simply 𝐖𝑇. A detailed explanation of the use of FastICA algorithm and MATLAB code can be obtained from [17].

2.3. 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 𝐰 of matrix 𝐖 is computed as [18]𝑘=(1/𝑛)𝑛𝑖=1𝑤𝑖𝑤𝑚4(1/𝑛)𝑛𝑖=1𝑤2𝑖𝑤2𝑚23,(4) where 𝑤𝑚 is the mean of 𝐰. Constant “3” guarantees that the Gaussian, super-Gaussian (sparse), and sub-Gaussian signals have, respectively, zero, positive, and negative values of 𝑘. 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 𝐖 in descending order of their 𝑘 values. This is to select the sparse components of an image as they represent edges of the image.

3. 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 𝐖, which is then employed for edge-detection in any number of noisy images. Both the phases are described below.

3.1. Training Phase

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

3.1.1. 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].

3.1.2. 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 𝐖 of size 64×64. This 𝐖 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 𝐖 is carried out using𝐖𝐖=real𝑇𝐖1/2𝐖.(5)

Kurtosis 𝑘 (i.e., the degree to which a statistical frequency curve is peaked) is then computed for each row vector 𝐰 of matrix 𝐖. Positive values of 𝑘 are required for sparsity of the elements. Constant “3” in (4) ensures high sparseness of the elements. The row vectors of 𝐖 are arranged in descending order of their corresponding computed 𝑘 values. This ensures use of sparse components that represent edges. Separation matrix 𝐖 obtained after above-mentioned processing can be used for edge-detection in any noisy image [20].

3.2. 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 𝐖, 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.

3.2.1. 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 𝐱 of size 8×8 is first projected in the ICA domain by multiplying it with 𝐖. We denote the projection of the image in ICA domain as 𝐬. For transitioning out of the ICA domain, 𝐬 is to be multiplied by 𝐖1. However, 𝐖 is orthogonal, that is, 𝐖1=𝐖𝑇; therefore, 𝐬 is simply multiplied by 𝐖𝑇. For computational purpose, 𝐱 is reshaped to 64×1 while entering and again 8×8 while exiting ICA domain.

3.2.2. 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 𝑠𝑖 in 𝐬, is given by [21, 22]𝑝𝑠𝑖=[](𝛼+2)𝛼(𝛼+1)/2(𝛼/2+1)||𝑠(𝛼(𝛼+1)/2)+𝑖||/𝑑(𝛼+3).(6)

Here, 𝑑 is the standard deviation, and 𝛼 controls the sparseness. We first estimate 𝑝(0) and 𝑑, using which, 𝛼 is evaluated as𝛼=2𝑘+𝑘(𝑘+4),2𝑘1(7) where𝑘=𝑑2𝑝(0)2,𝑑=𝐸𝑠𝑖2.(8) Next, the maximum a posteriori (MAP) estimation of the density model (6) is found using the shrinkage function given by 𝑔𝑠𝑖=1𝑠2𝑑sign𝑖𝑚,(9) where𝑚||𝑠=max0,𝑖||𝑎𝑑2+12𝑠𝑖+𝑎𝑑24𝜎2,(𝛼+3)(10)𝑎=𝛼(𝛼+1)2.(11) In (10), 𝜎 represents noise level. Using the above equations, the value of 𝑝(0) is approximated to be 0.707.

3.2.3. 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 𝐖. Thereafter, these components are shrunk using the shrinkage function given in (9), and the sample is then taken out of the ICA domain using 𝐖𝑇. Finally, Canny edge-detection algorithm [1] is applied to the image.

4. 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.

4.1. 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 𝐖 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 𝐖 remains same for all known/unknown images [20].

4.2. 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.

4.3. 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.

4.4. Application to Colored Images

The proposed approach is extended to colored images. Matrix 𝐖, computed for gray scale images, is employed for the colored images as well. White Gaussian noise is added separately and edge-detection phase is repeated individually for all three components R, G, and B. The results are given in Figure 7. Three colored images 7(a), 7(e), and 7(i) are tested with the proposed approach. Figures 7(b), 7(f), and 7(j) show the respective images with 3 dB white Gaussian noise added. Figures 7(c), 7(g), and 7(k) illustrate the results of NLMCanny applied to the respective noisy images, and the results of the proposed approach are shown in Figures 7(d), 7(h) and 7(l). Canny fails to provide satisfactory results because of the high noise level. However, our approach offers noticeably improved results.

4.5. Objective Evaluation of the Proposed Approach

Three important criterions must be fulfilled for the better performance of the edge-detection technique. (1) The edge detector should find all the real edges and not find any false edges. (2) The edges should be found in the correct place. (3) There should not be multiple edges found for a single edge [24]. Detailed subjective comparison for gray-scale as well as colored images is depicted in Figures 8(a), 8(c), and 8(e) in Figure 8 depict the NLMCanny results for gray-sale images. The respective proposed approach results are depicted in (b), (d), and (f) in Figure 8. Similarly. Figures 8(g), 8(i), and 8(k) depict the NLMCanny results for colored images, and the respective proposed approach results are depicted in Figures 8(h), 8(j), and 8(l). 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 (eRMS), peak signal-to-noise ratio (SNRPeak), signal-to-noise ratio (SNRRMS), and Pratt’s figure of merit (FOM) (refer to (12), (13), (14), and (15), resp.) [4, 24]. eRMS=1𝑀𝑁𝑀1𝑟=0𝑁1𝑐=0[]𝐸(𝑟,𝑐)𝑂(𝑟,𝑐)2,(12)SNRPeak=10log10(𝐿1)2(1/𝑀𝑁)𝑀1𝑟=0𝑁1𝑐=0[]𝐸(𝑟,𝑐)𝑂(𝑟,𝑐)2,(13)SNRRMS=𝑀1𝑟=0𝑁1𝑐=0[]𝐸(𝑟,𝑐)2𝑀1𝑟=0𝑁1𝑐=0[]𝐸(𝑟,𝑐)𝑂(𝑟,𝑐)2,(14) where 𝑂(𝑟,𝑐) is the original image (one with added noise), 𝐸(𝑟,𝑐) is the final image of size 𝑀×𝑁, and 𝐿 is the number of gray levels, that is, 256. For colored images, objective measures are calculated for each channel and average is computed. Pratt’s figure of merit is defined by [4]1FOM=𝐼𝑁𝐼𝐴𝑖=111+𝛼𝑑2,(15)𝐼𝑁=max(𝐼𝐴,𝐼𝐼), where 𝐼𝐼 and 𝐼𝐴 represent the number of ideal and actual edge map points, 𝛼 is a scaling constant, and 𝑑 is the separation distance between actual and ideal edges. 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 SNRRMS, SNRPeak, eRMS, and FOM for the proposed approach are higher.

5. Conclusion

A new approach based on ICA has been proposed for edge-detection 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, thereby speedingup its execution on the computer. Change in step size from 1 to 4 increases the speed 16 times. Step size of 4 has been shown to produce acceptable results. On a 2.47 GHz PC equipped with 4 GB of RAM, NLMCanny took 238.1 seconds to process gray-scale Barbara image. The same image took 448 seconds using the proposed approach with the step size of 1 and 32.4 seconds with the step size of 4. Superiority of the proposed approach has been validated using both subjective as well as objective measures. As a continuation of this work, we plan to test the approach with images in other research areas (e.g., medical images). We also plan to test it on the images corrupted with other types of noises.