数字图像处理程序1
作者:互联网
数字图像处理程序
I=imread('C:\Users\12166\Desktop\wlj.jpg');
figure,subplot(121);%显示原图
imshow(I),title('org');
whos I;
IF=rgb2gray(I);%灰度图像处理
imshow(IF),title('GRAY')
imwrite(IF,'C:\Users\12166\Desktop\gray.jpg')
IR45=imrotate(I,45);%原图旋转45度
figure,subplot(121);
imshow(IR45),title('rotate45');
imwrite(IR45,'C:\Users\12166\Desktop\rotate45.jpg')
IR90=imrotate(I,90);%原图旋转90度
subplot(122);
imshow(IR90),title('rotate90');
imwrite(IR90,'C:\Users\12166\Desktop\rotate90.jpg')
IC=imcomplement(I);%反相操作,底片效果
figure
imshow(IC),title('imcompl');
imwrite(IC,'C:\Users\12166\Desktop\imcompl.jpg')
处理后的图片
标签:Users,title,数字图像处理,imshow,程序,jpg,Desktop,12166 来源: https://blog.csdn.net/weixin_43685341/article/details/122259096