Theory and Practice of Globally Optimal Deformation Estimation