ess.imaging.tools.analysis.laplace_2d#

ess.imaging.tools.analysis.laplace_2d(image, dims)[source]#

Compute the Laplace operator of a 2d image using a kernel that approximates the second derivative in two dimensions. The kernel is designed to highlight areas of rapid intensity change, which are indicative of edges in the image. The kernel is applied to the image by convolving it with the Laplace operator, which is a discrete approximation of the second derivative. The result is a new image where each pixel value represents the sum of the second derivatives in the x and y directions, effectively highlighting areas of high curvature or rapid intensity change.

Parameters:
  • image (Variable | DataArray) – The input image to compute the Laplace operator on.

  • dims (tuple[str, str] | list[str]) – The dimensions of the image over which to compute the Laplace operator. Other dimensions will be preserved in the output.

Return type:

Variable | DataArray