PANDORE Version 6 GREYC-IMAGE

pderiche



Computes gradient magnitude and maxima localization using Deriche algorithm.



Synopsis

pderiche sigma [-m mask] [im_in|-] [im_mag|-] [im_dir|-]

Description

pderiche computes the gradient magnitude and the gradient direction images 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.

The direction is the atan(dy/dx) measured in radians. The direction image im_dir is necessarily of type float (values in [0..2*PI]).
Warning: the direction follows the image coordinate system, it means that it's going clockwise when displayed, since the y coordinates are inversed in the image system.

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

Parameters

Inputs

Outputs

Result

Returns SUCCESS or FAILURE.

Examples

Performs an edge detection for the tangram.pan image:

   pderiche 1 tangram.pan a.pan b.pan
   pbinarization 10 1e30 a.pan c.pan

See also

Edge detection

C++ prototype

Errc PDeriche( const Img2duc &im_in, Img2duc &im_mag, Img2duc &im_dir, float sigma );

Version française

Détection et localisation des contours par l'algorithme de Deriche.


Author: Carlotti & Joguet