20索引转灰度 看星星 2022-05-29 79 阅读1分钟 close all;clear all;clc; [X,map]=imread('forest.tif'); I = ind2gray(X,map); %将索引图像转换为灰度图像 figure,imshow(X,map); %索引图像 figure,imshow(I); %灰度图像