Histogram equalization and histogram matching

Histogram equalization is a special case of histogram matching.

Suppose we have a histogram like this.

histogram

And the CDF(Cumulative Distribution Funciton) for it goes like

CDF

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.

uniform histogram

So the CDF will be like

uniform CDF

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)$

Differences between Python 2.7 and Python 3 Understanding forward and backprop in neural networks

Comments

You forgot to set the shortname for Disqus. Please set it in _config.yml.
Your browser is out-of-date!

Update your browser to view this website correctly. Update my browser now

×