SIP Toolbox

thin - thinning by border deletion

Calling Sequence

out = thin(img)

Parameters

Description

Function thin performs thinning of binary objects. It uses the Zhang-Suen, a de facto standard and simple technique. The resulting image, the skeleton, is not always connected and is very sensible to noise. It is also slower than a good skeletonization algorithm (see skel). For thin shapes, it should work faster and provide better quality. You will need some pruning criterium to eliminate spurs.

Examples

       im=gray_imread(SIPDIR+'images/r.gif');
       imshow(im,2);

       skl = thin(im);

       xbasc();
       imshow(im+skl,[]);

       // Quality is definitely inferior to that of good skeletonization
       // methods, as in the following test

       im=gray_imread(SIPDIR+'images/escher.png');
       skl = thin(im);      // Ordinary thinning
       xbasc();
       xset('wdim',400,500);
       subplot(1,2,1);
       imshow(im+skl,[]);
       xset('wdim',800,400);

       skl = skel(im);      // multiscale euclidean skeletonization
       subplot(1,2,2);
       imshow(im+(skl >= 10),[]);
       xset('wdim',800,400);
   

Bibliography

"Practical Computer Vision using C", J. R. Parker, Wiley.

Authors

Ricardo Fabbri <ricardofabbri (AT) users DOT sf DOT net>

Availability

The latest version of the Scilab Image Processing toolbox can be found at

http://siptoolbox.sourceforge.net

See Also

skel,