help-octave
[Top][All Lists]
Advanced

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

Re: octave-forge: imread not reading files


From: Krishnan V
Subject: Re: octave-forge: imread not reading files
Date: Fri, 20 Oct 2006 18:58:48 +0530

Hi again(!)
i tried installing in octave as per your instructions and:
octave:5> pkg install image-1.0.0.tar.gz --prefix=/usr/share/octave/2.9.9/site/m/octave-forge/image/
tar: This does not look like a tar archive
tar: Skipping to next header
tar: Archive contains obsolescent base-64 headers
tar: Error exit delayed from previous errors
warning: implicit conversion from scalar to string
error: tar: tar exited with status = 
/****************************************/
I tried installing from source. I went into the src directory. configure was able to detect the directories to install.
make fails as follows:
address@hidden src]# make
mkoctfile -DHAVE_OCTAVE_29 -v pngread.cc -lpng
g++ -c -fPIC -I/usr/include/octave-2.9.9 -I/usr/include/octave-2.9.9/octave -mieee-fp -g -O2 -DHAVE_OCTAVE_29 pngread.cc -o pngread.o
pngread.cc: In function `canvas* load_canvas(char*)':
pngread.cc:207: error: `png_set_add_alpha' undeclared (first use this function)
pngread.cc:207: error: (Each undeclared identifier is reported only once for each function it appears in.)
make: *** [pngread.oct] Error 1
/**************************************************************************/
This is RH-9.0 . i upgraded some of the libraries; gcc-3.4.4,
address@hidden src]# display --version
Version: ImageMagick 6.2.6 07/09/06 Q16 http://www.imagemagick.org
Copyright: Copyright (C) 1999-2006 ImageMagick Studio LLC
/******************************/

Thanks
krishnan

On 10/20/06, David Bateman <address@hidden> wrote:
Krishnan V wrote:
> Thanks all for the response. Yes, the change helps, however there is a
> new problem.
> i am not able to read any type of image using this; not even ppm/pgm.
> i get a variety of errors. here are a few:
> /**********************************************************************/
> octave:6> im=imread("target.ppm");
> error: imread: unknown image type 'Palette'
> error: evaluating if command near line 80, column 5
> error: called from `imread' in file
> `/usr/share/octave/2.9.9/site/m/octave-forge/image/imread.m'
> error: evaluating assignment _expression_ near line 6, column 3
> octave:6> im=imread(" splash.ppm");
> error: imread: image data chunk has invalid size
> error: evaluating if command near line 133, column 5
> error: called from `imread' in file
> `/usr/share/octave/2.9.9/site/m/octave-forge/image/imread.m'
> error: evaluating assignment _expression_ near line 6, column 3
> octave:6> im=imread("10.gif");
> warning: implicit conversion from matrix to string
> error: imread: invalid image depth
> error: evaluating if command near line 76, column 5
> error: called from `imread' in file
> `/usr/share/octave/2.9.9/site/m/octave-forge/image/imread.m'
> error: evaluating assignment _expression_ near line 6, column 3
> /*************************************************************/
> and so on....
> Any tips/pointers?
> Thanks
> krishnan

The ImageMagick code in this version of octave-forge was faulty. See the
bug report

http://sourceforge.net/tracker/index.php?func=detail&aid=1439598&group_id=2888&atid=102888

I recently fixed this in the CVS. The response for this problem at the
time of the bug report was to force imread to use pngread and jpgread
instead of ImageMagick for jpg/png files and fallback to ImageMagick
otherwise. Note this means you don't get the alpha channel for pngs.
Also as the octave ImageMagick binding is broken in the version you are
using due to the "Quantum" not being 8-bits as assumed in the octave
code, you can't read anything else but jpg and png as you've found.

In fact I haven't changed the behavior of imread in the CVS yet as I
have no feedback on whether the fix I applied works except for the few
test cases I tried.. As you have 2.9.9, try getting the package

http://octave.dbateman.org/packages/image-1.0.0.tar.gz

and installing it with a command

pkg("install","image-1.0.0.tar.gz")

you'll need to do pkg("load","all") afterwards to make this package
visible... However, I believe this will fix your problems.. If it does
then perhaps pngs and jpgs should be read by imagemagick as well..

Regards
David



--
David Bateman                                address@hidden
Motorola Labs - Paris                        +33 1 69 35 48 04 (Ph)
Parc Les Algorithmes, Commune de St Aubin    +33 6 72 01 06 33 (Mob)
91193 Gif-Sur-Yvette FRANCE                  +33 1 69 35 77 01 (Fax)

The information contained in this communication has been classified as:

[x] General Business Information
[ ] Motorola Internal Use Only
[ ] Motorola Confidential Proprietary



reply via email to

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