[Index for tmp_for_tar/imgio] [Return to Master Index]

ims_load

(tmp_for_tar/imgio/ims_load.m)


Function Synopsis

ims = ims_load ( imfile )

Help text

       ims = ims_load ( imfile ) - Load an image, returning a sructure

 Reads an image file and returns a structure with fields :

 im     :  H x W (gray) : Pixel greylevel or RGB values. These are 
          3H x W (rgb)  : positive or zero integers.

 rgb    : 1             : True if the image is RGB, false if it is gray.

 maxval : 1             : Maximal value of elements in  im.

 file   : string        : Name of the original file.

 See also : ims_save, ims_show, set_viewer.

 This function is basically a wrapper around Ariel Tankus's readimagefile().



Listing of function file tmp_for_tar/imgio/ims_load.m

##       ims = ims_load ( imfile ) - Load an image, returning a sructure
##
## Reads an image file and returns a structure with fields :
##
## im     :  H x W (gray) : Pixel greylevel or RGB values. These are 
##          3H x W (rgb)  : positive or zero integers.
##
## rgb    : 1             : True if the image is RGB, false if it is gray.
##
## maxval : 1             : Maximal value of elements in  im.
##
## file   : string        : Name of the original file.
##
##
## See also : ims_save, ims_show, set_viewer.
##
## This function is basically a wrapper around Ariel Tankus's readimagefile().
##
## Author : Etienne Grossmann <etienne@isr.ist.utl.pt>
function ims = ims_load ( imfile )

try
  [ims.im,ims.rgb,ims.maxval] = readimagefile (imfile);
catch
  printf ("ims_load : Couldn't load '%s'\n",imfile) ;
  keyboard
  ims.im = [];
end
ims.file = imfile ;


Produced by oct2html on Sat Sep 14 9:47:03 2002
Cross-Directory links are: ON