darsia.get_mean_color#
- get_mean_color(image, mask=None)[source]#
Calculate the mean color of an image, optionally masked by a boolean mask.
- Parameters:
- image
darsia.Image The image from which to calculate the mean color.
- mask
darsia.Image|np.ndarray|None Optional mask to apply on the image. If None, the entire image is used.
- image
- Returns:
np.ndarrayThe mean color of the image, calculated as the average of RGB values.