Advertisement
Guest User

Untitled

a guest
Jun 16th, 2019
91
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.39 KB | None | 0 0
  1. import cv2
  2. import matplotlib.pyplot as plt
  3. from matplotlib.pyplot import imread as imread
  4.  
  5. plt.figure(1)
  6. img_DR = cv2.imread('img.tif',0)
  7. edges_DR = cv2.Canny(img_DR,20,40)
  8.  
  9. plt.subplot(121),plt.imshow(img_DR)
  10. plt.title('Original Image'), plt.xticks([]), plt.yticks([])
  11. plt.subplot(122),plt.imshow(edges_DR,cmap = 'gray')
  12. plt.title('Edge Image'), plt.xticks([]), plt.yticks([])
  13.  
  14. plt.show()
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement