indextogray.m
来自「Index to gray conversion in matlab」· M 代码 · 共 18 行
M
18 行
load trees
I = ind2gray(X,map);
imshow(X,map)
figure,imshow(I)
%%%%%%%%%%%%%%%%%%%
I = imread('cameraman.tif');
[X, map] = gray2ind(I, 16);
imview(X, map);
%%%%%%%%%%%%%%%%
I = imread('rice.png');
J = filter2(fspecial('sobel'),I);
K = mat2gray(J);
imview(I), imview(K)
⌨️ 快捷键说明
复制代码Ctrl + C
搜索代码Ctrl + F
全屏模式F11
增大字号Ctrl + =
减小字号Ctrl + -
显示快捷键?