PANDORE Version 6 GREYC-IMAGE

psharp



Performs contrast sharpening using laplacian unsharp masking.



Synopsis

psharp connexity degree [-m mask] [im_in|-] [im_out|-]

Description

psharp performs a contrast sharpening of the input image im_in using the Laplacian unsharp masking. The objective of sharpening is to highlight fine details and to enhance details that are blurred. It consists in shrinking the width of intensity variation without affecting the mean intensity of regions on both sides of the variation.

The unsharp masking algorithm is based on the subtraction of a degree times of the input image with the laplacian of the image. It is implemented by a spatial filtering with the following filters that depends on the connexity.
For example, 2D filters are:

       4-connexity                8-connexity
    0      -1      0           -1     -1      -1
   -1   4*degree  -1    or     -1   8*degree  -1
    0      -1      0           -1     -1      -1

For 3D filters, the center is set with 6*degree in case of 6-connexity, or 26*degree in case of 26-connexity.

Parameters

Inputs

Outputs

Result

Returns SUCCESS or FAILURE in case of invalid parameter values.

Examples

Sharpens the tangram.pan using the laplacian (which corresponds to degree=1).

   psharp 8 1 tangram.pan a.pan

See also

Filtering

C++ prototype

Errc PSharp( const Img2duc &im_in, Img2duc &im_out, int connexity, float degree );

Version française

Rehaussement du contraste par convolution.


Author: Régis Clouard