I\'m trying to rectify an image in python. I have a Homography H (from a rotation matrix that rotates around the x, y and z axis) that looks like this for example: [
I think what you want is cv2.warpPerspective (see documentation (link)), not cv2.perspectiveTransform.
cv2.warpPerspective
cv2.perspectiveTransform