[mminfgen] [Up] [mmsupgen] Sup-generating And Inf-generating

mmsupcanon
Union of sup-generating or hit-miss operators.

Synopsis

function y = mmsupcanon ( f , Iab , theta , DIRECTION )

Input

f Image Binary image
Iab Interval
theta Double

Default: 45

Degrees of rotation: 45, 90, or 180.

DIRECTION String

Default: 'CLOCKWISE'

Direction of rotation: 'CLOCKWISE' or ' ANTI-CLOCKWISE'

Output

y Image Binary image

Description

mmsupcanon creates the image y by computing the union of transformations of the image f by sup-generating operators. These hit-miss operators are characterized by rotations (in the clockwise or anti-clockwise direction) of theta degrees of the interval Iab.

Examples

Numerical example:
f=mmbinary([ 0 0 1 0 0 1 1; 0 1 0 0 1 0 0; 0 0 0 1 1 0 0])
Warning: converting image from double to int32
f =
     0     0     1     0     0     1     1
     0     1     0     0     1     0     0
     0     0     0     1     1     0     0
i=mmendpoints;
mmintershow(i)
ans =
. . . 
0 1 0 
0 0 0
g=mmsupcanon(f,i)
g =
     0     0     1     0     0     0     1
     0     1     0     0     0     0     0
     0     0     0     1     1     0     0
Image example
a=mmreadgray('gear.tif');
b=mmsupcanon(a,mmendpoints);
mmshow(a);
mmshow(mmdil(b));
a mmdil(b)

Equation

Algorithm

function y=mmsupcanon_equ( f, Iab, theta, DIRECTION )
  y = uint8(zeros(size(f)));
  y = mmunion(y,mmsupgen(f, Iab));
  alpha = theta;
  while alpha < 360
    Irot = mminterot( Iab, alpha, DIRECTION );
    y = mmunion(y,mmsupgen(f, Irot));
    alpha = alpha + theta;
  end; 

See also

mmfreedom Control automatic data type conversion.
mmsupgen Sup-generating (hit-miss).
mmthin Image transformation by thinning.
mmendpoints Interval to detect end-points.
mmhomothick Interval for homotopic thickening.
mmhomothin Interval for homotopic thinning.
mmse2hmt Create a Hit-or-Miss Template (or interval) from a pair of structuring elements.
[mminfgen] [Up] [mmsupgen]