|||
clear all;
close all;
clc;
I=imread('peppers.bmp');
IR(:,:)=I(:,:,1);
IG(:,:)=I(:,:,2);
IB(:,:)=I(:,:,3);
figure(1);
imshow(I);
figure(2);
subplot(1,3,1);imshow(IR);title('红色部分灰度');
subplot(1,3,2);imshow(IG);title('绿色部分灰度');
subplot(1,3,3);imshow(IB);title('蓝色部分灰度');
Archiver|手机版|科学网 ( 京ICP备07017567号-12 )
GMT+8, 2024-10-19 22:42
Powered by ScienceNet.cn
Copyright © 2007- 中国科学报社