1 实验一
1.1 实验题目
读入一幅彩色图像,在一个窗口中同时输出的三个通道图像。
1.2 程序源代码
a=imread('d.jpg');
%提取图像三通道信息
channel_1=a;
channel_2=a;
channel_3=a;
% 第一幅图的 G B 通道的灰度值全部变成 0 这样就只有 R 通道的了
channel_1(:,:,2)=0;
channel_1(:,:,3)=0;
channel_2(:,:,1)=0;
channel_2(:,:,3)=0;
channel_3(:,:,1)=0;
channel_3(:,:,2)=0;
% 显示图像
subplot(2,2,1);
imshow(channel_1,[]);
title('R 通道');
subplot(2,2,2);
imshow(channel_2,[]);
title('G 通道');
subplot(2,2,3);
imshow(channel_3,[]);
title('B 通道');
subplot(2,2,4);
imshow(a,[]);
title('原图');
2 实验二
2.1 实验题目
将一幅图像从 RGB 空间转换到 HSI 空间,并在 HSI 的三个分量分别添加噪声,然 后转换到 RGB 空间,并进行分析。
2.2 程序源代码
clc; %清空控制台
clear; %清空工作区
close all; %关闭已打开的 figure 图像窗口
color_pic=imread('d.jpg'); %读取彩色图像
double_color_pic=im2double(color_pic);
%分别提取 R/G/B 三个通道图像
R=double_color_pic(:,:,1); %R,G,B 二维用于计算
G=double_color_pic(:,:,
图像颜色模型转换与处理

最低0.47元/天 解锁文章

被折叠的 条评论
为什么被折叠?



