A modified Canny edge detector based on weighted least squares


Edge detection is the front-end processing stage in most computer vision and image understanding systems. Among various edge detection techniques, Canny edge detector is the one of most commonly used. In this paper a modified Canny edge detection technique focusing on change of the Sobel operator is proposed. Instead of convolution kernels, the weighted least squares method is utilized to calculate the horizontal and vertical gradient. Experimental results show that the new detector can detect some edges which are not observed in the results using the Canny edge detector.

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
Fig. 9
Fig. 10
Fig. 11
Fig. 12
Fig. 13
Fig. 14
Fig. 15
Fig. 16
Fig. 17
Fig. 18
Fig. 19
Fig. 20
Fig. 21
Fig. 22
Fig. 23
Fig. 24


  1. Bowyer K, Kranenburg C, Dougherty S (2001) Edge detector evaluation using empirical ROC curves. Comput Vis Image Understand 84:77–103

    Article  Google Scholar 

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

    Article  Google Scholar 

  3. Gonzalez RC, Woods RE (2008) Digital image processing, 3rd edn. Pearson Prentice Hall, New Jersey

    Google Scholar 

  4. Joshi S, Koju R (2012) Study and comparison of edge detection algorithms. In: 2012 Third Asian Himalayas international conference on internet

  5. Liang J (2019) Canny edge detection. justin-liang, Retrieved from http://justin-liang.com/tutorials/canny/

  6. Qin X, Zhang JS, Yan XD (2011) Local linear least squares kernel regression for linear and circular predictors. Commun Statistics Theory Methods 40(21):3812–3823

    MathSciNet  Article  Google Scholar 

  7. Roy S Module 5.7: Edge detection. National Programme on Technology Enhanced Learning (NPTEL). Retrieved from http://nptel.ac.in/courses/117104069/5

  8. Sharma S, Mahajan V (2017) Study and analysis of edge detection techniques in digital images, international journal of scientific research in science. Eng Technol 3(5):328–335

    Google Scholar 

  9. Sobel I (2015) An isotropic 3 \(\times \) 3 image gradient operator. Retrieved from https://www.researchgate.net/publication/239398674_An_Isotropic_3_3 _Image_Gradient_Operator

  10. Xu Z, Xu BJ, Wu G X (2017) Canny edge detection based on Open CV. In: 2017 13th IEEE international conference on electronic measurement & instruments (ICEMI), pp 53–56

Download references


This work is supported by the National Natural Science Foundation of China (Grant No. 11701069). And the author thanks for the two anonymous reviewers with their comments about the work.

Author information



Corresponding author

Correspondence to Xu Qin.

Additional information

Publisher's Note

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

National Natural Science Foundation of China (Grant No. 11701069).

Rights and permissions

Reprints and Permissions

About this article

Verify currency and authenticity via CrossMark

Cite this article

Qin, X. A modified Canny edge detector based on weighted least squares. Comput Stat 36, 641–659 (2021). https://doi.org/10.1007/s00180-020-01017-8

Download citation


  • Edge detection
  • Gradient
  • Sobel operator
  • Taylor expansion