From help-octave-request at bevo dot che dot wisc dot edu Mon Feb 18 11:43:19 2002 Subject: Re: how to read images-files From: Etienne Grossmann To: Edgar Martinez Cc: help-octave at bevo dot che dot wisc dot edu Date: Mon, 18 Feb 2002 17:50:48 +0000 Hello, Ariel Tankus (http://www.math.tau.ac.il/~arielt/misc.html) wrote some image i/o functions, amongst which the following : ====================================================================== octave:20> help readimagefile readimagefile is the user-defined function from the file /home/etienne/prog/octave/mylib/octave-mylib/tools/imgio/readimagefile.m [im, isPpm, maxval] = readimagefile(fname, force_gray) fname : string : name of image file. force_gray : flag : (opt) if true, the returned image is a gray level image, even if the file contained a color image. (default: false) im : matrix : an image. Note, that if force_gray == false, the image might by a PPM representation of the image. isPpm : flag : 1 : `im' is in PPM format. 0 : `im' is a graylevel matrix. maxval : int : Maximum luminosity level (usually 255) See also: readpnm, readfi, readjpg, readgif, splitppm. readimagefile Read an image file of any supported image format. The currently supported formats are: PGM/PPM (both ascii and binary), FI, JFIF, IMG and GIF. ====================================================================== I added some ugly wrapping and put it on my homepage (http://anonimo.local/~etienne/octave). Cheers, Etienne On Mon, Feb 18, 2002 at 07:16:30PM +0900, Edgar Martinez wrote: # hello, # # I am using octave under linux(kondara). # does somebody know how to load any kind of image in *.m programs? # mainly jpg, ps, gif, or ppm, even any other is ok! # # the way how to save them doesnt care, because i can be saved in octave # format. # (in the future it will easier to read) # # I want to manipulate images into simple 2D arrays. # # if some body has any suggestion, thanks in advance # # EddY # # # # ------------------------------------------------------------- # Octave is freely available under the terms of the GNU GPL. # # Octave's home on the web: http://www.octave.org # How to fund new projects: http://www.octave.org/funding.html # Subscription information: http://www.octave.org/archive.html # ------------------------------------------------------------- # # # -- Etienne Grossmann ------ http://www.isr.ist.utl.pt/~etienne ------------------------------------------------------------- Octave is freely available under the terms of the GNU GPL. Octave's home on the web: http://www.octave.org How to fund new projects: http://www.octave.org/funding.html Subscription information: http://www.octave.org/archive.html -------------------------------------------------------------