neuralib.imglib.norm

neuralib.imglib.norm.normalize_sequences(frames, handle_invalid=True, gamma_correction=False, gamma_value=0.5, to_8bit=False)[source]

Do the normalization for the image sequences

Parameters:
  • frames (list[np.ndarray] | np.ndarray) – list of image array

  • handle_invalid (bool) – handle Nan and negative value

  • gamma_correction (bool) – to the gamma correction

  • gamma_value (float) – gamma correction value

  • to_8bit (bool) – to 8bit images

Returns:

list of normalized image array

Return type:

list[np.ndarray]

neuralib.imglib.norm.handle_invalid_value(frames)[source]

Handle NaN and negative values and ensure all values are >= 0

Parameters:

frames (list[np.ndarray] | np.ndarray)

Return type:

list[np.ndarray]

neuralib.imglib.norm.get_percentile_value(im, perc_interval=(10, 100))[source]

Get the central distribution boundary value for imaging enhancement by changing the scaling of array.

Parameters:
  • im (ndarray) – image array

  • perc_interval (tuple[float, float]) – percentile

Returns:

lower_bound and upper_bound based on value distribution

Return type:

tuple[float, float]