I am looking for a python function or library that can convert coordinates of rectangle to trapezoid coordinates. So far I found the relevant problem here: https://math.stackexchange.com/questions/13404/mapping-irregular-quadrilateral-to-a-rectangle but no code is available. Is there any package or any function in Python that can do this?
Asked
Active
Viewed 1,587 times
-1
-
"trapezoid coordinates" is not a common phrase: I find no definition of that in Bing or Google. Please tell us here what you mean, rather than making us look at another question to understand what you are asking--especially since the other question never clarified the exact meaning. Are you looking for an affine transformation that transforms a given trapezoid to a given rectangle? – Rory Daulton Aug 09 '16 at 14:39
-
Thank you for your comment. I have edited the question. I hope it is more clear now. – Ivan T Aug 09 '16 at 14:55
-
Are you looking for a perspective transform ? – Aug 09 '16 at 15:05
-
1Have a look here: http://www.codeproject.com/Articles/674433/Perspective-Projection-of-a-Rectangle-Homography – Aug 09 '16 at 15:16
1 Answers
2
I wanted to do the same but from trapezoid to rectangular coordinated. The package that do the trick is:
from skimage.transform import ProjectiveTransform
You can read the complete answer in:
Transform irregular quadrilateral to rectangle in python matplotlib