MAZ=np.float32([[fx,0,0],[0,fy,0]])#构造缩放变换矩阵
imgT1=cv2.warpAffine(img,MAZ,(width,height))#仿射变换, 黑色填充...dx,dy=50,200#dx=100向右偏移量,dy=50向下偏移量
MAT=np.float32([[1,0,dx],[0,1,dy]])#构造平移变换矩阵
imgT2=cv2.warpAffine...(theta)
sinTheta=np.sin(theta)
MAR = np.float32([[cosTheta,-sinTheta,0],[sinTheta,cosTheta,0]])#构造旋转变换矩阵...30°
MAS=np.float32([[1,np.tan(theta),0],[0,1,0]])#构造扭变变换矩阵
imgT4=cv2.warpAffine(imgT3,MAS,(width,height...plt.axis('off'),plt.title("T4:Shear")
plt.imshow(cv2.cvtColor(imgT4, cv2.COLOR_BGR2RGB))
plt.show()
算法:图像复合变换是指对给定的图像连续进行多次上述的平移