ess.imaging.tools.analysis.sharpness#
- ess.imaging.tools.analysis.sharpness(image, dims, max_size=512)[source]#
Calculate the sharpness of an image by computing the Laplace operator and summing the absolute values of the results over specified dimensions. The sharpness is a measure of the amount of detail in the image, with higher values indicating sharper images. The Laplace operator is used to detect edges in the image, and the variance of the Laplacian highlights areas of rapid intensity change, which are indicative of sharp features.
- Parameters:
image (
Variable
|DataArray
) – The input image to compute the sharpness on.dims (
tuple
[str
,str
] |list
[str
]) – The dimensions of the image over which to compute the sharpness. Other dimensions will be preserved in the output.max_size (
int
|None
, default:512
) – The maximum size of the image to compute the sharpness on. If the image is larger than this size, it will be downsampled to fit within the specified maximum size. This is useful for large images where computing the Laplace operator directly would be computationally expensive.
- Return type: