Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- import numpy as np
- from skimage import transform as tf
- from PIL import Image
- def shear(t, img):
- image = np.asarray(img)
- print(image)
- a = tf.AffineTransform(shear=t)
- m = tf.warp(image, inverse_map=a)
- print(m)
- print(np.uint8(m*255))
- return Image.fromarray(np.uint8(m*255))
- i = Image.open("b.jpg")
- mI = shear(0.3, i)
- mI.show()
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement