PANDORE Version 6 GREYC-IMAGE

pgradientthreshold



Estimates the noise level in a gradient image.



Synopsis

pgradientthreshold percent [-m mask] [im_in|-]

Description

pgradientthreshold calculates the threshold value that is supposed to separate false contours to true contours. False contours are considered as gradient noise.

The threshold value is computed from the cumulated histogram of the positive gradient magnitude in im_in. The threshold value is the maximum gradient magnitude that represents 1-percent values of the cumulated histogram.

This value can be get by the way of the operator pstatus.

Parameters

Inputs

Result

Returns the threshold value.

Examples

Extracts contours from the tangram.pan image:

   pexponentialfiltering 0.7 tangram.pan i1.pan
   pgradient 1 i1.pan i2.pan i3.pan
   pnonmaximasuppression i2.pan i3.pan i4.pan
   ppostthinning i4.pan i5.pan
   pgradientthreshold 0.03 i2.pan
   seuilhaut=`pstatus`
   pbinarization $seuilhaut 1e30 i5.pan i6.pan
   pgradientthreshold 0.2 i2.pan
   seuilbas=`pstatus`
   pbinarization $seuilbas 1e30 i5.pan  i7.pan 
   pgeodesicdilation 1 1 -1 i6.pan i7.pan out.pan

See also

Edge detection

C++ prototype

Errc PGradientThreshold( const Img2duc &im_in, float percent );

Version française

Estimation du bruit dans une image d'amplitude du gradient.


Author: Régis Clouard