mmcv.image.auto_contrast¶
- mmcv.image.auto_contrast(img, cutoff=0)[source]¶
Auto adjust image contrast.
This function maximize (normalize) image contrast by first removing cutoff percent of the lightest and darkest pixels from the histogram and remapping the image so that the darkest pixel becomes black (0), and the lightest becomes white (255).
- Parameters:
- Returns:
The contrasted image.
- Return type:
ndarray