M = cv2.getRotationMatrix2D((cX, cY), -angle, a)
cos = np.abs(M[0, 0])
sin = np.abs(M[0, 1])
nW = int((h * sin) + (w * cos))
nH = int((h * cos) + (w * sin))
M[0, 2] += (nW / 2) - cX
M[1, 2] += (nH / 2) - cY
cv2.warpAffine(image, M, (nW, nH),borderValue=(255,255,255))
x=371#设原坐标为(371,68)
y=68
x=int(M[0,0]*x+M[0,1]*y+M[0,2])
y=int(M[1,0]*x+M[1,1]*y+M[1,2])
point=(x,y)
point是我根据变换矩阵M得出的新坐标,但与实际效果不符,求原因。