help-octave
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: Loading Image Problem


From: Abdul Rahman Riza
Subject: Re: Loading Image Problem
Date: Thu, 17 Jul 2008 19:26:13 +0800

Dear Colleagues,

I followed your instruction using imread instead of loadimage for inputting various kind of images but after I check the command i found following messages:

octave:3> help imread

help: `imread' not found
Additional help for built-in functions and operators is
available in the on-line version of the manual.  Use the command
`doc <topic>' to search the manual index.

Help and information about Octave is also available on the WWW
at http://www.octave.org and via the address@hidden
mailing list.
octave:4>


Riza

On Thu, 2008-07-10 at 12:26 +0200, Michael Grossbach wrote:
Abdul Rahman Riza wrote:
> Dear Colleagues,
> 
> I already installed newer version of ubuntu therefore now i can use octave
> 3.0 and use instruction as appeared in manual still with the error messages
> 
> For information about changes from previous versions, type `news'.
> 
> octave:1> I = loadimage ("lena.bmp");
> error: load: /home/unimap/lena.bmp: inconsistent number of columns near line
> 2
> error: load: unable to extract matrix size from file `/home/unimap/lena.bmp'
> error: evaluating assignment _expression_ near line 47, column 8
> error: called from `loadimage' in file
> `/usr/share/octave/3.0.0/m/image/loadimage.m'
> error: evaluating assignment _expression_ near line 1, column 3
> octave:1>
> 
> Anyone can tell me what went wrong?
> 

As someone already pointed out loadimage() reads Octave's own image 
format only:

octave-3.0.1.exe:1> help loadimage
  -- Function File: [X, MAP] = loadimage (FILE)
      Load an image file and it's associated color map from the
      specified FILE.  The image must be stored in Octave's image
      format.

      See also: saveimage, load, save.

Use imread() instead

octave-3.0.1.exe:2> help imread
  -- Function File: I = imread(FILENAME)
      Read images from various file formats.

      The size and numeric class of the output depends on the format of
      the image.  A colour image is returned as an MxNx3 matrix.
      Grey-level and black-and-white images are of size MxN.  The
      colour depth of the image determines the numeric class of the
      output: 'uint8' or 'uint16' for grey and colour, and 'logical'
      for black and white.

      Note: For image formats other than jpeg and png, the ImageMagick
      "convert" and "identify" utilities are needed. ImageMagick can be
      found at www.imagemagick.org

HTH, Michael

reply via email to

[Prev in Thread] Current Thread [Next in Thread]