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

mmcthick - Image transformation by conditional thickening.


Synopsis
y = mmcthick( f, g, Iab, n, theta, DIRECTION )
Input
f: Binary image (logical uint8).
g: Binary image (logical uint8).
Iab: Interval. Default: Homotopic thickening interval (mmhomothick).
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
mmcthick creates the binary image y by performing a thickening of the binary image f conditioned to the binary image g. The number of iterations of the conditional thickening is n and in each iteration the thickening is characterized by rotations of theta of the interval Iab.
Examples

Pseudo convex hull

f=imread('blob2.tif');
mmshow(f);
t=mmse2interval(mmimg2se(logical(uint8([0 0 0;0 0 1;1 1 1]))),...
                mmimg2se(logical(uint8([1 1 1;1 0 1;1 1 1]))));
mmintershow(t)

ans =
. . .
. 0 1
1 1 1 
f1=mmthick(f,t,40); % The thickening makes the image border grow
mmshow(f1);
image
(f)
image
(f1)
f2=mmcthick(f,mmneg(mmframe(f)),t,40); % conditioning to inner pixels
fn=mmcthick(f,mmneg(mmframe(f)),t); %pseudo convex hull
mmshow(f2);
mmshow(fn,f);
image
(f2)
image
(fn,f)
Equation

equation

Algorithm
function y = mmcthick_equ( f, g, Iab, n, theta, DIRECTION )
  y = f;
  for i=1:n
    for alpha=0:theta:360-theta
      Iab = mminterot(Iab, alpha, DIRECTION);
      y = mmintersec(mmunion(y,mmsupgen(y,Iab)),g);
    end;
  end; 
See Also
mmfreedom - Control automatic data type conversion.
mmhomothick - Interval for homotopic thickening.
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