Can you do one example please, so I can fully get it and able to do the rest .Take the co-ordinates of both the object and image and place them into two matrices, and let x be the required matrix which will take the form
(a b)
(c d)
Solve the matrices to get the required matrix Hope it helps.
Cheers