Skip to main content

Canny edge detector improvement using an intelligent ants routing


Canny operator provides simple technique to extract the useful edge information from image. However, it suffers from two problems: a difficulty to choose the thresholds values and the presence of broken edges. This paper proposes to improve Canny detector in two steps: First, adaptive Otsu threshold is used to select appropriate thresholds. Then, a new variant of ant colony optimization (ACO) algorithm is used to recover missing edges. From binary image, extracted edge endpoints are used as starting pixels for an intelligent ants routing mechanism. Ants are directed to suitable contour areas and missing edges are retraced via the pheromone traces. Proposed improvements are evaluated with entropy and kappa methods. Experimental results are good and assert approach’s ability to recover most of the broken edges, particularly in noisy clinical images.

This is a preview of subscription content, access via your institution.

Fig. 1
Fig. 2
Fig. 3
Fig. 4
Fig. 5
Fig. 6
Fig. 7
Fig. 8


  • Banharnsakun A (2018) Artificial bee colony algorithm for enhancing image edge detection. Evol Syst.

    Article  Google Scholar 

  • Bao P, Zhang L, Wu X (2005) Canny edge detection enhancement by scale multiplication. IEEE Trans Pattern Anal Mach Intell 27(9):1485–1490

    Article  Google Scholar 

  • Benhamza K, Seridi H (2018) Improvement on image edge detection using a novel variant of the ant colony system. J Circuits Syst Comput 28:1950080

    Article  Google Scholar 

  • Bryant DJ, Bouldin DW (1979) Evaluation of edge operators using relative and absolute grading. In: Proceedings of the IEEE Computer Society Conference on Pattern Recognition and Image Processing, Chicago, pp 138–145

  • Canny J (1986) A computational approach to edge detection. IEEE Trans Pattern Anal Mach Intell 8(6):679–698

    Article  Google Scholar 

  • Cohen J (1960) A coefficient of agreement for nominal scales. Educ Psychol Meas 20(1):37–46

    Google Scholar 

  • Davoodianidaliki M, Abedini AS, Hankayi M (2013) Adaptive edge detection using adjusted ant colony optimization. In: International archives of the photogrammetry, remote sensing and spatial information sciences, vol XL-1/W3, pp123–126, SMPR 2013, 5–8 October 2013

  • Deng CX, Wang GB, Yang XR (2013) Image edge detection algorithm based on improved canny operator. In: Proceedings of the 2013 international conference on wavelet analysis and pattern recognition, Tianjin, July, 2013

  • Dong Y, Li M, Li J (2013) Image retrieval based on improved canny edge detection algorithm. In: International conference on mechatronic sciences, electric engineering and computer (MEC), Shenyang, China, Dec 20–22, 2013

  • Dorrani Z, Mahmoodi MS (2016) Noisy images edge detection: ant colony optimization algorithm. J AI Data Min 4(1):77–83

    Google Scholar 

  • Fang M, Yue GX, Yu QC (2009) The study on an application of otsu method in canny operator. In: Proceedings of ISIP’09, 2009, pp 109–112, August 2009

  • Farag AA, Delp EJ (1995) Edge linking by sequential search. Pattern Recogn 28:611–633

    Article  Google Scholar 

  • Fernandes C, Vitorino R, Agostinho CR (2005) Self-regulated artificial ant colonies on digital image habitats. arXiv preprint cs/0512004

  • Gang L, Shangkun N, Yugan Y, Guanglei W, Siguo Z (2013) An improved moving objects detection algorithm. In: Proceedings of the 2013 international conference on wavelet analysis and pattern recognition, Tianjin, July, 2013

  • Gao J, Liu N (2012) An improved adaptive threshold canny edge detection algorithm. In: International conference on computer science and electronics engineering, vol. 1, Zhejiang, China, pp 164–168, 2012

  • Ghita O, Whelan PF (2002) Computational approach for edge linking. J Electron Imaging 11:479–485

    Article  Google Scholar 

  • Guan YP (2008) Automatic extraction of lips based on multi-scale wavelet edge detection. IET Comput Vis 2(1):23–33

    Article  Google Scholar 

  • Guan T, Zhou D, Peng K et al (2015) A novel contour closure method using ending point restrained gradient vector flow field. J Inf Sci Eng 31(1):43–58

    Google Scholar 

  • Gupta RK, Cho S-Y (2013) Window-based approach for fast stereo correspondence. IET Comput Vis 7(2):123–134

    Article  Google Scholar 

  • Han S-q, Wang L (2002) A survey of thresholding methods for image segmentation. Syst Eng Electron 24(6):91–94

    Google Scholar 

  • Hemanth J, Balas VE (2019) Nature inspired optimization techniques for image processing applications. Springer International Publishing, Switzerland

    Book  Google Scholar 

  • Jevtic A, Li B (2013) Ant algorithms for adaptive edge detection. In: Search Algorithms for Engineering Optimization. InTech, Rijeka, Croatia

    Google Scholar 

  • Jiang K, Li A-H, Cui Z-G, Wang T, Su Y-Z (2013) Adaptive shadow detection using global texture and sampling deduction. IET Comput Vis 7(2):115–122

    Article  Google Scholar 

  • Li J, Ding S (2011) A research on improved canny edge detection algorithm. In: International conference on applied informatics and communication. Springer, Berlin Heidelberg, pp 102–108

  • Li Y, Wang S, Tian Q, Ding X (2015) A survey of recent advances in visual feature detection. Neurocomputing 149:736–751

    Article  Google Scholar 

  • Lu D-S, Chen C-C (2008) Edge detection improvement by ant colony optimization. Pattern Recogn Lett 29(4):416–425 (ISSN 0167-8655)

    Article  Google Scholar 

  • Nakib A, El-Ghazali T (2017) Metaheuristics for medicine and biology, vol 704. Springer, Berlin Heidelberg

    Book  Google Scholar 

  • Oliva D, Abd-Elaziz M, Hinojosa S (2019) Image segmentation using metaheuristics. Metaheuristic algorithms for image segmentation: theory and applications. Springer, Cham, pp 47–58

    Chapter  Google Scholar 

  • Oskoei MA, Hu H (2010) A survey on edge detection methods. Technical report: CES-506. University of Essex, Colchester

  • Otsu NA (1979) Threshold selection method from gray-level histograms. IEEE Trans Syst Man Cybern 9(1):62–66

    Article  MathSciNet  Google Scholar 

  • Pal NR (1993) A review on image segmentation techniques. Pattern Recogn 26(9):1277–1294

    Article  Google Scholar 

  • Rong W, Li Z, Zhang W, Sun L (2014) An improved canny edge detection algorithm. In: Proceedings of 2014 IEEE international conference on mechatronics and automation, Tianjin, China August 3–6, 2014

  • Rong W, Li Z, Zhang W, Sun L (2014) An improved canny edge detection algorithm. In: IEEE international conference on mechatronics and automation, August 3–6, Tianjin, China, 2014

  • Sappa AD, Vintimilla BX (2007) Cost-based closed-contour representations. J Electron Imaging 16:1–9

    Google Scholar 

  • Sen D, Pal SK (2010) Gradient histogram: thresholding in a region of interest for edge detection. Image Vis Comput 28:677–695

    Article  Google Scholar 

  • Sezgin M (2004) Survey over image thresholding techniques and quantitative performance evaluation. J Electron Imaging 13(1):146–168

    Article  Google Scholar 

  • Shannon CE (1948) A mathematical theory of communication. Bell Syst Tech J 27:379–423

    Article  MathSciNet  Google Scholar 

  • Shih FY, Cheng S (2004) Adaptive mathematical morphology for edge linking. Inform Sci Inform Comput Sci 167(1-4):9–21

    MathSciNet  MATH  Google Scholar 

  • Shrivakshan GT, Chandrasekar CA (2012) Comparison of various edge detection techniques used in image processing. IJCSI Int J Comput Sci Issues 9(5):272–276

    Google Scholar 

  • Sonka M, Hlavac V, Boyle R (2014) Image processing, analysis, and machine vision. Cengage Learning, Boston

    Google Scholar 

  • Subbotin S, Oleynik A (2007) Modifications of ant colony optimization method for feature selection. In: CADSM’2007, Polyana, Ukraine, 20–24th Feb 2007

  • Verma OP, Hanmandlu M, Sultania AK (2010) A novel fuzzy ant system for edge detection. In: Computer and information science (ICIS), IEEE/ACIS 9th international conference, pp 228–233

  • Wang B, Fan S (2009) An improved canny edge detection algorithm. In: Second international workshop on computer science and engineering

  • Wang Z, He SX (2004) An adaptive edge-detection method based on Canny algorithm. J Image Graph 8(9):957–962

    Google Scholar 

  • Yu C, Song Y, Meng Q, Zhang Y, Liu Y (2015) Text detection and recognition in natural scene with edge analysis. IET Comput Vis 9(4):603–613

    Article  Google Scholar 

  • Zhu O, Pay M, Riordan V (1996) Edge linking by a directional potential function (DPF). Image Vis Comput 14:59–70

    Article  Google Scholar 

  • Ziou D, Tabbone S (1998) Edge detection techniques-an overview. Pattern Recognit Image Anal 8:537–559

    Google Scholar 

Download references

Author information

Authors and Affiliations


Corresponding author

Correspondence to Karima Benhamza.

Additional information

Publisher's Note

Springer Nature remains neutral with regard to jurisdictional claims in published maps and institutional affiliations.

Rights and permissions

Reprints and Permissions

About this article

Check for updates. Verify currency and authenticity via CrossMark

Cite this article

Benhamza, K., Seridi, H. Canny edge detector improvement using an intelligent ants routing. Evolving Systems 12, 397–406 (2021).

Download citation

  • Received:

  • Accepted:

  • Published:

  • Issue Date:

  • DOI: