slitflow.fun.img module

set_lut(img, low, high)[source]

Normalize input image intensity to 0-1.

Outer intensities are set to border values.

Parameters:
  • img (numpy.ndarray) – Input 2D image.

  • low (float) – Lower bound of intensity.

  • high (float) – Upper bound of intensity.

Returns:

Normalized input image

Return type:

numpy.ndarray

norm_img_sd(img, low_sd, high_sd)[source]

Normalize input image intensity using standard deviation factors.

Outer intensities are set to border values.

Parameters:
  • img (numpy.ndarray) – Input 2D image.

  • low_sd (float) – A factor to multiply the standard deviation of image intensity. Mean intensity - S.D * low_sd is used to lower bound.

  • high_sd (float) – A factor to multiply the standard deviation of image intensity. Mean intensity + S.D * high_sd is used to upper bound.

Returns:

Normalized input image

Return type:

numpy.ndarray