Skip to content

Commit a131231

Browse files
committed
draw canny
1 parent 4fa0c95 commit a131231

File tree

1 file changed

+7
-6
lines changed

1 file changed

+7
-6
lines changed

ch19-Canny边缘检测/19.Canny.py

+7-6
Original file line numberDiff line numberDiff line change
@@ -32,10 +32,11 @@
3232
img = cv2.imread('../data/messi5.jpg',0)
3333
edges = cv2.Canny(img, 100, 200)
3434

35-
plt.subplot(121), plt.imshow(img, cmap='gray')
36-
plt.title('Original Image'), plt.xticks([]), plt.yticks([])
35+
cv2.imshow('Edges',edges)
36+
cv2.waitKey(0)
3737

38-
plt.subplot(122), plt.imshow(edges, cmap='gray')
39-
plt.title('Edge Image'), plt.xticks([]), plt.yticks([])
40-
41-
plt.show()
38+
# plt.subplot(121), plt.imshow(img, cmap='gray')
39+
# plt.title('Original Image'), plt.xticks([]), plt.yticks([])
40+
# plt.subplot(122), plt.imshow(edges, cmap='gray')
41+
# plt.title('Edge Image'), plt.xticks([]), plt.yticks([])
42+
# plt.show()

0 commit comments

Comments
 (0)