Assma Azeroual1, Karim Afdel1. 1. Computer Systems and Vision Laboratory, College of Sciences, Ibn Zohr University, Agadir, Morocco.
Abstract
Edge detection is a critical stage in many computer vision systems, such as image segmentation and object detection. As it is difficult to detect image edges with precision and with low complexity, it is appropriate to find new methods for edge detection. In this paper, we take advantage of Faber Schauder Wavelet (FSW) and Otsu threshold to detect edges in a multi-scale way with low complexity, since the extrema coefficients of this wavelet are located on edge points and contain only arithmetic operations. First, the image is smoothed using bilateral filter depending on noise estimation. Second, the FSW extrema coefficients are selected based on Otsu threshold. Finally, the edge points are linked using a predictive edge linking algorithm to get the image edges. The effectiveness of the proposed method is supported by the experimental results which prove that our method is faster than many competing state-of-the-art approaches and can be used in real-time applications.
Edge detection is a critical stage in many computer vision systems, such as image segmentation and object detection. As it is difficult to detect image edges with precision and with low complexity, it is appropriate to find new methods for edge detection. In this paper, we take advantage of Faber Schauder Wavelet (FSW) and Otsu threshold to detect edges in a multi-scale way with low complexity, since the extrema coefficients of this wavelet are located on edge points and contain only arithmetic operations. First, the image is smoothed using bilateral filter depending on noise estimation. Second, the FSW extrema coefficients are selected based on Otsu threshold. Finally, the edge points are linked using a predictive edge linking algorithm to get the image edges. The effectiveness of the proposed method is supported by the experimental results which prove that our method is faster than many competing state-of-the-art approaches and can be used in real-time applications.
Edge detection has been a fundamental operation in computer vision. It is used most frequently for image segmentation based on abrupt changes occurred in image intensities [1]. Edge detection is considered a critical preprocessing step for many applications such as object recognition, segmentation, and active contours. Traditional methods for detecting edges used many techniques to compute the gradients, then non-maximal suppression [2], [3].It is difficult to find a unified approach to edge detection due to the variety of visual phenomena to which correspond salient edges. Similarly to traditional methods, many recent papers have used the gradient to detect image edges [4], [5], [6]. Other methods were inspired from the natural computing [7], [8], [9], [10], these methods used neural network or membrane computing to find edges. Type-2 fuzzy systems were also employed to detect image edges [6], [11], that can be combined with Sobel detector to achieve the same purpose [11].Giannarou et al. [12] presented a framework that combines preselected edge detectors based on the correspondence between their outcomes. The authors proposed two techniques to analyze statistically the correspondence of edge images emerging from multiple operators. Their first technique used the ROC analysis and the second one used the weighted Kappa coefficient method, however, there is a trade-off between detection of minor edges and noise reduction in the weighted Kappa coefficient method. In [13], the Kerr type of nonlinear optical material was used to detect image edges, its operations speed is very high but it is suitable just for white and black images. Later, a vector quantization combined with an edge detection method was used to segment images and was presented on SOM neural network to realize the algorithm adaptively [14], this approach is mainly devoted to medical images. Many other methods [15], [16], [17], [18], [19], [20], [21] have concerned about edge detection, Wu et al. [17] proposed an edge detection method based on a local dimension of complex networks using the weighted combination of the euclidean distance and gray-level similarity indices. There is a trade-off between finding image edges with precision and the time requirement. The majority of the cited works tried to improve the detection quality without decreasing the complexity of their methods.Wavelet transform has been a good method for edge detection, which has been shown by several recent studies [22], [23], [24], [25], [26]. Wavelets based methods are more exact than other methods and are considered better than traditional methods [27]. Faber Schauder Discrete Wavelet Transform (FSDWT) is one of the most important wavelets since it has numerous important properties in image processing. To our knowledge, the first and unique work using FSDWT in edge detection was the work of Douzi et al. [28]. The problem of wavelet-based methods is the choice of extrema coefficients, this choice is done based on a given threshold which is not automatic in several methods.In this paper, we present a new method to detect image edges based on the FSDWT and Otsu threshold. We have chosen the FSDWT because it can be used as a multi-scale edge detector and it has a simple lifting scheme with only arithmetic operations which make our algorithm low complex. In addition, we use the Otsu threshold to choose the FSDWT extrema coefficients which are located on image edges. Since the three fundamental steps performed in edge detection are [1]: image smoothing, edge points detection and edge linking, our proposed method begins by smoothing the image, then detects edge points and finally links edges. Our main contributions are:Automatic image smoothing as a preprocessing step based on the bilateral filter.FSDWT extrema coefficients selection based on Otsu threshold.A low complex edge detection method owing to the use of FSDWT.This paper is organized as follows: Section 2 describes the FSDWT and the Otsu threshold. Section 3 gives details about the proposed method. Section 4 discusses the experimental results and comparisons and section 5 draws the conclusion.
Background
Faber Schauder Discrete Wavelet Transform (FSDWT)
The Faber Schauder transform is more simple to express using the lifting scheme [29]. Let be a real sequence of a one-dimensional signal. The FSDWT transform consists of three steps as shown in Figure 1: The lifting scheme allows constructing an integer version of the Faber Schauder transform by rounding off the prediction and updating steps. Moreover, the Faber Schauder transform can be generalized to two-dimensional signals, which is important for images. The lifting scheme of the transform for two-dimensional signals [28] is given by: Generally, to visualize the result of a wavelet transform, researchers use pyramidal image sequence that represents the variation of information between consecutive resolutions [30], here the scales are separated. For the FSDWT, it is natural to visualize its coefficients in one image, called mixed scales representation shown in Figure 2. Here, each coefficient is represented at the point where its related basis function reaches its maximum.
Figure 1
Lifting scheme of FSDWT.
Figure 2
(a) Original image. (b) Mixed scales representation of image in (a).
Splitting: this step splits the entire set of signal () into two disjoint frames. One frame consists of even index samples such as , this frame is called as . The other frame consists of odd samples such as , this frame is called as . Each group consists of one half samples of the original signal.Predicting: the odd coefficients are predicted from a linear combination of the neighboring even coefficients, which allows using the correlation between odd and even coefficients ( and ). The sequence is determined by the following:Updating: the object of this step is to keep some original signal properties in the sequence , . For Faber Schauder transform the updating step is a simple interpolation of :Lifting scheme of FSDWT.(a) Original image. (b) Mixed scales representation of image in (a).
Otsu threshold
Thresholding can be viewed as a statistical decision theory problem whose aim is to minimize the average error incurred in assigning pixels to two or more classes. Otsu's method [31] is an attractive method that maximizes the between-class variance [1]. The basic idea of this method is that well-thresholded classes have to be distinct with respect to the intensity values of their pixels and the converse must be true. The important property of Otsu's method is that it is based entirely on computations performed on the histogram of an image.Let be the L distinct intensity levels in a digital image I of size , and let denote the number of pixels with intensity i, we have . We can obtain the normalized histogram of components by using the following: whereTo find the Otsu threshold we follow six steps: The image can be then segmented as:Compute the normalized histogram.Compute the cumulative sumsCompute the cumulative meansCompute the global intensity meanCompute the between-class varianceObtain the Otsu threshold as the value of k for which is maximum. If the maximum is not unique, obtain by averaging the values of k corresponding to the various maxima detected.
Materials & methods
In this section, we first introduce the [28] FSDWT based detector deficiencies. It follows that a new extrema coefficients extraction method is given based on FSDWT and Otsu threshold, which depends upon an automatic threshold and not a fixed threshold. Finally, a novel edge detection method using FSDWT and Otsu threshold is presented.
The problem of [28] algorithm
The algorithm of [28] consists of two steps. In the first step, regions where there is an important density of FSDWT extrema coefficients are selected. This step is done by fixing for each pixel, a percentage of extrema coefficients in a centered window. In the second step, the spatial orientation information was used to refine the edge detection. This method gives good results in terms of complexity, however, it presents discontinuities and some directional edges cannot be detected. In addition, the percentage taken to select the FSDWT extrema coefficients should be chosen as an automatic value depending on the image characteristics. The results of Douzi et al. detector were shown in Fig. 3 (b) of [28].
Preprocessing operations
Before applying the FSDWT on the image to detect edge pixels, we firstly smooth it using bilateral filter. Since image smoothing is an important step before detecting edge points [1], the majority of edge detection methods used it as a preprocessing operation. Many techniques use Gaussian filters to reduce noise, however, it does not preserve edges. For this reason, we have chosen to use the bilateral filter since it preserves edges while averaging within smooth regions of an image.To choose an appropriate pixel neighborhood diameter α, we first estimate the image noise, then the parameter α will depend on this estimation. The following steps show the preprocessing operations: Small values of MSE express a small amount of noise, that is why the parameter should be chosen smaller. While for MSE greater than 8, the image contains much more noise, hence the parameter should be bigger, and for a medium noise, the parameter should be chosen as quite big. The choice of these parameters is discussed on experimental results section.Apply the bilateral filter on the image with a pixel neighborhood diameter of 5.Compute the mean-squared error (MSE) between the original image and the smoothed image.Determine α based on the following:
The FSDWT extrema coefficients selection
To overcome the problems of [28] edge detector, we propose an improved method based on Otsu threshold.For an input image I of size , let be the FSDWT coefficients in mixed scales representation which is shown in Figure 3. The values of coefficients of the image in Figure 3 (a) are on the interval and the extrema coefficients are colored with black color (Figure 4). When we consider the top view of the FSDWT coefficients (Figure 5) the most of the black points are located on the contours of the original image, these black regions correspond to FSDWT extrema coefficients. We notice also that the number of extrema coefficients is less than the other coefficients number, which can be seen in the Figure 6 that presents the histogram of these coefficients and shows the extrema coefficients found for the image in 3 (a) where .
Figure 3
(a) Original image. (b) Mixed scales representation of FSDWT coefficients.
Figure 4
3D representation of FSDWT coefficients.
Figure 5
Top view of FSDWT coefficients.
Figure 6
Histogram of FSDWT coefficients of the image in Figure 3(a).
(a) Original image. (b) Mixed scales representation of FSDWT coefficients.3D representation of FSDWT coefficients.Top view of FSDWT coefficients.Histogram of FSDWT coefficients of the image in Figure 3(a).After applying the FSDWT on the image, the important step is to select extrema coefficients where we can find edges. The idea is to divide the coefficients into two classes: class E containing the extrema coefficients and class N of non-extrema coefficients, that is the reason behind using Otsu threshold in our proposed method, since Otsu thresholding is an optimal method to separate between classes [1]. To get the classes E and N we apply FSDWT on the image, then we follow the steps described in section (Otsu threshold) to compute the Otsu threshold of the FSDWT coefficients. The steps below are followed to obtain classes E and N: The Figure 7 shows the coefficients for different images with , the class E coefficients are in white color, and the class N coefficients are in black color. The class E coefficients correspond to the image edge pixels.
Figure 7
(a) presents the original images. (b) presents the T of each image FSDWT coefficients. (c) presents the E class coefficients colored in white color.
The input image is smoothed as described in section (Preprocessing operations).The FSDWT coefficients of the smoothed image are computed.The of coefficients is calculated.Each coefficient absolute value is compared with by the following:(a) presents the original images. (b) presents the T of each image FSDWT coefficients. (c) presents the E class coefficients colored in white color.
Edge detection algorithm
The proposed method first smooths the input image by bilateral filter based on noise estimation, then obtains the FSDWT coefficients. It follows that Otsu threshold is used as a maxima FSDWT coefficients selection tool. The outline of the proposed method is:The input image is smoothed by the bilateral filter based on noise estimation.Compute the FSDWT of the smoothed image.Extract the FSDWT extrema coefficients as described in the previous sections.The PEL (Predictive edge algorithm) [32] is used to link edge pixels. We have chosen this algorithm owing to its low complexity and effectiveness.
Results & discussion
We use 16 images obtained from the standard database to test our proposed work, these images are of size () presented in Figure 8. The proposed approach has been fully implemented and optimized in OpenCV C++ using an Intel core i7 CPU system and 8 GB in the memory. We take into consideration the parameters , , and for our experimental results to find the optimal parameter α for smoothing. The proposed approach is compared with four detectors, Canny, Laplacian, Sobel, and Prewitt.
Figure 8
Standard Dataset.
Standard Dataset.Different methods have been proposed to evaluate the results of an edge detection but none of them reached a large acceptance in the community [33]. It is not so trivial to obtain ground truth solutions to evaluate an edge detection technique performance [17].
Optimal values of , ,
To choose the optimal values of , , and , we apply our method to different images to detect the image edges, figures Figure 9, Figure 10, Figure 11, Figure 12, Figure 13, Figure 14 show the results for different values of , , . These parameters give good results for , , and .
Figure 9
Edge detection of ‘cameraman’ image (a) under different values of α1 (b)–(f).
Figure 10
Edge detection of ‘clock’ image (a) under different values of α1 (b)–(f).
Figure 11
Edge detection of ‘boat’ image (a) under different values of α2 (b)–(f).
Figure 12
Edge detection of ‘tree’ image (a) under different values of α2 (b)–(f).
Figure 13
Edge detection of ‘mandril’ image (a) under different values of α3 (b)–(f).
Figure 14
Edge detection of ‘moon’ image (a) under different values of α3 (b)–(f).
Edge detection of ‘cameraman’ image (a) under different values of α1 (b)–(f).Edge detection of ‘clock’ image (a) under different values of α1 (b)–(f).Edge detection of ‘boat’ image (a) under different values of α2 (b)–(f).Edge detection of ‘tree’ image (a) under different values of α2 (b)–(f).Edge detection of ‘mandril’ image (a) under different values of α3 (b)–(f).Edge detection of ‘moon’ image (a) under different values of α3 (b)–(f).
Optimal value of β
To select the extrema coefficients of FSDWT we use the relation between and β expressed in section 3. The results in Figure 15 prove that is the optimal parameter to choose the FSDWT extrema coefficients which are located on the image edge points.
Figure 15
FSDWT extrema coefficients under different values of parameter β.
FSDWT extrema coefficients under different values of parameter β.
Comparison with other methods
In this section, we compare our method with Canny, Laplacian, Sobel, and Prewitt edge detectors. The results of this comparison are shown in Figure 16.
Figure 16
Comparison between our method and other methods.
Comparison between our method and other methods.
Cost in time
The cost in time of our proposed algorithm is detailed in Table 1. According to Table 1 the total time required by our proposed edge detector is small and takes just some milliseconds. The Table 2 shows a comparison of the time requirement between our proposed method and other methods, this comparison proves that our proposed method performs well and has less time requirement than others and gives an approximate speed-up of 4.5 times.
Table 1
Run-time (ms) of the proposed edge detector.
Image
Other processing
Smoothing
Edge points
Edge linking
Total time
Bird
0.008
5.586
8.124
1.74
15.458
Cameraman
0.007
5.715
7.962
2.51
16.194
Clock
0.006
5.655
7.501
2.40
15.562
Clown
0.004
5.563
7.988
1.88
15.435
House
0.006
5.531
8.110
2.29
15.937
Table 2
Time (ms) requirement comparison between our method and others.
Image
Canny
Laplacian
Sobel
Prewitt
Proposed
Bird
74.553
75.902
85.334
76.417
15.458
Cameraman
72.195
76.963
92.168
75.286
16.194
Clock
69.589
73.452
88.247
75.309
15.562
Clown
77.520
74.830
88.256
74.923
15.435
House
74.362
76.040
92.222
76.824
15.937
Run-time (ms) of the proposed edge detector.Time (ms) requirement comparison between our method and others.
Conclusion
This paper described an edge detection method based on FSDWT and Otsu threshold. The FSDWT extrema coefficients were selected using the Otsu threshold to obtain edge points which were linked to get finally the image edges. Since FSDWT contains only arithmetic operations, our proposed method has low complexity and effectuates a multi-scale edge detection, which is proved by the experimental results. Our proposed method can be useful for real-time applications because it has low requirements in time.
Author contribution statement
Assma Azeroual, Karim Afdel: Conceived and designed the experiments; Performed the experiments; Analyzed and interpreted the data; Contributed reagents, materials, analysis tools or data; Wrote the paper.
Funding statement
This research did not receive any specific grant from funding agencies in the public, commercial, or not-for-profit sectors.
Competing interest statement
The authors declare no conflict of interest.
Additional information
No additional information is available for this paper.