|
matlab图象输入问题
%读文件
- function [X,map]=openfile()
- [filename,filepath]=uigetfile('*.*','载入数据') ; %调用打开文件的标准对话框
- for k=1:size(filepath,2)
- name(k)=filepath(k);
- end
- for i=1:size(filename,2)
- k=k+1;name(k)=filename(i);
- end
- %打开文件并读取数据
- [X,map]=imread(name);
- hf=figure('Color',[0.7,0.9,0.7],'Position',[350,300,400,200],...
- 'Name','原始图像','NumberTitle','Off','MenuBar','none');
- image(X);
- colorbar;
复制代码 |
|