By wikipedia http://en.wikipedia.org/wiki/Hessian_matrix , it is defined to be the square matrix of second order partial derivative of a function.
Can anybody tell me if it's correct?
[i,j]=gradient(im);
filt1=(1./2).*[1,0,-1;0,0,0;1,0,-1];
filt2=(1./2).*[-1,0,-1;0,0,0;1,0,1];
ii=(conv2(filt1,i));
jj=(conv2(filt2,j));
Gx=conv2(ii,im); % Gradient of the image in x-axis
Gy=conv2(jj,im); % Gradient of the image in y-axis
dif_Gx = conv2(f_x,a); % Gradient differentiation of the image in x-axis
dif_Gy = conv2(f_y,a); % Gradient differentiation of the image in y-axis
% Calculate second derivative
Gxx = Gx.^2;
Gyy = Gy.^2;
Gxy = Gx.*Gy;