?? 13-2.m
字號(hào):
[X,map] = imread('forest.tif');
I = ind2gray(X,map);
%把索引圖像轉(zhuǎn)換成灰度圖像
imshow(I)
title('原圖像')
figure;subplot(121)
plot(0:0.01:1,sqrt(0:0.01:1))
axis square
title('平方根灰度變換函數(shù)')
subplot(122)
J=sqrt(I);
%平方根變換
imshow(J)
title('平方根變換后圖像')
figure;subplot(121)
plot(0:0.01:1,1-(0:0.01:1))
axis square
title('圖像反轉(zhuǎn)曲線')
subplot(122)
K=1-J;
%對(duì)平方根變換后的圖像反轉(zhuǎn)變換
imshow(K)
title('平方根變換后圖像反轉(zhuǎn)變換')
?? 快捷鍵說明
復(fù)制代碼
Ctrl + C
搜索代碼
Ctrl + F
全屏模式
F11
切換主題
Ctrl + Shift + D
顯示快捷鍵
?
增大字號(hào)
Ctrl + =
減小字號(hào)
Ctrl + -