Geometric transformation python. warpPerspective takes a 3x3 transformation matrix as input.