Home > Util > pgmWrite.m

pgmWrite

PURPOSE ^

RANGE = pgmWrite(MTX, FILENAME, RANGE, TYPE, COMMENT)

SYNOPSIS ^

function range = pgmWrite(mtx, fname, range, type, comment );

DESCRIPTION ^

 RANGE = pgmWrite(MTX, FILENAME, RANGE, TYPE, COMMENT)

 Write a MatLab matrix to a pgm (graylevel image) file.
 This format is accessible from the XV image browsing utility.

 RANGE (optional) is a 2-vector specifying the values that map to
 black and white, respectively.  Passing a value of 'auto' (default)
 sets RANGE=[min,max] (as in MatLab's imagesc).  'auto2' sets
 RANGE=[mean-2*stdev, mean+2*stdev].  'auto3' sets
 RANGE=[p1-(p2-p1)/8, p2+(p2-p1)/8], where p1 is the 10th percentile
 value of the sorted MATRIX samples, and p2 is the 90th percentile
 value.

 TYPE (optional) should be 'raw' or 'ascii'.  Defaults to 'raw'.

CROSS-REFERENCE INFORMATION ^

This function calls: This function is called by:
Generated on Fri 27-Feb-2004 16:43:21 by m2html © 2003