MORPHOLOGY AND ITS APPLICATIONS

We define the translation and reflection of a set:

Ax = { c | c =a+x, a in A }
  = { c | c-x in A }
B^ = { c | -c in B }

The dilation of A by the structuring element B is

A + B = { x | B^x intersection A is empty }
  = { x | there is c in A s.t. x-c in B }
  = Union(c in A) ( c + B )

since B^x = {c | c-x in B^ } = { c | x-c in B } .

The erosion of A by the structuring element B is

A - B = { x | Bx is contained in A }

Theorem 1

(A - B)c = { x | Bx contained in A}c
  = { x | Bx intersection Ac is empty }c
  = { x | Bx intersection Ac is not empty }
  = Ac + B^

The opening of A by the structural element B is defined as the dilation of the erosion of A:

A o B = (A - B) + B
  = Union(c in A-B) ( c + B )
  = Union(c | Bc contained in A) Bc
  = Union(Bc contained in A) Bc

that is the union of the translates of B that are contained in A.

The closing of A by the structural element B is defined as the erosion of the dilation of A:

A * B = ( A + B ) - B

Theorem 2

( A * B )c = ( (A+B)-B)c
  = (A + B)c + B^
  = ( Ac - B^ ) + B^
  = Ac o B^

Notice that only features smaller that the geometric size of the structuring element are affected by the morphological operations. The morphological operator have several properties:

A o B is contained in A
A1 subset of A2 ==> A1 o B subset of A2 o B
(A o B) o B = A o B
A * B contains A
A1 subset of A2 ==> A1 * B subset of A2 * B
(A * B) * B = A * B

The boundary of a set A with respect to the structuring element B is

DB A = A \ ( A - B )
  = { x in A | Bx is not contained in A }


Region filling
Denote B4 the 4-connected (plus shaped) structuring element. Let A be a 8-connected boundary contour, and P lies inside the boundary. An algorithm to find the region inside the boundary is:

X0 = { P }
Xk = ( Xk-1 + B4 ) intersection Ac

and terminate when Xk = Xk-1.

Connected component extraction
Denote B8 the 8-connected (nine pixel square) structuring element. Let Y be a connected component and P belongs to Y. An algorithm that extracts Y is as follows:

Y0 = { P }
Yk = ( Yk-1 + B8 ) intersection A

and terminate when Yk = Yk-1.

Medial Axis
For each P in A let B(P) = { x belonging to D A | d(X,P) is minimum}. where d is the "distance". The medial axis of A is

M(A) = { P | B(P) has more than one point }

More on medial axis transform

Skeleton
The skeleton of A with respect to the structuring element B is defined as the union of the order-k skeletons:

S(A) = Unionk=0, ... Sk( A )
Sk(A) = (A -k B) \ ( (A -k B) o B)

where (A -k B) is the k times iterated erosion of A by the structuring element B, ie,
A -1 B = A - B
A -k B = (A -k-1 B) - B

The union is a finite as it is limited to the k until A is eroded to the empty set.
The set A can be reconstructed from the skeletons Sk(A):
A = Unionk ( Sk(A) +k B)

where Sk(A) +k B is the k-th iterated dilation of Sk(A) by B.



Marco Corvi - Page hosted by geocities.com.