用Matlab将ORL人脸数据库的pgm格式批量转换为jpg格式

%{
	将ORL人脸数据库的pgm格式批量转换为jpg格式
%}
	clc;	
   % clear all;
	for i=1:40
for j=1:10
	p_w_picpath=imread(strcat('E:\pic\att_faces\s',...
int2str(i),'\',int2str(j),'.pgm'));
	imwrite(p_w_picpath,strcat('E:\pic\att_faces\s',...
	int2str(i),'\',int2str(j),'.jpg'));
	end
	disp(strcat('s',int2str(i),'转换结束.'));
	end
disp('批量转换结束.');

分享标题:用Matlab将ORL人脸数据库的pgm格式批量转换为jpg格式
网站地址:http://csdahua.cn/article/ggddoi.html
扫二维码与项目经理沟通

我们在微信上24小时期待你的声音

解答本文疑问/技术咨询/运营咨询/技术建议/互联网交流