Geometric warp of image in python
A ProjectiveTransform
is a linear transformation, and cannot match your deformation scheme. There may be better options, but for arbitrary curves you can make it work with a PiecewiseAffineTransform
, which will match anything you throw at it by tessellating linear transformations. If you simply change the name of the transform in your code, this is the output I get:
So you'll probably need to tweak it a little bit to get what you are after, but at least it produces the two parallel lines you were expecting in the area where your transformation is well defined.