PANDORE Version 6 GREYC-IMAGE

psobel



Computes the Sobel gradient magnitude.



Synopsis

psobel [-m mask] [im_in|-] [im_out|-]

Description

psobel computes an approximation of the gradient magnitude of the input image im_in.

The algorithm uses the convolution with the following kernel:

   |+1 +2 +1|
   |+0 +0 +0|
   |-1 -2 -1|

The kernel is oriented in four directions: 0, 45, 90, 135 degrees and the magnitude value is set to the maximum value between these four values.

The output image im_out is of the same type as the input image im_in.

Inputs

Outputs

Result

Returns SUCCESS or FAILURE.

Examples

Performs an edge detection for the tangram.pan image:

   psobel tangram.pan b.pan
   pbinarization 45 1e30 b.pan out.pan

See also

Edge detection

C++ prototype

Errc PSobel( const Img2duc &im_in, Img2duc &im_out );

Version française

Module du gradient de Sobel.


Author: Régis Clouard