I have a square and its 4 corner coordinates $(x_1,y_1),(x_2,y_2),(x_3,y_3),(x_4,y_4)$. And I have a quadrilateral with corner coordinates $(x_1',y_1'),(x_2',y_2'),(x_3',y_3'),(x_4',y_4')$ where $(x_i,y_i)$ maps to $(x_i',y_i')$.
I am looking for a way to take a coordinate from inside the boundaries of the quadrilateral and map it to the corresponding coordinate in the square. I found this page http://mathinsight.org/determinant_linear_transformation but I am unsure how to do it. It seems to give an example of how to map from the square to the quadrilateral but I want the opposite.
Also in their second example with
A=[−1 −1]
[ 1 3]
How do they obtain this matrix, it is not clear to me..
Does anyone know?
Thanks
Edit
I found this article
http://www.fmwconcepts.com/imagemagick/bilinearwarp/FourCornerImageWarp2.pdf
But I don't understand how to solve for a0,a1,b0,b1,c0,c1,d0,d1
...