Abstract
Machine vision requires detectors to obtain the characteristics and the nature of the object in the image. The Canny edge detection method is the most recognisable technique that combines a low-pass Gaussian filter to reduce noise and oppression instead of the maximum threshold and hysteresis for localisation advantages. One of the problems encountered in the Canny approach is in the selection of a threshold value. Using a single fixed threshold value for the maximum gradient is not the optimal choice. Therefore, the Canny approach uses two threshold values, a high threshold and a low threshold to reduce the number of false positive pixels, representing the contours in the image significantly. However, using two fixed threshold values is also not the best option because of the high variation in the image. Although adaptive thresholds have been introduced, they are only used for specific types of images. In this paper, we introduce a method that computes the threshold values from the foreground and background image pixels from global and local image analysis. According to this method, an image is divided into several blocks using multiple resolution levels. After that, a modification sampling approach is used on global and local regions to get the optimal thresholds by selecting the highest between the class variance values. Experiments have been done on four different types of dataset images which are Berkeley, DRIVE, Persian and CASIA V2 datasets. The results show that the proposed method outperforms the Canny method and other adaptive methods.
Access provided by CONRICYT-eBooks. Download conference paper PDF
Similar content being viewed by others
Keywords
1 Introduction
In the area of machine vision applications, the details of edges obtained from each image play an important role in the analysis of image information. Thus, the study of effective image information has become one of the major areas of research among experts. Edge detection is a method in which the change occurs at the pixel in the image. Among the more commonly used detection methods used are the Sobel, Prewitt, Laplace, Log and Canny methods. Even though each of these methods has their advantages in controlling a simpler and less computational algorithm, there are also certain deficiencies in their applications. For the Sobel and Prewitt methods, these apply convolution to solve each pixel dot by using first order differential, however, if the convolution kernel is not properly selected, whether it is too large or too small, the edges are coarsened or a lot of false edges are generated. The Laplace method detects image edges by solving the second-order differential partial zero-value points, so it influences the accuracy of edge detection by detecting the most noise points in the image. The Log method uses a Gaussian filter for data smoothing, then the Laplace non-directional operation will be applied, and uses zero crossing points on the image edge point. However, this method has been seen to wrongly detect edges that involve a bit change of grey scale in the local area [1]. There is a conventional analysis, the Canny operator, that whilst on the basis of theory and practice is concluded to be the most optimal method, often does not bring optimal results. First, in the Canny method the images are smoothed with a Gaussian filter. By using this filter the high frequency signals that make the edge pixels present may also be smoothed. This operation causes loss of edge information while suppressing the noise. Next, the high and low threshold values that have been set manually require thorough prior research and repeated experiments may be required to set the proper threshold. However, in practice, the high and low threshold values will change because the scenes and lighting changes are different for each image. Conventional operators lack the ability of adjustment in many cases, therefore, they cannot get satisfactory detection results [1, 2].
The Otsu method introduced by [3] is generally used in order to make the conventional Canny method adaptively find the high and low thresholds [4,5,6,7,8]. Much research has been done in the modification of the Canny method by using the Otsu method in specific areas such as in logo edge detection [4], classifying Penaeid prawns species [6], segmentation of field leaf image [7] and edge detection in the Berkeley dataset [9]. Fixed partitioning is used in order to thoroughly analyse the image globally and locally. By using fixed partitioning, the local spatial value of an image will be obtained. When using fixed partitioning on the image, the image is divided into several equal parts and for each part of the local histogram will be calculated. One of the main advantages of using this method is that it provides an additional input to the histogram in order to obtain the spatial distribution of image content [10]. A comprehensive approach to producing edges for the different types of image data have been used in this proposed method.
In this paper, we propose an algorithm for finding edge images from various types of images by using an adaptive threshold approach based on local value after fixed partitioning in five different levels of the image. The high threshold value is obtained by using the Otsu method [3] and the low threshold value is obtained by halving the high threshold value. The most accurate edge image obtained will be measured. The experiment shows that the proposed method gives the most accurate edge image compared to the Canny method and previous experiments. Datasets from Berkeley [11], DRIVE [12] and Persian [13] have been used since the ground truth images are provided as well as to validate data from CASIA V2.
2 An Adaptive Threshold Based on Multiple Resolution Levels for Canny Edge Detection
As each image is retrieved, it is transformed into grey level images. The image is then partitioned into different levels. Canny edge detection will be used to detect the edge with assistance from the Otsu method but some modification is applied in order to get the best high threshold (H t ) value and low threshold (L t ) value. Here, by using multiple resolutions of images, consideration variance values on global for L 1 and local spatial value in L 2 until L 5 are carried out.
Let L be an m × m partitioning image and each represented image partition in level L m where \( m = 1,2, \ldots ,5 \). In each level, partition L mj will contribute to give local H t and L t values where \( j = 1,2, \ldots ,m^{2} \) (see Fig. 1).
For non-partitioned and global analysed images L 1, H t and L t will be obtained directly [2, 9]
The proposed approach uses this concept to fix the partitioning in each L m image as carried out in [9]. Here, modifications are in determining the spatial H t and L t values in every local partition. At each stage of the resulting minimum value of H t will be selected.
Then, the corresponding L t for each L mj is
Next, the minimum value of L t
where \( n = 1,2,3, \ldots ,10. \)
Furthermore, the value H t and L t that give the accurate edge image are selected.
3 Experiment and Results
In this study datasets from Berkeley [11], DRIVE [12] and Persian [13] which provide the ground truth images been used. In addition, the iris data from CASIA V2 have also been used. Even though the DRIVE and Persian databases provide the ground truth images, in this experiment some modification has been made because the ground truth images provided in the dataset are for binary image analysis. So, in order to compare with the result from this experiment, edge images from the binary image provided have been produced.
Here, the measurement is Figure of Merit (FOM) provided by Pratt [14], which is:
where N 1 and N T refer to the number of ideal and the actual edge points, while, d i is the pixel Euclidean distance of the ith edge detected, and \( \alpha \) is a scaling constant selected to be \( \alpha = \frac{1}{9} \) and is used for penalising the displaced edges. Larger FOM values (values are between 0 and 1) indicate better performance in the resultant images.
Here only \( n = 1,2,3, \ldots ,10 \) are considered because from the result of FOM on one of each dataset used shown in Fig. 2 that the most accurate edge image is contained in between that range which is the highest FOM value (marked by the arrow). By using this method 41 values of H t and 41 values of L t will be produced. After that, the edge image obtained is compared with the image obtained from the traditional Canny method and the other adaptive method by [9].
Table 1 shows the FOM values from the Berkeley, DRIVE and Persian datasets. The FOM results from the adaptive method by [9] are not all higher than those from the Canny method. There are certain images that give FOM results lower than the Canny method such as in all four DRIVE images and the Persian02 image. Furthermore, by using the proposed method, the results show that the FOM values are higher than values from the Canny method and the adaptive method by [9] work.
In terms of the image, the results show that the Canny method contained more unwanted edges and that the adaptive method by [9] contained fewer edges which give incomplete edge results. However, the proposed method shows the complete edge image result (see Figs. 3, 4, 5 and 6).
4 Conclusion
This paper proposes a modified Canny edge detection method by applying self-adaptive threshold values selected with the aid of the Otsu method. Furthermore, the calculations have been carried out on images globally and locally using fixed partitioning and at multiple resolution levels. In order to get the optimal threshold value, a sampling approach has been used by calculating the minimum between class variance values from each block.
The results show that from the four type different image datasets used, the proposed method outperforms the Canny method and previous work in terms of FOM values and the edge image results obtained. The result of the image shows the accurate edge image because it contains the edge image from the foreground and has ignored the edge image from the background.
References
Wang, M., Jin, J.S., Jing, Y., Han, X., Gao, L., Xiao, L.: The improved canny edge detection algorithm based on an anisotropic and genetic algorithm, vol. 634, pp. 115–124 (2016)
Jie, G., Ning, L.: An improved adaptive threshold canny edge detection algorithm. In: 2012 International Conference on Computer Science and Electronics Engineering, pp. 164–168, March 2012
Kutty, S.B., Saaidin, S., Megat Yunus, P.N.A., Abu Hassan, S.: Evaluation of canny and sobel operator for logo edge detection. In: ISTMET 2014 - 1st International Symposium on Technology Management and Emerging Technologies, Proceedings, vol. 2, pp. 153–156 (2014)
Hao, G., Min, L., Feng, H.: Improved self-adaptive edge detection method based on Canny. In: Proceedings - 2013 5th International Conference on Intelligent Human-Machine Systems and Cybernetics, IHMSC 2013, vol. 2, no. 2, pp. 527–530 (2013)
Classifying Penaeid prawns species using Canny and Otsu. In: Computer Science and Management Studies, pp. 35–42 (2014)
Wang, J., He, J., Han, Y., Ouyang, C., Li, D.: An adaptive thresholding algorithm of field leaf image. Comput. Electron. Agric. 96, 23–39 (2013)
Lin, C., Su, C.: Modified unsharp masking detection using Otsu thresholding and gray code Chun-Lin, no. 1 (2016)
Othman, Z., Abdullah, A., Prabuwono, A.S.: A statistical approach of multiple resolution levels for Canny edge detection. Intell. Syst. Des. Appl. (ISDA) 2012, 837–841 (2012)
Abdullah, A., Veltkamp, R.C., Wiering, M.A.: Spatial pyramids and two-layer stacking SVM classifiers for image categorization: a comparative study. In: Proceedings of International Joint Conference on Neural Networks, pp. 5–12 (2009)
Smith, P., Reid, D.B., Environment, C., Palo, L., Alto, P., Smith, P.L.: A threshold selection method from gray-level histograms. IEEE Trans. Syst. Man. Cybern. 9(1), 62–66 (1979)
Martin, D., Fowlkes, C., Tal, D., Malik, J.: A database of human segmented natural images and its application to evaluating segmentation algorithms and measuring ecological statistics. In: Proceedings Eighth IEEE International Conference on Computer Vision. ICCV 2001, vol. 2, pp. 416–423 (2001)
Staal, J., Abràmoff, M.D., Niemeijer, M., Viergever, M.A., Van Ginneken, B.: Ridge-based vessel segmentation in color images of the retina. IEEE Trans. Med. Imaging 23(4), 501–509 (2004)
Sadri, J., Yeganehzad, M.R., Saghi, J.: A novel comprehensive database for offline Persian handwriting recognition. Pattern Recogn. 60, 378–393 (2016)
Abdou, I.E., Pratt, W.K.: Quantitative design and evaluation of enhancement/thresholding edge detectors. Proc. IEEE 67(5), 753–763 (1979)
Acknowledgements
The deepest gratitude and thanks to Universiti Teknikal Malaysia Melaka (UTeM) in the sponsorship of this PJP research grant (PJP/2015/FTMK(3B)/S01426).
Author information
Authors and Affiliations
Corresponding author
Editor information
Editors and Affiliations
Rights and permissions
Copyright information
© 2018 Springer International Publishing AG
About this paper
Cite this paper
Othman, Z., Abdullah, A. (2018). An Adaptive Threshold Based on Multiple Resolution Levels for Canny Edge Detection. In: Saeed, F., Gazem, N., Patnaik, S., Saed Balaid, A., Mohammed, F. (eds) Recent Trends in Information and Communication Technology. IRICT 2017. Lecture Notes on Data Engineering and Communications Technologies, vol 5. Springer, Cham. https://doi.org/10.1007/978-3-319-59427-9_34
Download citation
DOI: https://doi.org/10.1007/978-3-319-59427-9_34
Published:
Publisher Name: Springer, Cham
Print ISBN: 978-3-319-59426-2
Online ISBN: 978-3-319-59427-9
eBook Packages: EngineeringEngineering (R0)