A novel edge detection method based on efficient gaussian binomial filter

Edge detection is a fundamental task in digital image processing and analysis, such as recognition, compression, classification, and segmentation [1]–[6]. While, edges contain useful information and features. Edge detection aims to localize the boundaries and image discontinuities over image intensities or textures changes. It also indicates high-frequency bandwidth. This is crucial to physical image aspects and content understanding, such as objects and motion, in computer vision applications [7]–[12]. Poor edge detection tasks dramatically reduce global system performance. The secondary purpose of edge detection is to make images easy to process by removing useful low-frequency content information.


Introduction
Edge detection is a fundamental task in digital image processing and analysis, such as recognition, compression, classification, and segmentation [1]- [6]. While, edges contain useful information and features. Edge detection aims to localize the boundaries and image discontinuities over image intensities or textures changes. It also indicates high-frequency bandwidth. This is crucial to physical image aspects and content understanding, such as objects and motion, in computer vision applications [7]- [12]. Poor edge detection tasks dramatically reduce global system performance. The secondary purpose of edge detection is to make images easy to process by removing useful low-frequency content information.
Edge detection tools can be classified into two categories. The classical methods use spatial linear convolution based on image intensity with a fixed edge operator. There were two types of operators, primary (gradient) and secondary derivatives (Laplacian), such as Sobel, Prewitt, Laplacian, and Canny [13]- [17]. Gradient localizes broad edge peak, while Laplacian detects zero-crossing. On the other hand, Laplacian of Gaussian (LoG) uses a smoothing filter combined with a Laplacian operator to reduce noise. Alternative methods are focused on local statistical computation based on nonlinear transformations. The purpose is to analyze and classify each image pixel as an edge. However, differential techniques are mostly used and easy to implement. Recently, a sophisticated approach to edge detection integrates Convolutional and Deep Neural Networks (CNN/DNN) because of the increasing number of computer vision applications. However, this approach is sensitive to noise, database selection with high complexity implementation in a real-time computer vision system [18]- [22]. In Table 1, we summarize edge detection techniques with applications.

Application Method
Face Recognition [2] Line Edge Map Vision systems [3] DNN Machine vision [4] Multilevel Fuzzy Edge Detection (FMFED) Medical image and Robotics [5] LoG Medical Images [6] Statistical Texture Analysis [7] Roberts, Prewitt, Canny Brain Tumor Segmentation [8] Sobel Robotics, medical imaging [9] DNN Identification interpretation [10] Fractional Derivatives Optics [11] Spin Hall Effect State of forests analysis [12] Canny Satellite Images [13] Prewitt, Kirsch, LoG, morphological Object extraction [14] Fuzzy Mealtime Face Recognition [14] LoG Image processing [15] Robert, Sobel, Prewitt and Canny MRI Medical Images [16] DNN Cataract Detection [18] Canny Synthetic Aperture Radar [19] Oriented Gaussian filter Human discrimination objects [20] Prewitt Computed tomography [21] DNN Meta-materials and Meta-surfaces [22] Optical edge However, noise is a crucial problem in edge detection and contours recovery. It significantly reduces performances of high-level processing, such as image recognition and classification [1], [2], [5], [6]. It is because conventional edge detectors behave as high-pass filtering, which is insufficient to remove lowpass noised content information. In gradient and Laplacian operators, the edge algorithms focus on pixel intensities differences and zero-crossing detection, respectively. They are much sensitive to noise amplitude resulting in false edge detection. This paper aims to develop a novel and robust approach based on Gaussian binomial filters for edge detection in section 2. The proposed method efficiency, speed, and reproducibility are shown in section 3.

Gaussian Binomial filter
We introduce in this section a novel approximation of Binomial Coefficients (BC) [23] based on the Gaussian function. Firstly, the Euler linearization of the powers of a half-period of the sine function ( ) is given by Eq. 1. Which ωk is a pulsation for corresponding harmonic , 0 is a fundamental pulsation expressed by the natural frequency 0 . It leads to where ( ) defines the binomial coefficients, are defined for each , positive integers expressed by Let u s now compute Fourier Transform (FT) of the powers of a half-period of t h e cosine function. Where ( ) denotes Dirac distribution in the frequency domain, = /2 is the frequency for given k harmonic. Let ( ) denotes FT of ( ) expressed by while the Fourier coefficients ( ) related to G ( ) is determined by Therefore, the Fourier coefficients Modulus may express only by ( ) yields Moreover, as stated in [24], we can obtain a precision approximation of the Gaussian function in terms of a sinusoidal function. On the other hand, it well knows that the FT of the Gaussian function is another Gaussian in the frequency domain. Then, the discrete binomial coefficients ( ) with fixed as a function of may be approximated by using a discrete Gaussian function. This function featured by (µ, 2 ) parameters, mean value µ and variance 2. In the following, we compute Gaussian parameters for given ( ) binomials coefficients. We consider ( ) discrete Gaussian function expressed by The ‖a s (k)‖ maximum occurs in the middle of [0, ] for k varying from 0 to , especially when = /2 in Fig. 1.
Let g n (t)denotes the normalized Gaussian function ( = 1) given by We, therefore, have the proposed BC approximation based on the Gaussian function given by For bi-dimensional binomial formulation, one uses the combination of multiples One-dimensional property of Gaussian. Let g 2 (k, l) denotes the discrete 2D filter and g b2 (k, l) their binomial approximation. Let ( , ) is Cartesian positive integer indexes with 0 ≤ , ≤ . g 2 (k, l)) filter is a square matrix with ( + 1) × ( + 1) dimensions. Then we have where = − , and = − .

Proposed edge detection architecture
This subsection describes the proposed scheme to perform edge detection based on Gaussian binomial filter, which consists of four stages shows in Fig. 2. This involves linear low-pass Gaussian filters, linear normalization, and nonlinear operations such as absolute subtraction and mathematical morphological. • Subtraction: The aim of this stage is to compute absolute residual images between primary and secondary stages. The absolute difference operation is used to detect image edge and contours.
• Morphological filtering: Post-processing for image pooling and single pixels removing. We use in this wok morphological open fallowed by close operation using 7 structural element length. This block reduce snowflakes with a radius of less than 7 pixels by opening it with a disk-shaped structuring element having a 7-pixel radius. Fig. 3 shows the pseudo-code to compute 2D Gaussian binomial filter H(k, j). This implementation return (n + 1) × (n + 1) coefficients computed for (k, j) varying from 0 up to n according to equations (9) and (10).

Efficiency
In order to evaluate the efficiency of the proposed Gaussian binomial approximation, we make a comparison between true 1D binomial filter coefficients computation and its Stirling's approximation [25] given by In Fig. 4, we present the Mean Square Error (MSE) and relative error as 1D filter length n increases. In the result, we calculated the Gaussian binomial filter coefficients in range n=4 to 50, for each value of rising from zero over . The proposed approximation has the best accuracy compared to Stirling's formulation. The relative error decreases rapidly for increasing filter size; it passed from ≈ 2 · 10 −2 ( = 4) ≈ 3 · 10 −4 ( = 50). However, Stirling's error decrease slightly over : 2 ≈ 10 −3 ( = 50). Examples of the results given by Stirling's and the proposed approximations of binomial coefficients ( ) are illustrated in Table 2, where n = 4 up to 40 and = 2 + 1. In this results, () Matlab's function was used to recover approximations integer part. It can be seen in the table that the proposed approximation outperform those of Stirling's in the case of the smallest and largest binomial coefficients.

Speed and Reproducibility
This subsection shows simulation results of different methods implemented in Matlab in terms of speed and execution time reproducibility. We have implemented the following algorithms shows in Table 3 to calculate ( + 1) coefficients of 1D Gaussian binomial filter for = 0 up to .   We used a 200000 iterations loop to compute a single binomial coefficient of 10 for each algorithm (bottom plot in Fig. 5). We observe that the proposed algorithm has the lowest execution time, come after Stirling's formulation. Algorithms 1 and 2 present the lowest speed. On the other hand, the proposed approach runtimes increase slightly for increasing filter length n better than Stirling's approximation. Because our approach used only exponential function implementation, multiplication numbers are proportional to filter length n for other approaches presented in Table 3. This makes our implementation speed less sensitive to filter length .

Edge Detection
This subsection covers qualitative and comparative analysis to verify the performance of the proposed algorithm. We discussed two parameters, Entropy and PSNR (Peak Signal to Noise Ratio). Firstly, the entropy E(I) indicates the information measurement in the image I introduced by Shannon [26]. On the other hand, it used to integrate pixel values repetition in the image. Increasing numbers of values denote (M) has high entropy and content, and lowest with a few values which are expressed by Secondly, the PSNR is the ratio between the maximum power of the original image and their MSE with the filtered image. We consider as the original input image, and If it is the output filtered image ( , ) are numbers of rows and columns, respectively. The low MSE induced high PSNR, indicating higher quality edge detection, while low PSNR results in low quality to edge recovering. The PSNR(dB) may be expressed by For analysis, we used primary 30 images on the BSDS500 database [27]. Each image has been resized to 128x128 and converted to grayscale with normalizing intensities. The 2D Gaussian binomial filters 0 and 1 parameters and + 1 have been fixed to 4 and 5, respectively, as shown in Fig. 2. While several types of edge detection approaches are applied to the similar original input image. Table 4 compares Prewitt, LoG, Laplacian, Sobel, and our method through entropy and PSNR. It has been shown that both PSNR and entropy parameters are slightly similar for Prewitt and Sobel and relatively higher compared to LoG and Laplacian approaches. It is clear in the table that the proposed algorithm produces the best performances improvements. This makes our algorithm an efficient method to edge recovering. Whereas The PSNR values remain relatively low because the original grayscale image has been used as a reference in PSNR computation, however, it is sufficient to verify algorithm performance. In Fig. 6, we show some examples of edge detection methods in comparison with the proposed approach. Firstly, the original images doesn't corrupt by noise. These images level are normalized, ranged ∈ [0, 1], and resized to 512x512. The Gaussian binomial filter size is set to 8. The result shows that the proposed approach and LoG algorithm exhibit the best performances. They provide good sharpness and thickness of the edges because of the Gaussian kernel efficiency and smoothing properties. The proposed approach provides high-quality edge detection. They reduce impulsion noise induced by the subtraction stage in Fig. 2 because of a morphological filter. However, others methods have acceptable quality. Secondly, we evaluate algorithm robustness against noise. We use similar parameters, as shown in Fig. 6. Additive Gaussian noise with = 10% has been applied to the original images. Simulation results have been illustrated in Fig. 7. It is clear in the figure that the proposed approach exhibit better result followed by LoG method under noisy conditions. In comparison, Prewitt and Sobel provide average performance. Laplacian yields poor quality to edge recovering. Again, the proposed approach maintains a good quality and is less sensitive to noise. This is due to the use of double low-pass Gaussian filters by smoothing the noised image. These filters reduce noise slightly before edge detection operation as shown in Fig. 7. In the other hand, morphological filter remove individual pixel noise after subtraction operation.

Conclusion
This paper describes a novel image edge detection approach, which may be outlined in four points. First, we perform a low-pass spatial filter using dual 2D Gaussian binomial filters to smooth the image. Second, the normalized filtered images are combined using the absolute difference operator in the spatial domain. Finley, the morphological filter is performed to reduce the impulse noise in images. The proposed approach improved a Significant advantage of the Gaussian binomial filter in terms of speed and efficiency compared to other known methods. Moreover, we show that the suggested edge detection architecture is much simpler and easy to implement. A real-time edge detection implementation based on FPGA (Field-Programmable Gate Array) or GPU (Graphics Processing Unit) is an issue that deserves further investigation.