Re:ImageMagick, four point perspective distortion in a video
by nilknarf on Sunday December 07, 2014 @08:19PM
(#8714417)
The math for working out the transform is actually the same (not an inverse!) since you are still just trying to map 4 points to 4 points.
I had a demo for the 'inverse' transform also: http://codepen.io/fta/pen/LHonf
Here is the same thing except using the video from this post: http://codepen.io/fta/pen/JoGybG
Have no time to do the rectifying math on the components today but basically it would be some kind of inverse of this projective transformation:
http://franklinta.com/2014/09/08/computing-css-matrix3d-tran...
quick non-inverse transformation adapted from http://math.stackexchange.com/a/339033/70086
http://jsfiddle.net/w4bkmeaq/