help-octave
[Top][All Lists]
Advanced

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

Re: Image format


From: Neil Davey
Subject: Re: Image format
Date: Fri, 2 Jul 1999 14:55:45 +1000 (EST)

On Thu, 1 Jul 1999, Benjamin Tovar Lopez wrote:

> Hi. Im new in proccessing images on Octave. To load an image the format should
> be octave, and that`s easy if you create the image from Octave. But if I want
> to proccess another image (for example the "Lena" picture)? For wich format 
> the
> image should be saved? Is there a way of saving the image like a numerical
> matrix from another application (like xv or something like that)?

Hi,
        I had to do something similar for a final year uni project, the
easiest way to do it is to save the graphics into a pbm/pgm/ppm. if you
use the raw format from xv, you can then write a file in octave using
fopen / fread etc and read the image into an array, the pbm/pgm/ppm format
created by xv is:

line 1: P6
line 2: text message
line 3: dimensions
line 4: no of colours I think or max value
then what follows is all the rows appended together...
since max value is 255, then each pixel is one byte, or unsigned char

if I'm wrong, or there is an easier way to do it please correct me.

Regards
        Neil

 
> Thanks
> 
> Benjamin Tovar
> be saved? Is there a way of saving the image like a numerical
> matrix from another application (like xv or something like that)?
> 
> Thanks
> 
> Benjamin Tovar
> 
> 
> 
> ---------------------------------------------------------------------
> Octave is freely available under the terms of the GNU GPL.  To ensure
> that development continues, see www.che.wisc.edu/octave/giftform.html
> Instructions for unsubscribing: www.che.wisc.edu/octave/archive.html
> ---------------------------------------------------------------------
> 

~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
Neil Davey
Postgraduate Research Student
Radio Science Laboratory
School of Microelectronic Engineering
Griffith University, Nathan, QLD Australia 4111
Ph: 3875 5574
Mobile: 0414 662 110

~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~

        This world is but merely a stepping stone....





---------------------------------------------------------------------
Octave is freely available under the terms of the GNU GPL.  To ensure
that development continues, see www.che.wisc.edu/octave/giftform.html
Instructions for unsubscribing: www.che.wisc.edu/octave/archive.html
---------------------------------------------------------------------



reply via email to

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