用户:锦廷查看:0 回复:0 评论:0 创建时间:2022-12-09T17:40:50
【作品展示】

【作品介绍】
将图像旋转and缩放
【作品源代码】
import cv2
i = cv2.imread(r'C:\\Users\\Administrator\\Desktop\\golier.png')
h = i.shape[0]
w = i.shape[1]
c=(w//2,h//2)
M=cv2.getRotationMatrix2D(c,180,12.0)
r=cv2.warpAffine(i,M,(w,h))
cv2.imshow('golier', r)
cv2.waitKey(0)
cv2.destroyAllWindows()
【提示】
部分含有Python第三方库相关内容的作品,在海龟编辑器网页端无法运行哦!如遇到这种情况,可以打开下面的链接,下载海龟编辑器客户端:
https://python.codemao.cn