| [Top] [Up] [Prev] [Next] | [Up] [Basic Concepts] [Demonstrations] [Functions] | SDC Morphology Toolbox V1.1 15Jan02 |
y = mmcthick( f, g, Iab, n, theta, DIRECTION ) 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".y: Binary image (logical uint8). 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.
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);
|
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);
|

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; | [Top] [Up] [Prev] [Next] | [Up] [Basic Concepts] [Demonstrations] [Functions] |
|
| Copyright (c) 1998-2002 by SDC Information Systems | ||