transparency

transparency#

stimupy.utils.transparency(img, mask=None, alpha=0.5, tau=0.2)#

Applies a transparency to image at specified (mask) location if provided

Parameters:
  • img (np.array) – image to which transparency will be applied

  • mask (np.array or None (default)) – if not None, transparency will be provided at non-zero locations provided in this mask

  • alpha (Number) – alpha of transparency (i.e. how transparent the medium is), default 0.2

  • tau (Number) – tau of transparency (i.e. value of transparent medium), default 0.5

Return type:

img with the applied transparency