?? f11_1.m
字號:
%原始索引圖像
load trees
%轉換為灰度圖像
I = ind2gray(X,map);
figure(1)
subplot(2,2,1);
imshow(X,map)
title('索引圖像');
subplot(2,2,2);
imshow(I)
title('轉換后的灰度圖像');
%原始真彩圖像
RGB = imread('peppers.png');
%轉換為索引圖像
[XX,map] = rgb2ind(RGB,128);
figure(2)
subplot(2,2,1);
imshow(RGB);
title('RGB圖像');
subplot(2,2,2);
imshow(XX,map);
title('轉換后的索引圖像');
%原始索引圖像
load trees
%轉換為二進制圖像
BW = im2bw(X,map,0.4);
figure(3)
subplot(2,2,1);
imshow(X,map);
title('索引圖像');
subplot(2,2,2);
imshow(BW);
title('轉換后的二進制圖像');
?? 快捷鍵說明
復制代碼
Ctrl + C
搜索代碼
Ctrl + F
全屏模式
F11
切換主題
Ctrl + Shift + D
顯示快捷鍵
?
增大字號
Ctrl + =
減小字號
Ctrl + -