I want to be able to correct images so you look at it from the orthogonal plane. I have seen This question but do not know how to put the calculations into JavaScript code to perform the action.
So to upload an image, select four points on the image to become the new corners and then to crop.
For example, I want to select the four corners of the piece of paper in this image and then crop it to make it look as if I am looking at it directly.