Code for solving the generalized pose and scale problem.