Lecture 7
Histogram
A histogram plots how many times (frequency) each intensity value in an image occurs.
Histogram Equalization
It produces a transformation function to generate an output image w/ a uniform histogram.
Histogram equalization in DIP can be categorized into two types:
- Discrete - Is the standard in digital image processing. Intensity levels of pixels are discrete values
- Continuous - Used in theory and simulations. Data not limited to a set of discrete values–value can be within a range.
For discrete cases, probabilities and summations are used. For continuous cases, probability densities and integrals are used.
Histogram Equalization: Discrete
A normalized histogram is denoted as: $p_r(r_k) = \frac{n_k}{MN}$ where $p_r$ is the probability and $n_k$ is hte number of pixels w/ intensity $r_k$. $MN$ is the total number of pixels in an image.
Discrete transformation function is defined as:
$S_k = T(r_k) = (L - 1) \sum^k_{j=0}p_r(r_j)$ where $k = 0, 1, 2, 3, … L - 1$
NOTE: Histogram Equalization is basically using the formula above.
Histogram Equalization: Continuous
Transformation function for intensity mapping is represented as: $s = T(r)$ where $0 \leq r \leq L-1$
Conditions for T(r):
- Monotonicity - T(r) increases monotonically within [0,L-1] to ensure higher input intensities will result in higher/equal output intensities
- Range Constraint - 0 $\leq T(r) \leq L-1$ for $0 \leq r \leq L-1$
A function $T$ is strictly monotonic if it is one-to-one and reversible. $r = T^-1(s)$ for $0 \leq s \leq L-1$
Histogram Matching (Specification)
Is a method to specify the histogram shape ourselves. It adjusts the histogram of an image to match the histogram of a target image.
Local Histogram Processing
Histogram equalization and histogram matching are both global histogram prcoessing methods. These processes modify pixels based on the intensity distribution of an entire image.
Enhancing details over small areas of an image would result in a fail since the number of pixels in small areas would have a less significant impact in computation of global transformations.
SOLUTION TO PROBLEM: perform transformations based on intensity distribution of pixel neighborhoods
So, local histogram processing won’t work best if you want to enhance details over small areas of an image.
Reading
Summary
For continuous histogram equalization, it is represented with the formula: $s = T(r)$ where $0 \leq r \leq L-1$
For a function $T$ to be strictly monotonic,
Histogram Matching - specifies histogram shape. Adjusts histogram of an image to match histogram of a target image.