Guest User

Untitled

a guest
Dec 14th, 2018
77
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.40 KB | None | 0 0
  1. from PIL import Image
  2. import keras
  3. import cv2
  4. import numpy as np
  5. import matplotlib.pyplot as plt
  6. from skimage import io, color
  7. from skimage import exposure
  8.  
  9. #Load Image
  10. x = Image.open('../input/_104304494_mediaitem104304493.jpg')
  11. x=np.asarray(x)
  12.  
  13. #Convolution Kernel
  14. kernel = np.array([[0,-1,0],[-1,5,-1],[0,-1,0]])
  15.  
  16. image = cv2.filter2D(x,-1,kernel)
  17. plt.imshow(image, cmap=plt.cm.gray)
  18. plt.axis('off')
  19. plt.show()
Add Comment
Please, Sign In to add comment