Color Edge Detection Using the Normalization Anisotropic Gaussian Kernel and Multichannel Fusion

Color edge detection is a key technique in image processing for vision engineering. In this paper, a new edge detector based on normalized Anisotropic Gaussian Directional Derivative and Multi-channel Gradient Matrix Fusion is proposed. Firstly, the color image is decomposed into six components in the RGB model and the HSV model, respectively. The gradient amplitude of the image edge is emphasized by Contrast Limited Adaptive Histogram Equalization (CLAHE). A normalized Anisotropic Gaussian Derivative is constructed by Multi-direction ANGK to extract the edge strength map of original color image. Finally, Singular Value Decomposition (SVD) was adopted to fuse each channel component in combination with a Multi-channel Morphological Gradient Derivative Matrix to improve the accuracy of edge detection. The proposed detector is compared with three state-of-art edge detectors with the Berkeley dataset (BSDS500) as the database. The results show that the proposed algorithm is more prominent in the performance of noise robustness and edge detection resolution.


I. INTRODUCTION
EDGE detection is a basic work of image processing in the field of computer vision. It is applied in many image processing tasks, such as image segmentation [1]- [3], target extraction [4], defect detection [5], dimension measurement [6], [7], etc. Therefore, developing an efficient and reliable edge detector is necessary for many machine visual projects. Over the past several decades, various color edge detectors based on local analysis can be roughly divided into three groups [8]: differential methods [5], [9], [10], fusion methods [11]- [13], and statistical methods [14]- [16].
The earlier differential methods make those points which are the maximum of the values of first-order directional derivatives or the zero-crossings of the second-order directional derivatives in a local window as candidate edge pixel [8]. It is common for calculation edge response The associate editor coordinating the review of this manuscript and approving it for publication was Naveed Akhtar . by discrete convolution kernel with image. Many different discrete convolution kernels, such as the Anisotropic Gaussian Directional Derivative Kernel (ANDD) [17], the Adaptive Scale Factor of the Gaussian Kernel (AAGK) [9], the Multi-scale Anisotropic Gaussian First-order Derivative (MFDAG) [18], adopted by researchers to gain good edge detection results. To reduce impulse noise sensitivity for detector, weighted median filter and directional derivatives were combined as Anisotropic Morphological Directional Derivative (AMDD) [19], which can filter most of the nonliner noise, effectively. These computation gradient methods can adjust convolution kernel flexibly to balance noise robustness and edge resolution. Such differential-based edge detectors possess obvious advantages and disadvantages. Moreover, in these based-ANDD detectors, some real edge pixels will be lost in the noise elimination process, and some false edge was detected by stretch effect of the ANDD. They are clear in principle and highly efficient in computation. Nevertheless, it is found that a certain amount of edge VOLUME 8, 2020 This work is licensed under a Creative Commons Attribution 4.0 License. For more information, see https://creativecommons.org/licenses/by/4.0/ information of image texture was discarded by the convolution operator. Fused-based approaches apply a mask to each component of a color image and fuses them into the edges of the color image in different ways [11], [19], [20]. For instance, the GM-ANDD [21] detector fuses the response of the gradient matrix and ANDD from three components in color image. To gain more edge feature and texture details in the image, based on the fusion of edge saturate difference and color edge strength map (CESM), a method of edge difference fusion [22] to accurately extract the edge information. The edge strength map (ESM) of the edge detector [11] based on fusing Morphological Gradient Derivation Matrix (MGDM) to find contour and boundary between background and object. In common, the output fusion methods have excellent effect in edge preservation but sensitive to noise.
The common defect methods based on statistics, analyze the local pattern around each pixel. For example, paper [23] proposed an edge detector based on image enhancement and multi-threshold selection, which can improve the image contrast and noise robustness. This approach has excellent effect in the detection of texture edge. Further, detectors based on local statistical analysis detect edges determined by color and texture transitions, at the same time, they are computationally more demanding [8]. To make the detector computationally efficient, the Principal Component Analysis(PCA) was adopted to analyze the covariance matrix of the gradient while maintaining a good detection for one-pixel edges [12]. Despite the research of the vast literature, detecting edge in color image and maintaining low sensitivity to noise remains a challenging topic. Therefore, it is necessary to propose a color edge detector with low sensitivity to noise while improved the computation efficiency.
Combined with advantages of the aforementioned edge detectors, in this paper, we present an edge detection method based on multi-channel fusion and the normalization of the Anisotropic Gaussian Kernel Gradient Directional Derivative Algorithm (MF-NAGK). First, a color image is decomposed into different single-channel images to gain more texture and thin edge information, the value channel of which is processed by the Contrast Limited Adaptive Histogram Equalization (CLAHE). To fuse texture information of channels, the Normalized Anisotropic Gaussian Kernel is adopted to obtain the gradient matrix image of 5 * K dimension. To avoid the image edge being damaged by noise, we take the maximal singular value of the multi-channel gradient matrix extracted by SVD as the final edge intensity response of the image. Eventually, by incorporating a binarization procedure, a fullfledged framework for color edge detection is developed. The detector abides by the principles of high Signal-to-Noise Ratio (SNR), precise positioning, and high edge resolution, and closely links the image edge details with the information of each channel. The corresponding experimental result shows that, compared with the advanced edge detectors [9], [11], [18], [19], the proposed algorithm has the edge evaluation based on the Precision-Recall Rate (PR) curve and Pratt's The structure of this paper is organized as follows: Section II elaborates the formula and the basic theory of the proposed algorithm. In section III, the new edge detector of a normalized scale space for edge detection and multi-space model fusion are presented. Section IV reports experiment results compared with several kinds of existing edge detectors in the Berkeley database. Section V lists our conclusions.

II. RELATED WORK
This section presents the common definitions and formulas important to this work: the first-order gradient derivation of ANGK and the computation of CESM and CEDM when detecting the edge of a color image.

A. THE ANISOTROPIC GAUSS KERNEL AND ITS FIRST-ORDER GRADIENT DERIVATIVE
In the study of color image edge detection, the ANGK can solve the problem of the disappearance of the gradient of cross edge center. It is widely used instead of the traditional Gaussian to verify image convolution to obtain better edge connectivity [11]. The discretization of ANGK are displayed in Eqs.(1), (2), and (3).
where σ i is the scale factor (σ i >0), ρ is the anisotropic factor (ρ ≥1), K is the number of directions of ANGK, R j is the rotating matrix and θ j is the direction of ANGK. Based on the calculation rule of the gradient response in the ideal step edge, the First Derivative of the Anisotropic Gaussian Kernel (FDAG) is expressed in Eq. (4): An FDAG with θ j = 45 • ,ρ= 2,σ i = 2, and the step edge convolution with FDAG are shown in Fig. 1(a) and (b) respectively.

B. CESM AND CDEM OF COLOR IMAGE IN SVD
For grayscale images or single-channel images represented as I (x, y), ESM and EDM are calculated using ANGKs which are described in Eqs. (5) and (6) respectively. Owing to the coexistence of multi-channel, there are more abundant information in color images compared to grayscale images in almost all fields. Hence, edge detection of color images is more effective than that of grayscale images [24]. To obtain more abundant texture and complete edge information for Specific detection task, Color images can be decomposed into different channel images in different color models. Taking RGB model as an example, any color image can be decomposed into I (x, y) = [I R (x, y) ; I G (x, y) ; I B (x, y)]. The Anisotropic Gaussian Derivative Matrix can be expressed as the result of superposition of three components with Convolution Kernel, as shown in Eq. (7).
where, A x, y|I, θ j , ρ, σ i , γ is the directional derivative matrix of a color image. The singular value decomposition of the Anisotropic Gaussian Directional Derivative Matrix is carried out and the maximum singular value component is selected as the edge intensity amplitude of the color image [11]. The decomposition formula is shown in Eq. (8): where |λ 1 | ≥ |λ 2 | ≥ |λ 3 | is the three singular values, u 1 , u 2 , and u 3 are the three left singular vectors, and v 1 , v 2 , and v 3 are the three right singular vectors. u 1 is selected as the optimal weight vector for gradient fusion at the pixel point (x, y). The calculator of CESM and CEDM of the color image are computed separately using Eqs. (9) and (10): where the maximal singular value is CESM at the pixel, and the corresponding maximum right singular vector v 1 is CEDM at the pixel point (x, y). In addition, it proves that CESM and CEDM are singular value decomposition of the gradient matrix of the color Canny detector [11].

III. A NEW COLOR EDGE DEECTOR
In this section, the edge detection method based on normalized the Anisotropic Gaussian Kernel and Multi-channel Fusion Edge Gradient (MF-NAGK) is described in detail: it is divided into color image channel selection, ideal step edge model establishment, the morphological gradient matrix and the fusion of the edge response value of the multi-channel image.

A. THE DECOMPOSITION OF COLOR IMAGE AND MODELING OF IDEAL STEP EDGES
A color image consists of R, G, B components in RGB model, and consists of H, S, V components in HSV model. In this section, the H components was discarded for the gray scale in the recycle range of [0,2π], and the S and V component were stretched into the pixel range of 0 to 255 as same as R, G, and B component. Contrast Limited Adaptive Histogram Equalization (CLAHE) [25]is a popular method for local contrast enhancement that has been showing powerful and useful for several applications. CLAHE applied to R, G, B components that results to the color distortion and easily amplify the noise response in the color image. The gray value on V channel is independent to illumination intensity, the V-channel was enhanced by CLAHE. The This method relies on two essential parameters: the number of tiles and the contrast limiting factor. In the processes of CLAHE for BSDS datasets, the number of tiles is 10 * 10 and the contrast limiting factor determined by iteration method while entropy of image get the maximal value [26]. The result of a sample image after processing is shown in Fig. 2.
After the contrast-limited histogram equalization, the edge gradient of the target in the value component and the background of similar color is strengthened, thereby increasing the magnitude of the edge gradient, and strengthening the connectivity for subsequent edge. With reference to the continuous ideal step edge in grayscale, the continuous ideal ladder edge in a single-channel image in color images [27] is defined in Eq. (11): where c 1 and c 2 are the color vectors on the two sides of the edge, α is the angle of the direction from high pixel value side to low pixel side of the edge, r is the distance from the origin to the edge, and sign() is the sign function. The expression [xcosα +ysinα] means the projection of the distance from the origin to the point (x, y) in the direction α. The edge segments the 2D plane into two half-planes with the color vectors c 1 and c 2 . The corresponding parameters are shown in the Fig. 3 (b), and the region of c 1 and c 2 are represented using Eqs. (12) and (13) respectively.
Further, the edge intensity response of the ideal step edge pixel coordinates (x, y) on the morphological gradient direction in continuous space is defined in Eq. (15):

B. COLOR EDGE DETECTION USING MF-NAGK
The ANGK was normalized to obtain the other 5 singlechannel edge gradient response graphs except the tonal channel. Morphological Gradient Matrix was obtained by combining the edge gradient response graphs of 5 channels, and then the edge intensity response values of color images were obtained by singular value decomposition. First, Gaussian Kernel is normalized. The normalized derivative of the Anisotropic Gaussian Kernel of ANDD is expressed in Eq. (16).
where β is the normalization parameter, and the corresponding parameter normalization calculation formula displayed in Eq. (17): Combined with Eqs. (4)(16)(17), the discrete formula formed in the image two-dimensional coordinate system z 2 space is shown in Eq. (18) and the limit parameter is presented using Eq. (19).
228280 VOLUME 8, 2020 The optimal scale factor σ i and anisotropic factor ρ are determined by calculating the Signal-to-Noise Ratio (SNR) of ANGK and taking the maximum SNR as reference. If a color image is corrupted by white Gaussian noise with a variance ε 2 , the edge strength response with the normalized Anisotropic Gaussian Kernel at θ j = α is obtained by the maximum of SNR, which would be computed by Eq. (20): It can be seen that the Signal-to-Noise Ratio of the edge response depends on the noise variance on one hand, and is inversely proportional to the anisotropic factor and scale on the other hand. Moreover, when a fixed Gaussian Kernel is used to detect step edges, the edges will over-smooth some small edges due to the increase of the scale factor, because the edge response and the reduction of the noise level causes the smooth edges to be discarded. By convolution (11) and (19), the edge strength response of each pixel can be derived using Eq. (33).
Under different directions of NAGK, each channel image can form the ESM under the corresponding channel. Combined with 5 channels of color image, ESM form a 5 * K MGDM at each pixel point. Accordingly, the response matrix of Morphological Edge Gradient of each pixel can be obtained, as shown in Eq. (22), as shown at the bottom of the page, where, A MGDM x, y|θ j is the morphological gradient response matrix, and I i (x, y|j) is the edge strength response formed in the j direction under the i channel i = R/G/B/S/V, j = 0 · · · K -1. The morphological gradient response matrix of each pixel in the image was calculated by Eq. (22), and the singular value decomposition was carried out to obtain the maximum singular value and corresponding left and right singular vectors. The decomposition process can be represented by Eqs. (23) and (24).
where, λ i is the singular value, u i is the left singular vector, v i is the right singular vector, i = 1, 2, · · · 5. The maximum singular value λ 1 corresponds to the left singular vector u 1 , which is the color space fusion vector at each pixel, and the maximum singular value λ 1 is taken as the final edge strength response of the color image. The right singular vector corresponding to the maximum singular value v T 1 represents the directional information of the edge of the color image, and CESM is the feature enhancement of the maximum left singular vector to the edge direction of the image. CESM and CEDM of the color image are extracted from the Morphological Gradient Matrix. The fusion results of the CESM and CEDM are calculated using Eqs. (25) and (26) respectively.
To obtain higher edge positioning accuracy and ideal edge detection effect, we continue the classic processing methods in Canny algorithm [10]: non-maximum suppression, and hysteresis threshold.
In summary, the edge detection based on MF-NAGK mainly includes MGDM calculation, ESM and EDM extraction, non-maximum suppression and double threshold extraction. The general flow of the algorithm is shown in Fig. 3.

IV. EXPERIMENTAL RESULTS AND ANALYSIS
In this section, experiments are carried out to evaluate the performance of the proposed algorithm. The proposed algorithm is programmed with the Intel Xeon CPU E5-2620 and 32-GB RAM run on Visual Studio 2019 and OpenCV 4.1.2 platforms which is summarized in Algorithm 1.
CEDM same for all detectors. The upper threshold varies from 0.01 to 0.99 with a step of 0.01. The configuration parameters of each detector are shown in Tab. 1.

A. P-R CURVE ASSESSMENT
In this experiment, the edge detection performance of five image for different detectors are shown in Fig. 4. It can be seen that there are many invalid edges in the images of Fig. 4(c) and (d), while Fig. 4(f) exhibits real and effective edges of the color image. It means that the color-Canny and the AAGK detectors detect a certain amount of fuzzy edges, while the proposed method detects more detailed features of real edge. Nevertheless, the edges yielded by the MFDAG method are not smooth enough. In addition, the AAGK detector yields some false detection results at positions of centerline structures. This is mainly caused by the intrinsic defect of the anisotropy stretch effect. The Precision-Recall curve [16] is a widely recognized performance index to evaluate edge location detection on an image data set with GT. Precision is the ratio of the correct number of edge pixels detected to the total number of edge pixels detected by the algorithm. It represents the probability that the detected edge is false. Recall is the ratio of the correct number of edge pixels detected to the total number of real edge pixels in the image. It represents the probability that the detected edge is the real edge. The Precision and Recall ratio of the detected pixel are defined in Eqs. (27) and (28): where TP, FP, and FN represent the number of edge pixels appears in the detection results and ground truth, appears in the detection results but not in ground truth, appears in the ground truth but not in the detection results, respectively. For each detector, different detection results are produced, so as to produce different Precision-Recall data, which can then be characterized by (PR) curve. The F-measure evaluation measure calculates the harmonic average value of precision and recall as expressed using Eq. (29): The Precision-Recall Curve [16] is adopted to evaluate the performance of different detectors on BSDS500. According to the F-measure law [28], the Optimal Data Set (ODS) scale, the Optimal Image Scale (OIS), the Average Precision (AP), and the recall-50% (R50) were calculated and shown in Tab. 2.
It can be seen clearly from Tab. 2. that the proposed edge detector achieves higher values of AP and R50 than the other three detectors. Therefore, the proposed algorithm can detect more delicate edges, which keeps consistency with Fig. 4. It also means that the successful discovery of the meaningful edges is detected through the proposed detector. The F ODS and F OIS indicators are slightly lower than MFDAG and MSAGK, because the edge strength response obtained by AGK is lower than the proposed algorithm, and more edge pixels can be detected under the same threshold condition, which further proves the effectiveness of the algorithm. The P-R curves of five detectors are shown in Fig. 5. The area between the P-R curve of the proposed detector and the coordinate axis is the biggest. It means that the proposed detector obtained the excellent edge detection results among the state-of-art detectors. Accordingly, the higher precision value obtained by fusion gradient information of multi-channel while recall within range of 0 to 0.9. In other words, there are more true edge matched with the GT of image, which mainly attribute to utilize the normalization anisotropic Gaussian directional derivative filters which can accurately obtain the local edge information from the color image. However, it can be found that the precision decreases sharply as the recall rate increases. There are a small number of pixels of false edge and the noise point in the image while a lot of pixel points of the real edge are detected by the operation of multi-channel fusion, which is acceptable in a certain extent.
Besides of the P-R curve metric, the three edge value assessment metrics [30], [31] was also adopted to assess the edge similarity between the detection results of different detectors and ground truth. Detection error rate (DCR), detection common rate (DCR), and detection correct similarity The results of the three edge value assessment metrics in BSDS500 as show in Tab. 3. It can be seen that the higher DCS value was achieved by the proposed detector among the other state-of-art detectors. Visual perception clearly shows that the images shown in the eighth row of Fig. 4 provide better and more true edges as compared to the image of the third row. Therefore, the edge performance of the proposed detector is superior to the other compared detectors.

B. FOM INDEX ASSESSMENT
The Pratt's Fig. of merit [9], [18], [24] was adopted to assess the performance of noise robust for different edge detectors. The matching tolerance distance was set to be 0.75% of the diagonal line of the image. Then, FOM of the detected result is defined by Eq. (33): where N e is the number of the true edge on the ideal edge image, N d is the number of detected edge pixel, d(k) is the distance between the k-th detected edge pixel and the true edge pixel, α is the constant scale factor constant and its value is 1/4. In the experiment, thirty natural color images from BSDS500 were selected for assessment. The Gaussian noise and salt-and-pepper noise were added to the selected images respectively. The Gaussian noise level varied from 0 to 20 with the interval of 2 and the salt-and-pepper noise varied from 0 to 10% with the interval of 1%. The four test images with Gaussian noise level of 10 and the images with salt-andpepper noise of 5% are shown in Fig. 6.
It can be seen that some noise pixel was detected as edge by color-Canny detector and AAGK detector, while proposed detector filter out the vast majority of Gaussian noise in detection results of Fig. 7. In the case of salt-and-pepper noise, as Fig. 9 illustration, the Canny, AAGK, and MSAGK detectors find a large number of false edge pixels, while MFDAG missed a certain amount of true edges. However, there are less noise edge and more truth edge pixels in the detected results of the proposed detector. The average FOMs on the thirty test color images are used to draw the FOM assessment curve. Meanwhile, Fig. 8 (a) and Fig. 8 (b) Illustrates the FOM of the five detectors on the database with the Gaussian noise or the pepper-salt noise, respectively.
In Fig. 8 (a), there is roughly no difference among all of detector in the FOM at origin of the standard deviation equal to 0. The average FOM of both the proposed detector and the MFDAG detector is larger than other three detectors while the noise deviation is 14. The proposed detector reaches the maximum FOM index at all noise levels, which indicates that the improved method has the strongest robustness to Gaussian noise. However, the FOM evaluation curve based on Canny, AAGK, and MSAGK declines rapidly with the improvement of noise level. They are sensitive to liner noise that adopt small scale Gaussian kernels filtering to maintain high edge resolution for detectors.
As the noise percentage increases, the performance of the five detectors decreases in different degrees observed from Fig. 8 (b). Meanwhile, the results represent that the proposed method achieves the best noise-robustness compared to other four detectors. In the 20 of percentage case, the proposed achieves the highest performance. The MSAGK attains the second best followed by the proposed detector. The AAGK and color Canny detector are quite sensitive to salt-and-pepper noise and their FOMs decrease fast with the increase of the percentage. When the percentage  of salt-and-pepper noise is 20, the performance of the four detectors based on linear filtering abruptly degrade but the MFDAG detector and proposed detector can obtain acceptable detection results. The proposed detector achieves better ability against the salt-and-pepper noise, which is mainly attributed to gradient matrix fusion and singular value decomposition obtained by the algorithm when CESM is extracted. Therefore, ability of resistance nonlinear noise of proposed detector is stronger than the other detectors.

C. ANALYSIS OF COMPUTIONAL COMPLEXITY AND DISCUSS
The proposed edge detector has been implemented in open CV. Detection is done on the Intel Xeon CPU E5-2620 and VOLUME 8, 2020   32-GB RAM. For each test image, the proposed algorithm and other four competitive methods were executed 100 times and mean execution times were measured. The mean execution times of different detectors was shown in Tab. 4. It can be seen that the Canny detector performs the best time cost effectiveness for it adopts the isotropic Gaussian Kernel. Except for the canny detector, all the other detectors use the anisotropic Gaussian kernel and the running time is mainly determined by the number of directions and screening operation of the Candidate pixel. For the proposed method, SVD is adopted to extract the effective edge pixels from the multi-channel gradient matrix. Through this procedure, the operations of edge strength value comparison and sorting could be avoided. The proposed detector improves the performance of the edge detection precision and noise robustness with an acceptable time expense.
In addition, the detector proposed in this paper is based on ideal step edge in the drab background color image. we would encourage that the proposed detector to be applied to richer color images dataset. Better object detection and recognition can be acquired while the proposed algorithm is used in real time.

V. CONCLUSION AND FUTURE WORK
In this paper, a new edge detector is proposed based on normalizing the Anisotropic Gaussian Kernel and Multi-channel Gradient Derivative Matrix Fusion for detecting the edge of color natural scene images. The following conclusions can be made: (1) Experimental results on publicly available datasets validate the superiority of the proposed detector over the competing ones. On the BSDS 500 dataset, the proposed method obtains the AP values of 0.72, respectively, an improvement of at least 0.03 over the competing detectors.
(2) In terms of the metric evaluation of FOM index, the proposed method achieved the FOM values of 0.74 and 0.68 in the case of the image deteriorated by liner noise and nonlinear noise, respectively. The proposed algorithm is more efficient in the performance of noise robustness.
For future study, more work will be focused on extracting the appearance defects (such as the corner, ridge and blob features) in color natural scene images based on the edge detection algorithm proposed in this paper. Meanwhile, the deep learning approach will be adopted and combined with the proposed algorithm for identification and classification of appearance defects. Both fusing channels and image enhancement with CLAHE could provide data augmentation for deep learning in future. [