
import cv2
import numpy as np
image = cv2.imread("test.jpg")
rows, cols, _ = image.shape
center = (cols // 2, rows // 2)
for i in range(1, 361):
# 获取旋转矩阵
M = cv2.getRotationMatrix2D(center, i, i / 100)
# 对图像进行旋转和缩放
transformed_image = cv2.warpAffine(image, M, (cols, rows))
cv2.imshow("Rotated and Scaled", transformed_image)
cv2.waitKey(50)
cv2.destroyAllWindows()


