[Top] [Up] [Prev] [Next] [Up] [Basic Concepts] [Demonstrations] [Functions] SDC Morphology Toolbox V1.1 15Jan02

mmthin - Image transformation by thinning.


Synopsis
y = mmthin( f, Iab, n, theta, DIRECTION )
Input
f: Binary image (logical uint8).
Iab: Interval. Default: Homotopic thinning interval (mmhomothin).
n: Non-negative integer. Number of iterations. Default: Infinite (-1).
theta: Degrees of rotation: 45, 90, or 180. Default: 45.
DIRECTION: String. 'CLOCKWISE' or ' ANTI-CLOCKWISE' Default: "CLOCKWISE".
Output
y: Binary image (logical uint8).
Description
mmthin creates the binary image y by performing a thinning of the binary image f. The number of iterations of the thinning is n and each iteration is performed by subtracting the points that are detect in f by hit-miss operators characterized by rotations of theta of the interval Iab. When n is infinite and the interval is mmhomothin (default conditions), mmthin gives the skeleton by thinning.
Examples
f=mmreadgray('scissors.tif');
f1=mmthin(f);
mmshow(f,f1); % skeleton
f2=mmthin(f1,mmendpoints,15); % prunning 15 pixels
mmshow(f,f2); % prunned skeleton
image
(f,f1)
image
(f,f2)
Equation

equation

Algorithm
function y = mmthin_equ( f, Iab, n, theta, DIRECTION )
  y = f;
  for i=1:n
    for alpha=0:theta:360-theta
      Iab = mminterot(Iab, alpha, DIRECTION);
      y = mmsubm(y,mmsupgen(y,Iab));
    end;
  end; 
See Also
mmcthin - Image transformation by conditional thinning.
mmendpoints - Interval to detect end-points.
mmfreedom - Control automatic data type conversion.
mmhomothin - Interval for homotopic thinning.
mmse2hmt - Create a Hit-or-Miss Template (or interval) from a pair of structuring elements.
mmthick - Image transformation by thickening.

[Top] [Up] [Prev] [Next] [Up] [Basic Concepts] [Demonstrations] [Functions] Valid XHTML 1.0!
Copyright (c) 1998-2002 by SDC Information Systems