-->
Page 371
AUTHOR
John Walker
Autodesk SA Avenue des Champs-Montants 14b
CH-2074 MARIN
Suisse/Schweiz/Svizzera/Svizra/Switzerland
Usenet: | kelvin@Autodesk.com |
Fax: | 038/33 88 15 |
Voice: | 038/33 76 33 |
Permission to use, copy, modify, and distribute this software and its documentation for any purpose and without fee is hereby granted, without any conditions or restrictions. This software is provided "as is" without express or implied warranty.
PLUGWARE! If you like this kind of stuff, you may also enjoy James Gleick's "ChaosThe Software" for MS-DOS, available for $59.95 from your local software store or directly from Autodesk, Inc., Attn: Science Series, 2320 Marinship Way, Sausalito, CA 94965, USA. Telephone: 800-688-2344 toll-free or, outside the U.S. (415) 332-2344 Ext 4886. Fax: 415-289-4718. "ChaosThe Software" includes a more comprehensive fractal forgery generator that creates three-dimensional landscapes as well as clouds and planets, plus five more modules that explore other aspects of Chaos. The user guide of more than 200 pages includes an introduction by James Gleick and detailed explanations by Rudy Rucker of the mathematics and algorithms used by each program.
15 October 1991
pgmedgeEdge detect a portable graymap
SYNOPSIS
pgmedge [pgmfile]
DESCRIPTION
pgmedge reads a portable graymap as input, outlines the edges, and writes a portable graymap as output. Piping the result through pgmtopbm -threshold and playing with the threshold value will give a bitmap of the edges.
The edge detection technique used is to take the Pythagorean sum of two Sobel gradient operators at 90 degrees to each other. For more details see Digital Image Processing by Gonzalez and Wintz, Chapter 7.
SEE ALSO
pgmenhance(1), pgmtopbm(1), pgm(5), pbm(5)
AUTHOR
Copyright " 1991 by Jef Poskanzer.
4 February 1990
pgmenhanceEdge enhance a portable graymap
SYNOPSIS
pgmenhance [-N][pgmfile]
Page 372
DESCRIPTION
pgmenhance reads a portable graymap as input, enhances the edges, and writes a portable graymap as output.
The edge enhancing technique is taken from Philip R. Thompson's xim program, which took it from section 6 of Digital Halftones by Dot Diffusion, D. E. Knuth, ACM Transaction on Graphics Vol. 6, No. 4, October 1987, which in turn got it from two 1976 papers by J. F. Jarvis et. al.
OPTIONS
The optional -N flag should be a digit from 1 to 9. 1 is the lowest level of enhancement, 9 is the highest; the default is 9.
SEE ALSO
pgmedge(1), pgm(5), pbm(5)
AUTHOR
Copyright " 1989 by Jef Poskanzer.
13 January 1989
pgmhistPrint a histogram of the values in a portable graymap
SYNOPSIS
pgmhist [pgmfile]
DESCRIPTION
pgmhist reads a portable graymap as input and prints a histogram of the gray values.
SEE ALSO
pgmnorm(1), pgm(5), ppmhist(1)
AUTHOR
Copyright " 1989 by Jef Poskanzer
28 February 1989
pgmkernelGenerate a convolution kernel
SYNOPSIS
pgmkernel [ _weight w ] width [ height ]
DESCRIPTION
pgmkernel generates a portable graymap array of size width x height (or width x width if height is not specified) to be used as a convolution file by pnmconvol. The data in the convolution array K are computed according to the formula:
Page 373
where w is a coefficient specified via the _weight flag, and width and height are the X and Y filter sizes.
The output PGM file is always written out in ASCII format.
OPTIONS
The optional -weight flag should be a real number greater than -1. The default value is 6.0.
BUGS
The computation time is proportional to width * height. This increases rapidly with the increase of the kernel size. A better approach could be to use a FFT in these cases.
SEE ALSO
pnmconvol(1), pnmsmooth(1)
AUTHOR
Alberto Accomazzi (alberto@cfa.harvard.edu)
10 December 1992
pgmnoiseCreate a graymap made up of white noise
SYNOPSIS
pgmnoise width height
DESCRIPTION
pgmnoise creates a portable graymap that is made up of random pixels with gray values in the range of 0 to PGM_MAXMAXVAL (depends on the compilation, either 255 or 65535). The graymap has a size of width * height pixels.
SEE ALSO
pgm(5)
AUTHOR
Copyright " 1993 by Frank Neumann
16 November 1993
pgmnormNormalize the contrast in a portable graymap
SYNOPSIS
pgmnorm[-bpercent N | -bvalue N][-wpercent N | -wvalue N][pgmfile]
DESCRIPTION
pgmnorm reads a portable graymap as input; normalizes the contrast by forcing the lightest pixels to white, the darkest pixels to black, and linearly rescaling the ones in between; and produces a portable graymap as output.
OPTIONS
By default, the darkest two percent of all pixels are mapped to black, and the lightest one percent are mapped to white. You can override these percentages by using the -bpercent and -wpercent flags, or you can specify the exact pixel values to be
Page 374
mapped by using the -bvalue and -wvalue flags. Appropriate numbers for the flags can be gotten from the pgmhist tool. If you just want to enhance the contrast, then choose values at elbows in the histogram; for example, if value 29 represents 3 percent of the image but value 30 represents 20 percent, choose 30 for bvalue. If you want to lighten the image, then set bvalue to 0 and just fiddle with wvalue; similarly, to darken the image, set wvalue to maxval and play with bvalue.
All flags can be abbreviated to their shortest unique prefix.
SEE ALSO
pgmhist(1), ppmnorm(1), pgm(5)
AUTHOR
Partially based on the fbnorm filter in Michael Mauldin's "Fuzzy Pixmap" package.
Copyright" 1989 by Jef Poskanzer.
28 February 1989
pgmoilTurn a portable graymap into an oil painting
SYNOPSIS
pgmoil [-n N][pgmfile]
DESCRIPTION
pgmoil reads a portable graymap as input, does an "oil transfer," and writes a portable graymap as output.
The oil transfer is described in Beyond Photography by Holzmann, Chapter 4, photo 7. It's a sort of localized smearing.
OPTIONS
The optional -n flag controls the size of the area smeared. The default value is 3.
BUGS
Takes a long time to run.
SEE ALSO
pgmbentley(1), ppmrelief(1), pgm(5)
AUTHOR
Copyright" 1990 by Wilson Bent (whb@hoh-2.att.com).
11 January 1991
pgmrampGenerate a grayscale ramp
SYNOPSIS
pgmramp -lr|-tb | -rectangle|-ellipse width height
DESCRIPTION
pgmramp generates a graymap of the specified size containing a black-to-white ramp. These ramps are useful for multiplying with other images, using the pnmarith tool.