标签:
it |
分类: MATLAB |
图像增强
1. 直方图均衡化的 Matlab 实现
1.1 imhist 函数
功能:计算和显示图像的色彩直方图
格式:imhist(I,n)
说明:imhist(I,n) 其中,n 为指定的灰度级数目,缺省值为256;imhist(X,map) 就算和显示索引色图像 X
的直方图,map 为调色板。用
stem(x,counts) 同样可以显示直方图。
1.2 imcontour 函数
功能:显示图像的等灰度值图
格式:imcontour(I,n),imcontour(I,v)
说明:n 为灰度级的个数,v 是有用户指定所选的等灰度级向量。
1.3 imadjust 函数
功能:通过直方图变换调整对比度
格式:J=imadjust(I,[low high],[bottom top],gamma)
说明:J=imadjust(I,[low high],[bottom top],gamma) 其中,gamma 为校正量r,[low
high] 为原图像中要变换的灰度范围,[bottom top]
指定了变换后的灰度范围;newmap=imadjust(map,[low high],[bottom top],gamma) 调整索引色图像的调色板 map 。此