readimage.m

来自「matlab 代码为图像的分割」· M 代码 · 共 12 行

M
12
字号
function im = readimage( filename )
% READIMAGE Read in an image and convert to grayscale
%    READIMAGE( filename ) Read in the image, convert
%    to grayscale if necessary, and then convert to
%    double precison format

im = imread( filename );
if( isrgb( im ) )
  im = rgb2gray( im );
end;
im = double( im );

⌨️ 快捷键说明

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