0% found this document useful (0 votes)
105 views

Histogram and Its Transform: 2.1. Definition

This document discusses techniques for manipulating the histogram and contrast of a grayscale image, including: 1. Contrast stretching, which expands the range of pixel intensities to increase contrast by remapping intensities from [amin, amax] to [0, L]. 2. Equalization, which normalizes the histogram to a standard histogram by applying a transformation function T(a) that spreads out the most frequent intensity values. 3. Creating a negative image by applying the transformation b = L - a, which inverts the intensities so pixels that were bright become dark and vice versa.

Uploaded by

chuoi_vip
Copyright
© Attribution Non-Commercial (BY-NC)
Available Formats
Download as DOC, PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
105 views

Histogram and Its Transform: 2.1. Definition

This document discusses techniques for manipulating the histogram and contrast of a grayscale image, including: 1. Contrast stretching, which expands the range of pixel intensities to increase contrast by remapping intensities from [amin, amax] to [0, L]. 2. Equalization, which normalizes the histogram to a standard histogram by applying a transformation function T(a) that spreads out the most frequent intensity values. 3. Creating a negative image by applying the transformation b = L - a, which inverts the intensities so pixels that were bright become dark and vice versa.

Uploaded by

chuoi_vip
Copyright
© Attribution Non-Commercial (BY-NC)
Available Formats
Download as DOC, PDF, TXT or read online on Scribd
You are on page 1/ 7

2.

Histogram and Its Transform


2.1. Definition

1. The intensity of a gray image at any coordinates (x, y) is called gray level (brightness) a
of the image at that point. That is
a = f(x, y).
2. Let amin ≤ f(x, y) ≤ amax, for all (x,y): 1 ≤ x ≤ W-width of image, 1 ≤ y ≤ H-height
of image, then the interval [amin, amax] is called the gray scale.

3. A histogram, h[a], is the number of times that gray level a occurs in the image. The
height in this histogram corresponds to the number of pixels with a given brightness.
4. The histogram can be normalized so that the total area under the histogram is 1. Denote
p[a] for a brightness a:
p[a] := h[a] / Γ

where Γ is the total number of pixels in the image.


2.2. Contrast stretching

Contrast is the range from the darkest regions of the image to the lightest regions. The
mathematical representation is
a − a min
contrast of image = max
a max + a min

where amax and amin are the maximum and minimum intensities of a region or image.

amax

amin

and hight-contract image

Set L = 2B-1 a maximum value of brightness and:

f ( x, y ) − a min
g ( x, y ) = L.
a max − a min

then, we have
0 ≤ g(x, y) ≤ L instead amin ≤ f(x, y) ≤ amax

Some results after contrast stretching


This formula, however, can be somewhat sensitive to outliers and a less sensitive and more
general version is given by:

 0, f ( x, y) < al o w,

 f ( x, y ) − a l o w
g ( x, y) =  L. , al o w ≤ f ( x, y) ≤ ah i g ,h
 ah i g h− al o w
 L, a h i g h< f ( x, y)

In this second version might choose

0 ≤ alow < ahigh ≤ L


2.3. Equalization

1 Normalize histograms to a "standard" histogram.


2 The most common histogram normalization technique is histogram equalization where
one attempts to change the histogram through the use of a function
b = T(a)
where
o a and b is a brightness (gray level).
o T(a) satisfies the following conditions:
(1) T(a) is single-valued and monotonically
increasing in the interval [0 , L]
(2) T(a) ∈ [0, L] for a ∈ [0, L]

Remark:
1) The requirement in (1) that T(r) be single valued is needed to
guarantee that the inverse transformation will exist, and the
monotonicity condition preserves the increasing order from
black to white in the output image.

a = T 1(b) for b ∈ [0, L-1]
2) Condition (2) guarantees that the output gray levels will be in
the same range as the input levels.
Let
p(a) = na / Γ
where
a –gray level in an immage
Γ – total number of pixels in the image
na –number of pixel with gray level a in the image
Define
T(a) = round ( L*{ p(0) + p(1) +...+ p(a-1) + p(a)} ),
we have: T(a) ∈ {0, 1, 2, ..., L-1, L}.
Then
g(x, y) = T( f (x, y))
for all x ∈[1,W], y ∈[1,H]

2.4. Image Negatives

The negative of an image with gray level in the range [0, L] is obtained by using the negative
transformation
b = T(a),
where T(a) = L – a,
or
b=L–a
And hence
g(x, y) = L – f(x, y),
for all x ∈[1,W], y ∈[1,H]

You might also like