lazyslide_models.tile_prediction.cv_features.Contrast#
- class Contrast(lower_percentile=1, upper_percentile=99)#
Bases:
_CVFeaturescontrast
Calculate the contrast of a tile.
Contrast is calculated as the standard deviation of the pixel values.
The tile can be in shape (H, W, C) for a single image or (B, C, H, W) for a batch of images.
- Parameters:
- lower_percentilefloat
Lower percentile for contrast calculation.
- upper_percentilefloat
Upper percentile for contrast calculation.