Docsity

Basic Morphological Algorithms-Digital Image Processing-Lecture Slides, Slides of Digital Image Processing

Partial preview of the text

Download Basic Morphological Algorithms-Digital Image Processing-Lecture Slides and more Slides Digital Image Processing in PDF only on Docsity!

2

Announcement 

Quiz # 3 will be held on Friday May 7, 2010^ 

Starting time: 8:15am ^

Syllabus: Chapters 6 (Color image processing) & 9(Morphological image processing) ^

Pattern of this quiz will be same as that of Quiz # 1 & 2

The best 2 quizzes of each student are included inthe final grading

3

Recap ^

DilationExpands the size of 1-valued objects, Smooth object boundaries,Closes holes and gaps ^

ErosionShrinks the size of 1-valued objects, Smooth object boundaries,Removes small objects ^

ClosingErosion followed by Dilation

breaks narrow joints and eliminates

thin protrusions ^

OpeningDilation followed by Erosion

Fill gaps, eliminate small holes,

fuses narrow breaks ^

Hit or Miss transformA tool for shape detection or for the detection of a disjoint region inan image

5

Morphological Boundaryextraction The boundary of set A denoted by

(A)

is obtained by

first eroding A by a suitable structuring element B andthen taking the difference between A and its erosion,i.e.

(^

)^

(^

)

A

A

A

B

Note: Using a 5x5 structuring element of 1s would results in a boundarybetween 2 and 3 pixels thick

3x3 structuringelement of 1s

6

Boundary extraction: Example Note: As a 3x3 structuring elements of 1s have been used, therefore, theboundary in figure 9.14(b) is one pixel thick

8

Example:

(^

)

1, 2,3,

c

k^

k

X

X

B

A

k

NOTE:The intersection ofdilation and thecomplement of Alimits the result toinside the region ofinterest

9

Region (Hole) filling: Example

11

Example:

12

Convex Hull 

Convex setA set

A

is said to be convex if any straight line segment

joining two points of

A

lies within

A

^

Example: R

1

is convex as line segment pq lies within set

R

1

14

Convex Hull ^

To find the Convex Hull

C(A)

of a set

A

the following

simple morphological algorithm can be used: ^

Let

B

i , where

i^

= 1, 2, 3, 4, represent four structuring elements

^

Implement: ^

Starting with: ^

Repeat 2

nd

step until convergence, i.e.

^

Convex Hull

C(A)

1^ is given by:

(^

)^

i^

i

k^

k

X

X

B

A

i^

and

k

i

X

A

1

i^

i^

i^

i

conv

k^

k

D

X

X

X

4 1

(^

)^

i

i

C A

D  

15

Convex Hull: Algorithmexplanation 

The method consists of iteratively applying the hit-or-miss transform to

A

with

B

1 ; when no further

changes occur, we perform the union with A and callthe result

D

1

The method is repeated with

B

2 , B

3

and

B

4

resulting

in

D

2 , D

3

and

D

(^4)

The union of four

Ds

constitutes the convex hull of

A

17

Convex Hull algorithm:Shortcoming 

ShortcomingConvex hull can grow beyond the minimumdimensions required to guarantee convexity 

Possible solutionLimit growth so that it does not extend past thevertical and horizontal dimensions of the original setof points

18

Thinning 

Thinning of a set

A

by the structuring element

B

can

be defined in terms of hit-or-miss transform as: 

Symmetric thinning: Sequence of structure elements

The process is to thin

A

by one pass with

B

1 , the thin the result with

one pass of

B

2 , and so on, until

A

is thinned with one pass of

B

n.

The entire process is repeated until no further changes occur

(^

)^

(^

c )

A

B

A

A

B

A

A

B

^

^

1

2

3

1

where

,^ is a rotated version of

,^

,^

,

i

n

i

B

B

B B

B

B

B

1

2

(^

)^

)^

n )

A

B

A

B

B

B

20

Thickening 

As in thinning, thickening of a set

A

by the

structuring element

B

can be defined in terms of hit-

or-miss transform as: where

B

is a structuring element

Thickening can also be defined as a sequentialoperation

(^

)

A

B

A

A

B

 1

2

(^

((

)^

)^

) n

A

B

A

B

B

B



21

Thickening 

Thickening is dual of thinning 

Note: A separate algorithm for thickening is usuallynot implemented, rather the thinning algorithm isused

by

providing

the

complement

of

A

and

by

interchanging

the

1s

and

0s

in

the

structuring

element. The result is complemented in order to getthe thickened version