Histogram Equalization: Enhancing Image Contrast for Enhanced Visual Perception
By Fouad Sabry
()
About this ebook
What is Histogram Equalization
Histogram equalization is a method in image processing of contrast adjustment using the image's histogram.
How you will benefit
(I) Insights, and validations about the following topics:
Chapter 1: Histogram Equalization
Chapter 2: Cumulative Distribution Function
Chapter 3: Histogram
Chapter 4: Random Variable
Chapter 5: Order Statistic
Chapter 6: HSL and HSV
Chapter 7: Color Histogram
Chapter 8: Continuous Uniform Distribution
Chapter 9: Optical Resolution
Chapter 10: Empirical Distribution Function
(II) Answering the public top questions about histogram equalization.
(III) Real world examples for the usage of histogram equalization in many fields.
Who this book is for
Professionals, undergraduate and graduate students, enthusiasts, hobbyists, and those who want to go beyond basic knowledge or information for any kind of Histogram Equalization.
Related to Histogram Equalization
Titles in the series (100)
Computer Vision: Exploring the Depths of Computer Vision Rating: 0 out of 5 stars0 ratingsJoint Photographic Experts Group: Unlocking the Power of Visual Data with the JPEG Standard Rating: 0 out of 5 stars0 ratingsHomography: Homography: Transformations in Computer Vision Rating: 0 out of 5 stars0 ratingsNoise Reduction: Enhancing Clarity, Advanced Techniques for Noise Reduction in Computer Vision Rating: 0 out of 5 stars0 ratingsComputer Stereo Vision: Exploring Depth Perception in Computer Vision Rating: 0 out of 5 stars0 ratingsHistogram Equalization: Enhancing Image Contrast for Enhanced Visual Perception Rating: 0 out of 5 stars0 ratingsRadon Transform: Unveiling Hidden Patterns in Visual Data Rating: 0 out of 5 stars0 ratingsColor Space: Exploring the Spectrum of Computer Vision Rating: 0 out of 5 stars0 ratingsUnderwater Computer Vision: Exploring the Depths of Computer Vision Beneath the Waves Rating: 0 out of 5 stars0 ratingsTone Mapping: Tone Mapping: Illuminating Perspectives in Computer Vision Rating: 0 out of 5 stars0 ratingsAffine Transformation: Unlocking Visual Perspectives: Exploring Affine Transformation in Computer Vision Rating: 0 out of 5 stars0 ratingsImage Compression: Efficient Techniques for Visual Data Optimization Rating: 0 out of 5 stars0 ratingsImage Histogram: Unveiling Visual Insights, Exploring the Depths of Image Histograms in Computer Vision Rating: 0 out of 5 stars0 ratingsColor Profile: Exploring Visual Perception and Analysis in Computer Vision Rating: 0 out of 5 stars0 ratingsInpainting: Bridging Gaps in Computer Vision Rating: 0 out of 5 stars0 ratingsHuman Visual System Model: Understanding Perception and Processing Rating: 0 out of 5 stars0 ratingsAnisotropic Diffusion: Enhancing Image Analysis Through Anisotropic Diffusion Rating: 0 out of 5 stars0 ratingsColor Management System: Optimizing Visual Perception in Digital Environments Rating: 0 out of 5 stars0 ratingsFilter Bank: Insights into Computer Vision's Filter Bank Techniques Rating: 0 out of 5 stars0 ratingsColor Mapping: Exploring Visual Perception and Analysis in Computer Vision Rating: 0 out of 5 stars0 ratingsColor Model: Understanding the Spectrum of Computer Vision: Exploring Color Models Rating: 0 out of 5 stars0 ratingsRetinex: Unveiling the Secrets of Computational Vision with Retinex Rating: 0 out of 5 stars0 ratingsRandom Sample Consensus: Robust Estimation in Computer Vision Rating: 0 out of 5 stars0 ratingsHough Transform: Unveiling the Magic of Hough Transform in Computer Vision Rating: 0 out of 5 stars0 ratingsHarris Corner Detector: Unveiling the Magic of Image Feature Detection Rating: 0 out of 5 stars0 ratingsAdaptive Filter: Enhancing Computer Vision Through Adaptive Filtering Rating: 0 out of 5 stars0 ratingsHadamard Transform: Unveiling the Power of Hadamard Transform in Computer Vision Rating: 0 out of 5 stars0 ratingsGamma Correction: Enhancing Visual Clarity in Computer Vision: The Gamma Correction Technique Rating: 0 out of 5 stars0 ratingsEdge Detection: Exploring Boundaries in Computer Vision Rating: 0 out of 5 stars0 ratingsColor Matching Function: Understanding Spectral Sensitivity in Computer Vision Rating: 0 out of 5 stars0 ratings
Related ebooks
Color Mapping: Exploring Visual Perception and Analysis in Computer Vision Rating: 0 out of 5 stars0 ratingsTone Mapping: Tone Mapping: Illuminating Perspectives in Computer Vision Rating: 0 out of 5 stars0 ratingsAlpha Compositing: Mastering the Art of Image Composition in Computer Vision Rating: 0 out of 5 stars0 ratingsVolume Rendering: Exploring Visual Realism in Computer Vision Rating: 0 out of 5 stars0 ratingsComputer Vision Graph Cuts: Exploring Graph Cuts in Computer Vision Rating: 0 out of 5 stars0 ratingsImage Segmentation: Unlocking Insights through Pixel Precision Rating: 0 out of 5 stars0 ratingsRaster Graphics Editor: Transforming Visual Realities: Mastering Raster Graphics Editors in Computer Vision Rating: 0 out of 5 stars0 ratingsColor Management System: Optimizing Visual Perception in Digital Environments Rating: 0 out of 5 stars0 ratingsBilinear Interpolation: Enhancing Image Resolution and Clarity through Bilinear Interpolation Rating: 0 out of 5 stars0 ratingsTexture Mapping: Exploring Dimensionality in Computer Vision Rating: 0 out of 5 stars0 ratingsBump Mapping: Exploring Depth in Computer Vision Rating: 0 out of 5 stars0 ratingsComputer Stereo Vision: Exploring Depth Perception in Computer Vision Rating: 0 out of 5 stars0 ratingsAnti Aliasing: Enhancing Visual Clarity in Computer Vision Rating: 0 out of 5 stars0 ratingsImage Based Modeling and Rendering: Exploring Visual Realism: Techniques in Computer Vision Rating: 0 out of 5 stars0 ratingsAN IMPROVED TECHNIQUE FOR MIX NOISE AND BLURRING REMOVAL IN DIGITAL IMAGES Rating: 0 out of 5 stars0 ratingsScale Invariant Feature Transform: Unveiling the Power of Scale Invariant Feature Transform in Computer Vision Rating: 0 out of 5 stars0 ratingsLine Drawing Algorithm: Mastering Techniques for Precision Image Rendering Rating: 0 out of 5 stars0 ratingsDigital Image Processing: Fundamentals and Applications Rating: 0 out of 5 stars0 ratingsImage Histogram: Unveiling Visual Insights, Exploring the Depths of Image Histograms in Computer Vision Rating: 0 out of 5 stars0 ratingsImage Processing And Acquisition Using Python Rating: 0 out of 5 stars0 ratingsDocument Mosaicing: Unlocking Visual Insights through Document Mosaicing Rating: 0 out of 5 stars0 ratingsContextual Image Classification: Understanding Visual Data for Effective Classification Rating: 0 out of 5 stars0 ratingsMotion Estimation: Advancements and Applications in Computer Vision Rating: 0 out of 5 stars0 ratingsGlobal Illumination: Advancing Vision: Insights into Global Illumination Rating: 0 out of 5 stars0 ratingsArtificial Intelligence for Image Super Resolution Rating: 0 out of 5 stars0 ratingsBundle Adjustment: Optimizing Visual Data for Precise Reconstruction Rating: 0 out of 5 stars0 ratingsCanny Edge Detector: Unveiling the Art of Visual Perception Rating: 0 out of 5 stars0 ratingsLevels and Curves with GIMP Rating: 4 out of 5 stars4/5Machine Learning - Advanced Concepts Rating: 0 out of 5 stars0 ratingsGamma Correction: Enhancing Visual Clarity in Computer Vision: The Gamma Correction Technique Rating: 0 out of 5 stars0 ratings
Intelligence (AI) & Semantics For You
101 Midjourney Prompt Secrets Rating: 3 out of 5 stars3/5AI for Educators: AI for Educators Rating: 5 out of 5 stars5/5Midjourney Mastery - The Ultimate Handbook of Prompts Rating: 5 out of 5 stars5/5Creating Online Courses with ChatGPT | A Step-by-Step Guide with Prompt Templates Rating: 4 out of 5 stars4/5Mastering ChatGPT: 21 Prompts Templates for Effortless Writing Rating: 5 out of 5 stars5/5ChatGPT For Dummies Rating: 0 out of 5 stars0 ratingsHow To Become A Data Scientist With ChatGPT: A Beginner's Guide to ChatGPT-Assisted Programming Rating: 5 out of 5 stars5/5The Business Case for AI: A Leader's Guide to AI Strategies, Best Practices & Real-World Applications Rating: 0 out of 5 stars0 ratings10 Great Ways to Earn Money Through Artificial Intelligence(AI) Rating: 5 out of 5 stars5/5Hacking : Guide to Computer Hacking and Penetration Testing Rating: 5 out of 5 stars5/5The Secrets of ChatGPT Prompt Engineering for Non-Developers Rating: 5 out of 5 stars5/5ChatGPT For Fiction Writing: AI for Authors Rating: 5 out of 5 stars5/5Artificial Intelligence: A Guide for Thinking Humans Rating: 4 out of 5 stars4/5What Makes Us Human: An Artificial Intelligence Answers Life's Biggest Questions Rating: 5 out of 5 stars5/5THE CHATGPT MILLIONAIRE'S HANDBOOK: UNLOCKING WEALTH THROUGH AI AUTOMATION Rating: 5 out of 5 stars5/5Enterprise AI For Dummies Rating: 3 out of 5 stars3/5Mastering ChatGPT Rating: 0 out of 5 stars0 ratingsChat-GPT Income Ideas: Pioneering Monetization Concepts Utilizing Conversational AI for Profitable Ventures Rating: 4 out of 5 stars4/5Dancing with Qubits: How quantum computing works and how it can change the world Rating: 5 out of 5 stars5/5Our Final Invention: Artificial Intelligence and the End of the Human Era Rating: 4 out of 5 stars4/5Summary of Super-Intelligence From Nick Bostrom Rating: 5 out of 5 stars5/5
Reviews for Histogram Equalization
0 ratings0 reviews
Book preview
Histogram Equalization - Fouad Sabry
Chapter 1: Histogram equalization
In image processing, histogram equalization is a technique for adjusting contrast by looking at the histogram of the image.
When an image has a limited range of intensity values, this technique is used to boost the global contrast of numerous images. This modification allows for a more uniform application of the complete range of intensities across the histogram. This makes it possible for areas with poor local contrast to improve their levels of differentiation. Image contrast is reduced through the use of histogram equalization by effectively spreading out the densely packed intensity values.
The technique works well when the foreground and background of a picture are the same brightness or contrast. In x-rays, for example, the procedure can improve visibility of bone structure, and in under- or overexposed pictures, it can restore detail. The method's main benefit is that it is a simple technique that can be easily adapted to any given input image and any operator that can be inverted. Therefore, in theory, the original histogram can be restored if the histogram equalization function is known. There is little computing work involved in the calculation. The method's lack of selectivity is a drawback. It could make the noise more noticeable while simultaneously reducing the quality of the transmission.
Small signal-to-noise ratio typically hinders visual detections in scientific imaging where spatial correlation is more significant than strength of signal (such as differentiating DNA segments of quantized length).
Histogram equalization is excellent for scientific photos like thermal, satellite, or x-ray images, the same category of images to which one would apply fake color, but it often gives unnatural results in photography. When applied to photos with a low color depth, histogram equalization might cause unintended results (such as a noticeable visual gradient). If you use it on an 8-bit image that's being presented using an 8-bit grayscale palette, for instance, the image's color depth (the number of distinct grayscale hues) will be reduced even further. Photos with a greater color depth than palette size, such as continuous data or 16-bit gray-scale images, will benefit most from histogram equalization.
Histogram equalization can be viewed and implemented in two distinct ways: as an image change or a palette change. Specifically, given an input picture I, a palette P, and an output image M, the operation can be written as P(M(I)). Histogram equalization can be implemented as a palette change or mapping change if a new palette is defined as P'=P(M), with image I remaining unmodified. Alternatively, if palette P is kept the same and the image is altered to I'=M(I), then the implementation is carried out via a change to the image itself. Changing the palette is preferable because it protects the original information.
Some variants of this technique employ a collection of histograms (termed subhistograms) to highlight regional differences rather than global ones. Adaptive histogram equalization, contrast limiting adaptive histogram equalization (CLAHE), multipeak histogram equalization (MPHE), and multipurpose beta optimized bihistogram equalization are all methods that fall under this category (MBOBHE). These techniques, especially MBOBHE, aim to tweak the HE algorithm in order to increase contrast without introducing brightness mean-shift and detail loss aberrations.
As a subset of the broader category of histogram remapping techniques, histogram equalization is a useful tool. These techniques aim to increase visual quality and make images easier to interpret (e.g., retinex)
The adjusted histogram is then applied to the original image in a process known as back projection (or project
), which acts as a look-up database for pixel brightness levels.
The function assigns the histogram bin value to the output image, where the bin's coordinates are determined by the values of pixels in each input group collected from all single-channel photos at the same place. Each pixel's value in the final image represents the statistical likelihood that its matching input pixel group is from the same object as that item's histogram.
Consider a discrete grayscale image {x} and let ni be the number of occurrences of gray level i.
The likelihood that the image will contain a pixel with intensity level I is
\ p_{x}(i)=p(x=i)={\frac {n_{i}}{n}},\quad 0\leq i<L{\displaystyle \ L} being the total number of gray levels in the image (typically 256), n represents the number of picture pixels, and p_{x}(i) being in fact the image's histogram for pixel value i, calibrated to the interval [0,1].
The cumulative distribution function for I will be defined as
{\displaystyle \operatorname {cdf} _{x}(i)=\sum _{j=0}^{i}p_{x}(x=j)} , in addition to being the normalized histogram of the image's gathered data.
We would like to create a transformation of the form {\displaystyle \ y=T(x)} to produce a new image {y}, histogram-wise, zero.
In this case, the cumulative distribution function (CDF) of the image values would be linear, i.e.
{\displaystyle \operatorname {cdf} _{y}(i)=(i+1)K} for {\displaystyle 0\leq i
for some constant {\displaystyle \ K} .
This transformation is possible because of the characteristics of the CDF (see Inverse distribution function); Specifically, it means
{\displaystyle \ y=T(k)=\operatorname {cdf} _{x}(k)}where \ k is in the range {\displaystyle [0,L-1])} .
Notice that \ T maps the levels into the range [0,1], Because we utilized a standardised histogram of x.
Reconciling the values to their original domain, To get the desired outcome, the following easy transformation must be done to the output::
{\displaystyle \ y^{\prime }=y\cdot (\max\{x\}-\min\{x\})+\min\{x\}=y\cdot (L-1)}.
Here, we present a more in-depth derivation.
\ y is a real value while {\displaystyle \ y^{\prime }} has to be an integer.
Using the rounding operation is a common and easy solution:
{\displaystyle \ y^{\prime }=\operatorname {round} (y\cdot (L-1))} .
However, A more in-depth examination yields a slightly modified formulation.
The mapped value {\displaystyle \ y^{\prime }} should be 0 for the range of {\displaystyle 0
And {\displaystyle \ y^{\prime }=1} for {\displaystyle 1/L
Then the quantization formula from \ y to {\displaystyle \ y^{\prime }} should be
{\displaystyle y^{\prime }=\operatorname {ceil} (L\cdot y)-1} .
(Note: {\displaystyle y^{\prime }=-1} when {\displaystyle \ y=0} , however, it does not happen just because {\displaystyle \ y=0} means that there is no pixel corresponding to that value.)
The above describes grayscale image histogram equalization. However, the same method may be used for color images by independently applying it to the RGB color values of the image's Red, Green, and Blue channels. However, because the relative distributions of the color channels vary as a result of applying the algorithm, using the same procedure to the Red, Green, and Blue components of an RGB image may result in drastic changes to the image's color balance. It is possible to apply the technique to the brightness or value channel without affecting the hue and saturation of the image by first converting the image to another color system, such as Lab color space or HSL/HSV color space. In three-dimensional space, various histogram equalization strategies exist. Histogram equalization was used in 3D color space by Trahanias and Venetsanopoulos.
In accordance with standard statistical terminology, CDF
(i.e.
It is recommended that cumulative histogram
be used in place of cumulative distribution function.
, in particular since the cumulative distribution function is linked to in the text; this function is calculated by dividing the values in the cumulative histogram by the total number of pixels.
The equalized CDF is defined in terms of rank as {\displaystyle rank/pixelcount} .
The following are the values of the displayed 8-bit grayscale image::
The following table displays the image's histogram. For the sake of brevity, pixel values with a count of zero have been omitted.
Below is the cdf, or cumulative distribution function. For the sake of brevity, we will again exclude pixel values that do not raise the cdf.
(Please note that {\displaystyle h(v)=\operatorname {ceil} (\operatorname {cdf} (v))-1} version is not illustrated yet.)
The range of values in the subimage is shown to be between 52 and 154 by this cdf.
Value 154 has a cdf of 64, which is the same as the number of pixels in the image.
The cdf must be normalized to [0,255] .
An equalization formula for histograms in general is:
{\displaystyle h(v)=\mathrm {round} \left({\frac {\operatorname {cdf} (v)-\operatorname {cdf} _{\min }}{(M\times N)-\operatorname {cdf} _{\min }}}\times (L-1)\right)}where cdfmin is the minimum non-zero value of the cumulative distribution function (in this case 1), M × N gives the image's number of pixels (for the example above 64, where M is the image's width, N its height, and L its number of grayscale levels, like as this one, 256).
The above equation might alternatively look like this if you wanted to scale