This is the most significant and essential technique of spatial based image enhancement.3 The basic intent of the contrast enhancement technique is to adjust the local contrast in the image so as to bring out the clear regions or objects in the image . Low-contrast images often result from poor or non-uniform lighting conditions, a limited dynamic range of the imaging sensor, or improper settings of the lens aperture.
The contrast enhancement tries to change the intensity of the pixel in the image, particularly in the input image for the purpose to obtain a more enhanced image .It is based on the number of techniques namely local, global, dark and bright levels of contrast .The contrast enhancement is considered as the amount of color or gray differentiation that lies among the different features in an image .The contrast enhancement improves the quality of image by increasing the luminance difference between the foreground and backgrounds
A Contrast Stretching Transformation can be achieved by:
1. Stretching the dark range of input values into a wider range of output values: This involves increasing the brightness of the darker areas in the image to enhance details and improve visibility.
2. Shifting the mid-range of input values: This involves adjusting the brightness levels of the mid-tones in the image to improve overall contrast and clarity.
3. Compressing the bright range of input values: This process involves reducing the brightness of the brighter areas in the image to prevent overexposure resulting in a more balanced and visually appealing image.
Local Contrast Stretching (LCS) is an image enhancement method that focuses on locally adjusting each pixel's value to improve the visualization of structures within an image, particularly in both the darkest and lightest portions. It operates by utilizing sliding windows, known as kernels, which traverse the image. The central pixel within each kernel is adjusted using the following formula:
I p ( x , y ) = 255 × [ I 0 ( x , y ) − m i n ] ( m a x − m i n ) {\displaystyle I_{p}(x,y)=255\times {\frac {[I_{0}(x,y)-min]}{(max-min)}}} Where: Ip(x,y) is the color level for the output pixel (x,y) after the contrast stretching process.
I0(x,y) is the color level input for data pixel (x, y).
max is the maximum value for color level in the input image within the selected kernel.
min is the minimum value for color level in the input image within the selected kernel.4
Local contrast stretching considers each range of color palate in the image (R, G, and B) separately, providing a set of minimum and maximum values for each color palate.
Global Contrast Stretching, on the other hand, considers all color palate ranges at once to determine the maximum and minimum values for the entire RGB color image. This approach utilizes the combination of RGB colors to derive a single maximum and minimum value for contrast stretching across the entire image.
These contrast stretching techniques play a crucial role in enhancing the clarity and visibility of structures within images, particularly in scenarios with low contrast resulting from factors such as non-uniform lighting conditions or limited dynamic range.
Rafael C. González, Richard Eugene Woods (2007). Digital Image Processing. Prentice Hall. p. 85. ISBN 978-0-13-168728-8. 978-0-13-168728-8 ↩
ITK Software Guide http://www.itk.org/ItkSoftwareGuide.pdf ↩
"Contrast Enhancement Techniques: A Brief and Concise Review" (PDF). https://www.irjet.net/archives/V4/i7/IRJET-V4I7375.pdf ↩
"Comparison of Contrast Stretching methods of Image Enhancement Techniques for Acute Leukemia Images" (PDF). https://www.ijert.org/research/comparison-of-contrast-stretching-methods-of-image-enhancement-techniques-for-acute-leukemia-images-IJERTV1IS6319.pdf ↩