Compute the homography parameters