Low contrast is a frequent challenge in image analysis, especially within medical imaging and highly saturated scenes. To address this issue, we present a nonlinear transformation for local contrast enhancement in digital images. Our method adapts the hyperbolic tangent function using two parameters: one to select the intensity range for modification and another to control the degree of enhancement. This approach outperforms conventional histogram-based techniques such as histogram equalization and specification in local contrast enhancement, without increasing computational cost, and produces smooth, artifact-free results in user-defined regions of interest. In addition, the proposed method was compared with CLAHE in MRIs, showing that, unlike CLAHE, the proposed method does not enhance the noise present in the background of the image. Furthermore, in deep learning contexts where dataset size is often limited, our method could serve as an effective data augmentation tool—generating varied contrast images while preserving anatomical structures, which improves neural network training for brain tumor detection in magnetic resonance imaging. The ability to manipulate local contrast may offer a pathway toward better interpretability of convolutional neural networks, as targeted contrast adjustments allow researchers to probe model sensitivity and enhance the explainability of classification and detection mechanisms.
Echeverry et al. (Thu,) studied this question.