%导入彩色图像
f = imread('girl.jpg');
%分别显示红绿蓝三原色的分量图像
fRed = f(:, :, 1);
figure,imshow(fRed);
fGreen = f(:, :, 2);
figure,imshow(fGreen);
fBlue = f(:, :, 3);
figure,imshow(fBlue);
%导入彩色图像
f = imread('girl.jpg');
%分别显示红绿蓝三原色的分量图像
fRed = f(:, :, 1);
figure,imshow(fRed);
fGreen = f(:, :, 2);
figure,imshow(fGreen);
fBlue = f(:, :, 3);
figure,imshow(fBlue);