• No results found

Heuristics for selecting gray scale morphological structuring elements

N/A
N/A
Protected

Academic year: 2019

Share "Heuristics for selecting gray scale morphological structuring elements"

Copied!
116
0
0

Loading.... (view fulltext now)

Full text

(1)

Rochester Institute of Technology

RIT Scholar Works

Theses

Thesis/Dissertation Collections

7-1-1994

Heuristics for selecting gray scale morphological

structuring elements

Paul Fetter

Follow this and additional works at:

http://scholarworks.rit.edu/theses

This Thesis is brought to you for free and open access by the Thesis/Dissertation Collections at RIT Scholar Works. It has been accepted for inclusion in Theses by an authorized administrator of RIT Scholar Works. For more information, please [email protected].

Recommended Citation

(2)

Heuristics for Selecting Gray Scale

Morphological Structuring Elements

by

Paul

Fetter

A Thesis Submitted

ill

Partial Fulfillment of the

Requirements for the Degree of

MASTER OF SCIENCE

ill

Computer Engineering

Approved by:

Graduate Advisor - Roy S. Czemikowski, Professor and Department Head

Ronald G. Matteson, Professor

Tony H. Chang, Professor

Department of Computer Engineering

College of Engineering

Rochester Institute of Technology

Rochester, New York

(3)

THESIS RELEASE PERMISSION FORM

ROCHESTER INSTITUTE OF TECHNOLOGY

COLLEGE OF ENGINEERING

Title: Heuristics for Selecting Gray Scale Morphological Structuring Elements

I, Paul Fetter, hereby grant pennission to the Wallace Memorial Library to

reproduce my thesis in whole or part.

Signature:

Date:

7~.2f}

/2f'f

(4)

ABSTRACT

This

thesis explores some

heuristics

for

choosing

8

bit

gray

scale

morphological

structuring

elements

for reducing

noise.

The

variables of size,

shape and volume that enter

into

the choice of

structuring

elements create a

very

large

number ofpossible

structuring

elements.

Some

general

heuristics

to

guide the choice of an appropriate

structuring

element will make the task

easier.

Both

the absolute error ofthe

image

and the appearance ofthe

image

will

be

used to

judge

the results.

The

experiments were performed on

3

images.

Each

of the

images had

noise added

before

processing; one set of

data had 10

percent ofthe pixels

disturbed

by

noise, the other

had 20

percent

of the pixels

disturbed

by

noise.

The

resulting 6 images

were then

filtered

with

10

different structuring

elements and the

resulting images

were then

compared against the respective

baseline image.

The

conclusions were

guided

by

the

resulting

absolute error values.
(5)

This

document

was produced

using

Microsoft

Windows

version

3.1,

Microsoft

Word for Windows

version

6.0a,

and

Mathcad

version

4.0 for

Windows.

The

C

program was

developed using

Borland

C

version

3.1.

AH

oftheprograms were run on a

Gateway

2000 486/33

PC

clone.

The

following

names used

here

and

in

the remainder of the

document

are

registeredtrademarks ofthe respective companies:

Windows

Word

for

Windows

Mathcad

Quattro

IPro

Borland

C

Microsoft Corporation

Microsoft Corporation

Mathsoft Corporation

Borland International

Borland International

Copyright

1994

by

Paul Fetter

All

rights

reserved
(6)

Table

of

Contents

THESIS RELEASE PERMISSION FORM

ii

ABSTRACT

jjj

TABLE OF

CONTENTS

v

LIST OF FIGURES

viii

LIST

OF TABLES

xxii

LIST

OF EQUATIONS

xxiii

GLOSSARY

xxiv

1.

BINARY MORPHOLOGY

1

1.1. Input 1

1.2.Dilation 2

1.3.Erosion 2

1.4. Open 4

1.5. Close 4

2.

GRAY SCALE

MORPHOLOGY

5

(7)

2.1.1. Umbra Transform 5

2.2. MorphologicalDilation 7

2.3.Morphological Erosion 10

2.4. Morphological

Opening

12

2.5. Morphological

Closing

12

2.6. Common Transformsandfilters 13

3. EXPERIMENTAL

PROCEDURE

15

3.1. Basics 15

3.2. Noise 15

3.3. Input Images 15

3.4.

Structuring

Elements 15

3.5.

Naming

Scheme 28

4. RESULTS

29

4.1. CokeImages 31

4.2.Girl Images 45

4.3.

Roy

Images

59

5. CONCLUSIONS

73

5.1. NumericalResults 73

(8)

5.2.VisualResults 78

6.

LITERATURE

CITED

78

(9)

List

of

Figures

FIGURE2-1 GRAPHOF ANARBITRARYFUNCTION

6

FIGURE 2-2 GRAPH OFANUMBRA 7

FIGURE 3-1BASELINECOKEIMAGE 16

FIGURE 3-2 COKEIMAGE WITH 10 PERCENT ERROR 17

FIGURE3-3 COKEIMAGE WITH20PERCENT ERROR 18

FIGURE3-4BASELINE GIRLIMAGE 19

FIGURE3-5 GIRLIMAGE WITH 10 PERCENT ERROR 20

FIGURE3-6 GIRLIMAGE WITH20PERCENT ERROR 21

FIGURE3-7BASELINE ROY IMAGE 22

FIGURE3-8ROY IMAGE WITH 10 PERCENT ERROR 23

FIGURE 3-9ROY IMAGE WITH20PERCENT ERROR 24

FIGURE4-1 20 PCT.ERR. DILATED BY FLAT SEOF SIZE 3 31

FIGURE4-220PCT. ERR. DILATED BY FLATSE OF SIZE 5 31

FIGURE 4-3 20PCT. ERR. DILATED BY FLATSEOF SIZE 7 31

FIGURE 4-410PCT. ERR. DILATED BY FLATSEOFSIZE3 31

FIGURE 4-5 10PCT. ERR. DILATED BY FLATSE OF SIZE 5 32

FIGURE 4-6 10 PCT. ERR.DILATED BY FLAT SEOF SIZE 7 32

FIGURE4-7 20PCT. ERR. ERODED BY FLATSE OF SIZE 3 32

FIGURE4-8 20PCT. ERR. ERODED BY FLATSE OF SIZE5 32

(10)

FIGURE4-9 20 PCT.ERR. ERODED BY FLATSE OF SIZE 7 32

FIGURE4-10 10PCT. ERR. ERODEDBYFLAT SE OF SIZE 3 32

FIGURE 4-1110 PCT.ERR. ERODED BY FLAT SE OF SIZE5 33

FIGURE4-12 10PCT. ERR.ERODED BYFLAT SEOFSIZE7 33

FIGURE4-13 20 PCT.ERR.OPENED BY FLATSE OF SIZE 3 33

FIGURE 4-1420PCT. ERR.OPENED BY FLAT SE OF SIZE5 33

FIGURE4-15 20PCT. ERR.OPENEDBY FLAT SE OF SIZE7 33

FIGURE4-16 10PCT. ERR. OPENEDBY FLATSEOF SIZE3 33

FIGURE4-17 10PCT.ERR. OPENED BY FLAT SE OF SIZE5 34

FIGURE4-18 10 PCT. ERR.OPENEDBY FLATSE OF SIZE 7 34

FIGURE4-19 20 PCT.ERR.CLOSEDBY FLAT SE OF SIZE3 34

FIGURE4-2020PCT.ERR. CLOSED BY FLATSEOF SIZE5 34

FIGURE4-21 20PCT.ERR.CLOSED BY FLATSE OF SIZE 7 34

FIGURE 4-22 10 PCT. ERR. CLOSED BY FLAT SE OF SIZE3 34

FIGURE4-23 10 PCT. ERR. CLOSED BY FLAT SE OF SIZE5 35

FIGURE 4-24 10PCT.ERR. CLOSEDBY FLATSE OF SIZE 7 35

FIGURE4-25 20 PCT.ERR. DILATED BY PYRAMIDSE OF SIZE 3 35

FIGURE4-2620PCT. ERR. DILATED BY PYRAMID SE OF SIZE 5 35

FIGURE4-27 20 PCT. ERR.DILATED BY PYRAMID SE OF SIZE7 35

FIGURE4-28 10PCT. ERR.DILATED BY PYRAMIDSE OF SIZE 3 35

FIGURE

4-29

10PCT.ERR. DILATED BY PYRAMIDSE OF SIZE 5 36

FIGURE4-30 10 PCT. ERR.DILATED BY PYRAMIDSE OF SIZE 7

36

(11)

FIGURE4-3120 PCT.ERR. ERODED BY PYRAMIDSE OFSIZE3 36

FIGURE4-32 20 PCT.ERR. ERODED BYPYRAMID SE OFSIZE5 36

FIGURE4-33 20 PCT.ERR. ERODED BY PYRAMID SE OFSIZE7 36

FIGURE4-34 10 PCT. ERR. ERODED BYPYRAMID SEOF SIZE3 36

FIGURE4-35 10PCT. ERR. ERODED BY PYRAMID SE OF SIZE5 37

FIGURE4-36 10PCT. ERR. ERODED BY PYRAMID SE OF SIZE 7 37

FIGURE4-37 20 PCT.ERR.OPENEDBY PYRAMID SEOF SIZE3 37

FIGURE4-38 20PCT. ERR. OPENED BY PYRAMID SE OF SIZE5 37

FIGURE 4-39 20PCT. ERR. OPENED BY PYRAMID SEOF SIZE 7 37

FIGURE4-40 10 PCT. ERR. OPENED BY PYRAMID SE OFSIZE 3 37

FIGURE4-41 10PCT. ERR. OPENED BY PYRAMID SE OF SIZE5 38

FIGURE4-42 10 PCT.ERR. OPENED BY PYRAMID SEOF SIZE 7 38

FIGURE4-43 20PCT.ERR.CLOSED BY PYRAMID SE OF SIZE 3 38

FIGURE 4-4420PCT. ERR. CLOSED BY PYRAMID SE OF SIZE5 38

FIGURE4-45 20PCT. ERR. CLOSED BY PYRAMIDSEOF SIZE 7 38

FIGURE4-46 10 PCT. ERR. CLOSED BY PYRAMID SE OF SIZE 3 38

FIGURE4-47 10PCT. ERR.CLOSED BY PYRAMID SEOFSIZE 5

39

FIGURE4-48 10 PCT.ERR. CLOSED BY PYRAMID SE OFSIZE 7

39

FIGURE

4-49

20PCT. ERR. DILATED BY DOMESE OF SIZE 5

39

FIGURE4-50 20PCT. ERR. DILATED BY DOMESEOFSIZE 7

39

FIGURE 4-51 10 PCT. ERR.DILATEDBY DOME SE OF SIZE 5

39

(12)

FIGURE4-53 20 PCT.ERR. ERODED BY DOME SEOFSIZE5 40

FIGURE 4-5420 PCT.ERR. ERODED BY DOMESEOF SIZE 7 40

FIGURE4-55 10 PCT. ERR. ERODED BY DOME SE OF SIZE5 40

FIGURE4-56 10PCT. ERR. ERODED BY DOMESE OF SIZE7 40

FIGURE4-57 20PCT. ERR. OPENEDBY DOMESE OF SIZE 5 40

FIGURE4-58 20PCT.ERR. OPENEDBY DOME SEOF SIZE7 40

FIGURE4-59 10PCT. ERR.OPENED BY DOME SE OF SIZE5 41

FIGURE4-60 10 PCT.ERR. OPENEDBY DOMESE OF SIZE7 41

FIGURE4-61 20PCT. ERR. CLOSED BY DOME SE OF SIZE5 41

FIGURE 4-6220 PCT. ERR.CLOSED BY DOME SE OF SIZE7 41

FIGURE 4-63 10 PCT. ERR. CLOSED BY DOME SE OFSIZE 5 41

FIGURE 4-6410 PCT.ERR.CLOSED BY DOMESE OF SIZE7 41

FIGURE4-65 20PCT. ERR. DILATED BY CONCAVE SE OF SIZE5 42

FIGURE4-66 10 PCT. ERR. DILATED BYCONCAVE SE OF SIZE 5 42

FIGURE4-67 20 PCT. ERR.DILATED BYCONCAVE SE OF SIZE 7 42

FIGURE4-68 10PCT. ERR. DILATED BYCONCAVE SE OF SIZE 7 42

FIGURE4-69 20PCT.ERR.ERODED BY CONCAVESE OF SIZE 5 42

FIGURE4-70 10PCT.ERR.ERODED BYCONCAVE SE OF SIZE 5 42

FIGURE 4-71 20PCT. ERR. ERODED BYCONCAVE SE OF SIZE7 43

FIGURE4-72 10PCT. ERR. ERODED BYCONCAVE SE OF SIZE 7 43

FIGURE 4-7320 PCT.ERR.OPENEDBYCONCAVE SE OF SIZE 5 43

FIGURE 4-7410PCT.ERR.OPENED BYCONCAVE SE OF SIZE 5

43

(13)

FIGURE4-75 20PCT. ERR.OPENEDBYCONCAVE SE OF SIZE7 43

FIGURE4-76 10 PCT.ERR. OPENEDBYCONCAVE SE OF SIZE7 43

FIGURE4-77 20 PCT. ERR. CLOSED BYCONCAVESE OF SIZE5 44

FIGURE4-78 10 PCT. ERR.CLOSEDBYCONCAVE SE OFSIZE5 44

FIGURE4-79 20 PCT. ERR.CLOSED BYCONCAVE SE OFSIZE 7 44

FIGURE4-80 10PCT. ERR. CLOSED BYCONCAVE SE OFSIZE 7 44

FIGURE 4-81 20PCT. ERR. DILATED BY FLAT SE OF SIZE3 45

FIGURE 4-82 20PCT.ERR.DILATED BY FLATSEOFSIZE5 45

FIGURE 4-8320 PCT.ERR. DILATED BY FLAT SEOFSIZE 7 45

FIGURE 4-84 10 PCT. ERR. DILATED BY FLATSE OFSIZE3 45

FIGURE4-85 10PCT.ERR. DILATED BY FLAT SEOF SIZE 5 45

FIGURE4-86 10 PCT. ERR. DILATED BY FLAT SE OF SIZE 7 45

FIGURE4-87 20PCT. ERR. ERODED BY FLAT SE OF SIZE 3 46

FIGURE4-88 20PCT.ERR. ERODED BY FLATSE OF SIZE 5 46

FIGURE4-89 20PCT. ERR. ERODED BY FLAT SE OF SIZE 7 46

FIGURE4-90 10 PCT. ERR. ERODED BY FLATSE OF SIZE 3 46

FIGURE4-91 10 PCT. ERR. ERODED BY FLATSEOFSIZE 5 46

FIGURE 4-92 10PCT. ERR. ERODED BY FLATSE OF SIZE7 46

FIGURE 4-9320PCT. ERR. OPENED BY FLATSE OF SIZE 3 47

FIGURE 4-9420PCT. ERR. OPENED BY FLATSE OF SIZE 5 47

FIGURE4-95 20 PCT.ERR. OPENED BY FLATSE OF SIZE 7 47

FIGURE4-96 10 PCT.ERR. OPENEDBYFLATSEOF SIZE

3

47
(14)

FIGURE4-97 10 PCT. ERR. OPENED BY FLATSEOF SIZE5 47

FIGURE 4-98 10PCT.ERR. OPENEDBY FLAT SE OF SIZE 7 47

FIGURE

4-99

20 PCT. ERR. CLOSEDBY FLATSE OFSIZE3 48

FIGURE4-100 20PCT.ERR.CLOSEDBY FLAT SE OF SIZE5 48

FIGURE4-101 20 PCT.ERR.CLOSEDBY FLAT SE OF SIZE7 48

FIGURE 4-102 10 PCT.ERR.CLOSEDBY FLAT SE OF SIZE3 48

FIGURE4-103 10 PCT. ERR. CLOSED BY FLAT SEOF SIZE5 48

FIGURE 4-104 10 PCT. ERR. CLOSED BY FLAT SE OF SIZE 7 48

FIGURE4-105 20 PCT.ERR. DILATED BY PYRAMID SEOFSIZE3 49

FIGURE4-10620PCT. ERR. DILATED BY PYRAMID SE OF SIZE5 49

FIGURE4-107 20PCT. ERR. DILATED BY PYRAMID SE OF SIZE 7

49

FIGURE4-108 10PCT. ERR. DILATED BY PYRAMIDSE OF SIZE 3 49

FIGURE4-109 10 PCT. ERR. DILATED BY PYRAMID SE OFSIZE 5 49

FIGURE4-110 10PCT. ERR. DILATED BY PYRAMID SE OF SIZE 7 49

FIGURE4-111 20PCT. ERR. ERODED BY PYRAMID SE OF SIZE3 50

FIGURE4-112 20PCT. ERR. ERODED BY PYRAMID SE OF SIZE 5 50

FIGURE4-113 20 PCT.ERR. ERODED BY PYRAMIDSE OF SIZE 7 50

FIGURE 4-114 10PCT. ERR. ERODED BY PYRAMIDSE OF SIZE 3 50

FIGURE4-115 10PCT. ERR. ERODED BY PYRAMTDSE OF SIZE 5 50

FIGURE 4-116 10PCT. ERR. ERODED BY PYRAMIDSE OF SIZE 7 50

FIGURE 4-117 20 PCT.ERR. OPENEDBYPYRAMIDSE OF SIZE 3 51

FIGURE4-118 20 PCT. ERR.OPENED BY PYRAMIDSE OF SIZE 5 51

(15)

FIGURE 4-119 20 PCT.ERR.OPENEDBYPYRAMID SE OFSIZE7 51

FIGURE 4-120 10PCT.ERR.OPENEDBY PYRAMID SEOF SIZE 3 51

FIGURE 4-121 10PCT.ERR.OPENEDBY PYRAMIDSEOF SIZE5 51

FIGURE 4-122 10 PCT. ERR. OPENED BY PYRAMID SEOF SIZE7 51

FIGURE4-123 20PCT. ERR. CLOSEDBY PYRAMIDSE OFSIZE3 52

FIGURE 4-12420 PCT.ERR.CLOSEDBY PYRAMIDSE OF SIZE5 52

FIGURE4-125 20PCT.ERR.CLOSED BY PYRAMID SE OF SIZE 7 52

FIGURE4-126 10PCT.ERR.CLOSED BY PYRAMIDSE OF SIZE3 52

FIGURE 4-127 10 PCT. ERR.CLOSEDBY PYRAMID SE OF SIZE5 52

FIGURE 4-128 10 PCT. ERR. CLOSED BY PYRAMID SE OF SIZE 7 52

FIGURE4-129 20PCT. ERR. DILATED BY DOMESE OF SIZE 5 53

FIGURE4-130 20 PCT. ERR. DILATED BY DOME SEOF SIZE 7 53

FIGURE 4-131 10 PCT. ERR. DILATED BY DOME SE OF SIZE 5 53

FIGURE 4-132 10 PCT. ERR. DILATED BY DOMESE OF SIZE 7 53

FIGURE 4-13320PCT.ERR. ERODED BY DOME SE OF SIZE5 53

FIGURE 4-13420PCT. ERR. ERODED BY DOME SEOF SIZE 7 53

FIGURE4-135 10 PCT. ERR. ERODED BY DOMESE OF SIZE 5 54

FIGURE4-136 10 PCT. ERR. ERODED BY DOMESE OF SIZE 7 54

FIGURE4-137 20PCT. ERR. OPENED BY DOMESE OFSIZE5 54

FIGURE4-138 20PCT. ERR. OPENED BY DOMESEOFSIZE 7 54

FIGURE 4-139 10 PCT. ERR. OPENED BY DOMESE OF SIZE 5 54

FIGURE 4-140 10 PCT. ERR. OPENED BY DOMESEOF SIZE 7 54

(16)

FIGURE4-141 20 PCT.ERR. CLOSED BY DOMESEOFSIZE 5 55

FIGURE 4-14220 PCT. ERR. CLOSEDBY DOME SE OF SIZE 7 55

FIGURE4-143 10 PCT.ERR. CLOSED BY DOME SEOFSIZE5 55

FIGURE 4-144 10PCT. ERR. CLOSEDBY DOME SE OF SIZE 7 55

FIGURE4-145 20 PCT. ERR.DILATED BY CONCAVE SE OF SIZE5 55

FIGURE4-146 10PCT. ERR. DILATED BY CONCAVE SE OFSIZE 5 55

FIGURE4-147 20PCT. ERR. DILATED BY CONCAVE SE OF SIZE 7 56

FIGURE4-148 10 PCT. ERR. DILATED BYCONCAVESE OF SIZE 7 56

FIGURE4-149 20PCT.ERR.ERODED BY CONCAVE SE OF SIZE 5 56

FIGURE4-150 10PCT. ERR. ERODED BY CONCAVE SE OF SIZE5 56

FIGURE 4-151 20PCT.ERR.ERODED BY CONCAVE SE OF SIZE 7 56

FIGURE4-152 10 PCT.ERR. ERODED BY CONCAVE SEOF SIZE7 56

FIGURE4-153 20PCT.ERR.OPENED BY CONCAVESE OF SIZE5 57

FIGURE 4-154 10PCT. ERR. OPENED BY CONCAVE SEOF SIZE 5 57

FIGURE4-155 20PCT. ERR. OPENED BY CONCAVESE OF SIZE 7 57

FIGURE4-156 10 PCT. ERR. OPENED BY CONCAVE SEOFSIZE 7 57

FIGURE4-157 20PCT. ERR.CLOSEDBY CONCAVE SEOFSIZE5 57

FIGURE4-158 10PCT. ERR. CLOSED BY CONCAVE SE OF SIZE5 57

FIGURE4-159 20PCT. ERR.CLOSEDBYCONCAVE SE OF SIZE 7 58

FIGURE4-160 10PCT. ERR.CLOSEDBYCONCAVESEOF SIZE 7 58

FIGURE 4-161 20 PCT. ERR.DILATED BY FLATSE OF SIZE 3 59

FIGURE 4-16220PCT.ERR.DILATEDBY FLATSE OF SIZE 5

59

(17)

FIGURE4-163 20 PCT.ERR.DILATEDBYFLAT SE OF SIZE7 59

FIGURE 4-164 10PCT.ERR. DILATED BYFLAT SE OF SIZE 3 59

FIGURE4-165 10 PCT.ERR.DILATED BYFLAT SE OF SIZE5 59

FIGURE4-166 10PCT. ERR.DILATED BY FLAT SE OFSIZE7 59

FIGURE4-167 20 PCT. ERR. ERODED BY FLAT SE OFSIZE 3 60

FIGURE4-168 20PCT. ERR. ERODED BY FLAT SE OF SIZE 5 60

FIGURE 4-169 20PCT.ERR.ERODED BY FLAT SE OF SIZE 7 60

FIGURE 4-170 10 PCT.ERR.ERODED BY FLAT SE OFSIZE 3 60

FIGURE 4-171 10 PCT. ERR. ERODED BY FLAT SE OF SIZE 5 60

FIGURE 4-172 10 PCT. ERR. ERODED BY FLAT SE OFSIZE7 60

FIGURE 4-173 20 PCT. ERR.OPENED BY FLAT SE OF SIZE3 61

FIGURE 4-17420PCT. ERR. OPENED BY FLAT SE OF SIZE5 61

FIGURE 4-175 20PCT. ERR. OPENED BY FLAT SE OFSIZE7 61

FIGURE 4-176 10 PCT. ERR. OPENED BY FLAT SE OF SIZE3 61

FIGURE 4-177 10 PCT. ERR. OPENED BY FLAT SE OFSIZE 5 61

FIGURE 4-178 10 PCT. ERR. OPENED BY FLAT SE OF SIZE7 61

FIGURE 4-179 20PCT. ERR. CLOSED BY FLAT SEOFSIZE3 62

FIGURE 4-18020PCT. ERR. CLOSED BY FLAT SEOF SIZE 5 62

FIGURE 4-181 20PCT. ERR. CLOSED BY FLAT SE OFSIZE 7 62

FIGURE 4-182 10PCT.ERR.CLOSED BYFLATSE OF SIZE 3 62

FIGURE 4-183 10 PCT. ERR.CLOSED BY FLAT SE OFSIZE 5

62

FIGURE 4-18410 PCT. ERR. CLOSED BY FLATSE OF SIZE 7

62

(18)

FIGURE 4-185 20 PCT. ERR. DILATEDBY PYRAMID SEOFSIZE3

63

FIGURE4-186 20 PCT. ERR. DILATEDBY PYRAMID SE OF SIZE5

63

FIGURE4-187 20 PCT. ERR. DILATEDBY PYRAMID SEOFSIZE 7 63

FIGURE4-188 10 PCT. ERR. DILATEDBY PYRAMID SE OFSIZE 3 63

FIGURE4-189 10PCT. ERR.DILATED BY PYRAMIDSE OFSIZE5 63

FIGURE4-190 10 PCT. ERR.DILATED BY PYRAMID SEOFSIZE 7 63

FIGURE4-191 20 PCT. ERR.ERODED BY PYRAMID SE OF SIZE3 64

FIGURE4-192 20 PCT. ERR.ERODED BY PYRAMIDSE OFSIZE 5 64

FIGURE4-193 20 PCT. ERR.ERODED BY PYRAMID SE OF SIZE 7 64

FIGURE4-194 10 PCT. ERR. ERODED BY PYRAMID SE OF SIZE3 64

FIGURE4-195 10PCT. ERR. ERODED BY PYRAMID SE OF SIZE5 64

FIGURE4-196 10PCT. ERR. ERODED BY PYRAMIDSE OF SIZE7 64

FIGURE4-197 20PCT. ERR.OPENEDBY PYRAMIDSEOF SIZE 3 65

FIGURE4-198 20 PCT.ERR. OPENED BY PYRAMID SE OF SIZE5 65

FIGURE4-199 20PCT. ERR. OPENED BY PYRAMIDSE OF SIZE7 65

FIGURE4-200 10PCT. ERR. OPENED BY PYRAMID SEOF SIZE 3 65

FIGURE 4-201 10 PCT. ERR. OPENED BY PYRAMIDSE OF SIZE 5

65

FIGURE 4-202 10 PCT. ERR. OPENED BY PYRAMIDSE OF SIZE 7 65

FIGURE 4-203 20PCT. ERR. CLOSED BY PYRAMIDSE OF SIZE 3 66

FIGURE 4-20420PCT. ERR. CLOSED BY PYRAMID SE OFSIZE 5

66

FIGURE 4-205 20PCT. ERR. CLOSED BY PYRAMIDSE OF SIZE 7

66

FIGURE4-206 10 PCT. ERR. CLOSED BY PYRAMIDSE OF SIZE 3

66

(19)

FIGURE4-207 10 PCT. ERR. CLOSEDBYPYRAMID SE OF SIZE5 66

FIGURE4-208 10PCT. ERR. CLOSEDBYPYRAMIDSEOFSIZE7

66

FIGURE4-209 20 PCT. ERR.DILATED BY DOME SE OF SIZE5 67

FIGURE4-210 20 PCT. ERR. DILATED BY DOME SE OF SIZE7 67

FIGURE 4-211 10PCT. ERR. DILATED BY DOME SE OF SIZE5 67

FIGURE 4-212 10 PCT. ERR. DILATED BY DOME SE OF SIZE7 67

FIGURE4-213 20 PCT.ERR. ERODED BY DOMESE OF SIZE 5 67

FIGURE4-21420PCT. ERR. ERODED BY DOME SE OF SIZE7 67

FIGURE4-215 10 PCT. ERR. ERODED BY DOME SE OF SIZE 5 68

FIGURE4-216 10 PCT. ERR. ERODED BY DOME SE OFSIZE7

68

FIGURE4-21720 PCT. ERR. OPENED BY DOME SE OFSIZE 5 68

FIGURE4-218 20PCT.ERR.OPENED BY DOME SE OF SIZE 7

68

FIGURE4-219 10 PCT.ERR. OPENED BY DOME SE OF SIZE5 68

FIGURE4-220 10PCT. ERR. OPENED BY DOMESE OFSIZE 7

68

FIGURE 4-221 20PCT. ERR. CLOSED BY DOME SE OF SIZE5

69

FIGURE 4-22220PCT. ERR. CLOSED BY DOMESE OF SIZE 7

69

FIGURE 4-223 10PCT. ERR. CLOSED BY DOMESE OF SIZE5

69

FIGURE 4-22410PCT. ERR. CLOSED BY DOME SE OFSIZE 7

69

FIGURE 4-225 20PCT. ERR. DILATED BY CONCAVE SE OF SIZE 5

69

FIGURE 4-226 10PCT. ERR. DILATED BYCONCAVE SE OF SIZE 5

69

FIGURE 4-227 20PCT. ERR. DILATED BYCONCAVESEOF SIZE 7 70

FIGURE4-228 10PCT. ERR. DILATED BYCONCAVE SE OF SIZE 7 70

(20)

FIGURE

4-229

20 PCT. ERR. ERODEDBYCONCAVESEOFSIZE5 70

FIGURE4-230 10 PCT. ERR. ERODED BYCONCAVE SE OFSIZE5 70

FIGURE 4-231 20 PCT. ERR.ERODED BYCONCAVESE OF SIZE 7 70

FIGURE 4-232 10 PCT. ERR.ERODED BYCONCAVESE OF SIZE7 70

FIGURE 4-233 20 PCT. ERR. OPENEDBYCONCAVESE OF SIZE5 71

FIGURE 4-234 10 PCT. ERR.OPENED BYCONCAVESE OF SIZE5 71

FIGURE 4-235 20 PCT. ERR.OPENED BY CONCAVESE OFSIZE 7 71

FIGURE 4-236 10 PCT.ERR.OPENED BYCONCAVESE OF SIZE7 71

FIGURE 4-237 20 PCT.ERR.CLOSEDBYCONCAVE SE OF SIZE 5 71

FIGURE 4-238 10 PCT.ERR. CLOSED BYCONCAVE SE OFSIZE5 71

FIGURE 4-239 20PCT. ERR.CLOSEDBYCONCAVESE OF SIZE 7 72

FIGURE4-240 10 PCT. ERR. CLOSED BY CONCAVE SE OF SIZE 7 72

FIGURE 5-1 DILATIONRESULTS 10 PERCENT ERROR 75

FIGURE 5-2 WIDE DILATION RESULTS 10 PCT. ERR 75

FIGURE 5-3DILATIONRESULTS20PERCENT ERROR 75

FIGURE 5-4 WIDE DILATION RESULTS 20PCT. ERR 75

FIGURE5-5EROSIONRESULTS 10PERCENTERROR 76

FIGURE 5-6WIDE EROSION RESULTS 10PCT. ERR 76

FIGURE5-7 EROSION RESULTS 20PERCENT ERROR 76

FIGURE5-8WIDE EROSION RESULTS20PCT. ERR 76

FIGURE5-9 OPENRESULTS 10PERCENT ERROR 77

FIGURE 5-10 OPEN RESULTS 20PERCENT ERROR 77

(21)

FIGURE 5-11 CLOSE RESULTS 10 PERCENTERROR 77

FIGURE 5-12 CLOSE RESULTS 20 PERCENTERROR 77

FIGURE 5-13 IMAGE CLOSEDBY3X3FLAT SE 80

FIGURE5-1420 PCT. ERR. CLOSEDBY FLAT SEOF SIZE 3 80

FIGURE5-15 10 PCT. ERR. CLOSEDBY FLAT SE OF SIZE3NARROW GRAPH 80

FIGURE5-16COKE IMAGECLOSEDBY 7X7 FLAT SE 81

FIGURE5-17 20 PCT. ERR. CLOSED BY FLAT SEOF SIZE7 81

FIGURE5-18 10 PCT.ERR.CLOSED BY FLAT SE OF SIZE 7 NARROW GRAPH 81

FIGURE5-19COKE IMAGE DILATED BY3X3FLATSE 82

FIGURE5-20 20 PCT. ERR. DILATED BY FLAT SEOF SIZE 3 82

FIGURE 5-21 20 PCT.ERR. DILATED BY FLATSE OF SIZE 3 NARROWGRAPH82

FIGURE 5-22COKEIMAGE DILATED BY 7X7 FLAT SE 83

FIGURE5-23 20PCT. ERR. DILATED BY FLAT SE OF SIZE7 83

FIGURE 5-2420PCT. ERR. DILATED BY FLAT SEOF SIZE7 NARROWGRAPH83

FIGURE 5-25 COKE IMAGE DILATED BY 7X7 FLAT SE SHIFTED DOWN

60

LEVELS 84

FIGURE5-26COKE IMAGE ERODED BY 3X3FLATSE 85

FIGURE5-27 20 PCT.ERR. ERODED BY FLAT SEOF SIZE 3 85

FIGURE5-2820PCT. ERR. ERODED BY FLATSE OFSIZE3NARROWGRAPH 85

FIGURE5-29COKE IMAGE ERODED BY7X7FLATSE 86

FIGURE 5-3020PCT. ERR. ERODED BY FLATSE OFSIZE7

86

FIGURE5-31 20PCT. ERR. ERODED BY FLATSE OF SIZE7 NARROW

GRAPH

86
(22)

FIGURE5-32COKEIMAGE ERODED BY 7X7 FLAT SE SHIFTED UP55LEVELS87

FIGURE5-33 COKEIMAGEOPENED BY3X3FLATSE 88

FIGURE5-3420PCT. ERR. OPENED BY FLAT SE OF SIZE3 88

FIGURE5-3520 PCT. ERR. OPENEDBY FLATSE OF SIZE3NARROW GRAPH88

FIGURE5-36COKE IMAGEOPENEDBY 7X7 FLATSE 89

FIGURE 5-3720PCT. ERR. OPENED BY FLAT SE OF SIZE 7 89

FIGURE5-3820PCT. ERR. OPENED BY FLAT SE OF SIZE 7 NARROW GRAPH89

(23)

List

of

Tables

TABLE 1-1 EXAMPLEOPERATIONS 1

TABLE 1-2 EXAMPLE OF BINARY MORPHOLOGY 3

TABLE2-1 EXAMPLE OF GRAY SCALE MORPHOLOGY 11

TABLE3-1TABLEDECODING 28

TABLE 5-1 DECODING GRAPH LABELS 74

(24)

List

of

Equations

EQ. 1-1 2

EQ. 1-2 2

EQ. 1-3 2

EQ. 1-4 2

EQ. 1-5 3

EQ. 1-6 4

EQ. 1-7 4

EQ.2-8 8

EQ.2-9 10

EQ.2-10 13

EQ.2-11 13

(25)

Glossary

Binary

Morphology

is

Morphology

performed on

bi-level images.

See

"Binary

Morphology"

on page

1.

Binary Morphology

Close

The closing is

a morphological operation

that

is

composed of an erosion

followed

by

a

dilation.

The

same

structuring

element must

be

used with

both

the erosion and the

dilation.

See

"0086"page

4.

DC

Shift

The

entire

image is

shifted

in

amplitude.

It

can

be

thought of as

shifting

the color

(gray)

ofthe

image.

Dilation

The dilation

is

a

dual

to erosion.

It

is

computed as

eroding

the complement ofthe

image. See

"Dilation"

on page

1.

Erosion

In

the simplest case the erosion

is

a subset operation.

See

"Erosion"on page

2.

Gray

Scale

Morphology

Gray-scale

Morphology

is

Morphology

performed on

gray

scale

images. See

"Gray

Scale

Morphology" onpage

5.

Open

The opening is

a morphological operation

that

is

composed of a

dilation

followed

by

an erosion.

The

same

structuring

element must

be

used with

both

the

dilation

and the erosion.

See

"Open"

on page

3.

Mathematical

Morphology

The

type of nonlinear

image processing

discussed in

thispaper.

Morphing

Morphology

The

image

processing

that

is

used

in

Michael Jackson

music videos, automobile commercials.

It has nothing

to

do

with this paper.

From

the

dictionary

A

branch

of

Biology

dealing

with the

form

and structure of organisms.

In

other words the shape.

Umbra

The

shadow of a

function.

Transform"

onpage

5.

See "Umbra

(26)

A

The

image

used.

The

images

used were

256

by

256

pixels.

B

The

structuring

element used.

Structuring

elements of

3

by

3

pixels,

5

by

5

pixels, and

7

by

7

pixels were used.

a,b

A

specific pixel

in

the

image

or

structuring

elementrespectively.

0

The dilation

operator.

*

The

erosion operator.

This

notation

is

not common to the

literature,

but

was made

because

the standard notation could not

be

inserted into

this

document.

0

The

open operator.

The

close operator.

C

The

complement of the set, used

in

the

binary

case.

The

pixels that are set are cleared, and the pixels that are not set are

set.

u

The

set unionoperator.

n

The

set

intersection

operator.

V

B

Denotes

rotation of the

structuring

element

B

aboutthe origin.

-

Also

denotes

rotation of the

structuring

element aboutthe origin.

(27)

1

.

Binary Morphology

1.1.

Input

In

this paper the

input images

that are operated on are square matrices of

finite

size.

Binary Morphology

operates on

2-valued

pixels.

The

table

in

the

glossary

onpagexxv

describes

the notation used

in

this paper.

The

following

tableprovides some examples ofthe operations used.

The

cell

that

is italicized is

the origin ofthe

image.

Operation

Example

A

1110

0

10

0

0

0

0

0

0

0

0

0

0

0

0

0

0

0

0

0

0

Ac

0

0

0

11

0

1111

117

11

11111

11111

-A

0

0

0

0

0

0

0

0

0

0

0

0

0

0

0

0

0

0

0

1

0

0

111

(28)

1.2.

Dilation

Dilation

is dual

to erosion

because

it is found

by

eroding

the complement of

an

image. This formulation

can

be

expressedas

AB

= [AC*(-B)]C

Eq.l-l

(Dougherty, eq 1.10,p.7)

The

character * represents morphological erosion.

This

substitution was

made

because

of

limitations for

characters to represent the operation.

Another

formulation for dilation is

A@B

=

{J[A

+

b:beB]

Eq

A_2

(Dougherty,eq1.12,p.7)

This

is

a union of the

input image

shifted

by

all elements

in

the

structuring

element.

Dilation

is

associative and commutative

1.3.

Erosion

Erosion

is

the other

primary

operation

in

morphology.

As

seen earlier,

dilation

can

be

expressed as a

dual

to erosion.

One formulation for

erosion

using

sets

is:

A*B

=

[x:B

+

x^A]

Eq

j_3

(Dougherty,eq.1.3,p.3)

Another formulation

for

erosion which will

be

used

later

is:

X*B

=

n[Xblb<=B

EqA_4

(29)

The

intersection is

composed of

X

translated

by

the elements of

B.

Each

of

those elements,

beB,

will

be

added to the point xeX, the sum x+b

is in

X

iff

thepoint x

is in X.h. The resulting

setofthe erosion can

be

expressed as:

Y

=

{x.BxczX}=

fl

X-y

yeBO

v

=

fl

Xy=X*B

-yeBO

Eq. 1-5

(Serra,eq. H-4,p.43).

where

B

is

B

reflected about the origin.

This

reflection about the origin comes about as a result of the need

for opening

and

closing

(which

are

defined

later)

to

be idempotent.

If

neither erosion, nor

dilation

used a rotated

structuring

element,ashiftwould

be built into

the

image for

those cases

using

a non-symmetrical

structuring

element.

As

an example:

Origin

is

Underlined

-3-2-10

1

2

3

I

X X X

S

X X

V

X X

IS

X X X X

*

I*S

X X

I*S

X X

X X X

X X X

close X X X

(30)

1

.4.

Open

The

morphological

opening is

an operation composed of erosion

followed

by

dilation.

AoB

=

(A*B)@B

EqU6

(Dougherty,eq..2.1,p.17)

Opening

an

image

with a

structuring

element

is

used to truncate protrusions

on the outside ofthe

image.

The

initial

erosion will

"cut

off'

Those

external

features

that the

structuring

element cannot

fit into.

The

dilation willexpand

the

image

to

nearly

theoriginal size.

1.5.

Close

The

morphological

closing is

an operation composed of

dilation

followed

by

erosion.

Afl

=

[A0(-S)]*(-B)

EqA_7

(Dougherty,eq.2.4,p.18)

Closing

an

image

will

fill in

gaps on the

inside

of the

image

that the

structuring

elements can

bridge.

The

initial

dilation

will

fill in

the

internal

gaps and the subsequent erosion will return the

image

to

nearly

the original
(31)

2.

Gray

Scale

Morphology

2.1.

Input

Gray

scale

morphology is

an extension of

binary

morphology

to

images

with shades ofgray, or

in

other words

from

two to three

dimensions. Eight-bit

per pixel

images,

256

shades, are a common

form,

but

that

is

not a theoretical

restriction.

Minus

infinity

is

also a value that the

images

can

take,

and

is

reservedto

indicate

the

lack

of a value.

Minus

infinity

is

used whenthe value

is

undefined

(not in

the

domain

of the

image.)

The

dilation

operator can

create values

for

those pixels

(expand

the

domain),

since

it is defined

as a

maximum.

The

erosion operator

does

not expandthe

domain

ofthe

image.

2.1.1.

Umbra

Transform

The Umbra Transform

was used

for

the

early development

of

gray

scale

morphology.

Although

newer

literature does

not use

it

much,

it

stillprovides

an

easily

visualized

way

of

looking

at

gray

scale morphology.

The Umbra

can

be

thoughtofas the shadow created

by

the

function

(Dougherty,

pp.
(32)

Figure2-1 Graph ofan

Arbitrary

Function

Looking

at the

function,

it only defines

the surface.

The

umbra

includes

the

volume underneath the surface all the

way

to minus

infinity.

One

important

distinction between

binary

and gray-scale

morphology is

that the concept of

the complement ofa picture needs to

be

examined

very

closely, since

in

the
(33)

y-w:;.:

Figure 2-2 GraphofanUmbra

2.2.

Morphological Dilation

(34)

d(x,

y)

=

max/,

j[a(x

-i,y-j)+b(i,

j)]

Eq. 2-8

A

=TtlXJTl (Dougherty,eq.6.22,p.103)

B

= nxn

x=

0...m

v =

0...m

'

= --

0

-2

2

n n

j

=

/

2

2

=

A@B

To

determine

the value of each pixel

in

the

resulting

image,

it is necessary

to

take the sum of the

corresponding

element

from

the

structuring

element and

the pixel

from

the

input image

that

is

overlaid.

For

example given the

following

input

image

A

fl(0,0)

=

l

0(0,4)

=

5

a(2,2)

=

\3

a(4,0)

=

2l

a(4,4)

=

25

andthe

structuring

element centered aboutthemiddle element.

12

3

4

5

6

7

8

9

The

value of the element

(1,1)

would

be determined from

the maximum of

the sums

12

3

4 5

6

7

8

9

10

11 12 13 14 15

16 17 18 19 20

21 22

23

24 25
(35)

1+1 2+2

3

+

3

6

+4

7

+

5

8

+

6

11+7

12+8

13+9

In

this case the value of the pixel

(1,1)

would

be 22.

The

pixel

(1,1)

would

take the sum ofthepixel

from

the

structuring

element

(2,2)

and

from

the

input

image (2,2).

A

special case

is

the

handling

ofthe edge conditions where part ofthe

structuring

element

is

not over the

domain

ofthe

input image.

Since

the

image is

treated as minus

infinity

when not

in its

domain,

the out of

domain

values

from

the

input image

are

just

set to minus

infinity. The

value ofthepixel

(0,0)

would

be

-oo+1 -oo+2 -oo+

3

-oo+4 1+5 2+

6

-oo+7

6

+8 7+9

or

16. The

origin ofthe

structuring

element

is

the center of

interest.

Another

important

case

is

where the pixel of

interest is

out ofthe

domain

ofthe

input

image,

but

at

least

one pixel

is in

the

domain

of the

input image.

One

example would

be

the value of the pixel

(5,5)

25+1 -00+2 -00+3

0O+4 o+

5

+6 -co+

7

-o+

8

-~+9

In

this case the value would

be 26.

The

only

restriction on this

is

some real

implementations. In

some

implementations,

the

domain is

restricted suchthat the

domain

of the resultant

image

cannot exceed the size ofthe

input

image,

which

includes

minus

infinity

pixels

in

the

image.

This

restriction

is

an
(36)

2.3.

Morphological

Erosion

Gray

scale erosion can

be

expressed as

d(x,

y)

= min

,-,j[a(x

-i,y-j)

-b(-i,

-j)]

Eg. 2-9

= **A*MJR

(Dougherty,eq.6.6,p.97)

One important

point that can

be

seen

from

the above equation

is

that the

structuring

element

is

rotated around the origin.

This

is

important

to

remember

for

implementation,

although

in many

of the common cases

(structuring

elements that are symmetrical around the origin)

it

will not

change

any

oftheresults.

The

following

is

a

1

dimensional

example of what

happens in

the cases where

the

structuring

element

is

not rotated.

The

rows that are marked with the

superscript asterisk are where the

structuring

element was not rotated about

the origin.

The incorrect definition does

not

have

the

idempotence

property.

Opening

and

closing

are

both

idempotent

operations; no openings or closings

after the

first opening

or

closing

respectively

will produce a change

in

the

image.

(37)

Origin is

emboldened

-3-2-10123

J oo oo oo

1

2

3

oo

S

0

1

2

V

S

2

1

0

I@S

oo

3

4

5

4

3

oo

7*5*

oo oo oo

1

oo oo oo

I*S

oo oo oo oo 00 oo oo

open oo

3

2

1

oo oo oo

3

2

1

OO oo oo

close oo oo oo

1

2

3

oo

Table2-1Exampleof

Gray

Scale

Morphology

Erosion

reduces the

domain in

the

boundary

cases where the offset of the

structuring

element

does

not

include

an element

in

the

domain

of

f.

Using

the

image

and

structuring

element that was used earlier the pixel

(1,1)

oftheoutput

image

would

be

1-9 2-8 3-7

6-6

7-5

8-4=-8=>-11-3 12-2 13-1

In

this case, we

have

a number of values

less

than zero which

map

to -.

In

anothercase,the value ofthe output pixel

(3,3)

would

be

(38)

13-9

14-8

15-7

18-6

19-5

20-4

23-3

24-2

25-1

Since

erosion uses the minimum of the

differences

the result would

be

13

-

9=4.

Another

case

is

where the

structuring

element extends past the

domain

ofthe

input image. The

pixel

(0,0)

would

be

19-9

20-8

-oo-7

24-6

25-5

-oo-4

oo

3

oo 2 oo1

Since

there are a number of values at- the output pixel will

be

-oo.

2.4.

Morphological

Opening

In

the

gray

scale case, the

basic definition

of morphological

opening is

the

same: erosion

followed

by

dilation

(Dougherty,

p.

111.)

The

effects are also

similar.

The

initial

erosion will remove those protrusions on the surface of the

image

that the

structuring

element cannot

fit

into,

the edges ofthe

image

will

become

smaller as the erosion will set the

domain

boundary

pixels to -.

The dilation

will add

back

to the

image both

the

boundary

pixels and some of

the "height"ofthepixels.

2.5.

Morphological

Closing

The

morphological

closing is dilation followed

by

erosion

(Dougherty,

p.

111.)

The dilation fills in

some voids on the

image

and expands the

domain

ofthe

image if it

can.

Some implementations

restrict the size ofthe

resulting

image

to

its initial

size.

The

erosion thenmakesthe

image

nearer to

its initial

shape,

but

the

internal

voids that were

filled in

by

the

dilation

cannot

be

restored.

One

special case

for

some

implementations

is

where the

dilation

(39)

could not expand the

domain because

of an

image

size

limit

and the erosion

reducesthe

domain

ofthe

image.

2.6.

Common Transforms

and

filters

Two

ofthe common transformsare the top-hat

f

-

(f

open

g)

(Dougherty,

pp.

119-120,)

and

valley

detector (f

close

g)

-f

(Dougherty,

p.

120.)

One

special

case

is

when the

structuring

element

is flat

with a value of

0

along

its

domain.

Then

-g =

g

and the

duality

of open and

closing

becomes

(f

close

g)

-

f

= -f

-[(-f)

open g].

One

way

to

detect both

the peaks and

valleys

is

touse

(f

close

g)

-

(f

open g).

Two

other

filters

are the

iteration

of

opening followed

by

closing

or

closing

followed

by

opening.

The

filters

are referred

to,

respectively

as:

CLOSEOPEN,

and

OPENCLOSE.

CLOSEOPEN(f)

=

(f

close

(-g))

openg)

Eq

2-io

(Dougherty,eq.7.5,p.127)

OPENCLOSE(f)

=

(f

open

g) close

(-g))

Eq

2-n

(Dougherty,eq.7.4,p.127)

One

simplification to the above

is

to restrict these

filters

to

flat structuring

elements with value

0

so

g

=-g.

Another

type of

filtering

that can

be

used

is

to start with a small

structuring

element and alternate

opening

and closings and then

increase

the

filter

size to

remove

successively

larger

noise particles.

It

is

important

to note that

in

the

digital

case that the order

in

which the

opening

and closings are

done is

important.

Since

a

closing

reduces the

domain

and an

opening may

increase

(40)

the

domain

if

possible

in

a

digital

setting,the

opening

needs to

be done

before

the

closing

to avoid

diminishing

the

domain.

(41)

3.

Experimental Procedure

3.1.

Basics

This

experiment was set

up

to

judge

the results of

different

sizes of

structuring

elements and

different

shapes on

restoring

images

(noise

reduction.)

The

procedure was to take an

image,

add noise to

it,

and then

use the noised

image

as the

starting

point.

The

basic

operations

(dilate,

erode, open, or

close)

were then used and the effect ofthe

processing

on the

image

could

be

calculated.

It

was also observed that the minimal error

for

a

given

image

and

structuring

element was not

necessarily

given

by

the original

processing.

In

many

cases the error was miriimized

by

shifting

the entire

image

by

a constant amount or

DC

shift.

3.2.

Noise

The

noise that was applied to the

image

was

uniformly distributed

with a

range of64.

In

the cases where the noise would

have

extended

beyond

the

available

gray

scalerange, the

resulting

value wastruncated atthe

boundary.

3.3.

Input Images

The

following

figures

are the

images

thatwere used

for

the experiments.

The

images

are

256

by

256

pixels.

The

three

base

images

were chosen toprovide

a

variety

of

input

sources.

The

coke

image has

the

sharply

defined

lines

and
(42)

curves.

The

image

ofthe girl

has

the softer shadings ofa

face

and

hair. The

image

of

Roy

combines some of

both

with the

background

providing

some

sharp

edges.

Figure 3-1 Baseline CokeImage

(43)

Figure 3-2CokeImagewith10Percent Error

(44)

Figure3-3Coke Imagewith20 Percent Error

(45)

ffiyyy''.yyyyyyy/'''.:yy,-';rV.y

&y>&y-\^y.yyyyy...y

Aw.-.

:::..:::.-.

,y\-y-.-\.. ,,.":-...

Figure3-4Baseline Girl Image

(46)

Figure 3-5 Girl Imagewith10 Percent Error

(47)

Figure3-6Girl Imagewith20PercentError

(48)

Figure3-7 Baseline

Roy

Image
(49)

Figure3-8

Roy

Imagewith10 Percent Error
(50)

Figure 3-9

Roy

Image with20 Percent Error
(51)

3.4.

Structuring

Elements

The structuring

elements used

for

the experiment can

be divided into

4

categories;

flat,

pyramidal, concave, and

dome

shaped.

All structuring

elements used were square;

3, 5,

or

7

units on a side.

Each category

of

structuring

elements

has 2

or

3 different

sizes.

There

are

3 flat

stmcturing

elements of sizes

3, 5,

and

7.

The

values of the pixels are all zero valued.

The

The

The

flat

structuring

0

0

0

0

0

0

0

0

0

flat

structuring

0

0

0

0

0

0

0

0

0

0

0

0

0

0

0

0

0

0

0

0

0

0

0

0

0

flat

structuring

0

0

0

0

0

0

0

0

0

0

0

0

0

0

0

0

0

0

0

0

0

0

0

0

0

0

0

0

0

0

0

0

0

0

0

0

0

0

0

0

0

0

0

0

0

0

0

0

0

element of size

3

has

the values:

element of size

5

has

the values:
(52)

The

pyramidal

structuring

element of size

0

1

0

1

2

1

0

1

0

The

pyramidal

structuring

element of size

0

0

1

0

0

0

1

2

1

0

1

2

3

2

1

0

1

2

1

0

0

0

1

0

0

The

pyramidal

structuring

element of size

0

0

0

1

0

0

0

0

0

1

2

1

0

0

0

1

2

3

2

1

0

1

2

3

4

3

2

1

0

1

2

3

2

1

0

0

0

1

2

1

0

0

0

0

0

1

0

0

0

The

concave

structuring

element of size

0

0

1

0

0

0

0

1

0

0

1

1

3

1

1

0

0

1

0

0

0

0

1

0

0

3

has

the values:

5

has

the values:

7

has

the values:

5

has

the values:
(53)

The

concave

structuring

element of size

7

has

the values

0

0

0

1

0

0

0

0

0

0

1

0

0

0

0

0

1

2

1

0

0

1

1

2

4

2

1

1

0

0

1

2

1

0

0

0

0

0

1

0

0

0

0

0

0

1

0

0

0

The

dome

structuring

element of size

5

has

the values:

0

0

1

0

0

0

2

3

2

0

1

3

3

3

1

0

2

3

2

0

0

0

1

0

0

The

dome

structuring

element of size

7

has

the values:

0

0

0

1

0

0

0

0

0

1

2

1

0

0

0

1

3

4

3

1

0

1

2

4

4

4

2

1

0

0

1

0

3

1

4

2

3

1

1

0

0

0

0

0

0

10

0

0

(54)

3.5.

Naming

Scheme

The

results generated

later in

this

document

often

label

theresults with acode

that

identifies

the

image

used, the amount of noise added to the

baseline

image,

and themorphological operation applied.

In

section

4

the traces

in

the

graphs

have

a

naming

scheme that

includes

the operation.

The naming

scheme

for

the traces

is

explained

in

the

following

table.

Character

Description

1

The

input image.

This

can

be

either

'c'

for

the

image

of the coke can, 'g'

for

the

image

of the

young

girl,

V

for

the

image

of

Dr.

Czernikowski

in

theengineer

hat.

2

The

amountof noiseappliedto the

image.

' 1'

for

10

percenterror, or '2'

for 20

percent error.

3

The

morphological operation applied.

The

values

can

be

'c\ 'd', 'e',

'o'

for

close,

dilate,

erode,

open respectively.

4

The

type of

structuring

element applied.

The

values can

be

'c',

'd', 'f,

'p'

for

concave,

dome,

flat,

pyramid respectively.

5

The

size ofthe square

structuring

element.

This

can take the values of

3, 5,

7.

The

concave and

dome structuring

elements are restricted to sizes of

5

and

7.

6-7

The

traceonthe graph.

This

takes thevalue

'vl'

or 'v2'

which

is

not significant of

itself.

The

trace

labeled

'vl' will

be

above or equal to the

trace

labeled

'v2.'

The

'vl'

trace

is

the absolute

error

for

the whole

image

at the various

DC

offsets, the

'v2'

trace

is

the absolute error

for

a

subset oftheentire

image.

Table 3-1 Table

Decoding

(55)

4.

Results

The

rest of this section

is divided into 3

sections that contains graphs that

show the

initial

results of the

investigation.

Each

section

focuses

on a

specific

input image

and the results that the

different

structuring

elements

provide.

One

parameter of specific

interest is

what

DC

shift will rriinimize

the absolute error overtheentire

image.

A DC

shift

is just

a shift ofthe entire

image

by

a constant value.

Each

graph

is

composed of the absolute error of

the

image

atthe

different DC

shifts.

The

two traces on the graphs are the absolute error

for

two cases.

The

first

case

is

the absolute error computed

using

the entire resultant

image

against

theentire

baseline

image. The

second trace on the graph

is

the absolute error

computed with a

border

ofthree pixels around

both

the

input image

and the

resultant

image.

The

border

was chosen so that the edge effects could

be

ignored for

erosion

andclosing.

As

described

earlier, thereduction

in

the

domain for

erosion and

closing

will

frame

the

image in black (0

valued) pixels.

Reducing

the

domain

of the absolute error allows

for

comparing

the results without that problem,

although the graphs

in

this section

do

not show the

domain

reduction as a

great problem.

The

title of each graph tells more of the

details

of

how

each

image

was

processed.

The first

part ofthe graphtitle will either

say 20 Pet

Err,

or

10 Pet

Err.

Those

twophrases

indicate how

much errorwas

introduced

into

the

base

image. The

rest ofthe graph title will

indicate

what morphological operation

was performed on the

image

and with what

structuring

element.

For

example
(56)

Dilated

by

Flat

SE

of

Size

3,

the operation was

dilation

and the

structuring

element

(SE)

was asquare

flat structuring

element

3

units on each side.

The

x-axis of the results graphs

is

centered at a

DC

offset of

0.

The label

i-20

at this point

is

an artifact ofthe creation ofthe graphs.

The

data

points

were read out of a

file

and were

labeled starting

at

0.

The

i-20

term

is

an

offset togetthe correct x-axis values.

The

marks under the -20 and

20

on the

x-axis are also artifacts ofthe package usedto createthe graphs.

(57)

4.1.

Coke Images

600000C 600000C 1

c2df7vl. 1

c2df7v2. 1

0 1

i-20 ..-2Q, i-20 .20,

Figure4-1 20Pet.Err. Dilated

by

Flat SE Figure4-3 20 Pet. Err. Dilated

by

Flat SE

ofsize3 ofsize 7

600000C

T~

-c2dfSvl. i

c2df5v2. l

^r*

'

0 1

t-2Q, i-20 .20.

600000C

cldf3vl. i

cldf3v2

0

.-20,

-L

i-20 ?0

Figure 4-2 20 Pet. Err. Dilated

by

FlatSE Figure 4-4 10 Pet. Err. Dilated

by

FlatSE
(58)

600000C 1 cldf5vl. 1 cldf5v2. 1 ,-^ --^-^ 0 1 600000C 1 c2ef5vl. i "^Y" ^""^" T^"-c2ef5v2. i * "^ 0 I

t-2Q, i-20 ,20, .-2Q, i-20 20.

Figure4-5 10 Pet. Err. Dilated

by

FlatSE Figure4-8 20 Pet. Err. Eroded

by

Flat SE

ofsize5 ofsize5

600000C 1 -cldf7vl. l cldf7v2. i 0 1 600000C 1 c2ef7vl. l "

-^

c2ef7v2. l 0 1

t-2Q, i-20 20. 1.-24 i-20 20.

Figure 4-6 10 Pet.Err.Dilated

by

FlatSE Figure4-9 20Pet.Err. Eroded

by

Flat SE

ofsize 7 ofsize7

600000C -2Q, i-20 6000000] clefivl clef3v2. 0 ..-20, J_ i-20 ,20,

Figure 4-7 20 Pet. Err. Eroded

by

FlatSE Figure 4-10 10 Pet. Err. Eroded

by

Flat

ofsize3 SEofsize3

(59)

600000C Ol _L 600000C c2of5vl c2of5v2. 1 0

-2Q, i-20 .20, .-20, i-20 .20,

Figure 4-11 10 Pet. Err. Eroded

by

Flat Figure 4-14 20 Pet. Err. Opened

by

Flat

SEofsize5 SEofsize5

600000C 1 clef7vl. l clef7v2. l ' -^Y^~-^

^Y^~-~_

0 600000C 1 c2of7vl. l c2of7v2. i

^^>-^_^

"^"^-"s ^-_ 0 1

-20, i-20 ,20, -20, i-20 20,

Figure 4-12 10 Pet. Err. Eroded

by

Flat Figure 4-15 20 Pet. Err. Opened

by

Flat

SEofsize7 SEofsize 7

600000C 600000C

clof3vl. l

clof3v2.

-2Q, i-20 i-20

Figure 4-13 20 Pet. Err. Opened

by

Flat Figure 4-16 10 Pet. Err. Opened

by

Flat

SEofsize3 SEofsize3

[image:59.535.53.472.46.650.2]
(60)

600000C 600000C

c2cf5vl

c2cf5v2.

i-20

Figure 4-17 10 Pet. Err. Opened

by

Flat Figure4-20 20 Pet. Err. Closed

by

Flat SE

SE ofsize5 ofsize5

600000C 1

clof7vl. l

clof7v2. l

""^^^^

0 '

600000C

.-20, i-20 20, i-20

Figure 4-18 10 Pet. Err. Opened

by

Flat Figure 4-21 20 Pet. Err. Closed

by

FlatSE

SEofsize7 ofsize7

600000C

-2Q, i-20

600000C

i-20

Figure 4-19 20 Pet.Err. Closed

by

FlatSE Figure 4-22 10 Pet. Err. Closed

by

Flat SE

ofsize3 ofsize3

(61)

600000C 1 -clc5vl. 1 clcf5v2. 1 ^"t 0

-2Q, i-20 20,

600000C 1

-c2dp5vl.

c2dp5v2.

0

-20, i-20 20,

Figure4-23 10Pet. Err. Closed

by

Flat SE Figure 4-26 20 Pet. Err. Dilated

by

ofsize5 PyramidSE ofsize5

600000C 1 -clcf7vl. l clcf7v2. l _ j """"**"Y " -Y^-' 0 i

-2Q, i-20 .20.

600000C 1

c2dp7vl.

c2dp7v2.

0 1

-2Q, i-20 .20,

Figure4-24 10Pct.Err. Closed

by

FlatSE Figure 4-27 20 Pet. Err. Dilated

by

ofsize 7 Pyramid SE ofsize7

600000C 1

c2dp3vl.

c2dp3v2.

0 '

600000C

-2Q, i-20 .20, i-20

Figure 4-25 20 Pet. Err. Dilated

by

Figure 4-28 10 Pet. Err.

Dilated

by

PyramidSEofsize3 PyramidSEofsize3

(62)

600000C

-cldp5vl.

cldp5v2.

0

600000C 1

-c2ep5vl.

c2ep5v2.

"

-^^Y-r

0

-20, i-20 .20, -2Q, i-20 ,20,

Figure 4-29 10 Pet. Err. Dilated

by

Figure 4-32 20 Pet. Err. Eroded

by

PyramidSE ofsize5 Pyramid SEofsize5

600000C 1

-cldp7vl.

^c-t^ ^^

cldp7v2.

0 1

600000C

-2Q. i-20 .20. i-20

Figure 4-30 10 Pet. Err. Dilated

by

Figure 4-33 20 Pet. Err. Eroded

by

PyramidSE ofsize 7 Pyramid SEofsize7

600000C

-20, i-20

600000C

i-20

Figure 4-31 20 Pet. Err. Eroded

by

Figure 4-34 10 Pet. Err. Eroded

by

PyramidSEofsize3 Pyramid SE ofsize3

(63)

600000C 600000C 1

c2op5vl.

c2op5v2.

t~>-;^^

0 1

i-20 -2Q, i-20 20,

Figure 4-35 10 Pet. Err. Eroded

by

Figure 4-38 20 Pet. Err. Opened

by

PyramidSEofsize5 Pyramid SE ofsize5

600000C 600000C

-20, i-20

Figure 4-36 10 Pet. Err. Eroded

by

Figure 4-39 20 Pet. Err. Opened

by

PyramidSEofsize 7 Pyramid SE ofsize7

600000C 600000C

-2Q, i-20

Figure 4-37 20 Pet. Err. Opened

by

Figure 4-40 10 Pet. Err. Opened

by

PyramidSEofsize3 PyramidSEofsize3

(64)

600000C 600000C

i-20 i-20

Figure 4-41 10 Pet. Err. Opened

by

Figure 4-44 20 Pet. Err. Closed

by

Pyramid SEofsize5 PyramidSE ofsize5

600000C 600000C 1

c2cp7vl.

c2cp7v2. '

"Y^"

0

-2Q. i-20 .20,

Figure 4-42 10 Pet. Err. Opened

by

Figure 4-45 20 Pet. Err. Closed

by

PyramidSEofsize7 PyramidSEofsize7

600000C

-2Q, i-20

600000C

i-20

Figure 4-43 20 Pet. Err. Closed

by

Figure 4-46 10 Pet. Err.

Closed

by

PyramidSEofsize3 Pyramid SEofsize3

(65)

600000C 600000C 1 c2dd7vl. i c2dd7v2. 1 "" 0 1

i-20 -2Q, i-20 .20.

Figure 4-47 10 Pet. Err. Closed

by

Figure4-50 20Pet. Err.Dilated

by

Dome

PyramidSE ofsize5 SE ofsize7

600000C 1 -clcp7vl. clcp7v2. ' - - - -" 0 I

-2Q. i-20 20,

600000C 1 -clddSvl. i cldd5v2. 0

.-20, i-20 20,

Figure 4-48 10 Pet. Err. Closed

by

Figure 4-51 10Pet. Err.Dilated

by

Dome

PyramidSEofsize 7 SEofsize5

600000C

01

-20, i-20 JO,

600000C

cldd7vl

cldd7v2.r<r-*

i-20

Figure4-49 20Pet. Err. Dilated

by

Dome Figure4-52 10Pet. Err. Dilated

by

Dome

SEofsize5 SEofsize7

(66)

600000C

0 -L

600000C

0 _L

-2Q. i-20 JO, -20, i-20 20,

Figure 4-53 20Pet. Err. Eroded

by

Dome Figure 4-56 10 Pet. Err. Eroded

by

Dome

SE ofsize5 SE ofsize7

600000C ol -2Q, -L i-20 JO, 600000C 1 c2od5vl. l c2od5v2. i 0 1

.-20, i-20 JO,

Figure 4-54 20Pet. Err.Eroded

by

Dome Figure4-57 20 Pet. Err. Opened

by

Dome

SEofsize 7 SE ofsize5

600000C ol .-20, _L i-20 JO, 600000C 1 c2od7vl. l c2od7v2. l *

'"^^^^

= ="-;. 0 '

-2Q. i-20 JO,

Figure 4-55 10Pet. Err. Eroded

by

Dome Figure4-58 20Pet. Err.

Opened

by

Dome

SEofsize5 SEofsize7

(67)

600000C clodSvl. i clod5v2 Ol J-6000000 1 c2cd7vl. 1 c2cd7v2. i -' 0

fc-20. i-20 JO, .-20, i-20 JO,

Figure4-59 10Pet. Err. Opened

by

Dome Figure 4-62 20 Pet. Err. Closed

by

Dome

SE ofsize5 SEofsize7

600000C 1 clod7vl. l clod7v2. i

^>>>-.

^-^s^^^

0 1 600000C 1 clcd5vl. i clcd5v2. l <^^ _ _ _ -0 1

-2Q. i-20 JO, -2Q, i-20 JO,

Figure 4-60 10Pet. Err. Opened

by

Dome Figure 4-63 10 Pet. Err. Closed

by

Dome

SEofsize 7 SEofsize5

600000C 1

c2cd5vl. l

c2cd5v2. l

.... - - - "

0 1

600000C

clcd7vl.

clcd7v2.

-2Q, i-20 JO, i-20

Figure 4-61 20 Pet. Err. Closed

by

Dome Figure 4-64 10Pet. Err. Closed

by

Dome

SEofsize5 SEofsize7

(68)

600000C

Ol

-2Q, i-20 JO,

6000000 1

cldc7vl. 1

"

cldc7v2.

i

0 1

-20, i-20 JO,

Figure 4-65 20 Pet. Err. Dilated

by

Figure 4-68 10 Pet. Err. Dilated

by

Concave SEofsize5 Concave SEofsize7

600000C

0

-2Q, i-20 JO,

600000C

i-20

Figure 4-66 10 Pet. Err. Dilated

by

Figure 4-69 20 Pet. Err. Eroded

by

Concave SEofsize5 ConcaveSE ofsize5

600000C 1

-<r^

c2dc7vl. l

c2dc7v2. l

0 1.

-20, i-20 JO,

600000C

ol

-20,

J.

i-20 JO,

Figure 4-67 20 Pet. Err. Dilated

by

Figure 4-70 10 Pet. Err. Eroded

by

Concave SEofsize 7 Concave SEofsize5

(69)

600000C

"

c2ec7vl.

1

~ *T ~*~*-^^_ * ^""^^ c2ec7v2. 1 0

-20, i-20 JO,

600000C

i-20

Figure 4-71 20 Pet. Err. Eroded

by

Figure 4-74 10 Pet. Err. Opened

by

ConcaveSE ofsize7 ConcaveSE ofsize5

600000C 1 -clec7vl. l ~^Y~t.. -T^*"" clec7vZ l -0 i -2Q, i-20 600000C 1 c2oc7vl. i c2oc7v2. i

r~v~^r--^^

^=^_^_^ 0 1

JO, -2Q, i-20 JO,

Figure 4-72 10 Pet. Err. Eroded

by

Figure 4-75 20 Pet. Err. Opened

by

Concave SEofsize7 Concave SEofsize7

600000C

c2oc5vl. i

c2oc5v2.

Ol

-2Q, i-20 JO,

600000C 1 -cloc7vl. cloc7v2. l

:^>v^^^

0

-2Q. i-20 JO,

Figure 4-73 20 Pet. Err. Opened

by

Figure 4-76 10 Pet. Err.

Opened

by

Concave SEofsize5 Concave SEofsize7

(70)

600000C 600000C 1

-c2cc7vl. 1

c2cc7vZ

1

-^

0 1

-2Q, i-20 JO,

Fzgwre 4-77 20 Pet. Err. Closed

by

Figure 4-79 20 Pet. Err. Closed

by

ConcaveSE ofsize5 ConcaveSE ofsize7

600000C 1

clcc5vl. l

clcc5v2. l

^*

0 '

-2Q, i-20 JO,

60ooooq

clcc7vl

cloc7v2.

Ol

-2Q, i-20 JO,

Figure 4-78 10 Pet. Err. Closed

by

Figure 4-80 10 Pet. Err. Closed

by

Concave SEofsize5 Concave SE ofsize 7

(71)

4.2.

Girl Images

6000000

g2df3vl.

g2df3v2

r

-20,

I

i 20 20,

600000C

i-20

Figure 4-81 20 Pet. Err. Dilated

by

Flat Figure 4-84 10 Pet. Err. Dilated

by

Flat

SEofsize3 SE ofsize3

6000000 1

g2df5vl.

g2df5v2.

0 '

600000C

-2Q, i-20 JO, i-20

Figure 4-82 20 Pet. Err. Dilated

by

Flat Figure 4-85 10 Pet. Err. Dilated

by

Flat

SEofsize5 SEofsize5

600000C

-2Q, i-20

6000000 1

gldf7vl.

gldf7v2.

0

-2Q, i-20 JO,

Figure 4-83 20 Pet. Err. Dilated

by

Flat Figure 4-86 10 Pet. Err. Dilated

by

Flat

SEofsize 7 SEofsize7

(72)

600000C 600000C

i-20

Figure 4-87 20 Pet. Err. Eroded

by

Flat Figure 4-90 10 Pet. Err. Eroded

by

Flat

SEofsize3 SE ofsize3

600000C 600000C

i-20

Figure 4-88 20 Pet. Err. Eroded

by

Flat Figure 4-91 10 Pet. Err. Eroded

by

Flat

SEofsize5 SEofsize5

600000C 600000C 1

glef7vl.

glef7v2.

'

^">^.

^Y-^---.

0 1

-2Q. i-20 JO,

Figure 4-89 20 Pet. Err. Eroded

by

Flat Figure 4-92 10 Pet. Err. Eroded

by

Flat

SE ofsize 7 SEofsize7

(73)

600000C 600000C 1

-glof3vl.

glof3v2.

0 '

-20, i-20 JO,

Figure 4-93 20 Pet. Err. Opened

by

Flat Figure 4-96 10 Pet. Err. Opened

by

Flat

SEofsize3 SE ofsize3

600000C 1

-g2o5vl.

g2o5v2.

'^^v^^^

0

600000C

.-20, i-20 JO, i-20

Figure 4-94 20 Pet. Err. Opened

by

Flat Figure 4-97 10 Pet. Err. Opened

by

Flat

SEofsize5 SE ofsize5

6000000 1

g2of7vl.

g2of7v2.

""^v,^^

0 1

600000C

-2Q, i-20

Figure

Figure 4-11 10 Pet. Err. Eroded by Flat
Figure 5-9 Open Results 10 Percent Error
Figure 5-1810 Pet. Err. Closed by Flat SE
Figure 5-22 Coke Image Dilated by 7x7 Flat SE

References

Related documents

The purpose of this study was to automatically characterize dense calcium (DC) tissue in the gray scale intravascular ultrasound (IVUS) images using the image textural

In this paper, first of all, a novel gray scale image compression method (BTC-PF) based on block truncation coding (BTC) and vector quantization (VQ) and second

Almohammad [17] proposed the performance of both gray scale and color versions of a given cover image when they are used with a given steganography method, the

Abstract — In this paper, a novel Gray Scale image compression method (BTC algorithm using Pattern fitting) based on block truncation coding (BTC) and Vector

The proposed edge detection of images was designed by passing through five main steps: Image input taking in CPU, image conversion (gray scale) using the Sobel Algorithm

Figure 3.1 shows results of applying proposed method using a gray scale document image of a check; figure 3.1(a) shows original cover image, the result of applying Algorithm 3 to

Four Level Multiple Image Sharing Scheme Using Visual Cryptography for Colour and Gray Scale Images.. Rajeev Kumar Sao 1