Algorithm to effectively find perspective transform in motion estimation I've shot a series of photographs in a sort of stop-motion fashion, and although the camera was mounted on a tripod, there are tiny motions between each two successive photos.

After some experimentation, I figured that using a perspective transform would be appropriate to apply a correction to a photo so that the difference frame is minimised. This transform basically just moves the four corners of a picture by a given offset, allowing for a trapezoid distortion.

To do this process by hand is impossible in this case, as it takes me like half an hour for each frame. So I am looking for an effective algorithm to estimate the transform parameters (the four corner offsets). I would give the algorithm the maximum magnitude of the offset, and it should then find, as quickly as possible, the parameters (eight values).

Is such an efficient algorithm known? The photos are in colour but could be converted to grey scale, although the lighting changes also over time, so taking a difference image and summing the pixels is not enough, but probably one needs to auto-adjust the contrast and brightness as well.
The suggested technique seems to be to gather points of interest, calculate a feature vector for them, and then find matching pairs of points in both images, followed by a calculation of the transform.

Here is a sample project: http://www.codeproject.com/Articles/95453/Automatic-Image-Stitching-with-Accord-NET

Here is a paper that claims improvement by preparing through a phase correlation stage: http://www3.nd.edu/~kwb/ThomasKareemBowyerIGARSS_2012.pdf