Numpy convert to homogeneous coordinates. The gradient is computed using second order accu...