提交 3d4230d0 编写于 作者: youcans_'s avatar youcans_

上传新文件

上级 6265c382
import cv2 as cv
import numpy as np
if __name__ == '__main__':
img = cv.imread("affine1.jpg")
pts1 = np.float32([[50, 50], [200, 50], [50, 200]])
pts2 = np.float32([[50, 100], [200, 50], [100, 250]])
MA = cv.getAffineTransform(pts1, pts2)
dst = cv.warpAffine(img, MA, img.shape[:2])
cv.imshow("Origin image", img)
cv.imshow("Affine transform", dst)
cv.waitKey(0)
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册