Image package not finding imagemagick?
Ben Abbott
bpabbott at mac.com
Wed Apr 9 21:31:44 CDT 2008
On Apr 9, 2008, at 9:10 PM, Nic Jones wrote:
> I've spent the last couple of days trying to get Octave installed to
> run some code for an assignment for uni in computer vision.
>
> OS: Mac OS X 10.5 on a PowerBook G4
>
> My steps have been:
> 1) downloaded and installed Octave.app (3.0.0) from http://octave.sourceforge.net/
> 2) installed gnuplot and AquaTerm, mucked around until those seemed to
> be working:
>
> octave-3.0.0:1> plot([1 2 3],[1 2 3], 'kx')
> comes up with a figure showing what you'd expect.
>
> 3) loaded up my code and got the following error:
>
> error: `imread' undefined near line 20 column 13
> error: evaluating assignment expression near line 20, column 11
> error: near line 20 of file `Assignment1.m'
>
> 4) assumed that the functionality of imread doesn't come standard with
> Octave.app
> 5) downloaded the octave-forge-bundle-20080216
> 6) tried to install
>
> pkg install image-1.0.5.tar.gz
>
> which took a while and gave errors I didn't copy down, but appeared to
> me to have something to do with ld not finding symbols.
> 7) from random googling et cetera, assumed my problem was that I don't
> have something called "imagemagick"
> 8) downloaded, compiled, installed, updated fink
> 9) used FinkCommander to install imagemagick 6.3.8, which took hours
> and installed a whole lot of stuff. I think the complete list is 266
> items long. It seems to be installed and working, because:
>
> [nic at Sousei-Seki ~]$ convert --version
> Version: ImageMagick 6.3.8 04/10/08 Q16 http://www.imagemagick.org
> Copyright: Copyright (C) 1999-2008 ImageMagick Studio LLC
>
> [snip]
>
> So now I'm stumped and out of ideas. Am I on the right path? How do
> I get Octave to see that I have imagemagick installed?
>
> Any help will be sincerely appreciated,
> Nic Jones
I have Octave & imagemagick installed via Fink. Installing the image
package resulted in the following
octave:3> pkg install image-1.0.5.tar
In file included from /sw/include/jpeglib.h:28,
from jpgwrite.cc:18:
/sw/include/jconfig.h:12:1: warning: "HAVE_STDLIB_H" redefined
In file included from /sw/include/octave-3.0.0+/octave/oct.h:31,
from jpgwrite.cc:11:
/sw/include/octave-3.0.0+/octave/config.h:570:1: warning: this is the
location of the previous definition
In file included from /sw/include/jpeglib.h:28,
from jpgread.cc:49:
/sw/include/jconfig.h:12:1: warning: "HAVE_STDLIB_H" redefined
In file included from /sw/include/octave-3.0.0+/octave/oct.h:31,
from jpgread.cc:41:
/sw/include/octave-3.0.0+/octave/config.h:570:1: warning: this is the
location of the previous definition
While all of that looks ominous, when I tried to read a jpg, it
appears to do so without problem.
octave:10> img = imread('MacGuy.jpg');
octave:11> which imread
which: `imread' is the function from the file /Users/bpabbott/octave/
image-1.0.5/imread.m
I'm running OSX 10.5.2 on Intel. My Octave source files are locally
installed (i.e. not directly from Fink, but built and installed using
Fink).
octave:12> ver
----------------------------------------------------------------------
GNU Octave Version 3.0.0+
GNU Octave License: GNU General Public License
Operating System: Darwin 9.2.2 Darwin Kernel Version 9.2.2: Tue Mar 4
21:17:34 PST 2008; root:xnu-1228.4.31~1/RELEASE_I386 i386
----------------------------------------------------------------------
Package Name | Version | Installation directory
--------------+---------+-----------------------
image *| 1.0.5 | /Users/bpabbott/octave/image-1.0.5
optim *| 1.0.0 | /Users/bpabbott/octave/optim-1.0.0
outliers *| 0.13.5 | /Users/bpabbott/octave/outliers-0.13.5
There appear to be three differences between your situation and mine.
(1) you did not use Fink to install Octave. (2) You are using a source
distribution that is a few months older than mine, and (3) you Mac is
a G4 and mine an Intel.
I don't have the time to try this out on my G4, but will give it a try
tomorrow. In the meantime, you might want to try to uninstall Octave
and reinstall via Fink (that approach will also take care of many
dependencies).
Ben
More information about the Help-octave
mailing list