常用图像额文件格式及类型

1、显示一幅二值图像:

>> bw = zeros(90,90);
>> bw(2:2:88,2:2:88) = 1;
>> imshow(bw);
>> 

2、利用image函数显示一幅索引图像:

 

>> [X,MAP] = imread('E:\STUDY_software\Matlab2016\images\11.jpg');
>> image(X);
>> colormap(MAP)

 

3、利用image来显示一幅RGB图像

>> RGB = imread('E:\STUDY_software\Matlab2016\images\2.jpg');
>> image(RGB);
>> f RGB(12,9,:)%要确定像素(129)的颜色

ans(:,:,1) =

  200


ans(:,:,2) =

  204


ans(:,:,3) =

  205

posted on 2017-04-29 15:54  飞翔的梦的窝  阅读(268)  评论(0编辑  收藏  举报

导航