Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- import numpy as np
- import cv2
- import math
- import matplotlib.pyplot as plt
- img = np.load("file.npz")
- print(img.files)
- # rows,cols,ch = img.shape
- #
- # pts1 = np.float32([[50,50],[200,50],[50,200]])
- # pts2 = np.float32([[10,100],[200,50],[100,250]])
- #
- # M = cv2.getAffineTransform(pts1,pts2)
- #
- # dst = cv2.warpAffine(img,M,(cols,rows))
- plt.subplot(121),plt.imshow(img),plt.title('Input')
- plt.subplot(122),plt.imshow(dst),plt.title('Output')
- plt.show()
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement