Post

i've been trying to figure out the math for 4 point perspective transforms like this for years now... (on and off) the last time I looked into it, I got as far as (finally) learning matrices and dove deep into videos/lessons on linear algebra and perspective projection and homogeneous coordinates

but I still don't know how to do these kinds of arbitrary 4 point transforms, which is the main thing I've been wanting to learn... were there any pages or resources that helped you to understand the math behind it?

yep your intuition is correct, matrices and linear algebra! there's a lot of strange terms which makes learning annoying. 8dof/projective transform/homography all point to essentially the same concept. i used the matrix from this answer for my calculation math.stackexchange.com/questions/49...

math.stackexchange.comHow to compute homography matrix H from corresponding points (2d-2d planar Homography)I went through this thread Mapping Irregular Quadrilateral to a Rectangle If i know the 4 corresponding points in image say p1->p1' p2->p2' p3->p3' p4->p4' then how to compute pi(x,y) from pi'(x...

0 reposts3 likes

essentially, i generate a homography matrix from 4 points to 4 other points, and then i can multiply the inverse of this on any external set of 4 points to get to that shape's projection. and because this is projective, points scale closer to the horizon/etc.