www.pudn.com > levelsetImage.rar > readimage.m


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 );