Key takeaways:
Histogram equalization is a technique in image processing used to enhance the contrast of an image by redistributing its intensity values. It helps in making the image clearer and more detailed, improving visibility between intensity levels.
The types of histogram equalization are:
Global histogram equalization
Contrast limited adaptive histogram equalization (CLAHE)
Adaptive histogram equalization (AHE)
It can be used in different applications. like medical imaging, surveillance, machine learning and computer vision.
While histogram equalization improves contrast, it can amplify noise in certain images. More advanced techniques like contrast stretching may be preferred in such cases.
Histogram equalization in image processing enhances the contrast and improves the visual quality of an image. Histogram equalization is to spread out the intensity valuesIntensity value refers to each pixel's value in an Image. of an image’s histogram to cover a wider range, resulting in a more balanced distribution of pixel intensities.
It makes the image appear clearer and more detailed, enhancing the differences between different intensity levels.
Types of histogram equalization
There are different variations derived from the primary histogram equalization method. These variations aim to address certain limitations or improve specific aspects of the equalization process. Some of the notable types of histogram equalization include:
Global histogram equalization: It is the standard histogram equalization technique. It operates on the entire image and enhances the global contrast by spreading the intensity values.
Contrast limited adaptive histogram equalization (CLAHE): CLAHE is an adaptive version of histogram equalization. It divides the image into smaller blocks or tiles and applies histogram equalization to each block individually. It avoids over-amplifying noiseWhen histogram equalization is applied to an image, it stretches the range of pixel values to enhance contrast. If there are minor changes or spikes in pixel values as a result of noise, those variations can also be stretched. This can amplify and bring out noise in the output image, resulting in undesired effects. and small intensity variations in flat regions while enhancing local contrast. CLAHE is particularly useful for images with varying lighting conditions.
Adaptive histogram equalization (AHE): Similar to CLAHE, AHE is an adaptive method that works on small regions of an image. However, unlike CLAHE, AHE does not include a contrast-limiting mechanismIt is a technique used to control the extent to which the contrast of an image is enhanced or adjusted.. As a result, AHE can amplify noise in some cases.
Applications
Histogram equalization has different applications in image processing and computer vision due to its ability to enhance the contrast and improve the visual quality of images. Here are some common applications:
Medical imaging: Histogram equalization can improve the visibility of structures in medical images, such as CT scans, X-rays, and MRI images. Poor contrast may obscure essential details.
Enhancement for surveillance: Surveillance cameras capture scenes with varying lighting conditions. Histogram equalization can help improve the visibility of objects and people in well-lit and poorly-lit areas.
Machine Learning and Computer Vision: Machine learning and Computer vision algorithms usually use high-contrast images. Histogram equalization can contribute to better feature extraction and pattern recognition.
Example code
Press "Run" to see how we can improve the image contrast using histogram equalization.