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。
翻譯的非常爛,以后還需多多努力,盡管非常多東西可以意會可是還是難以表達。