Lets say I have 2 images, the first is the image with no transform applied:
(A1) http://tinypic.com/r/qsunaw/6
The second is with a skew transformation applied:
(A2) http://tinypic.com/r/90adk0/6
Is there an algorithm that lets me know the necessary quadrilateral conversion I need to get from the first image to the second (and vice versa)?
This is a classic “inverse problem” of computer vision. There are plenty of algorithms, but choosing the right one depends entirely on your application, specifically on what constraints, if any, apply to the input images and on the expected results. The problem may be ill-posed (there may be no solutions, if there are some they may be unstable, or there may be infinite solutions).
For the simple example of the skewed images of text you gave, I’d probably try at first with simple template matching. Assuming the scale is unchanged, and that the skew is applied with respect to one of image corners and along one direction, there is only one unknown (the amount of skew in that direction), and you may have upper and lower bounds for its value known in advance. So you could quantize the allowed interval, then do an exhaustive search – perhaps with multiple passes (tighten the bound about the solution, do a finer quantization in there, iterate).
For general (i.e. natural) images, and more general allowed transformations, things get complicated very quickly. Assuming you are interested in planar transformations only (otherwise it is very likely that there are no solutions, due to occlusions), most recent methods will try to detect and match “interest points” across the images, then estimate a transformation using robustified least-squares.
If you are interested in this subfield of computer vision, a good tome to learn from is Hartley and Zisserman’s bible.