phenotypic.data.make_synthetic_colony#

phenotypic.data.make_synthetic_colony(h: int = 256, w: int = 256, bit_depth: int = 8, colony_rgb: Tuple[float, float, float] = (0.96, 0.88, 0.82), agar_rgb: Tuple[float, float, float] = (0.55, 0.56, 0.54), seed: int = 1) numpy.ndarray[source]#

Generate a single bright fungal colony on solid-media agar. Returns an RGB NumPy array.

Parameters:
  • h (int) – Image height (pixels).

  • w (int) – Image width (pixels).

  • bit_depth (int) – 8 or 16.

  • colony_rgb (Tuple[float, float, float]) – Linear RGB in [0,1] for colony tint. Will be forced lighter than agar.

  • agar_rgb (Tuple[float, float, float]) – Linear RGB in [0,1] for agar background.

  • seed (int) – RNG seed.

Returns:

HxWx3 RGB, dtype uint8 or uint16.

Return type:

np.ndarray

Notes

  • Colony is lighter than background via screen-like blend.

  • No Petri dish. Scene is a cropped colony with padding on agar.