Histeq
Enhance contrast using histogram equalization
该函数通过直方图均衡化来添加对照度
Syntax
J = histeq(I,hgram)
Description
Histeq enhances the contrast of images by transforming the values in an intensity image, or the values in the colormap of an indexed image, so that the histogram of the output image approximately matches a specified histogram.
Histeq函数通过改变一副亮度图像灰度值或者一副索引图像的灰度值来添加图像的对照度,以达到输出图像的直方图近似于规定的直方图。
J = histeq(I,hgram) transforms the intensity image I so that the histogram of the output intensity image J with length(hgram) bins approximately matches hgram. The
vector hgram should contain integer counts for equally spaced bins with intensity values in the appropriate range: [0, 1] for images of class double, [0, 255] for images
of class uint8, and [0, 65535] for images of class uint16. histeq automatically scales hgram so that sum(hgram) = prod(size(I)). The histogram of J will better match
hgram when length(hgram) is much smaller than the number of discrete levels in I.
J = histeq(I,hgram)改变灰度图像以达到输出图像J的直方图接近于參数hgram(该參数为规定直方图)。
向量hgram应该包括等区间的适当灰度值的数目(就是灰度区间,比方uint8图像,将256个灰度级化为32个区间,每一个区间连续8个灰度级)。灰度值的范围为:双精度图像灰度值范围为[0-1],unit8图像灰度值范围为[0-255],unit16图像的灰度值范围为[0-65535],histeq自己主动调整hgram以达到标准图像hgram的和等于原图像的像素数(也就是说两幅图像的像素数要相等。即将标准图像的像素数目调整的和原图像像素数目一样)。当规定直方图J的长度比原图像I的灰度级数目小时,J的直方图将会更好的匹配规定直方图hgram。
翻译的非常烂,以后还需多多努力,尽管非常多东西可以意会可是还是难以表达。