www.gusucode.com > 红外图像增强及目标检测演示界面matlab源码程序 > code/U_Save.m

    function U_Save()

[filename pathname]=uiputfile('*.*','open current file');

if(filename)
   %eval(['load(''pathname filename'')']);
   X=imread([pathname filename]);
    if(isrgb(X))
        X=rgb2gray(X);
    end
    colormap(gray);
    imagesc(X);
else
    msgbox('Cann''t Open File!','msgbox','Warn');
end