Updated: 08 May 2004
Table Of Contents
pammasksharpen - Sharpen an image via an unsharp mask
pammasksharpen [-sharpness=realnum maskfile [inputfile]
All options can be abbreviated to their shortest unique pre-
fix. 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
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
version of it, in the same format, as output. It does this via
mask, which you supply as another Netpbm image.
An unsharp mask is generally a blurred version of the original
sharpening computation is this: Calculate the "edgeness" of a
sample in the
input image as the signed difference between the sample value
corresponding sample in the unsharp mask. This tells how dif-
ferent the pixel
is from its neighbors. Add a multiple of the edgeness to the
to get the corresponding output sample. Clip as necessary.
pixels that are brighter than their neighbors to get even
pixels that are dimmer than their neighbors get even dimmer.
edges -- places where pixel values change quickly in space --
The unsharp mask must be the same dimensions and have the same
maxval as the
This specifies the magnitude of the sharpening. It is
the multiple of
edgeness that gets added to each sample as described
floatnum is a nonnegative real decimal number. Zero
sharpening at all.
The default is 1.0.
This option was new in Netpbm 10.30 (October 2005). Be-
fore that, the
sharpness was always 1.0.
pnmconvol, pamedge, pamsharpness, pamsharpmap, pamarith, pnm,
pammasksharpen was new in Netpbm 10.23 (July 2004).
Table Of Contents
* SEE ALSO
Man(1) output converted with