dark_correction module

dark_correction(img, dark_file_path, threshold=16384)[source]

Apply darkness correction to the specified input file and output a dark-corrected PIL image.

Authors: Weiqi Yue, Gabriel Ponon, Zhuldyz Ualikhankyzy, Nathaniel K. Tomczak Version: v0_1 (Jul 23 2022)

Parameters:
  • img (PIL.Image.Image) – Input file image for dark correction.

  • dark_file_path (str) – Full path to reference image whose pixels are subtracted from those of the input images.

  • threshold (int) – The intensity value below which the pixels are set to 0. (default: 16384)

Returns:

Dark-corrected PIL image.

Return type:

PIL.Image.Image