Discussion:
Image manipulation
(too old to reply)
Luiz Angioletti
2008-04-02 15:06:13 UTC
Permalink
Hi there Friends,

I'm new to the group, and have done a minor search here for image
manipulation in Octave.

I've read at http://www.gnu.org/software/octave/doc/interpreter/Image-Processing.html#Image-Processing,
that octave only loads images in the Octave's format (.img).

I've got a few .tif files of binary images I'd like to load and
manipulate.

The command I give Octave is:

"I = loadimage("file.tif")", without the external quotation marks.

The return it gives to me is:

error: load: /home/angioletti/Documentos/UFPA/gait/images/circles.tif:
inconsistent number of columns near line 2
error: load: unable to extract matrix size from file `/home/angioletti/
Documentos/UFPA/gait/images/circles.tif'
error: called from `loadimage' in file `/usr/share/octave/2.9.12/m/
image/loadimage.m'
error: evaluating assignment expression near line 1, column 3

I've also tried to load an .jpeg image (converted with the "convert"
command), and the result I get is:

error: load: /home/angioletti/Documentos/UFPA/gait/images/circc.jpeg:
inconsistent number of columns near line 3
error: load: unable to extract matrix size from file `/home/angioletti/
Documentos/UFPA/gait/images/circc.jpeg'
error: called from `loadimage' in file `/usr/share/octave/2.9.12/m/
image/loadimage.m'
error: evaluating assignment expression near line 1, column 3


Since the research I'm starting is with images, and I wouldn't like
to buy MATLAB, I really need this image operations to work... =P

I'm using Ubuntu 7.10, with the imagemagick and octave installed
thru Synaptic.


Thanks.


Luiz
david bateman
2008-04-04 13:33:46 UTC
Permalink
Post by Luiz Angioletti
Hi there Friends,
I'm new to the group, and have done a minor search here for image
manipulation in Octave.
I've read athttp://www.gnu.org/software/octave/doc/interpreter/Image-Processing.h...,
that octave only loads images in the Octave's format (.img).
I've got a few .tif files of binary images I'd like to load and
manipulate.
"I = loadimage("file.tif")", without the external quotation marks.
inconsistent number of columns near line 2
error: load: unable to extract matrix size from file `/home/angioletti/
Documentos/UFPA/gait/images/circles.tif'
error: called from `loadimage' in file `/usr/share/octave/2.9.12/m/
image/loadimage.m'
error: evaluating assignment expression near line 1, column 3
I've also tried to load an .jpeg image (converted with the "convert"
inconsistent number of columns near line 3
error: load: unable to extract matrix size from file `/home/angioletti/
Documentos/UFPA/gait/images/circc.jpeg'
error: called from `loadimage' in file `/usr/share/octave/2.9.12/m/
image/loadimage.m'
error: evaluating assignment expression near line 1, column 3
Since the research I'm starting is with images, and I wouldn't like
to buy MATLAB, I really need this image operations to work... =P
I'm using Ubuntu 7.10, with the imagemagick and octave installed
thru Synaptic.
Thanks.
Luiz
Try using imread from octave-forge.. If it is built with imagemagick
support it reads whatever formats that imagemagick supports (which is
basically everything)..

D.
Luiz Angioletti
2008-04-06 15:05:05 UTC
Permalink
Hi,

I've installed the functions of octave-forge, and when I try to use
the 'imread' function, this is what I get:

octave:1> I=imread(circlesm.tif);
error: `imread' undefined near line 1 column 3
error: evaluating assignment expression near line 1, column 2


I've also tried to access some help about the function, see if I've
any mistakes, and that's what I got:


octave:1> help imread

help: `imread' not found
Additional help for built-in functions and operators is
available in the on-line version of the manual. Use the command
`doc <topic>' to search the manual index.

Help and information about Octave is also available on the WWW
at http://www.octave.org and via the ***@octave.org
mailing list.



Thank you.
David Bateman
2008-04-06 20:43:21 UTC
Permalink
Post by Luiz Angioletti
Hi,
I've installed the functions of octave-forge, and when I try to use
octave:1> I=imread(circlesm.tif);
error: `imread' undefined near line 1 column 3
error: evaluating assignment expression near line 1, column 2
I've also tried to access some help about the function, see if I've
Then its not installed correctly.. What is your OS, etc. Why not use a
pre-packaged version of octave and octave-forge that already has these
functions and all teh dependencies pre-built.. BTW if you want to read
TIF files you have to have ImageMagick installed as well.

D.
Luiz Angioletti
2008-04-09 15:33:16 UTC
Permalink
Post by David Bateman
Post by Luiz Angioletti
Hi,
I've installed the functions of octave-forge, and when I try to use
octave:1> I=imread(circlesm.tif);
error: `imread' undefined near line 1 column 3
error: evaluating assignment expression near line 1, column 2
I've also tried to access some help about the function, see if I've
Then its not installed correctly.. What is your OS, etc. Why not use a
pre-packaged version of octave and octave-forge that already has these
functions and all teh dependencies pre-built.. BTW if you want to read
TIF files you have to have ImageMagick installed as well.
D.
David,

I think I need a little crash-course on manipulating images with
octave... =)

I'll download the binaries you speaked of. And then, I tell you the
results.

Meanwhile, do you have any reference to recommend on the image
manipulating subject?


thanks


Luiz.
Luiz Angioletti
2008-04-10 14:52:21 UTC
Permalink
Post by David Bateman
Post by Luiz Angioletti
Hi,
I've installed the functions of octave-forge, and when I try to use
octave:1> I=imread(circlesm.tif);
error: `imread' undefined near line 1 column 3
error: evaluating assignment expression near line 1, column 2
I've also tried to access some help about the function, see if I've
Then its not installed correctly.. What is your OS, etc. Why not use a
pre-packaged version of octave and octave-forge that already has these
functions and all teh dependencies pre-built.. BTW if you want to read
TIF files you have to have ImageMagick installed as well.
D.
Folks,

I'am using Ubuntu 7.10. The first time I tried to install octave, I
did it thru the package manager.. Then I got the problem of octave not
working to well

I've removed octave interelly, downloaded the source from the
official site, compiled it and so far so good.

Later I downloaded the image package from the forge. Followed the
installation instructions on the site, and even as root, I get the
message:
error: called from `pkg:configure_make' in file /usr/local/share/
octave/3.0.0/m/pkg/pkg.m near line 1058, column 2

I already have imagemagick installed on my system. And have no idea
what the above error message means.


Thanks


Luiz.
Luiz Angioletti
2008-04-10 15:17:37 UTC
Permalink
Post by Luiz Angioletti
Post by David Bateman
Post by Luiz Angioletti
Hi,
I've installed the functions of octave-forge, and when I try to use
octave:1> I=imread(circlesm.tif);
error: `imread' undefined near line 1 column 3
error: evaluating assignment expression near line 1, column 2
I've also tried to access some help about the function, see if I've
Then its not installed correctly.. What is your OS, etc. Why not use a
pre-packaged version of octave and octave-forge that already has these
functions and all teh dependencies pre-built.. BTW if you want to read
TIF files you have to have ImageMagick installed as well.
D.
Folks,
I'am using Ubuntu 7.10. The first time I tried to install octave, I
did it thru the package manager.. Then I got the problem of octave not
working to well
I've removed octave interelly, downloaded the source from the
official site, compiled it and so far so good.
Later I downloaded the image package from the forge. Followed the
installation instructions on the site, and even as root, I get the
error: called from `pkg:configure_make' in file /usr/local/share/
octave/3.0.0/m/pkg/pkg.m near line 1058, column 2
I already have imagemagick installed on my system. And have no idea
what the above error message means.
Thanks
Luiz.
Problem solved. At least in part. =)

I got to install the image package. It was, at least it seems,
complaining about some devel libraries.
I had (on Ubuntu Synaptic)

"graphicsmagick-libmagick-dev" installed.

I uninstalled it and installed the following:

libmagick++9-dev.

This package added a few dependencies and I successfully installed
the package

But...

I still can't get to read an binary image with imread().

Heres the command and the messages:

octave:5> I = imread(logo.tif)
error: `logo' undefined near line 5 column 12
error: evaluating argument list element number 1
error: evaluating assignment expression near line 5, column 3
octave:5>


I'm sure that the file "logo.tif" is in the current directory.
I'm also sure that imagemagick is installed on my system. Then again,
I installed it trough Synaptic... may this be the problem?


Thanks again.

Luiz.
Luiz Angioletti
2008-04-27 23:21:35 UTC
Permalink
Friends,

I got to capture the image into a variable. All it was missing was a
pair of apostrophes around the file name.

Now I want to print the variable to a file. To do so I use the
following:

octave:9> imwrite("file.jpg", K)
error: imwrite: unsupported data type logical
error: evaluating switch command near line 294, column 1
error: called from `imwrite' in file `/usr/local/share/octave/packages/
image-1.0.5/imwrite.m'


Of course, the variable I want to print is K.

What am I doing wrong?

Thank you.

Luiz.
Philip Martel
2008-04-28 00:36:58 UTC
Permalink
Post by Luiz Angioletti
Friends,
I got to capture the image into a variable. All it was missing was a
pair of apostrophes around the file name.
Now I want to print the variable to a file. To do so I use the
octave:9> imwrite("file.jpg", K)
error: imwrite: unsupported data type logical
error: evaluating switch command near line 294, column 1
error: called from `imwrite' in file `/usr/local/share/octave/packages/
image-1.0.5/imwrite.m'
Of course, the variable I want to print is K.
What am I doing wrong?
Try imwrite('file.jpg',K)
Post by Luiz Angioletti
Thank you.
Luiz.
Continue reading on narkive:
Loading...