Intensity Transformations and Histogram Processing

0.0(0)
studied byStudied by 0 people
learnLearn
examPractice Test
spaced repetitionSpaced Repetition
heart puzzleMatch
flashcardsFlashcards
Card Sorting

1/20

encourage image

There's no tags or description

Looks like no tags are added yet.

Study Analytics
Name
Mastery
Learn
Test
Matching
Spaced

No study sessions yet.

21 Terms

1
New cards

principal objective of image enhancement

process an image so that the result is more suitable than the original image for a specific application

2
New cards

image enhancement approaches

spartial domain methods

frequency domain methods

3
New cards

Spatial domain

refers to the image plane itself, based on direct manipulation of pixels in an image

4
New cards

spatial domain equation

g(x, y) = T[f(x, y)]

f(x, y) is the intensity of input image at pixel (x,y),
g(x, y) is the intensity of processed image at pixel (x,y)

5
New cards

frequency domain

based on modifying the Fourier transform of an image

6
New cards

Point Operations in Spatial Domain + formula

simplest image enhancement technique, work through pixel-by-pixel basis

Each output pixel’s value depends only on the corresponding input pixel value

s=T(r)

  • r: Input pixel intensity.

  • s: Output pixel intensity.

  • T: Transformation function

7
New cards

types of point operations

image negatives

log transformations

power-law(gamma)

piecewise linear- contrast stretch/gray level slicing

8
New cards

image negative formula + explanation

s = L-1-r

  • used for enhancing bright detail embedded in dark regions, esp when dark areas dominant in size

9
New cards

log transformations formula + explanation

s = c log (1 + r)

  • enhances low intensity values

  • maps a narrow range of low gray-level values in the input image into a
    wider range of output levels

10
New cards

Power-Law Transformations formula + explanation

s=c⋅rγ

  • adjust intensity

  • gamma < 1 brightens, > 1 darkens

11
New cards

Piecewise-Linear Transformations definition and types

multiple linear segments to adjust intensity

require user input to define the breakpoints and slopes

types:

  • contrast stretching

  • gray level slicing

  • bit plane slicing

12
New cards

contrast stretching

  • Expands the dynamic range of an image

  • Useful for low-contrast images caused by poor illumination or sensor issues

  • locations of points (r1,s1) and (r2,s2) control the shape of the transformation function

  • r1<=r2 and s1<=s2 is assumed so that the function is single valued and monotonically increasing

13
New cards

gray level slicing

  • Highlights specific ranges of gray levels while suppressing others

  • Applications: Medical imaging, satellite imagery

14
New cards

bit plane slicing

  • Separates the image into its bit-planes to emphasize individual bits. / determine the adequacy of the number of bits used to quantize each pixel

  • Applications: Image compression, noise analysis.

15
New cards

Histogram Processing def + formulas

  • histogram represents the frequency of each intensity value in an image

  • involves analyzing and modifying this distribution to enhance image quality

  • formulas

    • unnormalized hist in [0, L-1] → h(rk)= nk

    • normalized hist → p(rk) = nk/MN

    • rk = kth gray value

    • nk = number of pixels having gray level rk

<ul><li><p>histogram represents the frequency of each intensity value in an image</p></li><li><p>involves analyzing and modifying this distribution to enhance image quality</p></li><li><p>formulas</p><ul><li><p>unnormalized hist in [0, L-1] → <strong>h(r<sub>k</sub>)= n<sub>k</sub></strong></p></li><li><p>normalized hist → <strong>p(r<sub>k</sub>) = n<sub>k</sub>/MN</strong></p></li><li><p>r<sub>k</sub> = k<sup>th</sup> gray value</p></li><li><p>n<sub>k</sub> = number of pixels having gray level r<sub>k</sub></p></li></ul></li></ul><p></p>
16
New cards

histogram processing techniques

  • histogram equilization

  • histogram matching

17
New cards

histogram equilization

  • Enhances the contrast of an image by redistributing intensity values to occupy the entire dynamic range more evenly

  • Uses the cumulative distribution function (CDF) to map original pixel values

  • discrete formulas work with probablities and summations vs. cont. integrals

<ul><li><p>Enhances the contrast of an image by redistributing intensity values to occupy the entire dynamic range more evenly</p></li><li><p>Uses the cumulative distribution function (CDF) to map original pixel values</p></li><li><p>discrete formulas work with probablities and summations vs. cont. integrals</p></li></ul><p></p>
18
New cards

Histogram Matching (Specification)

  • Adjusts the image histogram to match a specified target histogram

  • Useful when uniform redistribution isn’t ideal

19
New cards

If you wanted to improve the contrast in an image with a very narrow range of intensity values, which technique would you use: histogram equalization or histogram matching?

Histogram equalization would be the right choice because it redistributes the intensity values more evenly across the full range, enhancing the contrast. This is particularly effective when the image has a narrow range of intensity values, as it spreads out the pixel distribution

20
New cards

Histogram Equalization Example:

Given an 8-pixel image with gray levels in the range [0, 7]: [0,0,1,1,2,3,5,7], Find the histogram-equalized image

  1. Compute the Histogram: Count the frequency of each gray level:

    • [gray level (rk​), freq (nk)]

      [0, 2]

      [1, 2]

      [2, 1]

      [3, 1]

      [4, 0]

      [5, 1]

      [6, 0]

      [7, 1]

  2. Calculate the Probability (p(rk)): Normalize the histogram by dividing by the total number of pixels (N=8) → p(rk) = nk/8:

    • [gray level (rk​), freq (nk), p(rk)]

      [0, 2, 0.25]

      [1, 2, 0.25]

      [2, 1, 0.125]

      [3, 1, 0.125]

      [4, 0, 0]

      [5, 1, 0.125]

      [6, 0, 0]

      [7, 1, 0.125]

  3. Compute the Cumulative Distribution Function (CDF): CDF(rk​) = ∑ (j=0 → k) p(rj)

    • [rk, CDF(rk)]

      [0, 0.25]

      [1, 0.5]

      [2, 0.625]

      [3, 0.75]

      [4, 0.75]

      [5, 0.875]

      [6, 0.875]

      [7, 1.0]

  4. Map to New Gray Levels: The new gray level is computed as: sk​ = round((L−1)⋅CDF(rk​)), where L = 8

    • [rk, CDF(rk​), sk​]

      [0, 0.25, 1]

      [1, 0.5, 3]

      [2, 0.625, 4]

      [3, 0.75, 5]

      [4, 0.75, 5]

      [5, 0.875, 6]

      [6, 0.875, 6]

      [7, 1.0, 7]

  5. Resulting Image: Replace each rk in the original image with sk​:

    • [0,0,1,1,2,3,5,7]→[1,1,3,3,4,5,6,7]

21
New cards

Histogram Matching Example

Match the histogram of the image from above to a target histogram with the following probabilities:

  • [Gray Level (zq), pz(zq)]

    [0, 0.125]

    [1, 0.125]

    [2, 0.25]

    [3, 0.25]

    [4, 0.125]

    [5, 0.125]

  1. Compute the Target CDF: G(zq) = ∑ (j=0 → q) pz(zj)

    • [Gray Level (zq), G(zq)]

      [0, 0.125]

      [1, 0.25]

      [2, 0.5]

      [3, 0.75]

      [4, 0.875]

      [5, 1.0]

  2. Map rk​ to sk​ (Equalization Step): Use the equalized mapping from equalization

  3. Match sk to zq: Find the closest value of G(zq) for each sk:

    • [sk, G(zq), zq​]

      [1, 0.25, 1]

      [2, 0.5, 2]

      [3, 0.75, 3]

      [4, 0.875, 4]

      [5, 1.0, 5]

  4. Resulting Image: Replace each sk in the original image with zq​:

    • [1,1,3,3,4,5,6,7]→[1,1,2,2,2,3,4,5]