|
From: | Krishnan V |
Subject: | Re: octave-forge: imread not reading files |
Date: | Fri, 20 Oct 2006 18:58:48 +0530 |
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
[Prev in Thread] | Current Thread | [Next in Thread] |