MATLAB: How do i calculate hessian matrix for an image

hessian

i need to calculate hessian matrix manually.can anyone help?

Best Answer

Hi, you need to compute second derivatives in each direction, using something like:
[gx, gy] = gradient(double(img));
[gxx, gxy] = gradient(gx);
[gxy, gyy] = gradient(gy);
The coefficients of the hessian matrix for each pixel are given by gxx, gxy and gyy.
regards