直方图:
描述了每个灰度级具有的点的个数,
直方图均衡化使灰度分布较好。实质是减少图像的灰度级以换取对比度的加大,原来直方图上频度较小的灰度级被纳入其他较大的灰度图中。
优点: 可逆的(只要知道变换函数,图像可以被还原)。
Histogram equalization often produces unrealistic effects in photographs; however it is very useful for scientific images like thermal, satellite or x-ray images, often the same class of images that user would apply false-color to.直方图均衡化处理的图片可能不太真实,但是更利于科学研究,因为对于类似X光的来说,spatial correlation is more important than intensity of signal (空间相关性要比信号强度更加重要)。
均衡化的做法用到了很多概率论方面的思维,因为点在不同灰度的分布本来也可以看做点在某个灰度出现的频率。
离散点的统计:
Consider a discrete grayscale image {x} and let ni be the number of occurrences of gray level i. The probability of an occurrence of a pixel of level i in the image is
L being the total number of gray levels in the image, n being the total number of pixels in the image, and px(i) being in fact the image's histogram for pixel value i, normalized to [0,1].
分别统计每个灰度级的概率,为下面均衡化做基础。
We would like to create a transformation of the form y = T(x) to produce a new image {y}, such that its CDF will be linearized across the value range, i.e.
累计分布函数要成线性才可以保证每一个灰度级的概率相同。因而希望得到类似如下形式的函数:
泛化实现方案:
具体例子,参见维基(http://en.wikipedia.org/wiki/Histogram_equalization)