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