Hessian matrix and structure tensor

Hi Ankit,

I created this function inside your branch, so you do not have to deal with a rebase. Please, merge.