def hessian_matrix(image, sigma=1, mode='constant', cval=0, order=None):
 image = img_as_float(image)
 gaussian_filtered = ndi.gaussian_filter(image, sigma=sigma, mode=mode, cval=cval)
 if (order is None):
  if (image.ndim == 2):
   warn('deprecation warning: the default order of the hessian matrix values will be "row-column" instead of "xy" starting in skimage version 0.15. Use order="rc" or order="xy" to set this explicitly')
   order = 'xy'
  else:
   order = 'rc'
 gradients = np.gradient(gaussian_filtered)
 axes = range(image.ndim)
 if (order == 'rc'):
  axes = reversed(axes)
 H_elems = [np.gradient(gradients[ax0], axis=ax1) for (ax0, ax1) in combinations_with_replacement(axes, 2)]
 return H_elems

def hessian_matrix ( image , sigma = 1 , mode = 'constant' , cval = 0 , order = None ) : image = img_as_float ( image ) gaussian_filtered = ndi . gaussian_filter ( image , sigma = sigma , mode = mode , cval = cval ) if ( order is None ) : if ( image . ndim == 2 ) : warn ( 'deprecation warning: the default order of the hessian matrix values will be "row-column" instead of "xy" starting in skimage version 0.15. Use order="rc" or order="xy" to set this explicitly' ) order = 'xy' else : order = 'rc' gradients = np . gradient ( gaussian_filtered ) axes = range ( image . ndim ) if ( order == 'rc' ) : axes = reversed ( axes ) H_elems = [ np . gradient ( gradients [ ax0 ] , axis = ax1 ) for ( ax0 , ax1 ) in combinations_with_replacement ( axes , 2 ) ] return H_elems
compute hessian matrix .