opencv achieve canny edge detection implemented in Python

import cv2

img = cv2.imread('../data/1.jpg')

c1 = cv2.Canny(img, 128, 200)
c2 = cv2.Canny(img, 32, 128)

cv2.imshow('c1', c1)
cv2.imshow('c2', c2)
cv2.waitKey()
cv2.destroyAllWindows()
cv2.imwrite('../data/cannyc1.jpg', c1)
cv2.imwrite('../data/cannyc2.jpg', c2)

Original
Here Insert Picture Description
c1
Here Insert Picture Description
c2
Here Insert Picture Description

Step canny edge detection algorithm is still very serious study found that complex several times, but did not know what the canny edge detection of specific practical usefulness and significance is that if there Gangster know, wish to comment on a wave of teaching the message area, thanks

Mediocre life we ​​should not drown each other

Published 45 original articles · won praise 24 · views 3424

Guess you like

Origin blog.csdn.net/my_name_is_learn/article/details/103991830