imadjust是matlab自帶函數(shù),用于對比度增強(qiáng)
設(shè)原圖象f(x,y)的灰度范圍是[m,M],如果希望調(diào)整后的圖象g(x,y)的灰度范圍是[n,N],可以通過下面的程序?qū)崿F(xiàn):
J = imadjust(I,[low_in high_in],[low_out high_out])
J = imadjust(I,[low_in high_in],[low_out high_out])
返回圖象I經(jīng)過直方圖調(diào)整后的圖象J,[low_in high_in]為原圖象中要變換的灰度范圍,[low_out high_out]指定了變換后的灰度范圍。
例:
I = imread('pout.tif');
J = imadjust(I,[0.3 0.7],[]);
imshow(I), figure, imshow(J)