THIN

NAME
SYNOPSIS
PARAMETERS
DESCRIPTION
EXAMPLE
REFERENCES
AUTHORS
AVAILABILITY
SEE ALSO

NAME

thin - thinning by border deletion

SYNOPSIS

out = thin(img)

PARAMETERS

img
Binary image containing one or more binary shapes. (foreground == 1, background == 0),
out
Internal skeleton, thinned version of the shapes in the input image.

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.

EXAMPLE

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);

REFERENCES

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

AUTHORS

Ricardo Fabbri <rfabbri@if.sc.usp.br>

AVAILABILITY

The latest version of the Scilab Image Processing toolbox can be found at
http://siptoolbox.sourceforge.net

SEE ALSO

skel