neodroidvision.utilities.visualisation.bounding_box_visualisation.draw_mask_on_image_array

neodroidvision.utilities.visualisation.bounding_box_visualisation.draw_mask_on_image_array(image, mask, color: Optional[ColorEnum] = None, alpha: float = 0.4, mode: PilModesEnum = PilModesEnum.RGBA)[source]

Draws mask on an image.

Args: image: uint8 numpy array with shape (img_height, img_height, 3) mask: a uint8 numpy array of shape (img_height, img_height) with values between either 0 or 1. color: color to draw the keypoints with. alpha: transparency value between 0 and 1. (default: 0.4)

Raises: ValueError: On incorrect data type for image or masks. :param alpha: :param color: :param mask: :param image: :param mode: