dcnum.feat.feat_brightness.bright_all

Functions

brightness_features(image, mask[, image_bg, ...])

Compute brightness features

compute_avg_sd_masked_uint8(image, mask)

compute_avg_sd_masked_int16(image, mask)

compute_median(image)

compute_percentiles_10_90(image, mask)

Module Contents

dcnum.feat.feat_brightness.bright_all.brightness_features(image: numpy.typing.NDArray[numpy.uint8], mask: numpy.typing.NDArray[numpy.bool_], image_bg: numpy.typing.NDArray[numpy.uint8] | None = None, image_corr: numpy.typing.NDArray[numpy.int16] | None = None, bg_off: float | None = None)[source]

Compute brightness features

Parameters:
  • image (np.ndarray) – 2D array of “image” of shape (H, W)

  • mask (np.ndarray) – 3D array containing the N masks of shape (N, H, W)

  • image_bg (np.ndarray) – 2D array of “image_bg” of shape (H, W), required for computing the “bg_med” feature.

  • image_corr (np.ndarray) – 2D array of (image - image_bg), which can be optionally passed to this method. If not given, will be computed.

  • bg_off (float) – Systematic offset value for correcting the brightness of the background data which has an effect on “bright_bc_avg”, “bright_perc_10”, “bright_perc_90”, and “bg_med” (bg_off is generated by sparsemed background correction).

dcnum.feat.feat_brightness.bright_all.compute_avg_sd_masked_uint8(image, mask)[source]
dcnum.feat.feat_brightness.bright_all.compute_avg_sd_masked_int16(image, mask)[source]
dcnum.feat.feat_brightness.bright_all.compute_median(image)[source]
dcnum.feat.feat_brightness.bright_all.compute_percentiles_10_90(image, mask)[source]