flipped1 = cv2.flip(image,1)
#图像垂直翻转
flipped2 = cv2.flip(image,0)
#图像水平垂直翻转
flipped3 = cv2.flip(image...rotated = cv2.warpAffine(image,M,(w,h))
cv2.imshow("Rotated by -90 Degrees",rotated)
cv2.waitKey(0)
仿射和透视变换矩阵...pts2 = np.float32([[10,100],[200,50],[100,250]])
#得到仿射矩阵
M = cv.getAffineTransform(pts1,pts2)
#实现仿射变换...dst = cv.warpAffine(img,M,(cols,rows))
#输出显示原图和变换图像
plt.subplot(121),plt.imshow(img),plt.title('Input...0,0], [360,0], [0,420], [360,420]])
# 计算得到转换矩阵
M = cv.getPerspectiveTransform(points1, points2)
# 实现透视变换转换