1 | initial version |
After much trial & error, I figured it out. I didn't notice that the new python cv2 module reverses the order of the output and transformation matrix arguments. (different from c++ AND old python cv module). Also, it returns the output matrix, so I can (optionally) omit the output argument and return directly into a new variable:
corners = np.ones((1,1,2))
newCorners = cv2.perspectiveTransform(corners, rotMat)