MATLAB图像热度转换

MATLAB图像热度转换,插个眼

clc;
clear;
file_path='C:\Users\Administrator\Desktop\desk\';
out_path='C:\Users\Administrator\Desktop\11\';
img_path_list=dir(strcat(file_path,'*.jpg'));
img_num=length(img_path_list);
hwait=waitbar(0,'准备开始');
for i=1:img_num
  img_name=img_path_list(i).name;
smap=imread(strcat(file_path,img_name));
img=rgb2gray(smap);
[m,n]=size(img);
set (gcf,'Position',[0,0,n,m]);
imshow(img,'Border','tight','InitialMagnification','fit');
colormap(jet);
F=getframe(gcf);
imwrite(F.cdata,strcat(out_path,img_name));

str='批量转换';
waitbar(n/img_num,hwait,str);
end;
close;
close(hwait);在这里插入代码片

版权声明:本文为qq_48884833原创文章,遵循CC 4.0 BY-SA版权协议,转载请附上原文出处链接和本声明。