I’m sorry to reply you so late. I tried to exchange the axis, but the final result was not very good either
points1=np.float32([[127,191],[351,191],[351,351]])
points2=np.float32([[0,0],[448,0],[448,448]])
M=cv2.getAffineTransform(points2,points1)
M