All options can be abbreviated to their shortest unique prefix. You may use two hyphens instead of one. You may separate an option name and its value with white space instead of an equals sign.
pamgauss 5 5 -sigma=.7 -tupletype=GRAYSCALE | pamtopnm >gauss.pgm pnmconvol gauss.pgm myimage.ppm >blurred.ppm pammasksharpen blurred.ppm myimage.ppm >sharpened.ppm
This program is part of Netpbm.
pammasksharpen reads a Netpbm image as input and produces a sharpened version of it, in the same format, as output. It does this via an unsharp mask, which you supply as another Netpbm image.
An unsharp mask is generally a blurred version of the original image. The sharpening computation is this: Calculate the "edgeness" of a sample in the input image as the signed difference between the sample value and the corresponding sample in the unsharp mask. This tells how different the pixel is from its neighbors. Add a multiple of the edgeness to the original sample to get the corresponding output sample. Clip as necessary. This causes pixels that are brighter than their neighbors to get even brighter, while pixels that are dimmer than their neighbors get even dimmer. This makes edges -- places where pixel values change quickly in space -- stand out more.
The unsharp mask must be the same dimensions and have the same maxval as the input image.
floatnum is a nonnegative real decimal number. Zero means no sharpening at all.
The default is 1.0.
This option was new in Netpbm 10.30 (October 2005). Before that, the sharpness was always 1.0.
pammasksharpen was new in Netpbm 10.23 (July 2004).