1、显示一幅二值图像:
>> bw = zeros(90,90); >> bw(2:2:88,2:2:88) = 1; >> imshow(bw); >>
2、利用image函数显示一幅索引图像:
>> [X,MAP] = imread('E:STUDY_softwareMatlab2016images11.jpg'); >> image(X); >> colormap(MAP)
3、利用image来显示一幅RGB图像
>> RGB = imread('E:STUDY_softwareMatlab2016images2.jpg'); >> image(RGB); >> f RGB(12,9,:)%要确定像素(12,9)的颜色
ans(:,:,1) =
200
ans(:,:,2) =
204
ans(:,:,3) =
205