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
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 dif-
ferent 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

   The unsharp mask must be the same dimensions and have the same
maxval as the
   input image.


          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
means no
          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

     * NAME
     * HISTORY
     * SEE ALSO

Man(1) output converted with man2html