fishtank.filters.unsharp_mask

Contents

fishtank.filters.unsharp_mask#

fishtank.filters.unsharp_mask(img, sigma=1, truncate=2, channel_axis=None)#

Gaussian unsharp mask.

Parameters:
  • img (ndarray) – A (C,Z,X,Y), (Z,X,Y), (C,X,Y), or (X,Y) image.

  • sigma (float | list (default: 1)) – Standard deviation for Gaussian kernel. If a list, the standard deviation for each channel.

  • channel_axis (Optional[int] (default: None)) – If None, channel axis is assumed to be the first axis if the image has more than 2 dimensions.

  • truncate (float (default: 2)) – Truncate the filter at this many standard deviations.

  • gpu – Wjether to use the GPU.

  • tilesize – Size of tiles. If None, no tiling is used.

Return type:

ndarray

Returns:

filtered a numpy array of the same shape and dtype as the input image.