1.图片缩小 matScale=np.float32([[0.5,0,0],[0,0.5,0]]) dst=cv2.warpAffine(img,matScale,(int(height/2),int(width/2))) cv2.imshow('dst',dst) cv2.imshow('src',img) cv2.waitKey(0) 2.图片移位 # matScale=np.float32([[1,0,100],[0,1,200]]) # dst=cv2.warpAffine(img,ma…