Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- import scipy.ndimage as ndimage
- import matplotlib.pyplot as plt
- import matplotlib.image as mpimg
- import numpy as np
- p1 = np.array([[8,10,10,10,0],[0,10,10,10,5], [5,8,8,8,5]])
- ll = np.array([[-1, 1, 1, 1, -1]])
- for i in range(3):
- print (i+1, p1[i,:])
- plt.imshow([p1[i,:]])
- plt.show()
- print ("Найди похожее",ll)
- plt.imshow(ll)
- plt.show()
- print (ndimage.convolve(p1, ll, mode = 'constant'))
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement