lazyslide_models.tile_prediction.cv_features.Saturation

lazyslide_models.tile_prediction.cv_features.Saturation#

class Saturation#

Bases: _CVFeatures

saturation Mean saturation of the HSV saturation channel

Calculate the color saturation of a tile.

Saturation measures the colorfulness of an image. It is calculated by converting the image to HSV color space and taking the mean of the saturation channel. Higher values indicate more vibrant colors.

The tile can be in shape (H, W, C) for a single image or (B, C, H, W) for a batch of images.

columns = ('saturation',)#

Subclasses whose _func returns a dict set this explicitly; for the rest it is derived below from the class name, which is the same rule _process_batch uses to key its result.