Discover millions of ebooks, audiobooks, and so much more with a free trial

Only $11.99/month after trial. Cancel anytime.

Histogram Equalization: Enhancing Image Contrast for Enhanced Visual Perception
Histogram Equalization: Enhancing Image Contrast for Enhanced Visual Perception
Histogram Equalization: Enhancing Image Contrast for Enhanced Visual Perception
Ebook158 pages1 hour

Histogram Equalization: Enhancing Image Contrast for Enhanced Visual Perception

Rating: 0 out of 5 stars

()

Read preview

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.

LanguageEnglish
Release dateApr 28, 2024
Histogram Equalization: Enhancing Image Contrast for Enhanced Visual Perception

Related to Histogram Equalization

Titles in the series (100)

View More

Related ebooks

Intelligence (AI) & Semantics For You

View More

Related articles

Reviews for Histogram Equalization

Rating: 0 out of 5 stars
0 ratings

0 ratings0 reviews

What did you think?

Tap to rate

Review must be at least 10 words

    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

    Enjoying the preview?
    Page 1 of 1