0% found this document useful (0 votes)
36 views10 pages

Computer Vision Histogram 27032024 085808am

The document discusses histogram processing techniques for computer vision, including defining histograms, how they relate to image appearance, and histogram equalization. Histogram equalization transforms the intensity values of an image's histogram for contrast enhancement by mapping intensities to a uniform distribution.

Uploaded by

fatmanasir284
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PPTX, PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
36 views10 pages

Computer Vision Histogram 27032024 085808am

The document discusses histogram processing techniques for computer vision, including defining histograms, how they relate to image appearance, and histogram equalization. Histogram equalization transforms the intensity values of an image's histogram for contrast enhancement by mapping intensities to a uniform distribution.

Uploaded by

fatmanasir284
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PPTX, PDF, TXT or read online on Scribd
You are on page 1/ 10

Computer Vision

Histogram Processing
HISTOGRAM PROCESSING
• Let rk , for k = 0,1, 2,…,L − 1, denote the intensities of an L-level digital
image, f (x, y).
• The unnormalized histogram of f is defined as

• where nk is the number of pixels in f with intensity rk , and the


subdivisions of the intensity scale are called histogram bins.
• The normalized histogram of f is defined as

• where, as usual, M and N are the number of image rows and columns,
respectively.
• The sum of pr(k) for all values of k is always 1.
• The components of pr(k) are estimates of the probabilities of intensity
levels occurring in an image.
• Histograms are simple to compute and are also suitable for fast
hardware implementations, thus making histogram-based techniques
a popular tool for real-time image processing.
• Histogram shape is related to
image appearance.
• Fig. shows images with four
basic intensity characteristics:
• dark
• Light
• low contrast
• high contrast
• The image histograms are also
shown.
• In the dark image that the most
populated histogram bins are
concentrated on the lower
(dark) end of the intensity scale.
• Discuss histograms for other
two images
• Show in matlab
HISTOGRAM EQUALIZATION
• Let the variable r denote the intensities of an image to be processed.
• We assume that r is in the range [0,L − 1],
• with r = 0 representing black and r = L − 1 representing white.
• For r satisfying these conditions, we focus attention on
transformations (intensity mappings) of the form that produce an
output intensity value, s, for a given intensity value r in the input
image.
• T(r) is a monotonic increasing function in the interval 0 ≤ r ≤ L − 1;
• 0 ≤ T(r) ≤ L − 1 for 0 ≤ r ≤ L − 1.
• In some formulations, we use the
inverse transformation and change the
condition (a) into strictly monotonic

• The condition in (a) that T(r) be


monotonically increasing guarantees
that output intensity values will never
be less than corresponding input
values, thus preventing artifacts • Histogram equalization can be given by
created by reversals of intensity.
• Condition (b) guarantees that the
range of output intensities is the same • A processed (output) image is obtained by
as the input. using Eq. given above to map each pixel in
the input image with intensity rk into a
• Finally, condition (a) guarantees that corresponding pixel with level sk in the
the mappings from s back to r will be output image.
one-to-one, thus preventing • This is called a histogram equalization or
ambiguities. histogram linearization transformation.
EXAMPLE 3.5 : Illustration of the mechanics
of histogram equalization.
• It will be helpful to work through a simple
example.
• Suppose that a
• 3-bit image (L = 8)
• of size 64 × 64 pixels (MN = 4096)
• has the intensity distribution in Table 3.1,
where the intensity levels are integers in the
range [0,L − 1] = [0, 7].
• 790/4096=0.19, 1023/4096=0.25 and so on..
• The histogram of this image is sketched in
Fig.

Original Histogram
• Values of the histogram equalization transformation function are
obtained using the equation given below, for instance,

• Similarly, s1 = T(r1) = 3.08, s2 = 4.55, s3 = 5.67, s4 = 6.23, s5 = 6.65,


s6 = 6.86, and s7 = 7.00.
• The values of the equalized histogram are given below.

• Observe that the transformation yielded only five distinct intensity


levels.
Transformation
• Because r0 = 0 was mapped to s0 = 1, there are 790 pixels in the
function
histogram equalized image with this value (see Table).
• Also, there are 1023 pixels with a value of s1 = 3
• 850 pixels with a value of s2 = 5.
• However, both r3 and r4 were mapped to the same value, 6, so
there are (656 + 329) = 985 pixels in the equalized image with this
value.
• Similarly, there are (245 + 122 + 81) = 448 pixels with a value of 7 in Equalized
the histogram equalized image. histogram
• Dividing these numbers by MN = 4096 yielded the equalized
histogram in Fig.

You might also like