[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: newbie question
From: |
David Grundberg |
Subject: |
Re: newbie question |
Date: |
Tue, 23 Feb 2010 14:04:41 +0100 |
User-agent: |
Thunderbird 2.0.0.23 (X11/20090812) |
Richard Evans wrote:
Hi,
I'm new to Octave, but managed to get it successfully installed and
tested it successfully on some plots and small matrix manipulations.
I'd like to use 16 bit tif or txt images as matrices and manipulate
them in Octave. I'm not sure how to load an image as a matrix in
Octave and assign it to a letter name for manipulation.
I've ordered John Eaton's book but it won't arrive for a while....
thought I'd ask here so I could get started. I've looked at the html
version of the book on the web, but it doesn't seem to directly answer
the question.
Rick
Rick,
To load 16-bit tiff images you need Octave/graphicsmagick compiled with
16-bit support (quantumdepth set to 16). If not, the 16-bit image is
converted to 8-bit on load.
Use
a = imread ("myfile.tif");
to assign image data as a matrix to variable a.
To see the class of the matrix, write
class (a)
Txt-files can be loaded too, using other functions, depending on format.
dlmread, csvread, etcetera.
hth,
David
- newbie question, Richard Evans, 2010/02/23
- Re: newbie question,
David Grundberg <=