Histogram equalization is a special case of histogram matching.
Suppose we have a histogram like this.
And the CDF(Cumulative Distribution Funciton) for it goes like
It shows that low value pixels occupy the majority, making the whole image look dark. It’s a relatively bad viewing experiment. If we equalize the value distribution, the figure will look better. After modified, the ideal distribution may like this.
So the CDF will be like
Now let’s make some derivation for the transformation function from x-axis with r to the x-axis with s.
Let $M$ be the upper limit for the pixels’ range, so the CDF at $M$ will be 1, i.e.
$$\begin{cases}
P(r=M) &= 1 \
P’(s=M) &= 1 = k\cdot M
\end{cases}$$
where k is a constant.
$$\begin{align}
P(s) &= k\cdot s \
&= \int_0^r p’(x)\,\text{d}x
\end{align}$$
Therefore, the transformation goes to be
$$ s = T(r)= M\int_0^r p’(x) \,\text{d}x
$$
where $p’(x)$ is called the PDF(Probability Distribution Function) which yields from $P’(x)$
Comments
shortname
for Disqus. Please set it in_config.yml
.