chapter 9 some basic morphological algorithm. boundary extraction region filling extraction of...

27
Chapter 9 Some Basic Morphological Algorithm

Upload: pamela-lucas

Post on 17-Dec-2015

280 views

Category:

Documents


3 download

TRANSCRIPT

Chapter 9

Some Basic Morphological Algorithm

Some Basic Morphological Algorithm

Boundary Extraction Region Filling Extraction of Connected Components Convex Hull Thinning Thickening Skeletons Pruning

Boundary Extraction

The boundary of a set A denoted by

Where B is a suitable structuring element

1. Its algorithm is following these2. Eroding A by B3. Performing the set difference between

A and its erosion

)()( BAAA

Boundary Extraction

BA

B

A

)(A

Boundary Extraction

Region Filling

Beginning with a point p inside the boundary, the objective is to fill the entire region with 1’s

Point p

Region Filling

If all nonboundary (background) points are labeled 0, then we assign a value of 1 to p to begin. The following procedure then fill the region with 1’s

,...3,2,1)( 1 kwhereABXX ckk

Where X0 = p and B is the symmetric structuring element.

Region Filling Algorithm

1. Pick a point inside p given it value 12. Set X0 = p

3. Start k = 14. Repeat getting Xk by

5. Terminate process if Xk = Xk-1

6. The set union of Xk and A is answer

,...3,2,1)( 1 kwhereABXX ckk

Region Filling Algorithm

Region Filling Algorithm

p

Region Filling

Connected Components Extraction

To establish if two pixels are connected, it must be determined if they are neighbors and if their gray levels satisfy a specified criterion of similary.

In practice, extraction of connected components in a binary image is central to many automated image analysis applications.

Connected Components Extraction

Let Y represent a connected component contained in a set A and assume that a point p of Y is known

Following expression

,...3,2,1)( 1 kwhereABXX kk

Where X0 = p and B is the symmetric structuring element.

Connected Components Extraction Algorithm

1. Pick a point of Y set p2. Set X0 = p

3. Start k = 14. Repeat getting Xk by

5. Terminate process if Xk = Xk-1

6. The answer set Y is Xk

,...3,2,1)( 1 kwhereABXX kk

Convex Hull

A set A is said to be convex if the straight line segment joining any two points in A lies entirely with in A

The convex hull H of an arbitrary set S is the smallest convex set containing

The set difference H-S is called the convex deficiency of S.

Convex Hull Let Bi, i=1,2,3,4 represent 4 structure The procedure consists of implementing the

equation

Let , where the subscript “conv” (convergence) in the sense that

Then the convex hull of A is

,...3,2,14,3,2,1)( 1 kandiwhereABXX ik

ik

AXwith i 0iconv

i XD

4

1

)(

i

iDAC

ik

ik XX 1

Convex Hull Algorithm Set Do with B1

Repeat to apply hit-or-miss transformation to A with B1 until no further change occur Xn.

Union Xn with A, called D1

Do same as B1 with B2, B3, and B4; hence we will get D1, D2, D3 and D4

Union all of D will be the answer of convex hull

AXXXX 40

30

20

10

Convex Hull Algorithm

x

xxx

x

xxx xx x

xxx

xx x

xx x

B1 B2 B3 B4 x Don’t care

Background

Foreground

A

HIT-or-MISS A with B1

x

xxx

x

HIT-or-MISS A with B2xx

x xx

HIT-or-MISS A with B3 x

xxx

x

HIT-or-MISS A with B4

x xxx x

Convex Hull

1D3D

2D4D

4

1

)(

i

iDAC

Thinning The thinning of a set A by a structuring

element B, can be defined

Where Bi is a rotated version of Bi-1

Using this concept, we now define thinning as

cBAA

BAABA

)*(

)*(

,,...,,, 321 nBBBBB

))...))((...((}{ 21 nBBBABA

x xx

x

x

x x

x x

x

x x

x

x

x

x

Thickening The thickening of a set A by a structuring

element B, can be defined

Where Bi is a rotated version of Bi-1

Using this concept, we now define thinning as

)*( BAAAOB

,,...,,, 321 nBBBBB

))...))((...((}{ 21 nOBOBAOBBAO

x xx

x

x

x x

x x

x

x x

x

x

x

x