loadimage.m

来自「对图像进行多种分析、变化」· M 代码 · 共 19 行

M
19
字号
function [f,fn,map]=LoadImage(prompt,pth);
%---------------------------------
%   [f,fn,map]=LoadImage(prompt,path) opens an image file and returns bitmap image matrix f and g,
%       Default of prompt is 'Read a JPEG image.'.
%       Default of pth is 'i\'.
%
%---------------------------------
if ~nargin
    prompt='Read a JPEG image.';pth='i\';
elseif nargin==1
    pth='i\';
end

[t,p]=uigetfile([pth,'*.*'],prompt);
fn=[p t];

[f,map]=imread(fn);
%g=double(f);

⌨️ 快捷键说明

复制代码Ctrl + C
搜索代码Ctrl + F
全屏模式F11
增大字号Ctrl + =
减小字号Ctrl + -
显示快捷键?