-2

What is the adaptive Canny edge detection, and why is it better than normal canny edge detection? Also is it implemented in matlab ?

Sara
  • 86
  • 2
  • 11
  • Give us a reference. Adaptive Canny edge detection is not a classical topic. –  Aug 22 '16 at 16:32
  • I've read that the only difference between canny edge detection and Adaptive canny detection is that the thresholds are calculated automatically not constant parameter you set. And yes it is implemented in matlab . – Sara Aug 24 '16 at 15:26

2 Answers2

0

I've read that the only difference between canny edge detection and Adaptive canny detection is that the thresholds are calculated automatically not constant parameter you set. And yes it is implemented in matlab

if you have more details add here

Sara
  • 86
  • 2
  • 11
0

I have an implementation of the same using OpenCV:

Use the following snippet:

v = np.median(gray_image)

#---- apply automatic Canny edge detection using the computed median----
lower = int(max(0, (1.0 - sigma) * v))    #---- lower threshold
upper = int(min(255, (1.0 + sigma) * v))  #---- upper threshold
edged = cv2.Canny(gray_image, lower, upper)
cv2.imshow('Edges',edged)

So what am I doing here?

I am taking the median value of the gray scale image. The sigma value of 0.33 is chosen to set the lower and upper threshold. 0.33 value is generally used by statisticians for data science. So it is considered here as well.

Jeru Luke
  • 20,118
  • 13
  • 80
  • 87