PANDORE Version 6 GREYC-IMAGE

pshen



Computes gradient magnitude and maxima localization using Shen-Castan's algorithm.



Synopsis

pshen strength [-m mask] [im_in|-] [im_out|-]

Description

pshen computes the gradient magnitude and performs the maxima localization. The output image can then be used to locate the contours. The output image im_out is built with the maximum magnitude value in the direction of the gradient. Other values are set to 0.

The gradient magnitude value reflects the amount of grayscale variation in this point. The more is the variation the greater is the value.

The gradient extraction and localization is done in three steps :

  1. smoothing ;
  2. gradient computing ;
  3. local maxima extraction.

Note: The image border of size 1 is set to 0.

Parameters

Inputs

Outputs

Result

Returns SUCCESS or FAILURE.

See also

Edge detection

Examples

Performs an edge detection for the tangram.pan image:

   pshen 1 tangram.pan a.pan
   pbinarization 10 1e30 a.pan b.pan

C++ prototype

Errc PShen( const Img2duc &im_in, Img2duc &im_out, float strength );

Version française

Détection et localisation des contours de Shen-Castan.


Author: Carlotti & Joguet