Matlab批量输出2D和3D热像图
1. 文件、数据介绍。
文件夹下有55个格式为mat的热像图数据。
每个mat文件包含一个200*300的juzhen变量。
2.运行程序,结果如下。
2D热像图
3D热像图
3.部分源代码。
clc
clear all
%读取照片名
fid_file=fopen('E:\实用程序\热像\东北大学\k2-1-处理\k2-1-mat\k2-1-matname.txt');
count=0;
%读图像文件名
filename=fgets(fid_file);
%图像裁剪
picture=temp_picture;
%将差图像以filename同名出图
num=strfind(filename,'m');
out_filename=filename(1:num-2);
path=[out_filename,'.bmp'];
%将2D图像添加颜色条显示出来保存figure
%[C,h] = contourf(picture);%等值线图
imagesc(picture);
h1=figure(gcf);
%将3D图像显示出来保存figure
mesh(picture);
axis([xlim ylim -0.4560 1.1740]);
view(30,10);
h2=figure(gcf);
fclose(fid_file);