help-octave
[Top][All Lists]
Advanced

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

Re: Image package


From: Thomas Treichl
Subject: Re: Image package
Date: Fri, 21 Nov 2008 23:00:06 +0100
User-agent: Thunderbird 2.0.0.18 (Macintosh/20081105)

Ben Abbott schrieb:
On Nov 19, 2008, at 10:22 AM, Robert Fong-tom wrote:
I am primarily interested in reading jpg, tiff and png files; displaying them; and writing image matrices to files of these formats. Let me give you some background. I am looking for a math tool to analyze images, and to study effects of various components (i.e telescope, optical filters and image processing filters, etc) on the image. I looked into using Scilab and although this math package is very good, it does not support OS X. I know MatLab but their price is way beyond my means. Octave seems to be a good alternative but I am having some difficulty getting the basic functionality I need. I have worked through most problems but getting the image package for OS X 10.4 is proving to be a challenge for me primarily because I do not have a software background.

Please reply-all so that others can also benefit. Also notice I've copied the octave-forge list.

While I've used the image package in the past, but I noticed image-1.0.5 was no longer functioning correctly for me (octave-3.0.3 on OSX 10.5.5), so I uninstalled image-1.0.5 and attempted to install the more recent image-1.0.8, which failed.

I snipped the middle part out, but the beginning and end of the trouble is below.

octave:4> pkg install image-1.0.8.tar
Undefined symbols:
   "Magick::Image::type() const", referenced from:
octave_value_list read_images<boolNDArray>(std::vector<Magick::Image, std::allocator<Magick::Image> >, Array<int>, unsigned int)in __magick_read__.o octave_value_list read_images<intNDArray<octave_int<unsigned char> > >(std::vector<Magick::Image, std::allocator<Magick::Image> >, Array<int>, unsigned int)in __magick_read__.o octave_value_list read_images<intNDArray<octave_int<unsigned short> > >(std::vector<Magick::Image, std::allocator<Magick::Image> >, Array<int>, unsigned int)in __magick_read__.o read_indexed_images(std::vector<Magick::Image, std::allocator<Magick::Image> >, Array<int>, bool)in __magick_read__.o
[...]
   "Magick::Image::baseRows() const", referenced from:
octave_value_list read_images<boolNDArray>(std::vector<Magick::Image, std::allocator<Magick::Image> >, Array<int>, unsigned int)in __magick_read__.o octave_value_list read_images<intNDArray<octave_int<unsigned char> > >(std::vector<Magick::Image, std::allocator<Magick::Image> >, Array<int>, unsigned int)in __magick_read__.o octave_value_list read_images<intNDArray<octave_int<unsigned short> > >(std::vector<Magick::Image, std::allocator<Magick::Image> >, Array<int>, unsigned int)in __magick_read__.o read_indexed_images(std::vector<Magick::Image, std::allocator<Magick::Image> >, Array<int>, bool)in __magick_read__.o
   "_CloneImageInfo", referenced from:
void Magick::readImages<std::vector<Magick::Image, std::allocator<Magick::Image> > >(std::vector<Magick::Image, std::allocator<Magick::Image> >*, std::basic_string<char, std::char_traits<char>, std::allocator<char> > const&)in __magick_read__.o
ld: symbol(s) not found
collect2: ld returned 1 exit status
make: *** [__magick_read__.oct] Error 1
error: 'make' returned the following error: mkoctfile __cordfltn__.cc
mkoctfile __bilateral__.cc
mkoctfile __custom_gaussian_smoothing__.cc
mkoctfile bwlabel.cc
mkoctfile bwfill.cc
mkoctfile rotate_scale.cc
mkoctfile hough_line.cc
mkoctfile graycomatrix.cc
mkoctfile deriche.cc
mkoctfile __bwdist.cc
mkoctfile nonmax_supress.cc
mkoctfile __magick_read__.cc `Magick++-config --cppflags` `Magick++- config --ldflags` error: called from `pkg:configure_make' in file /sw/share/octave/3.0.3/ m/pkg/pkg.m near line 1248, column 2

Robert, did you encounter this problem or something else?

In any event, does anyone have an idea as to what is wrong?

I can also see that something is different with the image-1.0.8 package but I currently don't know what is causing the fail. It's definitely not the 'pkg' command itself but the image-1.0.8.tar.gz package.

However, I was able to install image-1.0.7.tar.gz with tiff, jpg, png support inside of Octave.app 3.0.3. I needed to install some more libs, *note* that my Octave is in '/Applications' and not anywhere else. I got into the directory '/tmp' and run 'sh myscript.sh' which installs all the necessary libs for image-1.0.7.tar.gz inside of Octave.app. This quickly written script file is attached to this email.

After this script finished I was able to do a

  octave-3.0.3:2> pkg install -verbose -global image-1.0.7.tar.gz

successfully.

  octave-3.0.3:2> pkg list
    Package Name  | Version | Installation directory
    --------------+---------+-----------------------
           image *|   1.0.7 | .../Resources/share/octave/packages/image-1.0.7

I won't spend further time to write a clean description about what has to be done to install image-1.0.x.tar.gz inside of Octave.app. I'm already working with a 3.1.51+ version of Octave that comes with imread, imwrite etc. and further all the necessary libs for jpg, tiff, png - so somewhen you shouldn't need to deal with manually installing these libraries before installing the image package.

I hope this description helps a bit more here,

Regards,

  Thomas
curl -s -S 
http://mesh.dl.sourceforge.net/sourceforge/libpng/libpng-1.2.33.tar.gz -o 
libpng-1.2.33.tar.gz
tar -xzf libpng-1.2.33.tar.gz && cd libpng-1.2.33
PATH=/Applications/Octave.app/Contents/Resources/bin:$PATH \
   ./configure --prefix=/Applications/Octave.app/Contents/Resources \
  CFLAGS="-I/Applications/Octave.app/Contents/Resources/include" \
  LDFLAGS="-L/Applications/Octave.app/Contents/Resources/lib"
make && make install && cd ..

curl -s -S http://www.ijg.org/files/jpegsrc.v6b.tar.gz -o jpegsrc.v6b.tar.gz
tar -xzf jpegsrc.v6b.tar.gz && cd jpeg-6b
PATH=/Applications/Octave.app/Contents/Resources/bin:$PATH \
   ./configure --prefix=/Applications/Octave.app/Contents/Resources \
  CFLAGS="-I/Applications/Octave.app/Contents/Resources/include" \
  LDFLAGS="-L/Applications/Octave.app/Contents/Resources/lib"
make && make install && make install-lib && cd ..

curl -s -S ftp://ftp.remotesensing.org/pub/libtiff/tiff-3.8.2.tar.gz -o 
tiff-3.8.2.tar.gz
tar -xzf tiff-3.8.2.tar.gz && cd tiff-3.8.2
PATH=/Applications/Octave.app/Contents/Resources/bin:$PATH \
   ./configure --prefix=/Applications/Octave.app/Contents/Resources \
  CFLAGS="-I/Applications/Octave.app/Contents/Resources/include" \
  LDFLAGS="-L/Applications/Octave.app/Contents/Resources/lib"
make && make install && cd ..

curl -s -S 
ftp://ftp.graphicsmagick.org/pub/GraphicsMagick/1.2/GraphicsMagick-1.2.6.tar.gz 
-o GraphicsMagick-1.2.6.tar.gz
tar -xzf GraphicsMagick-1.2.6.tar.gz && cd GraphicsMagick-1.2.6
PATH=/Applications/Octave.app/Contents/Resources/bin:$PATH \
   ./configure --prefix=/Applications/Octave.app/Contents/Resources 
--without-perl \
  CFLAGS="-I/Applications/Octave.app/Contents/Resources/include" \
  LDFLAGS="-L/Applications/Octave.app/Contents/Resources/lib"
make && make install && cd ..

reply via email to

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