Ai
1 Star 0 Fork 0

Vincent/MATLAB_Study

加入 Gitee
与超过 1200万 开发者一起发现、参与优秀开源项目,私有仓库也完全免费 :)
免费加入
文件
克隆/下载
lesson08.m 953 Bytes
一键复制 编辑 原始数据 按行查看 历史
VINCENT 提交于 2022-10-25 17:43 +08:00 . MATLAB学习(修改版2)
%%
%1图像处理
clear, close all
I = imread('pout.tif'); %read
imshow(I); %show
%%
%2取出图像中黑白区域数值
%当得到的余数结果的符号希望跟被除数(y)一样,用rem()函数
for i=size(I,1)
for j=size(I,2)
if (rem(i,2)==0 && rem(j,2)==0)
I(i,j)=2;
end
end
end
%%
%3大米增加亮度
I=imread('rice.png');
subplot(1,2,1); imshow(I);
J=immultiply(I, 1.5);%亮度增加1.5倍
subplot(1,2,2); imshow(J);
%%
%4图像叠加
I=imread('rice.png');
J=imread('cameraman.tif'); K=imadd(I,J);
subplot(1,3,1); imshow(I);
subplot(1,3,2); imshow(K);
subplot(1,3,3); imshow(J);
%%
%增加图片的分布度(图像清晰化)
I = imread('pout.tif'); I2 = histeq(I);
subplot(1,4,1); imhist(I);
subplot(1,4,2); imshow(I);
subplot(1,4,3); imshow(I2);
subplot(1,4,4); imhist(I2);
%%
%旋转图片
I = imread('rice.png'); subplot(1,2,1);
imshow(I); J = imrotate(I, 35, 'bilinear');
subplot(1,2,2); imshow(J);
size(I)
size(J)
Loading...
马建仓 AI 助手
尝试更多
代码解读
代码找茬
代码优化
其他
1
https://gitee.com/Vincentstudy/MATLAB_Study.git
git@gitee.com:Vincentstudy/MATLAB_Study.git
Vincentstudy
MATLAB_Study
MATLAB_Study
master

搜索帮助