PANDORE Version 6 GREYC-IMAGE

ppostthinning



Performs contour postthinning to guaranty 8-connexity (or 26-connexity).



Synopsis

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

Description

ppostthinning consists in deleting all pixels that do not guaranty the 8-connexity in 2D (or the 26-connexity in 3D) for contour chains.
A contour chain is a sequence of connected non null pixels with 1 pixel thickness. There are connected with the 8-connexity in 2D (or the 26-connexity in 3D).

A pixel "x" is deleted from the chain if it does not destroy the 8-connexity (or 26-connexity). For example, the center is deleted in case of the following configuration (and any other symmetrical configurations):

     |x|       | |0
    x|x|   or x|x|  
     | |0      |x|

Warning: ppostthinning needs contour with 1 pixel thickness. It may be necessary to use before a skeletonization operator, for example: pskeletonization.

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

Inputs

Outputs

Result

Returns SUCCESS or FAILURE.

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

Contour

C++ prototype

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

Version française

Suppression des points de contours superflus.


Author: Régis Clouard