Matlab图像彩色转灰色

Matlab图像彩色转灰色

时间:2014年5月7日星期三

 

网上找的程序。实现图像彩色转灰色:

I1=imread('C:\Users\Yano\Desktop\matlab\test1\4.jpg');
I2=rgb2gray(I1);
figure(1)
imshow(I1);
title('源图像');
figure(2)
imshow(I2);
title('灰度图像');


 

自己拍的几张图片,通过此程序转换成功:


 

 

posted @ 2016-01-05 18:07  yxwkaifa  阅读(805)  评论(0编辑  收藏  举报