0% found this document useful (0 votes)
126 views

Image Processing Detection Techniques

image processing detection techniques

Uploaded by

jubair
Copyright
© © All Rights Reserved
Available Formats
Download as PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
126 views

Image Processing Detection Techniques

image processing detection techniques

Uploaded by

jubair
Copyright
© © All Rights Reserved
Available Formats
Download as PDF, TXT or read online on Scribd
You are on page 1/ 207

UNIVERSITY OF SURREY

Department

THE DETECfION

of

Mechanical

Engineering

AND EV ALUA TION OF DEFECfS IN INDUSTRIAL IMAGES.


by

Thesis

submitted

Antony

Kehoe

B.Eng.

for the

degree

of Doctor

July

Copyright

A. Kehoe

1990

1990

of Philosophy.

To
the memory of my mother
Muriel

Ph.D.

A. Kehoe

1990

Kehoe

ii

Abstract

ABSTRACT
In recent

years

radiographic

analysis

industrial

NDT for the identification

porosity

and

foreign

Conventional
such

as

inclusions

radiographic

increased

fully

analysis.

very

inspection
image

processing

presented

of detecting

features

from

methods

of

computer

hardware.

inspection

image

types

defect.

skilled inspector.
inspection
defect

Ph.D.

fully

due to the

interpretation

by

initial

system.

capable

of a

3D defect

have been developed

which are

and

extracting

are

based

a series
on

conventional

classify

each defect type using the

of defects

that this approach

and reliable.

and.

and the inspection

have been combined

inspection

rules

implemented

of 20

to. firstly.

rules

be

stages

of on-line

techniques
may

development

speed

on evaluation

effective

the

of defects

a set of classification

shown

automatic

to

of high

based

have

made

capability

the

defect

20

been

inconsistent

giving

data

of off-line

and

problems,

and

defect

systems

several

parts.

processing

has also been developed

These

machined

costs,

have

to

techniques

These

system

both

presents

represents

several

each

and

from

of

such as cracks,

and

suffer

technique

techniques.

here

radiographic

major

cycle. This has been primarily

A set of image processing

capable

results

methods

attempts

radiographic

automated

castings

few

image

work

inspection

in

To date

the radiographic

The

found

the

of defects,

operational

automate

conventional

and evaluation

high

performance.
the

become

work-in-progress,

operator
difficulties

has

performing

into
operation.

secondly.

a single

to automated
on a level

An IKB

to evaluate

each

requirements.

to form a demonstration
from

specialized

radiographic
radiographic
comparable

system capable
image.

Initial

inspection
to that

is

of the

As a final part of the work. an automated system for 3D defect

is discussed.

along

with techniques

for image

processing

and IKB

ev al uation.

A. Kehoe

1990

iii

A cknow le dg eme nt

ACKNOWLEDGEMENT
I would like to give thanks to my supervisor,
provided

continued

advice

and encouragement
I would

support

assistance

and

Radiographic
work

throughout

of

the

Departments

could

practical

advice,

mathematical
of software

Mr. Mike Jeffery

support

of study.
to Royal Ordnance p.l.c. for their

particular
like

to

to

Dr.

thank

Ordnance

all

Chorley

and for test material,

Lee

for

his

members

of

the

P.R.

and Glascoed
without

sites,

which

the

who provided

problems

of the

invaluable

assistance

on

image

for their implementation.

for his help on matters

processing

system,

I would also like

of software

design

and

implementation.

Finally,

I would

Manufacturing

Ph.D.

I would

to Mr. Alain LeBlanc

complicated

to mention

them

in

at the Royal

and in the development

advice,

and

and has given

not have been undertaken.

I am grateful

hardware

my course

work,

encouragement.

hospitality,

the more

for the work,

also like to express my gratitude

financial

for their

and direction

Professor G.A. Parker, who has

like

Systems

to thank

the members

and Robotics

Research

and for generating


every

success

A. Kehoe

1990

a congenial

in their

individual

of the research
Group

environment

for their

team

in the

assistance

and

in which to work. I wish

endeavours.

iv

Contents

CONTENTS
Dedication

ii

Abstract

.iii

Acknowledgement.

iv

Contents

List of Figures

vii i

List of Tables

xiv

Nomenclature
1

IN1RODUCI10N
1.1

1.2

1.3
2

xv

Survey

2
of Radiographic

Image

1.1.1

Medical

Radiographic

1.l.2

Automated

1. 1.3

3D Medical Radiography

1.1.4

Industrial

1.1.5

Automated

1.1.6

3D

Intelligent

Diagnostic

Systems

6
7

Radiographic

Analysis

Radiographic

Inspection

Systems

.ll

Radiography

Knowledge

1.2.1

Automated

1.2.2

IKB Techniques

Outline

Analysis

Radiographic

Industrial

Analysis

Based

Radiographic

14
Systems

Inspection

for Inspection

15

Cycle

16

for Defect Evaluation

17

of Research

19

AUTOMATED RADIOORAPIllC SYSTEM FOR 2D DEFECf INSPECfION

22

2.1

Image Processing

23

2.2

Intelligent

2.3

Description

System Outline

Knowledge

Based

of Development

System

Outline

24

Equipment.

25

RADIOGRAPHIC IMAGE PROCESSING CONSIDERATIONS

.3 0

3.1

Radiographic

30

3.2

Radiographic

3.3

Accuracy

Ph.D.

Image

Formation

Image Capture

33

of Defect Representation

Images

Pixel

3.3.2

Analysis

3.3.3

Theoretical

Analysis

39

3.3.4

Experimental

Analysis

45

3.3.5

Conclusions

of Analysis

48

1990

of Defects

.3 5

3.3.1

A. Kehoe

Representation

in Digitized

of Image Capture

and Digitized

35
Parameters

38

Contents

IMAGE PROCESSING 1ECHNIQUES FOR 20 DEFECf INSPECfION

54

4.1

54

4.2

4.1.1

Noise

4.1.2

Contrast

4.1.3

Defect

for Defect
Reduction

Detection

Techniques

Enhancement
Detection

Techniques

for

Defect

Merging

4.2.2

Defect

Segmentation

4.2.3

Dimensional

Techniques

57

Techniques

64

Analysis

80

Defect

4.2.1

55

Techniques

81

Techniques

Analysis

Techniques

82
85

INTELLIGENT KNOWLEDGE BASED SYSTEM CONSIDERATIONS

92

5.1

Knowledge

93

5.2

Inference

5.3

Control

6.2

6.3

6.4

IKB

Representation
and

Uncertainty

95

Solution

Search

98

Mechanism
Structure

and

KNOWLEDGE BASED TECHNIQUES FOR 20 DEFECf INSPECfION .. l 02

INfELLIGENf
6.1

Techniques

Techniques

6.1.1

Frame

6.1.2

Meta-level

Defect

Based

6.2.2

Defect

Defect

6.3.2

Defect

Representation

System

114

Classification

Grouping

System

6.4.2

Evaluation

128
129
132

Grouping

Evaluation

Inspection

115
117

Zoning

6.4.1

103
l11

Classification
and

103

Structure

Feature

Zoning

6.3.1

Inspection

Knowledge

Classification

Component

Defect

Defect

Task

6.2.1

Defect

for

System

134

Requirements

.134

Rules

136

DEMONSTRATOR SYSTEM FOR 20 DEFECf INSPECfION

143

7.1

Description

143

7.2

Outline

7.3

Experimental

7.4

Ph.D.

of

Equipment

of System

Design

Results

7.3.1

Results

of

Conventional

7.3.2

Results

of

Automated

Conclusions

A. Kehoe

1990

144

of

Results

148
Inspection
Inspection

.150
151
152

vi

Contents

CONCLUSIONS

156

8.1

Image

Processing

Techniques

8.2

Intelligent

Knowledge

8.3

Automated

Radiographic

8.4

Future

157

Based Techniques
Inspection

159

System

Work

162
164

8.4.1

Image

Processing

Techniques

8.4.2

Intelligent

Knowledge

8.4.3

Automated

Radiographic

.164

Based Techniques
Inspection

System

165
167

Bibliography

168

A Automated System for 3D Defect Detection

176

A.l

3D Defect Analysis by Pixel Blocks


A.1.1

A.2

3D Defect Analysis by Intensity

A.2.2

Defect Zoning and Grouping System

184

A.2.3

Defect

184

Future

Experimental
Results

A. Kehoe

Evaluation
System

System

.183

Defect

A.4

Classification

176

A.2.l

Proposed

Ph.D.

Distribution

IKB System for 3D Defect Detection

A.3

B.l

176

183

System

Design

.185

Work
Results
Tables

1990

186
of Radiographic

Inspection

.189
189

vii

List of Figures

LIST OF FIGURES
Fig. 2.1

Automated

2D defect inspection

Fig. 2.2

Development

system hardware

26

Fig. 2.3

Development

system software

27

Fig. 3.1

Radiographic

Fig. 3.2

(a) Radiographic
its horizontal

image

24

formation

31

image of a cavity type defect. along with (b)

intensity

crack type defect.

system

profile.

(c) Radiographic

and (d) horizontal

Fig. 3.4

Real-time

Fig. 3.5

(a) Circular test defect (b) Digitized test defect.

Fig. 3.6

(a) Test defect aligned with pixel edge (b) Test defect aligned
with junction
Histogram

image

capture

.32

Conventional

radiographic

image

profile

Fig. 3.3

Fig. 3.7

radiographic

intensity

image of a

capture

system

33

system

.34
36

of pixels

37

plot of intensity

values for the circular

test defect.

along column C of image


Fig. 3.8

Fig. 3.9

37

Binary image of circular

test defect at threshold

values.(a)

25%Tl

, (b) 50%TI and (c) 75%TI.

38

(a) Square test defect (b) Digitized test defect

.40

Fig. 3.10 Maximum

error Ea for intensity values 5%, 50%. 95%TI. against

the maximum

values

corresponding

normalized

Fig. 3.11 Maximum

of pixel

circular

defect

Dd,

areas

for the
Da

.40

error Ea for intensity values 5%. 50%. 95%TI. against

the maximum

values

corresponding

normalized

Fig. 3.12 Maximum

representation

of pixel

representation

Dd,

for the

square defect area Da

error Ea for normalized circular defect area

.41
Da 491[, 611[

and 8Ix pixels over a full range of intensity values 5% to 95%TI.. ...... .42

Ph.D.

A. Kehoe

1990

vii i

List of Figures

Fig. 3.13 Maximum

error Ea against

circular defect areas

maximum

values

Dd , for normalized

Da 91t to 1691t pixels, over intensity

values

40 - SO%Tl.
Fig. 3.14 Maximum

43

error Ea against maximum

square defect sizes

values of Dd, for normalized

Da 91t to 2487t pixels, over intensity

values

40 - SO%Tl.
Fig. 3.1S Maximum
maximum

43

error

Ea for intensity

values

of pixel

range of normalized
Fig. 3.16 Optical

calibration

photographic
Fig. 3.17 Maximum

negatives

of test

against the

Dd, corresponding

and square

grid, precision

defect

test shapes,

to a

area

44

and

defects

error E'a for intensity

32

values 20%, SO%, 80%TI, against

of pixel representation

to a range of normalized

ranging

representation

circular

the maximum values

Fig. 3.18 Maximum

value 48.3%TI,

Dd, corresponding

circular defect area Da

error E'a for normalized

circular defect area

.46
Da

from 191t to 2041t pixels over a full range of intensity

values 20% to 80%Tl.


Fig. 3.19 Maximum

47

error E'a for intensity values 40% to SO%TI, for values

of Dd from 4 to 90 pixels, corresponding

to normalized

square

defect areas
Fig. 3.20 Maximum

48
error

E'a for intensity values in the region 40% to

SO%TI for Dd from S to 88 pixels, corresponding to a range of


normalized
Fig. 3.21 Maximum
intensity

circular
error

defect

49

Ea and E'a for circular

values

48.3%

of pixel representation

and 48%TI,

and square defects at

against

Overall

detection

Fig. 4.2

Mean filter mask k(3,3) with unity weighting

Fig. 4.3

(a) Radiographic

Ph.D. A. Kehoe

1990

operation

image of defect

(c) Noise reduced

(d) the horizontal

corresponding

values

of defect area Dd

Fig. 4.1

profile.

defect

areas

SO

by image processing
values

and (b) its horizontal

image by Image Integration,

intensity profile

methods ....... S S
S7
intensity
and
S8

ix

List of Figures
Fig. 4.4

Typical

intensity

Fig. 4.5

(a) Noise reduced image of defect and (b) its horizontal


profile. (c)

distribution

(J -Norm

horizontal

for pixels

enhancement

intensity

profile.

in a window sfrn.n)
intensity

of defect image. and (d) the

58

Fig. 4.6

C-of-G contrast

Fig. 4.7

Alternative

Fig. 4.8

(a) Noise reduced image of defect and (b) its horizontal


profile.

C-of-G contrast

mask k(5.5)
enhancement

(c) C-of-G enhancement

horizontal
Fig. 4.9

enhancement

intensity

60

63
mask k(3.3)

and k(7.7) ...... 63


intensity

of defect image. and (d) the

profile

71

(a) Edge image of defect produced by lst. order gradient


operator.

(b) 2nd. order gradient

operator

operator.

(c) Mean Gradient

and (d) binary edge image of defect.

71

Fig. 4.10 Pixel window s(3.3). with reference pixel 0 and outer
pixels M and N at distance I.

67

Fig. 4.11 Kernel values

of gradient

intensity

masks x(5.5) y(5.5)

69

Fig. 4.12 Kernel

of gradient

intensity

masks x(3.3) y(3.3)

70

values

Fig. 4.13 Two pairs of mean intensity gradient masks. x j (5,5),


Yl(5.5) and x2(5.5). y2(5.5)
Fig. 4.14 (a) Contrast

enhanced

72

image of a cavity defect and (b) intensity

data for a single row. (c) Mathematical


row. and (d) resultant

binary

approximation

of single

image of the field flattening

technique
Fig. 4.15 Intensity

79
distribution

for a large population

of pixels

in a window stm.n)
Fig. 4.16 Mean

intensity

gradient

Fig. 4.17 (a) and (c) Contrast


defects.
produced
Fig. 4.18 Overall

Ph.D. A. Kehoe

75
masks

enhanced

(b) and (d) resultant


by
defect

1990

adaptive
detection

for adaptive

threshold

function ........ 77

image of porosity and cavity type


binary

threshold
operation

representation

of defects

technique
by image

79
processing

methods ....... 80

List 0/ Figures
Fig. 4.19 Formation

of merged

pixel

regions

from the closing

technique

S2

Fig. 4.20 (a) and (c) Binary image of cavity and crack type defects, (b) and
(d) resultant

merged

defect

regions

produced

by the closing

technique

S4

Fig. 4.21 Resultant

defect

images

after the blob colouring

cavity. (b) crack. (c) porosity.

technique.

(a)

and (d) crack type defects

S4

Fig. 5.1

Design of the IKB system for 20 defect inspection

Fig. 6.1

Operation of the IKB system for 20 defect inspection

102

Fig. 6.2

Taxonomies

104

Fig. 6.3

The frame representation

Fig. 6.4

Component

of the static knowledge base

features

Fig. 6.5 The hierarchical


Fig. 6.6

and child

frames

Inspection

zones,

of the general

taxonomy

frame

Frames of the defects

Fig. 6.7

Inspection

Fig. 6.9

Instances

of the component

inspection

and

component

base

l0S

defect inspection

system
type frame

of a defect instance
for the 20

111
defect
112

pattern
features

classification

1990

l09

110

task structure

tasks for the 20

Fig. 6.14 The hierarchical

106

Inspection

operation

meta-level

.105

107

system

Fig. 6.13 Rule group,

A. Kehoe

taxonomy

frame and the porosity

task for the creation

Fig. 6.12 Meta-level

Ph.D.

base

root frame defects

requirements

base for the 20

the classification

of a component...l 04

and inclusions

of the static knowledge

knowledge

Fig. 6.11 The hierarchical

including

porosity

Dynamic

Fig. 6.10 Meta-level

of the defects

taxonomy,

Fig. 6.S

concept

of the static knowledge

structure

cracks,

results taxonomies

after

92

frame

and classification

classification

structure

system

defect inspection

system
rule for the

system

of the meta-level

113

.116
tasks

for the
117

xi

List of Figures
Fig. 6.15 Frames of the p_defects taxonomy for use in the defect
classification

system

119

Fig. 6.16 Defect classification


p_defects

taxonomy.

Fig. 6.17 Meta-task

structure

classification
Fig. 6.18 Defect

attributes

and

and known

rules
for

knowledge

containing

base

123

confidence
factor

factors

grouping

of the meta-level

defect

tasks

for the

system

.129

zones taxonomy

for use in the zoning

system

l30

and groups of zoning rules for the zoning and


system

13 1

Fig. 6.24 Rule groups and individual

rules for the grouping

of defects

within the component.


Fig. 6.25 Instances

132

of defect group and defect

grouping
Fig. 6.26 Frames

following

the zoning and

operation

133

of the inspection

defect evaluation

component.

requirements

taxonomy

135

evaluation

rules for zoneA of the

used in the defect evaluation

Fig. 6.28 The hierarchical

used in the

system

Fig. 6.27 Group and individual

evaluation

124

126

in the inspection

grouping

facts about defect

the confidence

structure

grouping

.120

defect

system

and

Fig. 6.23 Individual

factor

system

122

groups.

mechanism

Fig. 6.21 The hierarchical

Fig. 6.22 Frames

of the confidence

classification

classification

zoning

for use in the defect classification

added to the current

Fig. 6.20 Inference

of frames in the

system

hypothesis

Fig. 6.19 Defect

rules. based on the patterns

structure

system

of the meta-level

tasks

system

138
for the
139

Fig. 6.29 Meta-level

tasks in the defect evaluation

system

.140

Fig. 6.30 Meta-level

tasks in the defect evaluation

system

141

Ph.D.

A. Kehoe

1990

xii

List of Figures
Fig. 7.1

Operation
defect

Fig. 7.2

of the demonstration

Techniques

Graphical

Fig. A.l

145

of the image processing


system

and selection

representation

and quality
the

20

inspection

demonstration
Fig. 7.3

system for automated

of

assurance

conventional

of values

radiographic

requirements

inspection

(a) Pixel representation

the

system for the


for parameters
component

image

of radiographic

process

149

of defect area in the digital

image

at 00 and (b) at 900 of rotation of the component.

captured

Fig. A.2 3D pixel block representation


enclosing

the whole

Fig. A.3 (a) Equivalent

179

defect

region at 00 and (b) at 900

rotation of the component


Fig. A.4 3D pixel

frame

Fig. A.5 Overlapping

179

enclosing

defect

regions

the equivalent

rectangular

at 00 rotation

of the component.

and (b) separation of defects at 300 rotation

defect.

defect position

and

rotation of the component.


Fig. A.7 Design of the proposed

Ph.D. A. Kehoe

1990

automated

180

of the component. ........ 181

at 00 rotation of the component.


(b) the defect" position along its positional path at 1100

Fig. A.6 Original

178

of a defect. with a pixel frame

defect.

rectangular

146

182
3D defect inspection

system

185

xiii

List of Tables

LIST OF TABLES
Table 4.1 (a)

Dimensional

analysis

output

for cavity

defects

in

Fig. 4.21(a)
Table

4.1 (b)

89

Dimensional

analysis

output

for crack defects

in

Fig. 4.21(b)
Table 4.1(c)

Dimensional

90
analysis

output

for porosity

defects

in

Fig. 4.21(c)
Table 4.1(d)

Dimensional

90
analysis

output

for crack defects

in

Fig. 4.21(d)
Table 7.1

Table B.l

Table B.2

Table B.3

Table B.4

Table B.5

Table B.6

Table B.7

Table B.8

Ph.D.

A. Kehoe

90

Summary

of both conventional

inspection

results

component

images

Inspection

results

inspection

for component

Inspection

results

inspection

for component

Inspection

results

inspection

for component

Inspection

results

inspection

for component

Inspection

results

inspection

for component

Inspection

results

inspection

for component

Inspection

results

inspection

for component

Inspection

results

inspection

for component

1990

for overall

and automated
acceptability

of all test
150

for

conventional
image

for

and

190
automated

and

191
automated

and

191
automated

R879H

for conventional
image

automated

R878H

for conventional
image

and

190

R877H

for conventional
image

automated

R876H

conventional
image

and

190

R875H

for conventional
image

automated

R874H

for conventional
image

and

and

191
automated

R880H

for conventional

and

image R88IH

192
automated
192

xiv

Nomenclature

NOMENCLATURE
D

photographic

10

incident

It

transmitted

Pa

area

Ad

actual

defect

Dr

radius

of circular

Da

Ad/Pa

normalized

Dd
Dd(x,y)

pixel representation
position of a defect

ri

percentage

integer

Ea

max.

E'a

experimental

X(rn,n)

area

of a single

pixel

Xo

area

of a single

defect

a set of integer values (- 00

p(x,

y)

density

light

light

error

area

test

error

pixel

of defect
rep.

area

of defect

(pixels).

area

(pixels).

image.

<

rn, n

image.

00).

intensity

mean

difference

p(x,

for

qn

intensity

threshold

k(m,n)

pixel

convolution

s(m ,n)

pixel

window

reference

Q\

a location

Q\

vector

QC

location

QC

vector

of

a population
values

image

(pixels).

value

x cols=n

a pixel

in a pixel

window.

of a location

of the centre
of the

a population
in

(percentage

of

the

of pixels.

intensity
image

of pixels.

histogram.
(pixels).

value: 0 to 100%).
x colsen

(pixels).

(pixels).

window.

in a pixel

of gravity
centre

a population

in a digital

of rows=m

of rowsem

of pixels.
for

for

pixels

of pixels

mask

location

digital

(digital value: 0 to 255).

of intensity

distribution
population

(pixels).

y).

value

of intensity

intensity

in the

image

(digital value: 0 to 255).

value

deviation

y=cols}.

in the digital

intensity

mean

(xerows,

of pixels

value

pixel

position

(T'l}.

in the digital

<

image

of a pixel

intensity

Ph.D. A. Kehoe 1990

value

(%Tl).

in' the digital

row/col

position

value

of pixel

of pixels

value

frequency

(pixels).

(rows x cols pixels).

row/col

standard

area

representation

in the digital

modified

defect

threshold

a pixel

intensity

(m rn 2) .

Ad (rn rn).

threshold

image

f(x)

image

of defect area (pixels).


in the digital image (m rn ) .

digital

approximated

radiographic

defect

actual

max

image (mrn2/pixel).

in digital

in the

of pixel

I'(x)

-i

of pixels

intensity

single

intensity.

intensity

I(x)

intensity.

resolution

pixel

constant.

window.

in a pixel

of gravity

window.

pixel

window.

xv

Nomenclature
G

intensity

mean

g-

vector

-V

orthogonal

Ar

area

Pr

perimeter

Er

elongation

Sr

density

Td

total

number

of defects

TDd

total

defects

areas

Vd

intensity

xe, Yd

Ist. moments

XXd. YYd

2nd.

Cxd. Cyd

centroid

position

principal

length

Wd

principal

width

NLd

normalized

principal

length

NWd

normalized

principal

width

Ld

PXd. PY d

gradient

intensity
of

between
gradient

pixel

of merged

merged

volume

window.

window.

intensity

gradient.

(pixels).

defect

region

defect

defect

(p i xe Is) .

region.

region.
in the digital

image.

(pixels).
of

defect

of defect

area.

area.

of defect

area.

of defect
of defect
of defect

vector

a pixel

gradient.

region

merged

in

a pixel

pixel

merged

moments

principal

of
defect

of
of

of

intensity

vector

of

pixels

of

area

(pixels).

area

(pixels).

area

(pixels).

of
of

defect

defect

area.

defect

area.

area.

ad

orientation

CLx

calibration

factor

for a pixel

row ( mm/pixel).

CLy

calibration

factor

for a pixel

column

CLxy

calibration

factor

for pixel

area

CLz

calibration

factor

for pixel

intensity

Hdmax

maximum

height

of defect

area

Wdmax

maximum

width

of defect

area

(pixels).

Ldmax

maximum

depth

of defect

area

(pixels) .

Wdrec

equivalent

rectangular

width

of

defect

area

(pixels) .

Ldrec

equivalent

rectangular

depth

of

defect

area

(pixels) .

hypothesis

of

CFh

confidence

factor

for

an hypothesis

CFr

confidence

factor

for

the

CFc

confidence

factor

for the

Ph.D. A. Kehoe 1990

of

the

principal

a rule

with

vector

of

defect

area.

( mm/pixel).

( mm2/pixel).
( mm/greylevel).

(pixels).

confidence
conclusion
condition

factors.
of
of

a rule.
the

rule

of a rule.

x vi

CHAPTER 1
INTRODUCTION

Ph.D.

A. Kehoe

1989

Chapter

Introduction

IN1RODUCTION

There

are few manufacturing

controlled

that

the

resultant

product

quality

assurance

industry

some form of testing

fully completed
carry

requirements.
components.

out destructive

purpose,

without

components,
cases

the

Across

be guarantied
a

broad

or inspection

an

of components,
costs.

(NDT)

of the

spectrum

of

On

is

is

the

on partly or

to ensure
large,

fitness
or

which

is

without

inferring

to
for

complex

impracticable.

required

component

exactly

it is reasonable

more

cycle

or strictly

manufacturing

has to be performed

inspection

testing

to meet

simple components

increased

such

condition

can

on a sample

incurring

non-destructive

that are so well defined,

With small,

testing

however,

determining

processes

In

these

capable

of

any long

term

damage.
There

are

essentially,
eddy

four

a defect

current

Penetrant

inspection,

defects

internal

very

inspection

cracks,

porosity,

machined

parts

over ultrasonic
adaptability
The

Ph.D.

for

radiographic
the

detection

technique

inspection

small

(Kodak,

and

1981).
such

which

crack

inspection.

used

to enhance

is used to detect

components.

has become

foreign

inclusions

Radiographic

analysis

definition

is,

detection,

ultrasonic

and evaluation

as high

of

small

Radiographic

and

which can be used to detect

analysis

identification

cavitation
inspection,

both

sizes.
the major technique
of defects,

found

in

offers

many

of inspection

such

castings

as
and

advantages

data,

and an

to a wide variety of components.

vast

conventional

are penetrant

defects on a wide range of component

In the past 40 years


NDT

walled,

each

and

are the only techniques

and external

of industrial

crack

NDT,

analysis,

Eddy current

thin

of

These

radiographic

process.

in

methods

technique.

is a surface

inspection

ultrasonic

established

detection

inspection

the visual
internal

well

majority
radiographic

A. Kehoe

1990

of

radiographic
equipment,

inspection

consisting

of

is
an

performed
X-ray

source

using
and
2

Chapter
photographic
inspector

film,

and

examines

and evaluates
Gevaert,

found

radiographic

These

interpretation

of defects

are

two

Firstly,

become

a critical

only

(Agfa-

improving

off-line

evaluation

cycle,

operational

costs

(Halmshaw,

1982).

the

image

formation

and

many

problems

resultant
to

features,

the

large

of image detail.

human

systematic

Such factors

content

very

difficult

to

improve

the

radiographic

(TV) and image

therefore,

and

make

detection

systems

camera

monitors

the radiographic

image

of

component

1977).

used

screens

on-line

en han c e men t
radiographic

A. Kehoe

such

for detecting

1990

relative

has

proving

speed

and

inspection

systems

- television

camera

images

and

include
as

defects,

to X-ray

such

to carry

(Mullenberg,
capture

detection

analyse
those

the
for

image

radiographic

radiation.

out

the

1984).

control

A TV

and produces
systems

system

the related

reducing

capture

on the screens

inspector

of defect

enhance

techniques

image,

and techniques

systems

evaluation:

image

consistency

intensifier

sensitive

image

under
human

image

of film costs and improved

to

inspection

have begun to be applied to the inspection

cycle time and eliminating

To improve
being

the

an

with

all

quality

components,

radiographic

intensifier

of fluorescent

elimination

inspection

Image

radiographic

of

that

greater

radiographic

integrity

that

such difficulties

by means

benefits

structural

dictate

have

of many

inspection

into the Cl M concept.

images

real-time

Secondly,

essential

(Roberts,

to enable

market

productive,

costs.

process

employed

more

the

processing

the

competitive

in the manufacture

to ensure

is,

It

become

operation

In order to overcome

Ph.D.

developed,

image

of

operational

become fully integrated

are

standards

1982), it does suffer from

component

incentives

demands

reduced

method

reliabili ty.

speeds,

skilled

lengthy

and poor resolution

processes

and

the

well

in the component

assurance

been

presents

overlapping

main

the

control

viewing

of image

of radiographic

manufacturing

the

process.

inconsistent.

There
cycle.

has

high

image

include

in contrast

a set of quality

include

nature

fluctuations
the

These

due to the

inspector.

inspection

and cycle time (Nichols,


and

the

visual

technique

work-in-progress

Additionally,
quality,

this

process

drawbacks.

increased

against

Although

both the inspection


several

subsequent

the film images for any signs of defects

those

1986).

Introduction

as

are

a video
currently

inspection

Kercher

points

increased
of image,

cycle
out

operational
reducing

the

film costs (1986).


image

processing

radiographic

image.

improving

the

noise

increasing

such as locating

and
edges

techniques
I m age

quality

of

the

contrast,

or regions

within

Chapter
the

component

those

(Skramsted,

for segmenting

analysis

on

the

inspector
To

inspection

carry out his evaluation

task (Ting,

very

few

inspection

cycle.

image

processing

presents

a certain

amount

also
a

Conventional

image

two reasons.

Firstly.

with a strictly
image

Brown.

of

able

of

any

techniques
designed

made

to

primarily

recognition.
automated

the
in

to

processing

the

conventional
Boerner

and

inspection

has so

is able

to deal

the

inspector

image.

Using

use

his

whether

any defects

powers

of

on

quality

based
methods

of

such

to

The
the

requirements.

of these

capabilities

for

of tasks

any uncertainties

techniques

are

incapable

of

data

(Ballard

evaluation

of

evaluate

to carry out a set routine

procedural

intelligent

assessment

assurance

fall far short

subjective

are present.

reasoning

goal and are unable to accommodate

Secondly,

both

he is able to make a reasonable

they are programmed

kind

skilled

image

to produce

an automated

radiographic

inspection

new approach

is needed.

level

reasoning
solution.

processing
of defect

It is envisaged

of image
data,

for

A series of conventional

efficiently

detect

combined

with

Ph.D.

the

automate
by

on a level equal to that of a skilled inspector

against

assist

due to the difficulties

of performing

series

been

in
of
and

1982).

In order

low

have

to

fully

interpretation

pattern

cycle

ambiguity

component

define

data.

performing

as

dimensional

1980).

been

of the image and determine

acceptability

the

inspection

and past experience


is

systems

automatic

such

Such

include

(1988).

In the conventional

inspector

1983).

has been
to

techniques

and performing

that for this reason no successful

far been achieved

the contents

have

This

techniques.

suggest

judgement

(Strecker.

attempts

analysis

the image

radiographic

radiographic

with

from

in

used

radiographic

Strecker

the defects

Image

regions

date

image

1980).

defect

successfully

the

image

Introduction

of rules

and analyse
an intelligent
defined

the quality

A. Kehoe

1990

defect

for defect

detection,

evaluation,

could

it is clear that a

based

inspectors.

of the inspection

(IKB)

to interpret

and high

provide

techniques

in the radiographic

know/edge

capable

that a system which incorporates

image processing

defects

by expert

assurance

data,

system

both
level

a promising

may be used to

image. These may be


system,

which

and evaluate

uses

defects

process.

Chapter

1.1

Introduction

SURVEY OF RADIOGRAPmC ANALYSIS

1.1.1

Medical Radiographic

The

drawbacks

industrial

and

image

of conventional

medical

angiography
inaccurate

applications.

(Barrett.

examinations

Medical

concentrated

year.

from

on

the

of heart

which.

are common

diagnostic

suffer

cycle.

made each

diagnosis

analysis
greatly

1981). These problems

diagnostic

diagnosis

radiographic

and mammography.

quality

medical

Analysis

techniques.

from

often result

along

with

development

images.
of

and lung related

The

image

diseases

processing

as

radiographic

vast

number

interest

bulk

in chest

poor

such

in a very slow and

the

has led to a significant

radiographic

to both

of

of

in automated
this

work

has

for

the

(Turner

and

techniques

radiographs

others. 1976; Fu and others. 1976).

Radiographic
Conventional
by X-ray

Image Capture

photographic

fluoroscopy.

real-time

(Pfeiler,

film

which

was

first

was used

1969). These devices

replaced

to observe

reduced

in medical
anatomical

diagnostics

movements

some of the film related

in

costs

of the process but produced a poor quality image. These were later replaced by
X-ray

image

intensifiers

systems

were used in conjunction


facilities
image

produced
capture

(Balter

techniques
(Conners

and others.

Image Processing
Chest

radiographs

diagnostic

evaluation.

radiograph

exhibits

and Kuhl,
diagnostic

Due

image

intensity

and poor

Ph.D.

A. Kehoe

1990

image

to provide

quality

on-line

1980). The development


costs

systems

of electronic

and

viewing
of digital

equipment

has

being used with these image

1982).

of Medical Images

present
many

acceptable

systems

and the falling

a series of automatic
devices

gave

with TV camera

for radiologists
processing

which

many
to

problems

the

nature

overlapping
image

contrast.

to
of

body
This

the
image

features.
makes

radiographer

performing

formation
large

the

variations

interpretation

chest
in

of image
5

Chapter
content

very

Many

difficult

image

and diagnosis

processing

inconsistent.

techniques

contrast

for

processing

techniques

for use on radiographic

from

image

adapted

texts

Pratt

and

and Hall

content

transformation

dependant

processes

based on its intensity


The

boundaries
detection

by

Fu,

1978;

techniques

much

Hough
local

edge

1.1.2

1976;

DeSouza,

processes

automated

the

much

are

in the

Sklansky

Several

of

A pattern

edges

are

be

Diagnostic

of
carried

detection

and

the

an automated

in chest radiographs
process

1990

for

chest

out.

(Wechsler
these

and

processing

detector

is used to
the value

to its intensity

value and

technique,

composite

such

as a

curves to the
curves,

lung

Systems
radiograph

This

analysis

heart or lung related

describes

boundary

polygons.

features

may

with

successful

techniques;

matching

estimated

that

area within the image.

convolution

according

for

such

states

and lung

A local edge

and

radiograph,

attention

in a specified

image is modified
neighbours.

chest

necessary

1983).

gradients

Radiographic

automatic

Ph.D. A. Kehoe

received

based on mask

rib

important

recognition

techniques

the poor contrast

rib detection

similar concepts.

approximate

may indicate

Ballard

These

is then used to match segments of predefined

diagnosis

involves

tumours

immediate
pixels;

the

automatic

Sklansky,

Automated

Once

which

reason

have

with

histogram

problem:

information

processing

transform,

boundaries

the

with high intensity

of its

independent

intensity

in the

image processing

of

For this

of a pixel in the digital


those

the

equalization,

specification.

of features

image

These are area

content

in

histogram
as

to improve

of which

in the digital image is modified by a point transform

are based around

find pixels

many

image

described

image

such

several

(1983);

and intensity

are used

and detection

contain
(1976).

describe

techniques

include

histogram

is an important

diagnosis

others

have been

value only.

enhancement

as boundaries,

These

enhancement

images

techniques,

which

image; the value of a pixel

and

processing

stretching

and intensity

point

Cocklin

(1979).

such as contrast

image

simple

established

(1975)

techniques,

radiographs.

for

developed
are

chest

1 'Introduction

stage

have
of

of artifacts

been

located

image

processing

in the

radiograph

diseases.

diagnostic

system

(1976).

The system

tumour

detection

for the detection

is based
and

of lung

on a hierarchical

classification:

various

Chapter 1
structurally

based

statistically
using

based

similar

transform

technique
regions

regions.

Dynamic
suspect

nodules

of

then

low

used

intensity;

Each

processes

tumour

boundary

region

region

to

correspond

to

these

the

candidate

into

dimensional

and statistical

Hough

highlight

small
tumour

the boundaries

based

of

classified

into

non-tumours.

information

analysis

specified

are

or

with

determined

suspected

tumours

tumours

along
is

A gradient

lung

these

further

use

the

used

is then used to generate

of

and

lung

above.

in

are

The

described

programming

ghosts,

classification
candidate

is

techniques

techniques.

to those

tumours.

or

processing

classification

methods

circular
these

image

Introduction

taken

Both

from

on predefined

each
models

of tumours.
Savol

and others

and evaluation
which

through

lung region

(1980).

radiograph,

which

with

an automatic

of the early

is apparent

finding

describe

stages
the

used

firstly

to

intensity

neighbours.

values

These

less

than

pixels

are

flexible

known as the isolation


it is classified

according

intensity

The final

evaluation
rounded

value.
opacities

1.1.3

region
integral.

in chest

object

in the

in the chest

The

process

of

that

of its eight

immediate

from which an object

is

Pixels are added

to maximize

a figure

of merit

Once each rounded object is detected


properties;

area, perimeter

of the automated

diagnostic

to a set of predefined

and mean

system

categories

is the

for small

radiographs.

3D Medical Radiography

for diagnostic

analysis:

projection

become

the

and obscured.

diagnosis.

dosage.

Much

work

analysis

in medical

anatomy
Often

image

represents

in which

many

the

radiologist

This may place the patient


has

been

diagnostics

done

on three

to overcome

in a new discipline known as computer


Scudder,

film image of the patient is inadequate

radiographic

of a complex

confused

for accurate

Ph.D.

region.

growing technique.

to its structural
operation

opacities

which

pixels in the lung region

pixels

in order

In many cases a single radiographic


(20)

to that

as seed

manner

of each classified

lung

starts by locating

used

contrast

rounded

the lung boundary

the

or equal

allowed to grow using an adaptive


in a geometrically

locates

for the detection

a lung disease

of small

determine

the small rounded opacities

system

of pneumoconiosis:

appearance

The system
is

diagnosis

aided

a two
organs

requires

and structures
several

images

at risk from high radiation

dimensional

these

dimensional

problems;

tomography

(3D)

radiographic

this has resulted

(CAT) (Barrett,

1981;

1978).

A. Kehoe

1990

Chapter
Computer

tomography

uses

to capture

several

body scanner,
body.

Image

processing

a special

imaging

radiographic

techniques

device,

projections

reconstruct

Introduction

sometimes

called

of a thin slice of the

these

projections

into

an

image of the 2D structure of the slice. By taking several slices of the body a 3D
computer
model

model of the body can be built up (Rosenfeld

may

reveal

be modified
the

designed
their

information

to operate

high costs
manual

diagnostic

systems,

1.1.4

have

and

date,
been

castings

however

improve

processing

main

food

as

techniques

of welded

which

is

boundary
joint;
and

film
used
a set

straightness
penetration

inspector

to

as automatic

In all

(1983).

in

of seven
of weld
of bead.

These
against

algorithm
1990

has

with

rotating

boards,
the

and

desire

to

in the use of
a

few

cases,

concentrated

several

and Yoshida

the

inspection

of

These

are based

upon

boundary

are measured

attributes

found

1988).

work

defects

line, uniformity

in

in

Images

Koshimizu

attributes

also
in

areas

and,

1982; Chin,

weld

has

interest

analysis

of defects

and circuit

application

processing

the

radiographic

measurement

analyse

for

determine

for comparison

A. Kehoe

in use,

developments

radiography

components

enhance,

systems.

image

A segmentation
Ph.D.

used

are

Due to

flexible

detection

to

and weld

techniques

the

a growing

image

joints

inspection

processing

radiographic

be

has produced

image (Chin,

of

and

clearance

electronic

products.

process

interest

semi-automated
image

will

recently

Ima&e Processin& of Industrial

inspection

but very

of industrial

joints,

such

of small

the radiographic

The

radiographer.

to

Analysis

More

areas

of packaged

interpret

systems

applications

parts.

other

the inspection

image

the

CAT systems

this will have to wait for further

of welded

machined

inspection

inspection

with

dependant,

CAT

Radiographic

inspection

in

machinery,

manner

Current

techniques

equipment.

the

applications

computing

for diagnosis.

Future

the two principal

and

by further

are not application

operation.

Industrial

To

necessary

in an interactive

they

requiring
techniques

and manipulated

and Kak, 1982). This

are

then

a set of predefined
for weld defect

describe

the

bead

from

edge

describe

at

to

detector

From
the

thickness,

standards

the

a series of

image.

presented

detection

made

joints

a local

which

of weld

attempts

welded

in

on

the

welded

roughness
the

human

for the weld.

is described

by Rose
8

Chapter 1
and

others

which

models

the

background

of the

Introduction

radiographic

image

in

an

attempt to remove the structure of the welded seam from the image (1988). This
type

of approach

simple

gives

gradient

cycle

based

a further

a much
edge

technique

more

detection

comparison
Although

presenting

techniques

do

radiographic

images.

processing
the

provide

requirements

each

the features

approach

cases

for defect

of

complete

within

to

the

purpose

directly

applicable,

detection

inspection

and

it is, however.

The application
such
and

as cracks.

application.

machined

techniques
images

parts

for

have

the

enhancement

been

developed.

scope

and application.

made

to implement

such

Early

enhancement

out

point

processes,

image

his

including

(Elgart

contrast

to improve

the

Such

computation
Recently

(Hall.

and frame

image

1980).

of

task.

which

1979).

were

stretching

and

contrast

on area processes.

Ph.D.

A. Kehoe

1990

not

of attempts

of defects,

found

in castings

A small

been

automated

in

number

of

radiographic

restricted

in

their

have previously

been

inspection

used

to assist

techniques

taken

intensity
chosen

methods

These

were

1980).

were also simple

based

Whilst

and methodology

defects

however.

from

reduction

between

were

sophisticated

in welds, or to

systems.

these

were

the

inspector

based

developments

techniques,

to

on simple
in

medical

including

i m age

were used to reduce the noise content of the

Richman,

and they

of

These

Noise

averaging.

techniques

more

techniques

and

poor

be

section.

detection

many

processing

integration
video

defect

inclusions

detection

into

to meet
may

to the detection

attention.

a series

of image

for a further application.

less

have.

techniques

in the following

carry

these

Additionally,

are described

image

and

for

techniques

that the approach

techniques

much

algorithms

of a component.

and foreign

received

such

are tailored

Such

system may be suitable

cavitation

has

image

possible

of image processing
porosity.

from

problem

implementation

and evaluation

of a particular

of such an image processing

inspection

of the weld seam by

inspection

the design

individual

the bounds

On the basis of these feature

designed to detect specific types of defects. such as 'blow-holes'


operate

the

than

of each defect

the acceptability

general

In most

techniques

solution

defect classes.

a unified

not

To

and orientation.

is able to determine

to a set predefined

and reliable

technique.

is used to extract

the image. such as area. location


values the inspector

accurate

include

the

Contrast

enhancement

techniques,

histogram

equalization.

were

defects

and component

partly

because

to implement
of

image

the mean

they

enhancement
filter

(Mengers,

required

into computer
have

used
little

hardware.
emerged

and the median

filter

Chapter
for

noise

reduction,

enhancement

(Pratt,

The majority
images

of defect

been

based

very

simple

component

is

differences

between

subtraction

of

methods

The

alignment
defect

technique

technique

in

from

original

the

from

a reference

speeds,

but

they

do,

relies

upon

an

this is very difficult


image

gives

distorted.

a flexible

filters

Rosenfeld

difference

operator

pixels

in the image likely


is

edge
then

published
describes

in the radiographic

and often

used

to

form

based

the

several

reproducible
impracticable.

of the

detected

made

to the

1983) these

on conventional
detection

experiments

using

and Huekel

edge

the boundary
using

the

and

(Deckel,

for defect

linking algorithm,

from

been

edge

linear

in industrial

two

local

detector,

image (1980). The edge detector


to represent

on

very fragile.

techniques

Skramstad

defects

techniques,

been

small

and

to achieve

and remain

the

evaluation,

exact
view

the

Such

extremely

have

of

1981).

suffer

matching technique

expensive

have

for

a partial

Ting

based

(Closier,

image

Improvements

image

only

are

however,

only

radiographic

image

leaving

image

high

resultant

An

contrast

technique.

techniques

suitable

images.

background.

for

displaced

image

difference

a very few image processing

detectors,

is considerably

radiographic

which

with

technique

non-linear

subtraction

Other

image

to be computationally

and

image

inspector

including

Only

filters

used on industrial

the

the

and

techniques

on a simple

(1980).

of images,

Additionally,

and high-pass

detection

away

a test

very

problems.

tend

taken

provide
at

low-pass

Introduction

1975).

have

describes

operate

and

edge

to locate

is used to highlight

between

a defect

and its

high

level

decision

making

pixels

into

complete

defect

boundaries.
Strecker

describes

'shrink-holes'
is

used

a local

in radiographic

which
each

average

slope of intensity.

of deviation
flexible
image
only
more

pixel;
between

pattern
with

defect

variation

in

Ph.D.

technique

of castings
attributes

include

the

(1983).

of
mean

An area process

a small

neighbourhood

intensity

value

and a set of predetermined


is then

eliminating
based

a straightforward

susceptible

image

A. Kehoe

image,

Such a region
than

which is used to detect small

and the

The output of the method is based on the magnitude

matching

result

is less

attributes
attributes

pixels.

technique

intensity

the

a reference

reliable

the

these

operator

film images

calculates

around

feature

used

to

compare

all component
approach
edge

features

to defect
based

the

enhanced

and leaving

detection

approach,

to noise and can accommodate

attributes.

gives

because

a relatively

a
the

wide

contrast.

1990

10

Chapter
In

an overview

Strecker

present

of different

an analysis

inspection

systems

operations

and a local

filters

are used

regular

features

unsharp

is

used

pointed

out

component.

that

the median
structures

filter,

whilst retaining

may be subtracted
A further
classifier

parts

by

defects

susceptibility

1.1.5

edges

defect

stated
filter,

used to

by defects.

images

which

component

Non linear

filters,

the

as an
is then

of the

approach,

the

which

caused

filter

such as step edges.

are

image
such

removes

A filtered

as

faint
image

giving good results of defect detection.

detection

and a threshold

is described

which

attributes

uses

features

based on heuristic

and,

more

a pat t ern

of a defect. Features
assumptions,

value is used to determine

to

Radiographic
automate

is described
several

porosity,

cracks

the

radiographic

by Pearson

and others

image
and

Inspection

processing
foriegn

of an engineering

techniques

if a defect is

if it is to discriminate
importantly,

to overcome

inclusion

casting.

type

A field

the component

geometry,

and locate

Systems
inspection
(1975).

defects

function

approximates

the systematic

from the original


Unfortunately,

A. Kehoe

to

the

pixel

intensity

intensity
variations.

defect
system
cavities,

a radiographic

is described

variations,

values;
The result

this
is then

effectively
subtracted

between.

this

defects

1990

is blind

to

large

caused

row of pixels and fits a

input row to leave only the small differences


technique

film

in the image, due to

intensity

by the defects. The algorithm takes a single horizontal


polynomial

analyse

technique

variations

for

inspection

and

in

flattening

the the small

cycle

This

to detect

which is designed to remove the large intensity

Ph.D.

suppressing

are

with

Linear

to noise.

includes
image

best

segmentation.

strong features

and component

attempt

detection

detection.

averaging

or corners

in a similar

of defect

Automated

An

filtering

whilst

or not. Such a model has to be very robust

between

non-linear

generally

work

found in the image are combined non-linearly


present

local

based on a series of local grey-level

or 'rules of thumb',

automated

examples

of the image

from the original,

method

and

and

to

for defect

typical

techniques

during

are used

respect

in the image

Two

Boerner

and a Difference-of-Gaussians

as sharp

problems

linear

Introduction

detection

with

classifier

an image

these

homogeneous,

severe

include

pattern

to blur

to defect

techniques

the defects

the high frequency

relatively
cause

feature

from the original,

highlight
It

These

to enhance

filter,

subtracted

of three

(1988).

of the

approaches

horizontal

in the

11

Chapter
component.

such

technique

transverse

is necessary

vertical

of size

likened

to

edge

pixels
is used

threshold

technique

Finally

the

dimensional

direction.

to remove

inspection

defect
as

reduction
detection

are

errors

of

uses

the reference

intensity

field

reduction

a variable

defect

groups.

of

boolean

logic

type

three

procedure

their

operations.
on

the

of defect

and

type.
inspection
in

system for the

aluminium

castings

including

a noise

which

capture

system.

method

between

are designed
The

alignment

image itself.

within

component.

In effect

in a much

defect

a specimen

of accurate

the defects

image.

procedure.

of

This is

the image. whilst


this

similar

operation

way to the

above.

of

extraction
the

technique.

detected

which divides

which

defects.

the defects

and

into three

1. class 2. and class 3. From the inspection

the specimen

test

specifications;

number

of defects

are two main problems

type

from the specimen

of the

and

based

technique.

subtraction

attributes

implemented

the

are described.
image

described

dimensional

and

defects

image is passed onto a feature

and maximum

A. Kehoe

and

into

for the defect

to suppress

method

of the casting

Firstly.

A noise

image.

Due to the problems

based on their size: class

problem.

the

to determine

the

of the specimen

to a classification

There

this

method.

correction

by

structures

subsequently

using

of its six neighbours;

a fully automated

image is derived

the

requirements

series

used

image

determines

evaluation

algorithms

an

flattening

The resultant

from

associated

cavitation

image.

the regular
an estimate

the

component.

procedural

then

done using a series of filters

Ph.D.

are

introduced

and a reference

unusable

pixels

and a shading

produces

in the

to the requirements

technique

maintaining

determines

only

noise

order

which

is to highlight

conventional

evaluation

technique

eliminate

classes

is used

based on a

The result of the operation

A set of preprocessing

images

filter technique

the

and others also describe


and

processing

differentiating

determined.

it conforms

detection

size.

second

defects

pixels

specification.

Filbert

image

pixels.

image

is used to segment the defects from the background.

attributes

implemented

to

second

operator.

of horizontal

technique

(1986).

A high-pass

Ix7

a directional

image in the vertical

whether

and

between the centre pixel and the average

be

the

cracks.

to detect these.

pixel-window.

difference
may

as

Introduction

component
lowest

defect

in the casting.

as conventional
with

is evaluated

both

size.

maximum

This achieved

boolean

of the

as good or

above

defect

using an

method.
approaches

to the

due to the range of defect shapes and sizes. and the variation

1990

12

Chapter
of

component

detection
time

structures

cannot

a single

be realised.

to increase

set

of

general

This causes

proportionally

with

the

the

purpose

amount

size

and

acceptable

when the number of defect types to be classified

and

brief.

inspection

requirements

classification

simple

procedural

Demandt
interpretation

methods

that

techniques.

level

dimensional

of boolean
in

such

computationally

to

approach

is still

promising

approach

automated

described.

in its

infancy

which

and has

to the problem

system
uses

for

and

the

an expert

system

and

networks

the

yet

to proven
defects

to carry

of

annealing.
this type of
Such

acceptable.

an

A more

and others

in

of

application

alarms.

by Bartlett

of

using

difficulties

the

false

and

solution.

and simulated

to

as

is necessary.

part of the solution

prone

such

evaluation

inspection

simple

or complex

making

overcome

is suggested

inspection

are

cavitation

is an inadequate

for defect

expensive

is limited to two or

is required.

features

as neural

used are only

minor

decision

operators

order

images

defect

be adopted (1988). Although providing

technique

An

high

the filters.

component

and

defect

processing

to be identified.

major

of detected

that

only

of radiographic

non-procedural
should

using

have

for

of

methods

of the

types

porosity.

analysis

dictate

suggests

defect

cracks.

further

and evaluation

requirements

several

and transverse

inclusions.

Then

inspection

If. however.

longitudinal
foreign

and the

filters

complexity

the simple defect classification

classes.

Introduction

of computer

Secondly.
three

soldered

(1988).

joints

out the defect

is

evaluation

process.
A series

of defect

features

describing

each defect

along with a set of classification

rules to determine

further

operating

set

of

requirements
others

rules

are used to determine

point out that an expert

evaluation
The

evaluation

problem

features

because

of the defect

those used by the inspector


condition"

format

used during

built

into the rules of the expert

Although
of approach
for

Ph.D.

reliable

and efficient

has several

complex

A. Kehoe

inspection

1990

the classification

rules

Additionally,

a more diverse

the

inspection

or not. Bartlett

and

to the defect

as a human
cycle

inspector.

are similar

to

carrying out the same task. and the "if action then

by the
that

of

a good solution

it can be made to operate

used
ensure

conditions

system provides

are used.

the type of the defect.

if a defect is acceptable

of the evaluation

inspector.

on

in the image

the decision

the experience

system.
operation

application

analogies

mimic

by means

inspector

of heuristic

process
can

be

control.

to

is achieved.

than others

to the current

requirements

of the

making

an

reviewed

field

expert

above.

of interest.
system

this type
Particularly

offers

many

13

Chapter 1
advantages.
defect

such

as

It

should

data.

high

level

be noted.

several drawbacks.

Bartlett

results

inefficient

in a very

decision

making

however.

that

and others explain


system

1.1.6

3D Industrial Radiography

to correctly

image.

Due

effectively

to

the

the size. position.

nature

of

fluctuations

of

conventional
presence

image.

intensity

of a defect

to

many

the

inspection.

if

knowledge

system

any

doubt

images

image

is

and great

the

component.

In

arises

regarding

the

of the component
from

its

original

an evaluation.

A single
second

radiographic

reason.

position

at different

become

image of the component

Defects

which

depths

image as overlapping
problems.

Present
taken

from

inspection

processing
single

systems

the quality

however.

to

assurance

of defects.

The

and Compton

accurately

overlapping
inspection

features.
and

processing

provide

single

implement

for routine

A. Kehoe

1990

time

are

reliably

analysis

comprehensive

computer

upon

and

inspection.

a similar

in the radiographic

the

overcomes

cycle

time

the

cycle.

and

for

of computer
both

techniques

by Oliver and others

makes

very
them

against

for the 3D analysis


to the

techniques

automated

Up to date very little

solutions
of

of defects

a component

techniques

elegant

require
This

attributes

inadequate

techniques

application

2D

evaluate

processing

of turbine blades is described

accurate

in

component

increase

based

image.

and

on image

of the

of the inspection

methods

or

for a

process.

3D radiographic

scatter

together.

will appear

considerably

radiographic

has been published

close

views

techniques.

standards

may not be adequate

will merge into a single region and

multiple

of the inspection

image

very

The defects

Using

It does.

costs

appear

in the component.

features.

indistinguishable.

operational

Ph.D.

angle

are taken.

This allows the inspector to use multiple views of a suspect defect to

very

some

in the

position.

work

through

of defects
features

of

is very

may not be

radiographic

overlapping

from

with

these

rotated

the

geometry

radiographic

component

and number

formation

exhibiting

further

suffer

of the

further

usually

make

the

image

due

radiographic

systems

a single image of a component

identify

a shadow

of

expert

and optimisation

due to the problems of rule evaluation.

adequate

inference

that a lack of expert

difficult

Just as for medical diagnostics.

and

Introduction

demand

tomography
problem

(1986).
a

expensive
unsuitable

great

for

the

Although
deal

equipment
for

of

of
to

an on-line

14

Chapter
industrial

inspection

simpler

and quicker

inspection.
based

method

the

conventional

high

of 3D defect

Such" method

on

1 .2

requinng

process

methods

IS

of

analysis

in Appendix

by

skilled

the

Introduction

operation.

is required

presented

adopted

radiographic

speed

much

for industrial

A.

which

inspector

is

performing

inspection.

INTELLIGENT KNOWLEDGE BASED SYSTEMS FOR INSPECTION

The field of artificial

intelligence

has received much attention

over the last

30 years. The main drive of this interest has been the combination

of computer

science

approximate

with

symbolic

processing

intelligent

human

behaviour.

The

discipline

is

of

or

(Gevarter,

1983). Hayes-Roth

program

that

designed

expert.

to store

use that knowledge

to

achieve

most

prominent

intelligent

within
based

an IKB system

of a particular

to solve problems

which

area

knowledge

and others define


knowledge

machines

diverse

(IKB)

systems

as a computer

problem

from that domain

this

domain

and to

in an intelligent

way

(1983). The general IKB system consists of three main parts: a knowledge
with

explicit

inference

representation

mechanism,

inexact

reasoning

process

(Black.

with

is

improve

domain

uncertain

evidence

chemistry.

applications

geology.

medicine

and

unavailable.

to

enhance

of experts

the

in routine

which

have

processes

not

the

purpose

problem

for

solving

of

to

as a possible

means of automating

nature

production
and

or

In the manufacturing

complex

breakdown

1987).

operations.

include those of a highly


include

(Kriz,

non-experts.

for

These

such as

to operate where an

suitable

machine

previously

of fields.

science

been

expertise.
of

computer

performance

processes

diagnostics

guides

they are used for three main reasons:

the efficiency

human

general

with provision

in a wide variety

IKB systems have been identified

on

structure

which

industries
Typical

knowledge;

engine; and a control

have found

In most applications
expert

the

1986).

IKB systems
agriculture.

or

of

base

control

mechanized

which rely heavily

planning
of

methods.

robotized

and

scheduling.

manufacturing

cells (Fox. 1986).


The application
the

manufacturing

Ph.D.

A. Kehoe

of IKB systems

to quality

cycle

to offer

1990

are

seen

assurance
several

and inspection

promising

within

advantages.

15

Chapter
small

number

of IKB systems

have found successful

and the related area of fault diagnosis.


system

for inspecting

production
systems

error

(1983),

circuit

from

manufacturing

expertise

information
capture

is restricted

and

decision

retain

making

knowledge

boards

industries
from

and identifying

system

environment

gained

applications

is outlined

knowledge

several

knowledge

techniques

can be built

for

and

of

matters.

into an IKB system

in robot
(1987).

assurance

is built

experience.

Often

IKB systems

are able to

subsequently

quality

faults

of the

by Conversano

of quality

years

a rule based

the source

for evaluating

to a small number of people.

this

in this area,

Shubin and others describe

and a diagnostic

in the manufacturing

In many
up

printed

Introduction

use

it

Ballard

with

states

to give better

such

intelligent

that

control

quality

and better

quality at reduced costs (1987). IKB systems are also seen to be able to improve
on

the

efficiency

dependency
due

to

and

on experts

boredom

efficiency

consistency

and

Automated

The
inspection

inspector

performance

to carry out the inspection


fatigue

when performing

1.2.1

of

inspectors

are

an inspection

Radiographic

human

inspector

cycle

is required

capable

cycle

performing

of

only

porosity,

cavitation

occur in the radiographic


able

to

identify

structure

occurring

eliminate
of the

have a variety

and orientation
in their

dimensional

within
class

and shape

set of heuristic

inclusions.

such

features

component.

within

the bounds
type.

attributes,

classification

from

inspector
devised

90%

the component
features,

knowledge
such

classifies
from

image;
these

which

The inspector

is

of

the

as cracks,

and may occur

such as elongation

rules

his

types

of the component

The

to

defect types, such as

for defects.

Defect

of shapes and sizes,

that

radiographic

Component

image, may be mistaken

and operation

cavitation,
unique

and

and foreign

suggests
80%

conventional

and classify those found into one of a series of predefined


cracks,

the

Cycle

the

defects

Bartlett

relieve

(1988).

Inspection

to locate

cycle.

and

and

at any position
such defects

defects

and density,

experience

are

from

their

based

on a

of the

inspection

cycle.
During
certain

the

amount

inspection

of ambiguity

and past experience


the image content.
expertise

Ph.D.

the

in the

the inspector

inspector
image.

1990

is capable
Using

both

of

the acceptability

cycle the inspector


of the component

dealing

subjective

is able to make a reasonable

During the evaluation

to determine

A. Kehoe

cycle

with

judgement

assessment

of

is able to use his

based on the quality

16

Chapter
assurance
assist

requirements

the human

For

The

interpretation
real-world

during

or

and

(Horn,

undertakes

evaluation

limitation

understanding

cycle.

All

the inspection

of performing

present

entities

inspector

inspection

interpretation

must be capable

inspector.

the

inspector

accurate

system

of

abilities

greatly

of

image

data

on a level

equal

to that of a skilled

of

image

of images:

recognizing

these

Introduction

cycle.

processing

relating

1979). This corresponds

when

and

the

automated

systems

objects

in

the

to the operation

evaluating

defects

is

the

image

to

the skilled

in the

image.

In order to overcome this limitation it is considered

that an IKB system applied

to the inspection

solution.

1.2.2

cycle would give a most effective

IKB Techniques for Defect Evaluation

The techniques
the automated
processing

used in the IKB system determine

inspection

system.

They also dictate

the mode of operation


what information

system should supply and how this information

There

are two

model-driven,
approach

alternative

methods

or top-down

of operation

approach,

(Alty and Coombs,

of

the image

is to be interpreted.

of the

IKB

and the data-driven,

1984). The top-down operation

system:

the

or bottom-up

involves a series of

high level models of each defect type, which are used to direct the search for
defects

in

the

radiographic

features

of each defect

Features

and attributes

The construction

located

The

for

defect

structure

may be applied
to recognition

detected

the diagnostic

of

the

guide

to a low-level

the

model.

description.

system.

Having

classify

these suspect
1990

tumours

diagnostic

problem
in section

approach

This

the suspect
taken

into tumours

(Savol

systems

type

is
of

for

chest

and others,

1980;

1.1.2, adopt a bottom-up

The low level

classification

information

cycle.

of a

approach.

in the image.

located

of the attributes

evaluation

automated

the construction,

uses the dimensional

A. Kehoe

combines

As such the top-down

and

to the present

of objects

Ballard

Ph.D.

classification

1976). Both the systems, described

approach

according

due to the large variations

is more suited to the bottom-up

radiographs

objects

in the image

approach

of a high level model for each defect type to be detected in

the

hierarchic

Ballard,

bottom-up

defect type; each defect is unique.

ineffective
problem

The

are added until each defect has a complete

the image is very difficult,


particular

image.

attributes

and evaluation

tumours

of

in the lung region,

from the boundary

or non-tumours

cycle

of

(1976).

of each to
Savol

and
17

Chapter
others use low-level
which

is then

area,

perimeter

radiographic

intensity

classified
and

recognition

found

the

this

in

operation

dimensional

intensity

system,
(Bartlett,

radiographic
the

defect

attributes

made to determine

to grow a rounded object in the image,

and evaluated

mean

inspection

of defect

attributes

according

value

described

image

by

pixels

are

to its

(1980).

earlier,

1980). Pixels

determined

Introduction

The

also

and defect

if the defect conforms

industrial

a similar

techniques.

into

type

automated

method

part of a defect

detection

associated

properties;

uses

representing

defect

structural

defect

identified.

to the requirements

are

Following

groups,
A test

their
is then

for the type of

defect.
For

the

would

present

involve

processing

problem,

both

techniques

image
would

2D

defect

processing
extract

the

inspection,

the

and

techniques.

IKB

low-level

data

bottom-up

approach

The

from the

image

radiographic

image in the form of suspect regions and their attributes.

An IKB classification

technique

types

would then classify

attributes,

adding

evaluation

technique

further

A. Kehoe

1990

information

regions
to

into defect
the

defect

would then use the completed

the defect is in conflict

Ph.D.

these

with the acceptable

based

description.

description

on their
The

to determine

IKB
if

limits of inspection.

18

Chapter

1.3

OUILINE OF RESEARCH

The

overall

radiographic
including

objective

inspection
cracks.

would.

eventually.

predefined

the

system

for

detection

and

of performing

3D inspection

in

an

on-line

foriegn

an

inclusions.

operation.

automated

evaluation

It is envisaged

be capable

and

develop

The

of

defects.

occurring

in

that such a system


of defects

within

requirements

of

a
an

system are that it should operate on a level equal to. or better than.

system

operation.

and show promising

of performing

and a secondary

development

image

on

areas

processing

and an IKB system


based

the

2D inspection

system for on-line

on two major

of

cost benefits.

cycle for this system has been divided

capable

concentrated

types

to

components.

The development

defects.

the

is

engineering

that of a skilled inspector

initial

research

porosity

component

automated

of

cavitation.

cast and machined

has

Introduction

of the

techniques

assurance

of defects

3D inspection.
initial
for

in an off-line

The present

system:

the

for the classification

quality

into two stages; an

the

standards

design

automatic

and evaluation
of

the

work
and

analysis

of

of all defect

component

under

evaluation.
A

set

capable

of

image

of detecting

features

from

methods

of

computer
accurate

image

types

defect.
to

These

give

may

of defects

and digitization

are given

above

work presents

an analysis

techniques.
cycle

and the

will be efficient.

implemented
of

careful

high

speed

of these

which

a series
on

are

of 2D

conventional

into

specialized

operation.

For

that the parameters

consideration.

of appropriate
reliable

developed

based

it is important

of the effects
selection

are

be

capability

been

and extracting

techniques

and
the

have

of defects

and analysis

capture

the inspection

techniques

processing

hardware

image

processing

several

each

detection

processing

A part

parameters
values

of the

on image

to ensure

and meet the quality

of

that

assurance

standards of the process to the full.


An IKB system has been developed to. firstly. classify

each defect type into

one of a series of classes. using the defect data and a set of classification
and.

secondly.

Ph.D. A. Kehoe

to

evaluate

1990

each

defect

based

on

evaluation

rules

and

rules
the

19

Chapter
inspection

requirements.

radiographic

image

In

the

order

classification

measure

of belief or expectancy

on the

expert

quality

assurance

knowledge

the conditions

to

rules

are

to form

of the inspection

an automated

effectively

a demonstration

of defects

in a single

and

system

radiographic

has been useful

limitations

performance

defects,
capable

of

the

for

radiographic

desired

techniques

film image

was

detected
attributes,
data

Ph.D.

on the

are built

current

image

indentifying

and,

into

to the expert

techniques

of the component,

and the

designed

processing
defects,

the evaluation

and 3D quality

1990

be

further

steps are required

describing

describing

A. Kehoe

to

the

shape

system
assurance

is

component.

the capabilities
indicating

the

inspector.

system for 3D inspection

have

only 2D analysis of
been

designed

to

be

is that the techniques

are used on

results

to give

enhanced

are combined
to

to determine

and volume,

relationships

This

2D inspection

secondly,

A. Although performing

processing

system.

an off-line

3D defect data. The IKB system for 2D classification

Additional

Further,

which

of a predetermined

developed,

system compared

is outlined in Appendix

views

defects

the

incorporate
operate

inspection

performing

of 3D analysis. The major difference

multiple

in

both of the above systems have

in two ways, firstly,

of an automated

the

to

rules

process,

As a final part of the research work an automated


of defects

ambiguity

of the rules.

combined

The system

Introduction

of the rule. These are based

The evaluation

As part of the initial phase of development


been

the

designed

in the conclusion

of inspectors.

requirements

accommodate

between

provide

and evaluation
3D

the
of

operation.

the 3D local attributes

of

and to determine

3D

defects

component.

has to be enhanced

and

to reason

the

global

with 3D defect

requirements.

20

CHAPTER 2
AUTOMATED RADIOGRAPHIC SYSTEM
FOR 2D DEFECT INSPECTION

Ph.D.

A. Kehoe

1990

Chapter 2

Automated Radiographic

System for 2D Defect Inspection

AlITOMATED SYSlEM FOR 2D DEFECf INSPECTION

The operation

of the automated system for 2D defect inspection

in Fig. 2.1. The primary


camera.

step of the cycle involves

which is used to capture

from

a radiographic

image

film,

or the

screen

produces
input

output

an analogue

to the image
stored

processing.

image

processing

linear

image

This signal

is made

is digitized

by

computer

of defects,

and analysis

values

to ensure

that they

operation

out

three

occupy

the

features,

it is

operations;

of defects.

of image

of the image

of unimportant

TV camera

which

to carry

first

photographic

image

is designed
the

The

component

or f r a m e s t o r e , where

memory,

The intensity

A variety

system.

or TV

In order

processing

is to

are transformed

by a

full

such

range

of available

as fixturing

for the

are also masked from of the image, these may effect later steps and

burden

image

input

relation

levels.

component.
over

the

the image.

intensity

system

of the image, detection

to standardize
simple

an

intensifier

of the radiographic

image

for

calibrate

signal

into

accessible

calibration

of an image
system.

and

The

which may be a conventional

processing

hardware

an imaging device.

a single image of an engineering

sensor;

video

is illustrated

the amount

processing

component

system

image.

of computer
is designed

including

The image analysis

cavity.

operation

processing.
to enhance

crack.

is designed

Following

this operation

and segment

porosity

defects

and inclusion

to dimensionally

analyse

type

the

from the
defects.

the detected

defects, creating a set of 2D attributes for each to be used by the IKB system.
The IKB system
suspect

defects

classified
other

acceptability

Ph.D.

and evaluation

are designed

defects

three distinct

operations;

the classification

into a single class of defect type. the zoning

defects.

operations

performs

to determine

and the component.


of the defects

A. Kehoe

1990

of defects

in the component.

the defect

and grouping

with

is made to evaluate

assurance

of

The two initial

type and its relationship

The final operation

based on the quality

of the

requirements

the

of the

22

Automated Radiographic

Chapter 2
inspection

2.1

System for 2D Defect Inspection

process.

IMAGE PROCESSING SYSTEM OU1LINE

The

defect

reduction

technique.

enhancement
image.

detection

to

a defect

component

image
in

random

noise

image

processing

noise

pixels

in the digital

an

poor

technique

image

succession.

in the

the

to represent

is

rapid

improve

detection

likely

operation

captured

of the

to eliminate

technique.

and

reduction

stage

resultant

contrast

part

of

added

image.

the

Fig.

technique.

together

The

the

all

a defect.
to

contrast

to a pixel

depending

Defect

detection

values

of its closest

an adaptive
analysis
pixel,

threshold

of a large

to determine

techniques

neighbouring

pixels.

technique,
population

intensity

work on the attributes


information

capable

of detecting

about

up from

determine

a set of 20

size,

further

processing

regions

position

and

performed
wholly
connected
operation

defect

by a closing
by

adjacent

which

pixels

for each

pixels.

reduces

in a merged

A. Kehoe

amount

of

technique

is

technique.

on the intensity
is completed
from

around

the

the

image

by
each

1990

of the image, nor on any


such

these

techniques

analysis

defect

are

pixels

is used

to
its

In order

for

have to be merged

into

component

which

defects.

describes

image.

background.

pixels

is

is

followed

by

defect

region

This

region.

image

Region

merging

is

Each defect pixel in the image which is not

defect
size

in the component

Defect

suspect

out the defect

technique.
other

As

2.1.

in the

of

the

forming

achieved by a technique based on a blob


Ph.D.

images.

is an image of suspect

Fig.

region of defect pixels. The segmentation


defect

noise

within the component.

operation

and orientation
from

pixels

types.

pixels,

attributes

segmented

to

defect

analysis

to be carried

surrounded

The

uses the statistical

taken

on the content

any type of defect

individual

shape,

which

values,

of individual

the

The input to the defect


made

the

in the

if the pixel is part of a defect region; a defect pixel. Both

and do not rely on any information


structural

2.1.

called C-of-G

an area process

of

radiographic

enhancement

This

factor

a contrast

pixels

reduce

of moments,

adds a weighting

a noise

Several

an area process based on the principles


technique

uses

image.

of

to highlight

integration

are

system

allowed

process

an

connects

a continuous
colouring

to dilate

and

equivalent
leaving

become
erosion

a connected

all of the individual


defect

technique.

region.

This is

Once connected,

23

Chapter 2
regions

Automated Radiographic

may be manipulated

analysis

and modified,

System for 2D Defect Inspection

and be passed on to the dimensional

system.

The

dimensional

image

analysis

and the merged

techniques

region

image,

make .use
to

information.

For the whole merged region

determined

which

image.

each

For

describe
merged

the

local

the

and

position

of

a set of 2D local

defect

and global

image a set of global

number

region

obtain

of both

the

2D defect

attributes

defects

attributes

pixel

are

are

in

the

determined

which describe the size and shape of the defect.

2D Defect
Desc

X-Ray
Image
Image
Capture

Defect
Analysis

Defect
Detection

Defect
~ ctassmcatlon

Suspect
defects

lrnaqe
Capture
~
Component

2.2

Defect
groups

lIP

-~

Fi . 2.1

IKBS System -

Non-defects

NOise

Non

Defect
Evaluation

Zoning &
Grouping

Defect
types

Image Processing
System

Component
Acceptability

Unknown
feature

Automated 2D defect ins

IN1ELLIGENT KNOWLEDGEBASED SYSlEM OUTIJNE

The classification
attributes
base,

of suspect defects,

Fig.

2.1.

Each

feature,

and

include

transverse

longitudinal,

defects
transverse

zoning

and grouping

global

2D

between

operation of the IKB system is based on the local 2D shape

attributes

defects,

and rules of classification

suspect

defect

further

classified

and

is classified

longitudinal

into

and minor cavities,


operation
for

the

into

defect

cracks,

stored in the knowledge


a defect

a series

major

and

and inclusions.

in

the

image;

of types;
minor

A. Kehoe

the

set of

relationship

and number of defect types in the image.

Once each defect has been classified the IKB system evaluates

Ph.D.

this,

a second

including

these

porosity,

Following

of the IKB system determines


defects

or component

1990

all the defects

24

Chapter 2
against
local

the

quality

and

global

information
determine
and

width,

determine

assurance
defect

stored
if the

Automated Radiographic

in

data,

the

whether

the

standards;
and

conform

to inspection

engine.

knowledge

representation

knowledge

rules

which

which

and determines

defects,

global

of defects,

data

such

of inspection
the

the

based

used

system,

used

to

as length
is used

as the

to

position

in

problem

assurance

solving

process

strategy;

during

in the knowledge
the

which

base containing

and quality

inference

the use of information


scheme

of

requirements.

performs

guides

is

such

defect

use

assurance

data

of three main items: a knowledge

information,

evaluation,

makes

quality

defect

of individual
The

cycle
and

Local

attributes

structure,

frame

base.

topological

an inference

hierarchical

inspection,

limits.

component

a control

evaluation

acceptable

of defects,

data,

of

attributes

The IKB system consists


defect

rules

The

knowledge

dimensional

are within

and number

standards.

System for 2D Defect Inspection

knowledge

incorporates

image

base. The

base

both

is

application

and rules of inspection.

,..
The inference
system,
structure

with confidence
is used

procedural

2.3

to

and

verifying

the

placed

process.

problem

the

overall

intermediate

states.

production
mechanism,

on the rules.

is used to control

guide

chaining
inference

inference

and low-level

task structure

processes,

uncertainty

factors

control

for both high-level

the meta-level
search

is based on a backward

which includes a statistical

of reasoning
control

engine

capable

A meta-level

This

solving

utilizes

tasks.

process

task

heuristic

In this

both the procedural

reasoning

rule

way

and non-

during

solution

DESCRIPTION OF DEVELOPMENT EQUIPMENT

The development

system

consists

image capture device, an image


or framestore,
storage,

A Panasonic

Ph.D.

radiographic

A. Kehoe

system

WV50, charge coupled

1986) is used, in conjunction


conventional

digitizer and display

and a host computer,

which acts as overall

1990

film.

of the following
with large

module,

system

Fig.

2.2: an

an image memory

memory

and disk file

controller.
diode (CCO) type, TV camera (Panasonic,

with a viewing
The

equipment,

video

light box, to capture

signal

is digitized

into

images

of

a nominal

25

Chapter 2

Automated Radiographic

System for 2D Defect Inspection

512 x 512 pixels and 256 greyscale values by a Datacube


digital

image is stored into a Datacube

image capacity
between

RO/-store

Digimax

module.

framestore;

The

which has an

of 2Mb, or eight 512 x 512 pixel images. Image data is passed

these

modules

known as Maxbus

through

proprietary

high

speed

bus

structure,

(Datacube, 1988).

ImageCaptureSystem
T.V. monitor

r--~~t==-

Analooue
video
signal

DATACUBE
ImageProcessingSystem

Digitiser &
Display
Camera

Framestore

Digital data

image

Image data bus


VME communication bus

Host
Computer

Input!
Outpu

System
Memory

Disk
Storage

User
Interface

L-------------Host

ComputerSUN3/160M

Fi . 2.2
A S UN 3/160
modules

through

Motorola

speed.

capacity

disk

system,

several

multi-tasking

system.

environment

A. Kehoe

device

1990

the operation

of the hardware

bus. The computer

is based

32 bit processor, with an additional co-processor

development

an image

controls

communication

The computer

development

languages,

workstation

VM E

storage

mouse pointing

Ph.D.

the

MC68000

operational

The

computer

(Sun,
system

also has 4Mb of system


The

tools
is

computer

supports

and programming

offered

consisting

memory

the

UN/X

languages.

of

windows,

on a

to improve
and a high
operating

Additionally

menus

and

1986).
software

processing

consists

software

of 'C' and Prolog

package,

H / PS,

programming

and an IKB

system

26

Chapter 2
building

tool,

(Kernigham

and Ritchie,
offers

'C' and structured

image

all running

FLEX,

HIPS package
package

Automated Radiographic

1978; Clocksin

many useful

in a modular

allows further
processing

a UNIX

and Mellish,

image

processing

flexible

functions

fashion

to be easily

development.

have been written

under

System for 2D Defect Inspection

All

system,

1981; Bourne,
algorithms

(Landy and others.

processing

Fig.

2.3

1983). The

implemented

added and provides

image

in 'C' and incorporated

operating

in

1984). The

the basis for

algorithms

developed

into this package.

FLEXIKBS

BuildingTool
QUINTEC

Prolog

Fi . 2.3
The FLEX tool is a Prolog based system which offers the use of an English
like language.
(Quintek,

knowledge

specification

1988). This package

approach,

such

as

functions

for

language,

Quintek

frame

user

implementation

is

quite

programming

language,

applications.

Additionally

machines,

Ph.D.

representation,

1990

FLEX

unique
the

in

forward

runs

a standard

allowing

from PC-based

A. Kehoe

has many additional

interfaces.
Prolog,

language (KS L), to develop IKB systems

under

Edinburgh
its

whole

package

a version
to

and
of

graphical
the

Prolog

implementation.
interface

to become
is

to a purely Prolog

chaining,
syntax

capability

the IKB system

features

available

to

embedded
for

the

The
'C'

in other

a variety

of

to large workstations.

27

Chapter 2
Overall

the

Automated Radiographic

development

very

Ph.D.

efficient

A. Kehoe

hardware

1990

or target

systems

be

developed

and

flexible

The system does not, however, operate at high speed. To achieve ondevelopment

to

and

evaluated.
specific,

methodologies

comprehensive

many

the successful

and

is

allowing

line operation

techniques

system

System for 2D Defect Inspection

may be transferred

quickly
to more

systems.

28

CHAPTER 3
RADIOGRAPHIC IMAGE PROCESSING
CONSIDERATIONS

Ph.D. A. Kehoe

1990

Chapter 3

Radiographic

Image Processing

Considerations

RADlOORAPIDC IMAGE PROCESSING CONSIDERATIONS

Due to the nature


quality

of detail definition.

processing
image
the

of radiographic

methods

capture

image.

is

the detection

a difficult

and digitization

producing

When

designing

factors

should

be

problem.

into

and the resultant

in the component

Additionally.

affect

results

processing

taken

formation

of defects

seriously

inconsistent

image

image

techniques

analysis

to undertake

these

ensure

of

of defects

the defect

to

by image

parameters

the representation

from

consideration

the

poor

accurate

in

techniques.
tasks.
and

such

reliable

operation.

3. 1

RADIOGRAPIDC IMAGE FORMATION

A radiographic

image of a component

component

under

radiographic

image capture

which

traverses

radiological
capture
input

examination

device.

placed

component.

screen

which

may

the

be either
intensifier

image

of the

component.

radiological

image

is formed

determined

component

by

(Barrett.

offers

greater

Ph.D.

A. Kehoe

the
1981).

resistance

1990

material

emerging

X-ray

different
and

beam.

physical
or

resulting

film

high

or the

into a visible

absorption

the component.

thickness

radiation

contains

photographic

by the
properties

X-ray

and

image falls upon the image

and is converted

through

source

beam

system.

Component

to the X-ray

X -ray

emanates

conventional

rates of the X-ray beam as it travels


are

an

source

This invisible

of an image

radiographic

between

The X-ray

image of the component.

device.

The

the

is

is formed as shown in Fig. 3.1. The

and scatter

These.

in turn.

shape

of

density

in reduced

the

material

exposure

on

30

Chapter 3
the

imaging

different

X-ray

radiographic
projection
image

device.

exposure

corresponding

giving

Image Processing

of

the

contrast

in the

A complex

component

to the physical

changes

in the

characteristics

radiographic

geometry

of

the

of

X-ray

image
the

source.

and the imaging


lack

of

radiographic

detail,

image.

be represented
fluctuations

is greatly

shadow

affected

image

Chesney

image

contrast

The

a 'flat' 2D
in the

in contrast

and

by the

formation

Chesney

positions
and

factors

and

suggest

that

the
the

of the X-ray source,

device (1971). A poor image formation


low

many

component.

factors on image quality are the relative

component

radiological

would

and systematic

the

causes.

a shadow image of the component;


features

of the

Considerations

component

overlapping

quality

determining

cause

rates,

of a 3D object.

The

inhomogenity

image is effectively

with many

limiting

Such

Radiographic

image

set-up can

distortion

in

the

image.
Overlapping
Features

Image Capture
Device

Enlarged
Image

Image Noise
Lack of
Detail

Radiographic Image
Formation

Radiographic Image
Capture

formation.

Fi . 3.1

A defect in the component causes a change in the absorption

rates of the X-

ray beam as it travels through the component;

a cavity defect type offers little

resistance

artifact

to

radiographic
This

the
image

is clearly

which contain

Figs.

3.2(b)

radiographic

as

shown

beam.

a region

Such

an

contrasting

in the radiographic

with
images

would

its

appear

immediate

of Figs.

3.2(a)

in

the

background.
and 3.2(c),

a cavity and crack type defects.

The contrast
systematic

X-ray

changes

intensity

caused

variations

and 3.2(d)

by a defect

caused

which contain

are very

small

by the component;
the horizontal

this

intensity

compared

to the

is illustrated
profiles

in

of the

images in Figs. 3.2(a) and 3.2(c). The level of contrast and the

Ph.D. A. Kehoe

1990

31

Chapter

Radio g, aphic

Image

Processing

b
Fig.

3.2

horizontal

Considerations

(a) Radiographic

image

intensity

(c)

profile.

of a cavity

Radiographic

horizontal

and

type defect.
image

intcnsi

of

along
a crack

with
type

(b) its
defect,

rofilc.

Fig.

3.16

Optical

calibration

grid,

ne atives

Ph.D.

A. Kehoe

1990

precision
of

test

test

shapes,

and

photographic

defects.

32

Chapter 3

detail

definition

above

image

position

3.2

Radiographic

of the defect

formation

in the

factors.

of the defect

Image Processing

image

It is also

in the component

is primarily
affected

by

Considerations

determined
the

size,

by the

shape

and

structure.

RADIOGRAPillC IMAGE CAPTURE

The

image

radiographic
inherent

image

noise.

device

by

contrast

may

limited

The capability

of radiological
component

capture

contrast

towards

ability,

of the imaging

is very

important:

lack

device

of

poor

resolution

to capture

radiological

quality

contrast

and

a wide range
caused

by the

and defect may be very slight and needs to be amplified as much as

possible.

Conventional

densities

for corresponding

photographic

film, Fig. 3.3, offers

X-ray exposure,

the extremes of its range, (0-0.50


where

contribute

photographic

(0-3.50),

and 2.75-3.50)

a wide range of film

but tends to be limited

(Chesney

and Chesney,

at

1979):

density
(3.1)

and La

incident

light intensity,

Lt

transmitted

light

intensity.

Analogue video
signal

source
image

Fi . 3.3
Image intensifier
almost

linear

and others,
to

systems

response

over

do not suffer from this problem,

Fig. 3.4. giving

a very

(0-50)

wide range

1983). The image resolution

photographic

screens,

Conventional

70-100

Ph.D. A. Kehoe

film

(Halmshaw,

line-pairs/mm
1990

for

of contrasts,

of image intensifiers

1982);

2-5

film.

The

is poor compared

line-pairs/mm

for

resolution

film

of

(Cocklin

intensifying
images

is
33

Chapter 3
dependant
smaller
little

upon

grain

size

used

in

Image Processing

the

film

images

produced

have

significantly

intensifying

(Halmshaw,

screen

by the
more

and

graininess

noise

scintillation

film.

caused

by

of

the

The film image contains

of the

content,

generally
Image

the

fluorescence

intensifier

granularity

the

of

screens

1980).

The effects
imaging

only

Considerations

structure,

the grain size the finer the image resolution.


noise,

the

the

Radiographic

of poor contrast

device on the quality

ability

and lack of image

of the radiographic

resolution

from the

image may be considered

be quite small when compared to the effects of poor image formation.


applications

they may be considered

quite

to

For most

acceptable.

Output flourescent
screen

T.V. Camera

source

Image intensifier
system
electro-optical
focusing system.

Fi . 3.4
One considerable
by

which

the

radiographic
film

image

cracks,

contrasting
would
'positive'

represents

and

between

the

as a light

1990

image

appear

immediate
region

image of the component.

Ph.D. A. Kehoe

image

resulting

a 'negative'
its

film and screen

radiological

and porosity

against

appear

difference

invisible

image,

cavities

Real-time

is

converted

representation
of the

in this image
surroundings,

of shadow,

Fig.

images
of

into

the

component.

visible

component.
Defects

as regions
whilst

is the method
A

such

as

of dark shadow

foreign

3.2. The screen

inclusions
image

is a

showing the defect types visa versa.

34

Chapter 3

3.3

Radiographic

Image Processing

Considerations

ACCURACYOF DEFECf REPRESENTAnON

The radiographic
into video
system,

image produced

data by a TV camera

by the image capture


system

for input

device

is converted

into the image

processing

as shown in Figs 3.1 and 3.2. The first stage of image processing

concerned

with

the

resultant

digital

digitized

by both

digitization

image

into

spatial

of

this

computer

points

memory.

(pixels)

point; such an operation generally

video
and

signal
The

and

storage

of

video

data

analogue

light

levels

(intensity)

gives a digital grey scale

is
the
is

at each

image of 512 x 512

pixels with 0 to 255 intensity levels.

3.3.1

Pixel Representation

A defect
collection
their
the

in the component

of pixels

surrounding
digital

with

The

value

of each

exposure

at corresponding

of the

pixel

system

enhancement
regions,

would

segmentation

threshold

function,

reliability

of

parameters;

of
image

the resolution

the

defects

and dimensional

these

in the

collection

area

the

digital

approximation

analyse

image

value of each pixel during defect

the

X-ray

a typical

image

(Pratt,

1975):

are

of defect

image,

using

The accuracy

dependant

upon

resolution),

of the defect in the digital image, and the level of threshold


the intensity

image,

detection

background

(pixel

of

of

operations

of the defects.

operations

that

device.

its quality,

the

as a

represents

in the

these defects

following

analysis

of the digital

from

defect

from

processing

image

actual

image to improve

the

different

on the image capture

perform

of the greyscale

greyscale

significantly

represents

points

digital

of pixels

In order to locate and dimensionally


processing

in the

values

number

approximation

intensity

appears

intensity

pixels.

area

of Defects

a
and

three

the position

value

applied to

detection.

Pixel Resolution
Figure
radiographic

3.5(a)

shows

image;

Ph.D. A. Kehoe

1990

a simulated

a circular

area

image
of

low

of

a cavity

uniform

type

intensity

defect
set

in the

against

35

Chapter 3
background
greyscale

of

high

uniform

Radiographic
intensity.

image of the simulated

intensity

values

digitized

image is determined

surface,

whilst

Image Processing

Figure

defect,

3.5(b)

with pixel

at each pixel. The approximation


the intensity

by the number
values

each

shows

the

representation

of actual

of pixels

digitized

of area and

defect

area in the

'touched'

by the defect

are given by the reflectance

of the image

being viewed in each pixel. Changes in the intensity


are proportional

Considerations

to the amount of background

values from pixel to pixel

and defect

area

represented

by

pixel.

ABC

Pixel Representation
of Defect Area Dd

0 E
Background
2
3

Area

Intensity level i

4
Pixel Area Pa

Fig. 3.5(a) Circular

Fig. 3.5(b) Digitized

test defect.

test defect.

The value of pixel resolution dictates the minimum size of defect which may
be represented

in the

digital

image.

small defects may be accurately

At low values

represented.

of pixel

resolution

very

yet the field of view of the image

is very limited. When a large component is to be inspected a large field of view


is required.
values.

using

a high value

however, very small defects

integrate
has

this is achieved

with

been

their

estimated

In

surroundings.
using

resolution.

the image may become distorted

Previously

a simple

of pixel

Nyquist

the

required

guide-line:

the

At such
or even

pixel

resolution

pixel

resolution

should be at least half the minimum object size in the field of view.

Defect Position
The effect of defect position in the digital image is shown in Fig. 3.6. When
the defect centre aligns with a pixel centre,
representation

of defect

area differs

as in Fig. 3.5(a) above, the pixel

from when the defect

centre

aligns

with

the edge of a pixel. Fig. 3.6(a), or the junction of adjacent pixels. Fig. 3.6(b). For
a defect

of a given

due to position,

area. the variation

is more significant

in pixel

representation

of defect

area

when the digital image has a very low pixel

resolution

Ph.D. A. Kehoe

1990

36

Chapter 3
Defect
Area Ad

Radiographic

Pixel Representation
of Defect Area Dd

Defect
Centre

..

~-

Fig.

- + - ...

3.6(a)

- ~ -.

,,-

'.-

-T

Test

defect

aligned

Fig.

-1-"'1

3.6(b)

Test

with

Intensity
Figure
the

threshold

values

minimum

intensity

digital

binary

of

image
25%,

image

plot

of the

50%

values

in

of

aligned

'unction

of

ixels.

Value

a histogram

greyscale

defect

with

Threshold

3.7 shows

digitized

Intensity
levels i

-f.

T'1_

Considerations

Image Processing

and

the

the

of the

intensity

simulated
75%,

image.

defect

values

defect,

Fig.

calculated
Figure

after

3.5(b),

from

3.8

the

along

the

shows

application

column
and

C of

intensity

maximum

and

the

corresponding

of

the

threshold

function.
The

choice

accurate

pixel

values,

say

in the

binary

only

intensity

pixels

image,
pixels

-image,

threshold

representation

75%,

those

binary

of

of

representing

Fig.

3.8(a).

is

actual

defect

only

Whilst

representing

Fig.

the

value

large

important

a small

area.

portion

at very

low

portion

of

in

determining

At

high

of the

threshold
the

threshold

defect

values,

defect

an

appear

say

appear

25%,
in

the

3.8(c).
Threshold
Values

White 255

75% 11
50% 11
25% 11
Black

&0....... ...&_ ..........


.....1...

Column C of pixel image

Fig.

3.7 Histogram

plot

of intensity
column

One

histogram

method

for

selecting

an

technique

(Ballard

and

Ph.D. A. Kehoe

1990

values

for the circular

test

defect,

along

C of ima e.
intensity

Brown,

threshold

1982). This

value
method

is

the

assumes

b i mod a I
that

the

37

r
Chapter 3
cumulative

histogram

of

distribution;

the

consists

search
two

the

histogram

peaks,

common

image

this

problem

of varying

intensity

for

value

the

is

minimum

then

levels,
global

interest

background.

of

threshold

an

as the

occurs

The

value

bimodal
is to

separates

threshold

the

value.

has a background

smoothly

is inadequate

technique

which

intensity

vary

Considerations

has

when the image

regions

value

image

regions.

intensity

chosen

or when

this case a single


the

levels

Image Processing

of two major

with this method

intensity

from

Radiographic

in intensity.

to separate

regions

In
of

Pixel Representation
of Defect Area Dd

Fig. 3.8(a)

50% TI

25%11

(b)

(c)

test defect at theshold values 25%TI

3.3.2

50%TI and 75%TI.

Analysis of Image Capture and Digitization Parameters

The pixel

representation

four parameters,

of a defect

in the digital

image

the actual defect area, Ad, the pixel resolution,

is a function

of

Pa, the level of

intensity threshold value applied to the defect pixels in the _image, TI, and the
position of the defect in the image, Dd(xy)'
The pixel representation

of defect area in the digital image is given by:

(3.2)
for a fixed pixel resolution, Pa, and a defect of a given area, Ad:

(3.3)
and for a given intensity

threshold

value, Tl:

(3.4)

For a given pixel

Ph.D. A. Kehoe

1990

resolution

and defect

area, the pixel

representation

of a

38

Chapter 3
defect,

at a particular

intensity

Radiographic
threshold

Image Processing

value,

is determined

Considerations
by the position

of the defect in the digital image. By examining the values of Dd for a series of
defect
value
by

positions

the greatest

error of pixel

gives a measure of the accuracy

image

range

processing

of intensity

techniques.

threshold

determine

analysis

and defect

the minimum sized defect, may be identified

capture

and digitization.

images

of two test defects,

square

test defect,

3.3.3

For
value.

Firstly,

shown

is presented

Theoretical

the analysis

which

an analysis
a theoretical

the circular
in Fig.

size

defect,

in the digital

analysis

test defect,

3.9. Secondly,

for

such results

of the three parameters


is described

it is

and

in

image.
of image
which uses

shown in Fig. 3.5, and a

an experimental

approach

to

which uses images of actual test defects.

Analysis

below

the pixel

resolution,

Pa , is assumed to be a fixed

The actual defect area, Ad, is normalized

the attribute

be conducted

any

This

may be identified

From

particular

section outlines

with

areas.

to

the analysis

accuracy

may

possible

The following

the

may be found.

with which a defect

Further

values

representation

Da, a dimensionless

to the pixel resolution,

giving

value of actual defect area. For a circular test

defect of a given area, Da , within a pixel image plane with origin at (x=Il.y=O),
the pixel representation
Dd

of defect area, Dd, is given by

= .J
"" Int(
(m,n)E Z

X (m, n)

X Da dx

dy)

D/

(3.5)

a=(Tl/100)

where
and

1 - a. +

Dr

= Radius

of defect area Da

rn,

m+I,
n+1

n+1
function XDa(n)=1

when

Da

when

Da

1 when

Pa(m,n)

m+Ln

= 0 when

p~m,n)

x,y origin of pixel plane

=0
function X (n)
(m,n)

The value of Dd , an integer value,


surface,

(m,n),

by a proportion

Ph.D.

A. Kehoe

Dr

is found by summing

is 'touched' by the surface of the normalized


greater

1990

than the factor

all pixels

whose

circular defect, Da ,

a; where a is given by the intensity

39

Chapter 3
threshold

Radiographic

Image Processing

value %Tl. Several values of Dd are obtained

the defect

in the digital

image. The minimum

may be used to determine

Considerations

for various

and maximum

positions

of these

the maximum error of pixel representation

of

values

of defect

area, Ea.
ABC

DE

ABC

Pixel Representation
of Defect Area Dd

DE

Background
2
3
4

Defect Area
Ad

Fig. 3.9(a) Square

2
3
4

Intensity level i

Pixel Area Pa

Fig. 3.9(b) Digitized

test defect.

test defect.

An absolute value of the maximum error, Ea, is calculated by:


Ea =

Max( Abs( (Da~ Dd) ))


(3.6)

Figure 3.10 shows the results of the maximum


threshold
value

values 5%, 50% and 95%TI over a range of circular

of normalized

values

error value, Ea, for intensity

are

plotted

representation,

defect

area,

against

the

Da, ranging

defect areas; the

from 91t to 2251t

corresponding

maximum

pixels.

values

Pa .. Const
Da=AdtPa

0.6

\
\\
\\

...

..
e
CII

E 0.4
::l

pixel

Dd, which range from 33 to 730 pixels.

0.8

IV

of

These

0.2

..

0.0

"

o,,~

"""""..:::::::::. ~

..........

_.

..

","",

_._..._.........:.,..

......

Intensity
threshold
5%11
50% 11
95% 11

r-,

200

.........

400

._

............ ."... N:

600

..

800

Dd (pixels)
Pixel representation of circular defect

Fig. 3.10
maximum

Maximum error Ea for intensity values 5%, 50%, 95%Tl, against the
values

of pixel

representation
circular

Ph.D. A. Kehoe

1990

defect

Dd, for

the

corresponding

normalized

areas Da.

40

Chapter 3
For

the square

calculation

Radiographic

test defect

the same

Image Processing

analysis

may

Considerations

be used.

of Dd, Eqn. 3.5. also takes into account the various

however.

the

orientations

the

square defect may adopt at each position in the digital image. Figure 3.11 shows
the values of Ea for the square test defect at intensity
and 95%Tl over a similar
plotted

against

the

range of normalized

corresponding

maximum

threshold

defect

values

areas.

of

values 5%. 50%


These

values

are

Dd for the square test

defect; with the values of Dd ranging from 35 to 890 pixels.


0.8

--oor---........
--~-

r--~---r--

........
--~-

......

+-__~

r-__
~

~l~-+

~ __~

.......
---.

Pa", Const

~ __~ __~Da~Ad~a

0.6 ........
+--t--~;.---+---+--r---+--~---+---+---t

\\

...o
...
CD

\\

0.4

::s
E

><

la

.' .",,~

::E 0.2

0.0

Intensity

i'--:-~'I~~~"'"~f'~"";;-;:'"
..~~; ;;~.,,!,.. ~;."';
L..--....I...-

--..___....I- _ _..._

.......

200

Fig. 3.11
maximum

,=~j
..w--1 ~thre~o~oo~

;.o.<>~m.tw:._:, ..

50010TI
95% TI

__.'--_...t-_-L._--I~--J

400

600
800
Dd (pixels)
Pixel representation of square defect

1000

Maximum error Ea for intensity values 5%. 50%. 95%TI. against the
values

of pixel

representation

Dd, for the

corresponding

normalized

s uare defect area Da.


In both

figures

representation
threshold.
Dd.

3.10

can

be

and

seen

to

for corresponding

This relationship

on the values

3.11.

the

values

steadily

increases

representation

maximum

decrease. at

in pixel

gives a clear indication

of pixel

of

all

error

values

representation

of

pixel

of intensity

of defect

area.

of the effect of pixel resolution

of defect

area.

and the maximum

error

values. For a given defect area. at a particular position in the digital image. the
number

of

resolution.
defect
error

pixels
For

representing

low

pixel

the

defect

resolution

is high. and from the figures.


of pixel

of the intensity

and 3.11. Experimentation


E a are at their highest
threshold

Ph.D. A. Kehoe

given

number

this results

of

by

the

pixels

value

of

pixel

representing

the

in a low value of maximum

representation.

The importance

at intensity

the

is

1990

threshold

value is also shown in Figs. 3.10

has shown that. for all sizes of defect. the values of


for intensity

values

above

threshold

values of 5% and 95%Tl. Whilst

and below

these

extremes

a reduction

of
41

Radiographic

Chapter 3

Image Processing

the values of Ea is given. This trend is clearly


shows the values of Ea for the circular
defect

area,

threshold

Da, 4 91t,

641t

and 811t

illustrated

Considerations

in Fig. 3.12" which

test defect at the normalized


pixels,

over the

full

range

values of

of intensity

values.

The values
threshold

of Ea can be seen to reach

a minimum

values of 40% and 50%Tl, having maximum

between

values

the intensity

at 5% to 95%TI.

The figure also shows that the minimum values of Ea do not occur at the same
intensity

threshold

value,

indicating

that there may be an optimum threshold

value for each size of test defect.


0.3

Pa .. Const
Da .. AdlPa

~\

...o
...

0.2

\\ "

..

GI

:l

"r-,

~<

)(

~ 0.1

:..."

........"'......

".

"'~

r-.

",

.....................

/'

,.,/"

/#'

,.;.~

~
~'"

Da (pixels)

"".Y'"'

~ :
......""'

~
~JoY':oY'~

~V
/;
7 //
Circular defect

491t
611t
811t

.........

0.0

o
Fig. 3.12

ixels over a full ran e of intensit

effects

threshold
Figure

0/0 TI
Intensity threshold

Maximum error Ea for normalized circular defect area


8I1t

The

100

80

60

40

20

value

of

increasing

on the values

defect

area

and

values 5% to 95%Tl.
variations

of Ea are represented

3.13 shows the three dimensional

surface

Da 491t, 611t and

in

in Figs.

of Ea values

the
3.13

intensity
and 3.14.

for the circular

test defect for a series of normalized defect areas in a small region of intensity
threshold
Dd,

values.

corresponding

against intensity
three

dimensional

relationship

Ph.D.

The values

pixel

representation

of defect

to values of Da ranging from 91t to 1691t pixels,

area

are plotted

threshold values of 40% to 50%TI. Figure 3.14 shows the same


surface

between

A. Kehoe

of maximum

1990

for the square test defect.

the three

parameters

of image

The figures
capture

illustrate

the

and digitization.

42

Chapter 3

Radiographic

Image Processing

Considerations

(00.22
. 0.18

~w 0:14

.14

X 0.1
~ 0.06

Fig. 3.13

.1
.06

Maximum error Ea against maximum

circular defect areas

ro

Da 91t to 1691t

values

ixels, over intensit

:L

0.3
.26
.22
.18
.14
.1

0.14
0.1

42

Fig. 3.14

values 40 - 50%TI.

0.3

. 0.26
~ 0.22
W 0.18
~

Dd, for normalized

Maximum error Ea against maximum values of Dd , for normalized

s uare defect sizes

Ph.D. A. Kehoe

1990

Da 91t to 2481t

ixels, over intensit

values 40 - 50%TI.

43

Chapter 3

Radiographic

Image Processing

Considerations

For all values of intensity threshold the values of Ea can be seen to decrease
as the values of Dd increase.

These error values

intensity

of

threshold

representation
optimum

values

47%

and

are at a minimum

50%TI,

for

all

between

values

of

of defect area Dd, Both figures give a second indication

threshold

in this limited

value does not occur

at a single intensity

the
pixel

that the

value but varies

range.

In practical

applications

it is desirable

to use a single

intensity

threshold

value on a whole range of defect sizes. From the above figures it is possible to
choose a value which gives the best overall values of Ea. Figure 3.15 shows the
values

of Ea for

threshold
error

the

circular

and square

defect

value 48.3%TI. These values represent

from pixel

representation

that

They also indicate the best possible


the

test

digital

image

may

be

given

the smallest

may be achieved

by the
possible

using

the

intensity
values

test

of

defects.

accuracy with which any area of defect in

identified

and

analysed

by

image

processing

techniques.
0.3

Pa .. Canst

,
I'\.

~ 0.2

...

......
0

III

E
:::1
E

><la

Da,.,AdIPa

f\.

r-,

'_

0.1

f'-- ~

,_

v;.............

:::i:

Intensity
threshold

'-...
0.0

Fig. 3.15
values

100

200

300
400
500
Dd (pixels)
Pixel representation of test defects

Maximum error Ea for intensity


of pixel representation
circular

Ph.D. A. Kehoe

1990

Dd,

600

48.3 o TI Square
48.31!.o TI Circle
700

value 48.3%TI, against the maximum

corresponding

and s uare defect

to a range of normalized
area.

44

Chapter 3

3.3.4

Experimental

For experimental
were

used, along

threshold
area

machined

Image Processing

analysis

a series

of images

depicting

with a simple image processing

image.

circular

analyse

In order
and

the pixel

to produce

square

shapes

system

actual

representation

of

the test images,

were

produced

and

depicting

at known areas. A series of video images of each negative


a CCD type TV camera,

showing

the test

to digitize,
actual

contact

discrete

negatives,

defects
defect

two high precision

reduced

steps to give a set of photographic

test

designed

made of each, see Fig. 3.16. These were accurately

using

Considerations

Analysis

and dimensionally

in each

Radiographic

over

negatives
a series

of

the test defects

were then captured,

defects

at various

positions

within the field of view.


The image processing

system performed

- digitization

the following

of the video image into a 128x 128 pixel

image having an intensity greyscale


- determination
values

cycle on each image:

of the maximum

of 0 to 255.

and minimum

intensity

in the image.

- threshold
- calculation

the image at n%TI.


of the number of pixels

representing

the test

defects.
An
obtained

accurate

measure

of pixel

using

an optical

grid,

resolution

in

the

digital

image,

Pa, was

Fig. 3.16, placed in the field of view of the

camera:

Pa

x grid dimension . y grid dimension


pixel rows . pixel columns

mm
pixel

= ~~~~----------~~-----~-------------(3.7)

where x and y grid dimension

are given by calibration

of the optical

grid in

the image, and pixel rows and columns fixed at 128x 128 pixels.
The level of intensity

threshold

value applied

to each image was calculated

by:

n%11 =

imax - imm.
. 100
n
(3.8)

where n is a specified threshold level in the range 10 to 90.


Ph.D. A. Kehoe

1990

45

Chapter 3

The

value

summing

of

pixel

Radiographic

representation

all the pixels

in the digital

of

Image Processing

defect

binary

area

image

was

Considerations

determined

with

intensity

=i =

by

value

of

unity:

Dd

The maximum
defect

area

maximum

where f(x)

p(x,y)

(3.9)

and minimum values of Dd were used, along with the actual

size,

error

Ad

normalized

of pixel

to the

representation,

pixel

area,

to determine

Eta, at a particular

values

intensity

of

threshold

value:

Eta

Max( Abs( (Da ~ Dd) ) )


(3.10)

The values of Eta may be found for all threshold values in the range 10% to
90%TI

using

the above

analysis.

Figure

3.17

shows

the

values

of maximum

error E'a for intensity threshold values 20%, 50% and 80%TI, over the range of
normalized

circular

defect area, Da, 121t to 2031t pixels. These values are plotted

against the values of pixel representation


730 pixels.

of defect area Dd: ranging from 33 to

It can be seen that the experimental

the theoretical

results

values of Eta decrease

of Fig.

3.10.

results

For all values

with corresponding

increases

correspond

of intensity
in defect

0.8 .----r---r----r---or---r---..,...---.,.----,

closely

threshold

to
the

area.
Pa - Canst

F_----+-----~----~----~F_~ __~-- __~----~ __--~Da=Ad~a

200

400

600

800

Dd (pixels)
Pixel representation of circular defect

Fig. 3.17
maximum

Maximum error E'a for intensity values 20%, 50%, 80%TI, against the
values

of pixel

representation

normalized

Ph.D.

A. Kehoe

1990

circular

Dd, corresponding
defect

to a range of

area Da.

46

Chapter 3

Radiographic

Image Processing

In Fig. 3.18 the values of E'a are shown for a series


test defects areas: Da ranging

from

range

values,

of intensity

threshold

of normalized

191t to 2041t pixels, plotted


20%

to

80%TI.

Considerations

As

circular

against the full

for

the

theoretical

results in Fig. 3.12, the values of E'a can be seen to be at their lowest between
the intensity threshold values 40% to SO%TI. The minimum values of E'a do not,
however,

occur

at the

same

intensity

threshold

value.

This

illustrated

in Fig. 3.19, which shows the values of E'a for the square test defect

plotted against the values of Dd in the region of intensity

effect

is clearly

threshold values 40%

to SO%TI. The variation of E'a for very low values of defect area is also shown in
the figure. Here the values of E'a can be seen to be very large for very small
values of sizes Dd, corresponding
with a fixed pixel resolution:
square

0.5

to small

sizes

of normalized

defect

area D a

< E'a < 1.7 when 0 < Dd < 20 pixels

for the

test defect.
0.6

r----r--~----,r---.,.--""'T""-__,.--,__-_r_-__r-___.

Pa'"
Const
r---~---4+---~---+----b---~---r---)~---+--~Da=Ad~a

0.5

0.1

0.0

o
Fig. 3.18

20

40

60

80

%TI
Intensity threshold

Maximum error E'a for normalized

from 191t to 2041t

circular

100

defect area

ixels over a full ran e of intensit

Da ranging

values 20% to 80%Tl.

Figure 3.20 shows a similar plot to Fig. 3.19 for the circular test defect, with
values of E'a plotted

against

very low values

of pixel

representation

area Dd . The figure also shows the values of Ea at the intensity


of 48.3%Tl.

determined

by the theoretical

experimental

values

E'a

slightly

of

from the theoretical

at threshold

resolution,

small

the values of E'a are significantly

when 0 < Dd < 20 pixels

Ph.D. A. Kehoe

values

1990

above.
48%

threshold

see Fig.

to 50%TI

3.15.

deviate

value
The
only

values of Ea at 48.3%TI. The figure shows that at

very low values of Dd, and corresponding


pixel

analysis

of defect

sizes

of defect area at a fixed

increased:

0.2 < E'a < 0.7

for the circular test defect.

47

Chapter 3

Radiographic

Image Processing

Considerations

2.0

p a.

Canst

0a .. AdlPa

~
~
~

\\
~;_$""\.

Intensity
t hreshold

.~

I"-.......

"""......
"''''r''~=~-,

..................

0.0

o
Fig. 3.19

20

fA-

40% TI

.<,,,,.

44%T1
48%T1
SO%T1

fjr
.

..

;>....

........

,'~

""""' __'""W

...........

....

--'"'<.'!l'

40

60
80
Dd (pixels)
Pixel representation of square defect

100

Maximum error E'a for intensity values 40% to 50%TI, for values of Dd

from 4 to 90

corres

ixels,

to normalized

s uare defect areas.

Figures 3.19 and 3.20 give an indication of the effect of a very high value of
pixel

resolution

on the accuracy

of defect

representation

in the digital

For a defect of a given size, the higher the value of pixel resolution
the

number

of pixels

representing

the defect

in the

image,

the

at intensity

values

theoretical

of Ea
test

threshold
for

the

shapes.

3.3.5

These

digital

on

the

cycle
is

values

during

plotted

has shown the effects

accuracy

and

reliability

48.3%TI

against

the

segmentation
efficient,

inspection

process

parameters

is made

Ph.D. A. Kehoe

to

1990

of

defect

for

both

the

corresponding

threshold

value

and

inspection

meets
full,

with careful

it

the
is

important

applied

in

the

of the defect
to the defect

that the image

processing

for 2D defect

inspection

system

quality

and digitization

representation

the position

of the image. To ensure

radiographic
the

of image capture

are pixel resolution,

and the level of intensity

of an automated

accurate,

are

values

of defect area Dd .

image. These parameters

in the image,
pixels

threshold

Conclusions of Analysis

The above analysis


parameters

and square test

value 48%TI are shown in Fig. 3.21, along with


intensity

values of pixel representation

the lower

and consequently

the higher the value of E'a. The values of E'a for the circular
defects

image.

assurance
that

the

standards
selection

of
of

the
such

consideration.

48

, ,,

0.8

0.6

....
I

\
\.\~\

UJ

CD

E 0.4
:l
E

Chapter 3

Image Processing

Considerations
Pa- Const
Da-AdIPa

!\

..

)(

::l!

Radiographic

~.

.~v..

0.2

Intensity
threshold

.~

~.

~~

':'~""".... ...,...:,s....

.v.r........

*..""....... ~...................

."'<' .........................
........................ ..:;::. ...

44%TI
48%TI

-s....

_._
0.00

20

60

40

48.3% TI

.......
80

50%TI

100

Dd (pixels)
Pixel representation of circular defect

Fig.

3.20

Maximum

error

E'a for intensity

for Dd from 5 to 88 pixels,

values

corresponding
defect

in the region

to a range

40%

to 50%Tl

of normalized

circular

areas.

Defect Position
Due

to

the

radiographic
occur

image

at

any

parameter

cannot

consideration

when

are

not

be

to

of

the

under

component
to

give
It

image.

selecting

position
In

digital

order'

the

predetermined.

manipulated

the

in

problem,

within

be

digitization

the

cannot

in

operations

of

position

representation

and

nature

the

that

practical

should,

however,

accuracy

As

or

of

of

the

may

such

this

reliable

defect

given

every

be

parameters

digital

defects

evaluation.
accurate

the

in the

terms

a more

appropriate

ensure

a defect

image
image

capture
processing

compromised.

Pixel Resolution
In
a

choosing

trade-off

is

digital

image.

allow

the

image

capture,

processing
desirable
image
For

a pixel
encountered
A large

complete

give

processing
most

determined

limiting

sufficient
system

by the

satisfies

between

high

definition

and

of view,

given

by high

values

of
the

Conversely

industrial

Ph.D. A. Kehoe

field

which

inspection

and

system.
to

resolution

detail

radiographic

1990

size

component

amount

high

is able

minimum

of

in

image

definition,
in

the

the

to accurately

the

of defect

to be

choice

of

the

of Pa , is desirable

to

single

low
and

a range
of

identified

view

cycle,

passed

by

requirements
in

image

identify

inspection

field

data

given

digital

inspection

speeding

to

the

values

of

ensure

image
Pa, is

that

of defect

pixel
in the

the
sizes.

resolution

is

radiographic

49

Chapter 3
image.

as

specified

in

the

Radiographic
quality

Image Processing

assurance

standards

Considerations

of

the

inspection

process.

r---_,_--~-.....,r__-_,_--...,...--r_-__r--...,
4.
Pa.

0.3

Const

Oa = AdlPa

sas 0.2

"Cl

...0
...
Cl)

Intensity

E
~ 0.1

threshold

><as

48.3%TI Circle
48.3%TI Square
48%TI Circle
48%TI Square

==
0.0
0

200

Fig. 3.21
values

400
600
Op (pixels)
Pixel representation of test defects

Maximum error Ea and Eta for circular

48.3% and 48%TI. against

800

and square defects at intensity

corresponding

values

of pixel representation

of defect area Dd.


Figure

3.21

resolution

may

be

used

to

give

an

indication

the

required

in the digital image. The figure gives a clear indication

of pixel

resolution

on the pixel

representation

of defects

and on the maximum error of pixel representation


of Pa test defects

are represented

by a greater

image. This gives a corresponding


the

of

digitization

representing

of

actual

the defect

of the effect

in the digital

image

of defect area. At low values


number of pixels in the digital

low value 'of error Eta. At high values of Pa

defect

in the

pixel

area

digital

is

very

coerse

image.

This

results

with

few

pixels

in a much

higher

value of error. Eta.


The
chosen

appropriate

level

in one

two

representation
represented
known.

of

of

pixel

ways;

by

resolution
selecting

of defect area, or by selecting


in the

then Fig.

representation,
which should

image.

If the

required

3.21 may be used


Dd . This

represent

value

the smallest

represents
defect

Ph.D. A. Kehoe

the

the

digital

required

the minimum
accuracy

to give

of Dd and the known size of the smallest


may be easily

in

image

accuracy

of pixel

minimum

in the digital
defect

be

of pixel

size of defect to be
representation

a corresponding
the

may

value

number
image.

the required

is

of pixel
of

pixels

With a value
pixel resolution

determined.

1990

50

Chapter 3
Alternatively.
image

Image Processing

Considerations

if the minimum size of defect to be represented

in the .digital

is known.

then

with

Radiographic

an assumed

value

of pixel

resolution.

1 m m 2/pixel. a value of Dd may be calculated

and a corresponding

taken

the maximum

from the figure.

This value

represents

to which a defect will be represented


unacceptable
resolution

for

the

value of E'a

value

of accuracy

in the digital image. If the error value is

inspection

should be modified

say Pa

requirements

then

the

value

of

pixel

until a suitable value is reached.

It should be noted that the values of maximum error of pixel representation


of defect area. E'a, Fig. 3.21.
Fig.

3.16.

accuracy
test

In effect
to which

images.

background.
real
could

values

image

The

images

high definition

be possibly

For

be

resolution

using the methods

minimum

defect

reading

of

considered

reliably

detect

intensities

of

defects

described

in

selecting

radiographic
accuracy

that

a value

of

pixel

if the specified
accuracy

of 25%.

ne,

of the defect.

is 50

of Eta for the square test defect from the figure. as

Threshold

The level of intensity


representation

value of pixel resolution

Value

threshold

of the defect

value has a significant

in the binary

digital

image;

effect

to select the correct

give

of defects

an accurate

operations
intensity
values

in

binary

the

image

threshold

particular
Experimental
threshold

47%

value
value

A. Kehoe

processing

values

of maximum
between

representation

of

error
to

which
for

would

however.

varied

considerably

From

was

theoretical

The

analysis.

1990

which

both

50%Tl.

48.3%TI

system.

has

theoretical
give

the

shown

between

for

found
and

on the pixel

this is clearly

in Figs. 3.12 and 3.18. It is important

Ph.D.

and

0.2mm2/pixel.

Intensity

were

defect

in

actual

is Imm2 with a required

these give the worst case. This gives a corresponding


Pa

defects

methods.

value of pixel representation

the values

minimum

much unlike

As an example.

above.

images,

noise.

to be the highest

before

test

absolute

shape and no image

detection

size for inspection

then the lowest possible


pixels;

the

uniform

using image processing

should

experimental

could

of Eta may be considered


achieved

factors

These

exhibit

using

represent

methods

of defect

images.

the values

of E'a

processing

test

radiographic

images

these

were calculated

threshold

further

the
to

experimental
overall

that

the

47% to 50%Tl.

lowest

test

images

values

optimum

the

the

indicated

best

analysis

analysis.

produce

analysis

value to

defect

above

shown

that

one

of

Ea.

intensity

Such observations

51

follow

closely

the

Chapter 3

Radiographic

assumptions

of the bimodal

Image Processing
histogram

Considerations

theory

outlined

in

section 3.2.1 above.


The values

of intensity

threshold

minimum

intensity

values

percentage

intervals

between them. This technique

images,

consisting

intensity,

of

distribution.
accurate

radiographic

images

systematic

and

by

background

to

an intensity

divide

the

variations

changes

these

to apply the findings

image

the

digital

radiographic

a single

intensity

the

histogram
selection

and

threshold

Instead

geometry

accuracy

described

interpolation

of

threshold

Ph.D. A. Kehoe

should

applied

pixels

approximates

of a single threshold

technique

of the analysis

they

is

Actual

have

large

and comparatively
global

intensity

in this case.

to real digital
be

50%TI

background.

Fig. 3.2. A single

operation

value

background

which

possible

around

with a

slightly

radiographic

modified.

The

image should be divided into a series of small windows and

intensity

defect

threshold

the

uniform

histogram

value

attributes.

by defects,

and

of

exhibiting

intensity

from

due to component

caused

determination

and

threshold

defects

the maximum

is well suited to simple test

value to segment the defects is inappropriate

In order

variable

images

and

do not possess

intensity

intensity

threshold

best

defect

Choosing

sufficiently

both

only

test

using

Fig. 3.16. Such an image gives a smooth

bimodal

small

in the

were calculated

bimodal

value between

by Rosenfeld

A window

may be considered

in the subsequent

individual

to each.

distribution.

binary
values

to have
In

contains

an intensity

such

cases

the

47% and 50%Tl would give the


image.

and Kak uses

threshold

which

A similar

a windowing

between

windows

thresholding

technique
to

give

and
a

across the whole of the image (1982).

1990

52

CHAPTER 4
IMAGE PROCESSING TECHNIQUES
FOR 2D DEFECT INSPECTION

Ph.D. A. Kehoe

1990

Chapter 4

Image Processing

4 IMAGE PROCESSING
INSPECTION

The

image

radiographic
analysis.

processing

images

image

highlighting
represent

operation

of the component

image consisting

for

2D

of two main

The defect detection

digital

TECHNIQUES

system

consists

Techniques for 2D Defect Inspection

defect

stages;

inspection
defect

is designed

under

FOR 2D DEFECT

detection

pixels

in the digital

industrial
and defect

to take as input a captured

evaluation,

and produce

of only suspect defects in the component.

those

in

radiographic

as output

an

This is achieved by

image

which

are likely to

part of a defect.

The input to the defect analysis system is an image of suspect defects made
up from
image

individual

into

describe
original

a description

its

description

shape,

size,

represents
input

system

defect

Defect

of the

defect,

position
a

image

pixels.

vast

analysis

is designed

a set of 2D

and orientation
reduction

and ensures

that

in

the

local

in the

image

to convert
attributes

digital

subsequent

which

image.

information
operation

the
This

from

the

of the

IKB

is efficient.

4.1

1ECHNIQUESFOR DEFECf DE1ECfION

The

radiographic

process,

containing

intensity

variations

image
many

presents

many

overlapping

problems

component

due to the component

to

the

features,

geometry.

poor

defect
large

contrast,

detection
systematic
a lack of

image detail and image noise. The defect types to be detected in the component
image

include,

cracks,

cavities,

porosity

and foreign

Fig. 3.2. These defects may appear at any position

Ph.D.

A. Kehoe

1990

inclusions,

and orientation

as shown

in

in the image

54

Chapter 4
of

the

component

Image Processing

and

may

indication

to the presence

intensity

value

detection

techniques

whilst
in the

large

shape

in the image,
its

be

able

to

accommodate

the small

of background

..

..f

contrast

noise

camera

system.
high

detection

contains

for defect

improve

the

ensuring

that

background

image

appears

which,
pixels.

contrast

spatial

frequency

as edges
more

by defects

Def ect
pixe Is

Defect
Detection

are
This

likely

to

process

producing

in the digital

Ph.D. A. Kehoe

represent
effectively

an

Noise
1990

appears

and the

output

Fig.

4.1.

electronics

The

of the

image as isolated
image

and

technique

TV

pixels of

processing.

operation

regions

detection

method,

technique,

of noise. This is caused by the

enhancement

defect

may

be

is designed

to

their

background,

is able to successfully

detection

operation

is designed

part

a defect

region

of

separates
image

the

consisting

defects
of

to

in

the

from

the

only

suspect

defect pixels.

Techniques

radiographic

and its lack of spatial

are also represented

correlated.

the

defect

detection

subsequent

The contrast

between

a noise reduction

in the digital

in the image. The defect

image,

noise

device

during

the subsequent

image.

involves
amount

capture

Noise Reduction

Image

..

and a defect

defects made up from individual

4.1.1

caused

methods.

a certain

Image noise

mistaken

component

problems,

y mage p rocessrnq-

Contrast
Enhancement

process

technique

in the

which

Defect

intensity,

pixels

above

of

Background
pixels

defect

locate each defect

region

image

inherent

find

changes

enhancement

radiographic

very

the

Overall defect detection

The overall

positive

background.

Contrast enhanced
image

NOIse
pixels

Fi . 4.1

immediate

intensity

only

intensity.

Noise reduced
image
Noise
Reduction

The

is a localized

of

Def ect DeClon


fbI

I~

size.

that

and enhancing

Digital
image

and

with

should

variations

any

of a defect

contrasting

locating

take

Techniques for 2D Defect Inspection

image

correlation.

by high spatial
as isolated

is characterized
Component

frequencies,

pixels,

dispersed

by its high
features

such

but these are much


at random

in the
55

Chapter 4
image.

with

intensity

neighbours.

Such

smoothing

Image Processing

filters.

values

noise
such

much

pixels

Techniques for 2D Defect Inspection

greater

than

be

eliminated

may

as the common

mean

that

filter

of
by

their

immediate

low-pass

and median

spatial

filler

(Pratt.

1975).
The

conventional

methods.

using

its immediate
the

the intensity

by

some blurring

area

intensity
mean

filter

process.

value

filter

This

brightness

replaces

images

may be implemented

filter

uses

as part of

an area

any isolated

background.

process
value of

noise

it

does.

a pixels

intensity
This

of the original

value

operation

spots

in

however.

technique

and eliminate

with

the median

improves

on the
much

making it less attractive

system.

for image noise reduction

the summation

but is a non-

it is. however.

image

as a high speed operation

image processing

This

as the mean filter.

neighbours.

more

to implement

succession.

their

uses the same masks

A more simple method


rapid

mean

to eliminate

with

of its immediate

1979). which involves

which

linear

of image detail when large masks are used.

which

for use in an on-line

is by discrete

and be made to operate

The

tends

them

by preserving

more difficult

filter

technique.

hardware

system.

mean

value of a pixel with the mean intensity

averaging

The median
linear

processing

neighbours.

image

introduce

image processing

image

which replaces

of the

a mask and convolution

into specialized
an on-line

implementation

is image averaging

of a series of digital
tends

random

to
noise

increase

-the

in the image;

n images reduces the noise in the image by a factor of vn.

(Hall.

images captured
contrast

of

low

the averaging
It does.

in
of

however.

tend to blur detail in the image when high values of n are used.

Image

integration

with a previously

involves

the

combination

of part

of a captured

image

stored result (Hall. 1979).

Part of a captured image. Iq. is combined with a stored image. Ip(n-I). to give a
new image. Ip(n):
I

pen)

= I

(-1) + I
q(n) n
p(n-I)

(11-- )
n

(4.1)

where n is the number of images captured.

Ph.D. A. Kehoe

1990

56

Image Processing

Chapter 4
This

noise

..J (20-1),

reduction

and is particularly

image,

especially

advantage
images

from

of causing
used.
into

reduction

technique

results
shows

4.3(c)

the

4.3(b),

in

the

reduced

intensity

Contrast

Defects

appear
with

changes

are

background

their

intensity,

caused

enhancement

stage

image,

highlighting

the

ensures

regions
the

and accurately
One reason
of intensities
simply
full

ranging

from

greyscale

by remapping

transforms.
stretching

Contrast

stretching

intensity
histogram
in

the

between

values

of

equalization
image

to

the minimum

Ph.D. A. Kehoe

1990

this

inspection.
4.3.

in random

Figure

and Fig.
noise

is

image

before,

Fig.

regions

of intensity

operation.

These

systematic

component,

Fig.

whilst
the

local

variations

3.2.

the intensity

techniques

The

contrast

leaving

operation

is

aim

in

the

of the

in the input

the

should

intensity

unimportant
improve

image
function
the

able to successfully

the

device

the

image

point

performs
distribution

and maximum

up

process
all

values

the

system;

called

the

usually

intensity

radiographic

(Rosenfeld

a remapping
of

are

to medical

equalization

take

processing

techniques

applied

simple

This may be

levels of the image to occupy the

remapping

to

image is the limited range

is able to accommodate.

in

locate

image.

in the radiographic

operators

are

in the digital

and histogram

make

in Fig.

reduction

the

the intensity

Such

Two

an

of

as the noise

for 2D defect

as localized

regions

available

0 to 255.

are contrast

the

defect

capture

greyscale

was chosen

background.

than

each defect

the image

implementation

shown

the

in the image, such as the edges of the defect. This

for poor contrast

of

image

Additionally,

subsequent

overcome

range

by

has

of the number of

radiographic

immediate

defect

intact.

represent

the

is to improve

of defect features
that

The

in the

Techniques

smaller

contrast

definition

of

component

of

are

the noise reduction

significantly

background

image.

Enhancement

that

easy

also

image of a crack type defect,

profiles

in the

regardless

system

process

noise

integration

integration

processing

radiographic

and after, Fig. 4.3(d),

contrasting

image

the

by a factor of

the random

Image

and

integration

noise

4.1.2

at eliminating

factors,

for the image

the original

in the image

of image detail,

hardware,

image

noise

electronics.

these

computer

resultant

indicated

effective
TV

to

of the

4.3(a)

reduces

no blurring

Due

technique
The

operation

Techniques for 2D Defect Inspection

or

images

and Kak, 1982).

which

transforms

the

available

intensity.

The

of the intensity

intensity

in the available

histogram

values
uniform

range.
57

Chapter

Image

Processing

Techniques

for

20 DcfccI

b
Fig.

4.3

(a) Radiographic

profile.

(c)

Noise

image

reduced

of defect

image

horizontal

Fig. 4.5
profile.

(a) Noise
(c) () -Norm

reduced

image

enhancement
intensit

Ph.D.

A. Kehoe

1090

Inspection

by

and (b) its hoihontal

Image

inten

Integration,

and

intensity
(d)

the

rofile.

of defect
of defect

and (b) its horizontal


image,

and

(d)

the

intensity
horizontal

rofile.

58

Chapter 4

Both

of

increasing

techniques

the contrast

applied
does,

these

to

radiographic
industrial

radiographic

rely

upon

image.
are

changes,

not

caused

the radiographic

by defect
image

of

required
its

surrounding

been

to

taken

from

properties
value

a large

constant

intensity.

enhancing

very

whilst

contrast

image

contrast

would

enhance
inspector

enhancement
The

first,

properties

techniques

G-Norm

of pixel

the intensity

value

of the pixel;

the value
C-of-G

to determine

in

have

contrast

intensity

values

image.

These

the

increasing

of background

contrast

is

value and those of

pixel

of moments

these

an area processes

each

method,

in

small

the human

around

reducing

accuracy

processes

techniques

to assist

of the

defect detection.

operation.

neighbourhood

The second

upon the principles

new

on the statistical

pixels,

point

these

techniques

of the contents

with sufficient

the component

this

images,

these

simple

well enough

Two

are used to modify

of defect

only

for automatic

perform

e nh a n c e me nt , is based

be specified

of

a pixel based on its intensity

neighbours.

developed

radiographic

success

knowledge

As such

enhance

which will enhance

The

selectively

sufficiently

medical

detail in the image, and may be equally

being

regions.

to selectively

on

a priori

Additionally,

in his task, but are inadequate


In order

well

this cannot

capable

Techniques for 2D Defect Inspection

images.

some

Often

applications.

techniques

perform

and improving

industrial

however,

Image Processing

pixels

enhancement,

the centre of intensity

the
to a

is based

of a small

window around each pixel; this may be likened to finding the centre of gravity
of

a plane

systematic
contrast

shape.
intensity

cs -Norm
determine
then

changes

Contrast

contrast

used

to modify

if it is likely

overall

effect

of

background

the

contrast

of the

of

this

background

transform
image,

is

whilst

to

flatten

the

increasing

the

process

to

Enhancement

enhancement
window
the

intensity

to be a pixel

of this transform
image,

technique

deviation

placed

over each pixel


value

location.

at the pixel

representing
by

an

of a population

is to flatten

caused

uses

the

area

of intensity
These

location,

part of a defect

the systematic
component,

values

are

increasing

its

region.

intensity

whilst

values,

The

changes

increasing

the

of regions of defect pixels.

For each pixel, Po(x,y),


values,

effect

the mean and standard

from a large

value

overall

of regions of defect pixels.

q-Norm

taken

The

f(x)

Ph.D. A. Kehoe

i, are taken

1990

in the image, 10, a small


from the surrounding

population

neighbourhood

of intensity
using a pixel

59

Image Processing

Chapter 4
window,

s(m,n),

distribution
s(m,n),l

Techniques for 2D Defect Inspection

of side w. Typically the population of the window would have a

as shown in the Fig. 4.4 below: where N is the size of population of


is the mean intensity

value,

and

0'

i is the

standard

deviation

of the

population.

A
N

- i (J

+i

ical intensit

distribution

for

(J

ixels in a window

These values are given by (Volk, 1958):


_o

q=J

... 1 ~.
l=-..Jl
N rn.n=O

The following

transform

w
1 ~
(. 1N ..J
m,n=O

i)

(4.2)

is then applied to the centre pixel of the window:

(4.3)
I

where i is the modified


The

majority

distributed
pixels

of

the

pixel

intensity

values

in

the

pixel

window

are

about the mean intensity value in the region B - C of Fig. 4.4, these

constitute

intensity

intensity value of the centre pixel.

the

values

the extremities

background

contrasting

image

with

their

background

to

relatively

window.

background

of the intensity distribution,

D of Fig. 4.4. The above transform

in the

and

Defect
therefore

have

appear

in the shaded regions A - Band

tends to reduce the intensity

constant

pixels

value,

whilst

increasing

at
C -

values of the
the

intensity

values of the defect pixels. This effect can be seen in Fig. 4.5 which shows the
noise

reduced

enhanced

input image of a cavity type defect,

image,

Fig.

4.5(c).

The

horizontal

Fig. 4.5(a),

intensity

profiles

and the output


of

the

two

images are sown in Figs. 4.5(b) and (d).


As

this

component

Ph.D.

technique

does

not

image it is capable

A. Kehoe

1990

rely

upon

of enhancing

any

structural

information

of the

any type, or shape, of defect. Its

60

Image Processing

Chapter 4
does,

however,

enable

require

the transform

a relatively

to highlight

Techniques for 2D Defect Inspection

large

population

the defect

of

intensity

intensity

values

values

adequately;

to

pixel

window sizes of 15 < w < 40 were found to give acceptable results. Such large
window
point

sizes r~sults in a great deal more computer

processes

described

processing

above. With the use of specialized

image processing

hardware

it may be possible to reduce the amount of processing

unlikely

that

significant

improvements

could

than the simple


time, but, it is

be made.

C-of-G Contrast Enhancement


The C-of-G
problem

contrast

of increased

enhancement
processing

technique

time

by

was designed

implementation

to overcome

the

of an area

process

of a small window,

located

which uses only a limited size of window.


The technique
at each

pixel

window

gives

may

determines

in the

to enhance

window containing
only

very
may

centre
intensity
pixels

varying

background

corresponds

corresponds

centre

of defect

be

to

the defect

pixel

intensity,

any pixel

would
closely

given

be given

pixels

position.
the

position.
a large

to the centre
small

of intensity

in the

of the image at this location.

factor
weighting,
in the

when

the

the

image.

A window

of intensity
the

of the

value

for each pixel

of the
in the

when the centre


window,
centre

of

background
of

intensity

to an outer pixel in the window.

image, 10, Using the intensity values, f(x),


the centre of intensity
object.

For a

containing

A small pixel window of side w, is placed over each pixel, Po(x,y).

principle

and

of the window would

centre

pixel

weighting,

ID

Therefore.

may be used as a weighting

pixels

would

the contrast
with

correspond

Defect

of the

of the contents

closely

of intensity

image.

The _ position

a defect pixel, the centre of intensity

a slightly

window

image.

an indication

be used

correspond

the centre of intensity

of
The

window

for each pixel in the window, s(m,n),

of the window is determined.

moments;

as used
is considered

value

represents

a mass.

Ph.D.

A. Kehoe

1990

in the

to determine
as a plane

the

This is achieved
centre

shape

of

and each

using the

gravity

a plane

pixel

intensity

61

Image Processing

Chapter 4

Using

the

centre

pixel

Techniques for 2D Defect Inspection

as a reference.

0,

the centre

of gravity

of the

window is given by:


w

OX )

(f(x).

m.n=O

C-of-O = ...;_..;_.----w

L f(x)
m.n=O

(4.4)

where 0 A represents the position of each pixel in the window, and 0 C the
position of the centre of gravity. The modulus of the above yields distance of
the centre of gravity

from the centre pixel:


w

C-of-G

L ( f(x). OA)_
I m_.n_=O
w
L f(x)

I QC I

m,n=O

For

window

placed

over

an

(4.5)

image

area

containing

little

intensity

variation the value of 0 C may be very large. To avoid this:

C-of -0

Ii

m.n=O

This

equation

convolution

f(x) . OA )

may be implemented

technique.

I = I OC I I

as an area process.

The values of the mask. k(m,n).

f(x)

m.n=O

I
(4.6)

using

represent

a mask and
the distances

OA from the centre pixel of the window. The mask of side w = 5. shown in Fig.
4.6 below. was found to work well. Alternative masks are shown in Fig. 4.7.
The convolution

operation

is performed

by:

C-of-G

L k(m,n)
m,n= -w
2

Ph.D. A. Kehoe

1990

. s(m,n)

= p.m(x,y)
(4.7)

62

Image Processing

Chapter 4

Techniques for 2D Defect Inspection

14 11 10 11 14
11 7

11

10 5

10

11 7

7 11

14 11 10 11 14

C-of-G contrast enhancement

Fi . 4.6
The

resulting

Pm (x,y)

value

of

this

operation

is

in the output image 1m. Following

mask k(5,5).

assigned

a complete

to

pixel

operation

image the pixel values are scaled, 0 to 256. to eliminate


small

the

location

on the whole

any very large or very

values.
7

21 18 16 15 16 18 21
18 14 11 10 11 14 18

16 11 7

7 11 16

15 10 5

16 11 7

5 10 15
7 11 16

18 14 11 10 11 14 18
21 18 16 15 16 18 21
Fig. 4.7

Alternative C-of-G

Figure

4.8 shows the results

contrast

mask k(3.3)

enhancement

of the C-of-G

contrast

and k(7.7).

enhancement

on

an

image of a cavity type defect. Figures 4.8(a) shows the noise reduced image of
the defect,

along with its horizontal

shows the output


result

image of C-of-G

on the horizontal

intensity

As with the cr -Norm technique


may be used to selectively
rely

upon

Additionally.
window.

any

intensity

profile,

contrast

enhancement,

the C-of-G

and Fig.

4.8(d)

the

contrast

enhancement

technique

enhance any type. or shape, of defect. as it does not


about

technique

performs

enabling

Figure 4.8(c)

profile of the image.

information

the

Figs. 4.8(b).

its use within

the

content

very

an on-line

well
image

of

the

with

component

small

processing

sizes
system:

image.
of

pixel

window

sizes of 3 < w < 7 gave very good results. as shown in Fig. 4.8(c). For these
reasons the C-of-G
2D defect

inspection

technique

was chosen

as the contrast

to those used for blurring

A. Kehoe

1990

for the

system.

It should be noted that the masks illustrated

Ph.D.

enhancement

in Figs. 4.6 and 4.7 are similar

filters.

63

Image Processing

Chapter 4

4.1.3

Defect Detection Techniques

Although
the

sharing

many

common

for

detection

of

are

not

techniques

section

1.1.2,

techniques

are

methods

based

features

directly
on

problems
in

applicable

structural

with

of medical

diagnostic

boundaries

boundaries

use

to

the

in the image.

estimating

rib boundaries

to

curves

and polygons

processing.
described

problem.

feature

structure

techniques

The composite
(1978),

current

The detection

matching

image

radiographs.

approach

knowledge.

pattern

medical

chest

make great use of the known anatomical

wealth
lung

Techniques for 2D Defect Inspection

These

detection.

The

of the body and a

techniques

to

in

for rib and

approximate

the

actual

used by Wechsler

and Fu for

for lung boundaries

used by Fu

and others (1976). are based on the known shapes of the lungs and ribs in the
body.
Techniques
structural
small

for

information

rounded

features

automatic
to

opacities

detection

limit
are

the

of tumours

image

known.

and to appear in restricted

and

processing

by medical

pnuemonoconiosis
problem.

experience,

use

Tumours
to have

and

certain

areas of the lung region (Savol and others.

1980). Ballard

uses a pattern matching

small rounded

objects

in a particular

technique,

a Hough transform,

to detect

area of the lung region of the radiograph

(1976).
Unfortunately.
image

cannot

industrial
shape

the

rely

of

defects

structural

knowledge.

in

knowledge,

Defects

in the

and size. and may appear at any position

classification.
techniques

the

4.3(a)

and

matching

more

suitable

are

4.5(a).
difficult

approach

industrial

or draw

radiographic

upon

component

a wealth

may

and orientation

be

of

Such

structural

to construct

of
any

in the bounds

and its type unknown

is to use

are two main methods

for detecting

pixels

the boundary

which

represent

in medical
rounded

will be unique

the

prior to

model

for

statistically

based

this

type

based

of

defect

techniques.

There

region

Fig.

pattern

A much

detection

which

Each defect

see
with

problem.

(1976),

systems;

defect

region.

a defect
of the

in the industrial
defect;

find

Both of these approaches

image;

the pixels
are used

Ballard locates the edges of tumours in the lung

Savol and others use a region growing

opacities

A. Kehoe

represent

the complete

diagnostic

The gradient
Ph.D.

on such

inspection

of the component.

find

detection

technique

to find small

(1980).
based local edge detector
1990

may be used in the industrial

image
64

Image Processing

Chapter 4
to locate
This

all the pixels

technique

defect.

gives

but suffers

image noise.
pixels.

Skramstad

on the boundary
a very

from

two major

problems

are

to

a defect

contains

many

requires

an

These

problems:

well

result

of

the technique

is susceptible

from failure

illustrated

and component.

representation

in

techniques.

more

pixels

increased
The

pixels

for defect detection

depending

technique

internal

pixel

the defect

the

the

detected

to extract

experimental

to

all edge
results

of

(1980).

Region based techniques


pixel

between

efficient

and gaps in the boundary

These

Techniques for 2D Defect Inspection

upon
than

amount

some

the
of

three

resulting

defect

regions

region

The

are

lost

resulting

during

are

during

and

subsequent

advantages

assign a

representation

representation.

processing

however.

the

test.

boundary

have.
of

have a basic strategy;

over

therefore

operations.

edge

complete.

very

processing.

and

detection

few
the

of

the

intensity

values of its internal pixels can be used to give an estimate of the volume of a
defect

in the

presence

component.

of image

for defect

Additionally.

noise.

detection

As such

in industrial

Edl:e Detection
One of the most

the

region

techniques
based

radiographic

suffer

image

images

little

from

processing

the

techniques

show much promise.

Techniques

effective

methods

of locating

defects

in the radiographic

image is to detect the edges of the defect. An edge in the radiographic

image is

represented

between

two

by an abrupt

regions

intensity

of

change

relatively

changes

is

constant

to take

the

areas

of high

image

may be taken.

highlighting

conventional

implementation

The
methods

intensity

in intensity;

using

operators

mask

use

differentiating

masks
the

to as matching

filters

operators

may be either

Ph.D.

(Ballard

work

A. Kehoe

1990

and

directional

experimentation
difference

are

in a single

filters.

order

of these

convolution

to as high-pass

Early
first

highlight

derivative

operators.

the boundary

method
of the

the

of

second

techniques

directional

in

nature;

resemble

Brown.

1982).

or unidirectional

on edge
similar

is by discrete
first

as they

detection

of the

change.

All

only.

these

highlighting

derivative

techniques.
direction

finding

image.

the areas of high intensity

or templates;

to

One

Alternatively.

which

image

designed
referred

first

gradient.

and

intensity.

marking

These

order

capable

the features

(isotropic).

techniques

difference

are often

Second

linear

order

of

referred
they

are

difference

and are often

concentrated

to that of Ski an sky (1976);

on

including

65

Image Processing

Chapter 4
the Maxab s , Prewitt.
the

first

order

immediate

and Kirsch

differences

neighbours

to

operators

(Pratt.

between

a pixels

indicate

areas

consist

of a series of directional

image,

a further

operation

Techniques for 2D Defect Inspection


1975). These

intensity

value

high

intensity

of

are based upon


and those

of its

gradient.

They

masks. each of which is applied

combines

the output

of each

to the input

to give a final

edge

picture.
For

satisfactory

detail

and

high

industrial
image

these

contrast

radiographic

have

images

results

poor

operators

between

images

definition

regions.

do not

and little

the first order difference

require

definition

Unfortunately.

exhibit

these

contrast

operators

high

the

qualities;

with their

fail to extract

of

majority

defects

One method

obtained

of overcoming

1976).

processing

required,

This

second

order

with

difference

operators

(Rosenfeld

described

by Pearson

second

order

intensity

all the edge pixels in

relatively

generator.

inadequate

defect

detection

techniques

and Kak, 1982). and the spatial


(1975).

between

high-pass

operators

are combined

perform

well

images.
image.

other

for defect

Laplacian

operator

technique

of Pearson

by a further

second

Although

industrial

types

of input

detection.

Figure

on the image
and others

difference

a noise

reduction

images.
4.9(b)

of a cavity
(1975)

included

and Sobel

filter

technique

are based

upon the

areas

of high
series of

operation.

order

radiographic

also

Roberts

mask. or a

free

pixel

These

of

is undesirable.

such as the Laplacian,

and others

the -amount

They consist of a single isotropic

to

than

operation

increase

to indicate

of the

noise

considerably

for on-line

operators.

which

noise

quality

more

1982), Fig.

is to use a plan

intensities

masks

order

however.

edge based

differences

change.

directional

does,

which

Experimentation

the

In such

at a lower level. to guide the edge linking stage at a higher resolution

(Sklansky,

In

this difficulty

of

in the

background.

the image. leaving gaps in the boundary of defects (Peli and Malah,
4.9(a).

image

operators

require

operation

improves

images

contain

a great

deal

As such

these

operators

are

shows

a typical

type defect.

suffers

from

output

The edge

of the
detection

an additional

problem.

The output of the operator moving across the boundary of a defect is a pair of
pulses,

with

difficulty

the

to the

In an attempt
was developed.
in

industrial

Ph.D.

same

amplitude

subsequent

classification

to overcome

gradient

radiographic

images.

1990

opposite

polarity.

which

adds

further

stage.

these problems

The mean

A. Kehoe

but

a new edge detection

technique

operator is a new approach to edge detection


This

technique

uses

an

area

process

to

66

Image Processing

Chapter 4
determine

the

mean

intensity

gradient

Techniques for 2D Defect Inspection

of a small

window

placed

over

each

pixel in the image. Each pixel intensity gradient in the window is summed and
averaged to give an edge strength to the centre pixel of the window.

Mean Gradient Edge Detector


In order
intensity
window

to determine

gradient

between

the mean

intensity

gradient

of a window,

the centre pixel and each of the outer pixels

G,

the

in the

must first be considered.

For a window s(m,n),


the intensity

gradient,

placed at each pixel location, Po(x,y),

in the image 10,

G a, between the centre pixel, reference

0 in Fig. 4.10,

and any outer pixel, A, is given by:

(4.8)
where V is the pixel

intensity

gradient,

g, in the orthogonal

component

directions:

(4.9)
and 0 A represents the position of an outer pixel, Po(x +m,y+n),

from the centre

pixel in the window, Po(x,y).


Considering

the outer pixels M and N of window s(m,n)

below, where M = po(x+ml,y+nl)

and N = po(x+m2,y+n2)

shown in Fig. 4.10

,M
,

K'"
~

f-Cl
~

N
Fig. 4.10

Pixel window s(3,3), with reference pixel 0 and outer pixels M and N
at distance 1.

Ph.D.

A. Kehoe

1990

67

Chapter 4
Then

Image Processing

Techniques for 2D Defect Inspection

from the figure:


G

=V.OM

=V.ON
(4.10)

and

UM

where

= I OM I = I ON I

(11 c?sa)
sine

and

ON =

LOM

1 sino. )

- 1 coso.

(4.11)

LON

Therefore

solving

the equations

gradient

Gm = (1 coso)x + (1 sina)y

(4.12)

On = (1 sina)x - (I cosa)y

(4.13)

into terms of the component

directions

of pixel intensity

gives:
coso.

x=G

y = 0

-1

+ 0

sino.

sino.

- Gn

coso.

(4.14)

Such an analysis of all outer pixels in the window yields a set of equations
for G 1... G nxm- and a corresponding
results
pixel

of pixel
gives

the

intensity

set of solutions for x and y. Combining the

gradient

intensity

in the component

gradient

of

the

directions

G x. G y. This

calculation

techniques

using

and convolution

a mask

whole

directions
window

may be implemented

for each outer

in the

component

into discrete

linear

techniques.

For a masks x(m,n)

and y(m,n)

defining the intensity gradient of the window

in the two component

directions,

Eqns.

following

kernel

values

for the corresponding

x(ml,nl)

The combination

Ph.D.

A. Kehoe

coso.
- -

11

_ sino. _ cos~
-1---1

x(m2,n2)

4.12. 4.13 and 4.14 above

pixel

the

locations:

sino.
y(ml, nl) =-

11
y(m2, n2)

(4.15)

___coso. __sin~

12

12

of all solutions for x and y for equations G

1990

give

(4.16)
1 ..

0 nxm wo u Id

68

Image Processing

Chapter 4

give the kernel values of masks x(m,n)

Techniques for 2D Defect Inspection

and y(m,n)

as shown in Fig. 4.11 below,

where In = 10 AI and an = L(OX->OA):


sin 0.1 sin 0.2 sin 0.3

..
12 13 .
..
14 T5 ..
0
. ..
13 15
.. .. .. . ..
.. .. .. . ..

cos 0.1 cos 0.2 cosa3

12 13

11

11

sin 0.4 sin 0.1 sin 0.3

coso. 4 cos 0.1 cos 0.3

12 14 15

12

..
.. .. .. .. ..
.. .. .. .. ..

sin as sin as

cosaS cos as

Mask y( m, n )

Kernel values of gradient intensity masks x(5 5) y(5,5).

Fig. 4.11

for m,n

The values of 0 x- 0 yare

3, the kernel values are given as shown in Fig. 4.12.


then given by a convolution

L x (m,n) . s(m,n)

m.n=

operation:

w
2

=
y

y (m,n) . s(m,n)
m,n=- w
2

and the value of mean intensity


window

gradient,

G,

where n is the number of pixel intensity


and Pm(x,y)

is given to the centre pixel of the

image

lOx

+ 0y
n

gradients

calculated

(4.18)
in the window,

is a pixel location in the output image 1m

The results

of a mean intensity

was produced

using

gradient

operator

a modified

version

above. Two pairs of masks are used, xt(m,n),


defining

(4.17)

by the operator:
P (x.y)= 101 =

This

..

13 15

Maskx( m, n)

Therefore

.. ..
.. ..

two sets

of intensity

gradient

are shown in Fig. 4.9(c).


of the operator

y j Im.n) and x2(m,n),

component

directions

about

described
Y2(m,n),
the centre

pixel of the window.

Ph.D.

A. Kehoe

1990

69

Image Processing

Chapter 4
Mask x(3, 3) =

Techniques for 2D Defect Inspection

=
a=90 0.=45

..
..

1-1

1-";2

a--Q0
1-1

.. ..
Mask y(3, 3)

-1

-1

..

0
-1

1/

1,

-1

-1

Kernel values of zradient intensity masks x(3 3) v(3.3)'

Fif!. 4.12
These

'2

-1

1,

1,

'2

masks

are shown

in Fig. 4.13.

The mean

intensity

gradient

of the

window is then given by:


ox!

+ 0X2 + 0y! + 0y2

p (x,y)= 10 1=

(4.19)

where n is the total of pixel intensity gradients calculated


The output
image.

of this operator.

as shown in Fig. 4.9(c),

is an edge enhanced

In order to segment the defects from the background

simply thresholded
The

(Pratt.

results

of
on

radiographic

images;

representation

of defect

window

ensures

output.

described

above.

intensity

changes

should be noted.
overall

gradient

Ph.D.

A. Kehoe

detection

gradient

producing
size.

two

this

sets

increases

in the

technique

based

more

Using

that all the gradient

values of intensity
The similarity

edge

previous

When

the image may be

1975), to give a binary edge picture, Fig. 4.9(d).

this

improvement

edge

in the window.

the mean
information

gradient

Additionally.

seen

used

defect

on

edges

of each

to

be

an

industrial
and

pixel

good
in the

is given equal weight to the

component

the sensitivity

window.

be

techniques

complete

of gradient

can

directions

of the

operator

due to the use

this operator is much less susceptible

are used,
to very

as

small

of the mean

to noise in the image.

of the masks in Fig. 4.12 to that of the Sobel edge operator


In the Sobel operator
in a component

1990

direction

such masks

are used to determine

the

in the pixel window.

70

Chapter

Fig.

Image Processing

4.8

profile.

reduced
Cc) C-of-G

image

enhancement

of defect
of defect

intensit

Fig. 4.9
(b)

2nd.

(a) Edge
order

image

gradient

of defect

operator.

Techniques

(c)

for

2D Defect

Inspection

and Cb) its


image.

and

intensity
(d) the

horizontal

rofile.

produced
Mean

by 1st. order
Gradient

gradient

operator

and

operator.
(c) binary

e of dcfect.

Ph.D.

A. Kehoe

1990

71

Image Processing

Chapter 4

The

two

requires

a large

processing
would

be less

the

at

features
with

difficult

to

first

the

that

reasons

remained

15 24 30 24 15

24 30

0 -30 -24

12 30 60 30 12

30 60

24 30

0 -30 -24

-12 -30 -60 -30 -12

15 12

-12 -15

-15 24 30 24 -15

-10 -12 -10

0 -20 -20 -12

12 20 20

0 -4

12 20 20

-4

10 12 10

x 2( 5,5)

defect

because

high

level

they

decision

was considered

..

.'

0 -20 -10

0 -20 -20 -12


-4

10 12 -10

Y ~5,5)

Two pairs of mean intensity gradient masks. xl(5,5).

Fig. 4.13

the

10 12 10

10 20

0 -20 -10

10 20

in

Y 1(5, 5)

these

system for defect detection.

-12 -15

0 -4

the

experimentation

operator

but

detectors.

enhance

are undesirable

15 12

x (5,5)

to

still

for use as part of an image processing

speed,

edge

Through

a subsequent

image

over-shadow

tends

the mean gradient

60 30

at high

background

Gaps

operation

specialized

edges.

gaps

requiring

With

this

difference

operator

examples.

usually

the

defect

firstly,

to run

order

in

The

found

defect

For these

be made

gradients

was

resolve,

could

than

are,

to complete.

edges.

rather
it

technique

alternative

defect

particular

process.

unsuitable

than

intensity

technique

boundary

operator

efficient
high

of this

of processing

the

gradients

background

making

amount

very

intensity
with

disadvantages

hardware

Secondly,

are

main

Techniques for 2D Defect Inspection

Yl(5,5)

and

x2(5,5), Y2(5,5).

Region Based Techniques


Region
over

edge

with

based
based

noisy

based

of

features
techniques

defect

in the

Ph.D.

A. Kehoe

detection

techniques.

images.

representation
internal

defect

the

Firstly,

Secondly,
defects

of the defect
provide
component;

1990

techniques

the

they
the

in the

have

three

are very

robust

detected
image;

very

such

techniques

little

are

are
of

the

processing.

of estimating

the

illustrated

advantages

and perform

regions

image are lost during


opportunity

major
a

well

complete
external

Lastly,

3D volume
in more

or

region
of a

detail

in

72

Chapter 4
section

Image Processing

Techniques for 2D Defect Inspection

8.2.

The feature
detection

technique

radiographic
results.

location

image

The operator

method described
(1983).

This

processing

and

by Strecker

method
has

uses the intensity

is

been

is a region

well

suited

shown

values

to

based defect
to

industrial

produce

acceptable

of the neighbourhood

of a pixel

to determine if a pixel is likely to be part of a defect region. This technique is


applicable

to the present

problem,

however,

is designed

to detect only small defects,

the

of processing

amount

it unsuitable
The

required

for on-line

region

based

image

field

and others,

radiographic

images

(1975).

to

remove

the

only

small

designed
leaving
algorithm

takes

a single
intensity

approximates

the

systematic

the

input

correspond

intensity

intensity

intensity
data

for defect

for detecting

systematic

field

attributes

intensity

changes

intensity

variations.

to leave

only

in the component.

order polynomial

function

defects

and
make

by

described

in industrial
technique

changes

caused

of pixels

detection,

flattening

in

the

the

is

image

defects.

The

from the input image and

by a mathematical

or column,

to the defects

use of a fourth
intensity

row,

method

row, or column,

the

from

technique

The

large

approximates

the

in castings,

it

processing.

is a novel

random

two major disadvantages:

such as 'shrink-holes'

to determine

flattening

by Pearson

it has

function;

The result
the

Pearson

this

is then

small

subtracted

differences;

and others

to approximate

effectively

a single

these

describe

the

row of the

field in the image (1975).

For a single row, or column, of pixels, 1m (x),


mathematical

approximation

from the input image 1m the

of the data, I'm (x), using an nth

order

polynomial

function is given by (Hood, 1987):

(4.20)

an .... an

where

are constants of the equation.

The output image, 10' is then given by:

(4.21)
where I is the number of rows, or columns, in the image.
Figure

4.14(a)

and Fig. 4.14(b)

Ph.D.

A. Kehoe

shows

the

contrast

shows the intensity

1990

enhanced

input

data of a single

image

to the

operator,

row in the image. The

73

Image Processing

Chapter 4
mathematical

approximation

Techniques for 2D Defect Inspection

of this data is shown in Fig. 4.14(c).

image of the operator

is a greyscale

intensity

constant

intensity

small

defect

background
in the

earlier,

image.

to produce

This

and
image

a segmented

may

image. 10 which has a relatively

intensity
be

binary

The output

changes

simply

image

representing

thresholded,

of the defect

the

as described

and background.

This binary image is shown in Fig. 4.14(d).


This method of defect detection may be used to good effect provided that an
appropriate

mathematical

field caused
cylindrical

by the component.
type

components,

Intensity

field

technique

is blind

image,
the
of

flattening

such

performed

as

hardware,

however,

it

making

is

case
two

cracks.

Two

approximate

function

major

the

required.
very

Secondly.

difficult

it unsuitable

data,

to

and others

disadvantages.
have,

which

for

(1975).

Firstly,

the

of the input

therefore.

to

be

considerably

increases

due to the non-linear

operation

implement

for on-line

intensity

is a good choice

of Pearson

operations

row and column

of processing

to

in line with the rows and columns

longitudinal

technique

selected

The polynomial

has,

pixel

is

as in the

to defects

for both

amount
the

function

image

into

image

processing

processing.

Adaptive Threshold Technique for Defect Detection


A simple region based method to detect defect pixels in the digital image is a
single

intepsity

pixels

and

images.

threshold

background

but

background

is
has

operation:
pixels.

inadequate
large

dividing

A single
for

variations

statistically

adaptive

threshold

based area process

of a defect

to its intensity
region.

of intensity.

In order

variations

the

intensity

small localized
of image

representation

capture

in

the

In the analysis
Ph.D.

A. Kehoe

been

to apply a threshold
value to determine
of background
changes

caused

and digitization

digital

radiographic

it is suggested

1990

in

which

in simple
the

to selectively

function

image
segment

threshold.

developed

values of a large population

also designed to conform to the conclusions


effects

has

of defect

is useful

is required; an adaptive

which

uses

to each individual
around the pixel

if it is likely to represent part

In this way the threshold operation

the large systematic

into regions

value

images

function

pixel in the image. The statistical


are compared

threshold

radiographic

the defects a locally variable threshold


A novel

the image

intensity,

is able to accommodate
and yet be sensitive

by the defects.

The method

to
was

of section 3.3.5; the analysis of the


parameters

on the accuracy

of defect

image.

that in order to accurately detect defects, the


74

Chapter 4
digital
a

radiographic

single

image

intensity

threshold

the

adaptive

threshold

into

small

using

the

For

each

intensity

intensity

from

standard

deviation

Fig.

4.15

pixel

Intensity

that

representing

of

part
of

A simple

its

its
of

of

defect

neighbours;

threshold

if

p-(x,y)
o

if

J>(x,y)
o

Kak

(1982).
is

the

each:
In

divided

threshold

value

window,

10, a large

is

therefore,

a distribution

is the
These

mean
values

are

background

close
an

appearing

to

the

intensity
at the

value

given

an

mean

intensity

value

much

extremities

of

a pixel

in Fig.
and

by Eqn.

of pixels

has

of pixel

using

as shown

intensity

the

image

population

neighbourhood,

population

has

is given

image,

for a large

neighbours;
a

to

image

intensity

and

applied

and

digital

of

surrounding

population.

part

the

the

value

may have

distribution

representing

to

that

of the

50%Tl,

windows

value.

the

s(m,n). The population

of small

by Rosenfeld

and

in the input

taken

and

below

window

N is the size of population,

where

than

are

described

intensity

a series

47%

is described

mean

Po(x,y),

into

between

a moving

50%TI

pixel,

values

window

similar

the

value,

technique

by

Techniques for 2D Defect Inspection

be divided

technique

sections

approximating

should

threshold

this variable

calculated

Image Processing

(J

i is the

4.2.

in a window

intensity

lower,

value
A

value.

the

4.15:

or

pixel
higher,

population.

by:

r _" ~ a
< r + x, 0:
>

p(x,y)=

p(x,y)

= 255

p (x,y) = 128

else

(4.22)
where

xn is a user defined variable.

output

image

Ph.D.

A. Kehoe

and

Pm (x,y)

a corresponding

pixel

in the

1m.

1990

75

Image Processing

Chapter 4
If a pixel

has

an intensity

intensity

values

intensity

value greater

For

pixels

128.

representing
those

in the window,

with

constant

value

This

operation

as cavities,

foreign

inclusions

the modified

work

improved

and give

inside

these

changes

With experimentation
well

than

n%

its value is changed

values

such

representing

less

than X n % of the population

intensity

defects

Techniques for 2D Defect Inspection

o.

to

the

population

If a pixel

of

has an

its value is changed to 255.

limits

the

cracks

of

change

intensity

its

value

values

and porosity

to a

of

pixels

to 0 (black),

and

to 255 (white).

threshold

function

below

was found to

performance:

if

(1- p(x,y
o

> q

if

(1+

> q

p (x.y)')
o

p(x,y) = 0

p (x,y)

= 255

p (x,y) = 128

else

(4.23)

where q n is a user defined threshold value.


The

main

intensity

problem

gradient

features

such

adjacent

pixels

mistaken

for defect

function

as

with

this

features

in

edges
can

vary

is

its

sensitivity

background;

corners.

In

such

so

To overcome

areas

causing
this

modifying

the pixel

the

very

the adaptive

Ensuring

value

pixels

gradient
that

high

component

intensity

background

problem

value.

to

particularly

to take into account the intensity

before

pixel intensity

the

enormously,

pixels.

was enhanced

in the window

and

technique

to

of
be

threshold

of the pixels
any modified

is part of a defect and not part of some high intensity

gradient

area.
The

intensity

defect

pixels,

threshold,

whilst

described

the intensity

above.

gradient

is used

threshold

to

gradient

of the pixel, G .against the mean intensity

window.

s(m,n).

The three threshold functions are given as:

(~

where

qn are user specified

In order to normalize

Ph.D.

A. Kehoe

1990

> ql

possible

is made by comparing

intensity

(r - ~(x,y

determine

(r +

gradient,

(j of the

po(x,y > q2

- G )2 + (~ - G )2 > q3
x
y
y
threshold

the

(4.24)

values.

the above conditions

to the intensity

gradient:

76

Image Processing

Chapter 4

(r - Ib(x,y
-;:=====::;- >

Jl+IUf

The product

of the intensity

IG

IU - a I

q1

Jl+lof

and gradient

a I .

Techniques for 2D Defect Inspection

threshold

conditions

(r - p, (x,y

1+101

(4.25)

>q4

gives:

p(X,y)=

(4.26)
and

similarly

for the

IG

remaining

(r

condition.

+ po(x,y) )

+ 101

> qs

p. (x,y)
m

else
The intensity

Pm(X,y)

gradient

the intensity

values

of the neighbouring

the gradient,

as shown below:

lal= lex
The mean intensity

a,

value of the pixel,

pixels

255

(4.27)

128

is determined

by comparing

in the component

directions

ay I

of

(4.28)

G of the window, s(m,n), may be determined by

gradient

an area process,

using

a convolution

technique

Fig. 4.16 below,

one for each component

and two masks,

direction

as shown

of the gradient;

in

k x (m, n),

ky(m,n) with side w=3:

k (m,n)
x

Fi . 4.16

-1 -2

Mean intensit

The convolution

operation

k (m,n)
y

-1

-2

-1

-1

radient masks for ada tive threshold


to is performed

L kJm,n)

m,n=-w

Ph.D.

A. Kehoe

1990

function.

by:
w
2

w
2

Ox

. s(m,n)

Oy

L kfm,n)

. s(m,n)

m,n=-w

(4.29)

77

Image Processing

Chapter 4
and the mean intensity

gradient of the window is given by:

I~ I =
where n is the number of gradients
The final

output

Techniques for 2D Defect Inspection

+ ~

calculated

of this operation

pixels and background

Iu

__ x ---,Y~
n

(4.30)

in the masks

is an image

consisting

of only

pixels. Figure 4.17 shows the results of the process; Figs.

4.17 (a) and 4.17 (c) show the contrast

enhanced

images of porosity and crack

type defects, Figs 4.17 (b) and 4.17 (d) show the corresponding
adaptive
input

threshold

operation.

These

are binary

images after the

representations

of the

of the

images.

The

adaptive

requirements
to

defect

threshold

of defect

detect

all

knowledge

types

of

of

the

the operator

caused

by the defects,

background

accurate

content,

such

the

intensity

component

gradient

the

the

of actual defect

without

to

the

is able
a priori

and porosity.

The

threshold

function

intensity

changes,

small

intensity

suited

The operator

cavities,

within

experimentation

well

image

at detecting

in the large systematic

representations

is

images.

as cracks,

effective

Through

above

in radiographic
in

particularly

image.

described

defects

pixel

makes

produce

detection

of the image

consideration

function

changes making up the

operator

was

shape and size,

found

to

as shown in

Fig. 4.17, and gave complete pixel regions with small sizes of pixel window: 5 <

w > 15. As the technique


techniques
hardware
reasons

is

also

for use
the

techniques

Ph.D.

it

possible

as part

adaptive

is based

1990

implement

of an on-line

threshold

for the 2D defect

A. Kehoe

to

on conventional

function
inspection

this

image
was

mask

operator

processing

adopted

and convolution
into
system.

as the defect

specialized
For

these

detection

system.

78

Chapter

Image

Processing

Techniques

for

2D Defect

Inspection

b
Fig.

4.14

data

for

Fig.

(a) Contrast
a single

row.

resultant

4.17

(a) an

defects,

(b)

and

enhanced

ima e of

resultant

A. Kehoe

1990

binary
thresh

defect

approximation
the

(c) Contra t enhanced

ivc

Ph.D.

of a cavity

(c) Mathematical

binar

(d)

image

field

image

and (b) intensity

of single

row,

and

cavity

type

flattenin

of p

representation

of

defects

produced

by

ue.

79

Chapter 4

4.2

Image Processing

Techniques for 2D Defect Inspection

1ECHNIQUES FOR DEFECf ANALYSIS

The input

to the defect

analysis

operation

is an image

of suspect

defects

made up from individual defect pixels. Defect analysis is used to determine a set
of 2D attributes

for each suspect defect which describes

and orientation
consists

of

in the component

a defect

dimensional

analysis

image. This is achieved

merging

and

techniques,

merged

into

regions

merging

groups

locality.

The segmentation

in

a merged

analysis
region

defect

techniques
image

and

defects

based

process

forming

and

which

a series

of

from

on

out, the defect pixels have to


the

rules

connects

background.

continuity,

defect

to obtain local and global defect

region.

pixel

information.

which describe

defect

The

image

Region

proximity

all of the individual

a continuous

are determined

image

of

make use of both the defect

set of 2D local attributes


the defect,

operation,

to be carried

segmented

pixels

region,

segmentation

by a process

as shown in Fig. 4.18.

In order for further processing


be

its shape, size, position

and
pixels

dimensional

and the merged

For each region

the shape and size of

and for the whole merged region image the global attributes

are found which describe the number and position

of the

of the defects in the

image

. bY Image processlng na YSIS

DfctA
ee
Defect
pixels

Merged defect
regions
Defect
Merging

I~

Fi . 4.18

Overall defect detection

The output
defect
from

in the
the

Defect
Segmentation

of the image
image.

original

This

input

analysis
represents

image

20 defect
d escription

Continuous defect
regions

..

Dimensional
Analysis

...

methods.

system
a great

and ensures

is a description
reduction
that

the

of each suspect

in image

subsequent

information
operation

of

the IKB system is efficient.

Ph.D.

A. Kehoe

1990

80

Chapter 4

4.2.1

merging

pixels

operations,

which

operation

may

and secondly,

most efficient
technique.

have

serves

two purposes,

become

separated

to join

previous

adjacent

processing

to group similar defect areas into a single defect. The

and effective

way of performing

by Ballard and Brown (1982),

erosion described

firstly,

during

this operation

This is based on the techniques of splitting

described
and

Techniques for 2D Defect Inspection

Defect Merging Techniques

The defect
defect

Image Processing

and

is by a closing
merging

and also on the techniques

of regions
of dilation

in Joyce Loebl (1985).

Closing Technique
Each
defect

defect

pixels,

pixel

in the image,

is allowed

which

is not wholly

to expand in size and become

surrounded
connected

by other
to adjacent

pixels, forming a merged region, as shown in Fig. 4.19.


The

amount

determines

of expansion

the pattern of expansion.

4 expansion

gives:

8 expansion

gives:

Following
completely

For

each

connectivity

Ph.D.

each defect pixel

to adjacent

number

effectively

pixel

Po(x,y)

1990

and

in the image, 10,

output

output

pixels

in the merged
is erased.

This

of steps to the expansion


reducing
with

rule may be specified

A. Kehoe

For every pixel, Po(x,y),

input

connected
value,

of the process

input

expansion.

for an equivalent

by a constant

= 0 or 255.

with an intensity value f(x)

constant

is specified

the boundary
an intensity

region
operation

operation,

of the merged
value

f(x)

which is not
is repeated

specified

by a

region.

= 0 or 255 the 8

as:

81

Chapter 4

Image Processing

Techniques for 2D Defect Inspection

+1

if

po(x+m,y+n) "# 8

p (x,y)
m

m,n= -1

128
(4.31)

for 4 connectivity:
+1

if

po(x+m,y+n) "# 4

m.n= -1

Defect
original
The

final

pixels
the

pixels
result

after

images

4.2.2

Defect

are

representation
processing
transforms

line

technique

of

cavity

Figures

of the

defect

and include

and quad

developed

based

Brown

(1982).

Ph.D.

A. Kehoe

remain

the
and

pixels

return

in connected
region

initial

crack

4.20(b)

size

defects

and 4.20(d)

to

defect

regions.

of connected

of

the

their
defect

collections

and 4.20(c)

following
show

the

the

of
show

adaptive

same

defects

trees

Techniques

of segmentation,
region.
run

These
length

(Rosenfeld

are

A much

simpler

on the blob

and

1990

to complete
and faster

colouring

each

resulting

in a different

well

described

in the

encoding, binary

with very complex greyscale

a great deal of processing

operation.

pixels

other

is a complete

Segmentation

methods

texts,

with

operation.

several

capable of dealing
require

defect

merged

shown in Fig. 4.20. Figures 4.20(a)

technique.
merging

not

approximating

pixels,

the

There

merged

area

defect

thresholding

were

of the

an

binary

ions from the closin

which

whilst

with

individual

(4.32)

Formation

size,

128

is a corresponding pixel in the output image 1m.

where Pm (x,y)

Fi . 4.19

p (x,y)

Kak,

1982).

image

trees, medial
These

methods

axis
are

images of objects, as such they


making them unsuitable
segmentation

technique

technique

described

for onhas

by Ballard

been
and

82

Chapter 4

Image Processing

Techniques for 2D Defect Inspection

Blob Colourin~ Technique


For

an

objective

image

is to assign

intensity

each

value or colour:

shaped template
each

containing

pixel

procedure

only

connected

pixels

region

and

background

of defect

pixels

pixels,
with

different

give each merged defect region a label. Using the L

with

an intensity

may be defined

the initial colour k

value

!(x)

255

the blob

colouring

as:

= 1.

!(x1) = 128

then

else if ( !(x ) = 255


3

&

else if ( !(x2) = 255

&
&

else if ( !(X2)

255

next pixel
!(x2) = 128 )

then

colour(x )
1

colour(x )
3

!(x~

= 128 )

then

colounx.)

colour(x

!(x~

then

~.

255 )

colour(x )
1

else if ( !(x2) = 128

&

min( colour(x2), colour(x ) )


3

colour(x ) is equivalent to colour(x )


2
3
f(x~ = 128 )
then
colour(x1)
k

k + 1

This procedure is also carried out for pixels with an intensity value !(x)
Following

a complete

scan of the image the colour equivalences

ensure that each defect region has only one intensity


segmentation

technique

is an image of defect

are connected

by the same intensity

defect

The results of the blob colouring

types

region.

are shown

blob colouring
4.21(c)

the

below, the image is scanned from top left to bottom right. For

Po(x,y)

if

defect

are used to

value. The output of this


whose

individual

pixels

value: which also acts as a label for the

in Fig. 4.21. Figures 4.21(a)

technique

regions

= o.

operation

on a range of defect

and (b) show the results of the

on the defect images of Fig. 4.20(b)

and (d). Figures

and (d) show the result of the defect merging and segmentation

on the

porosity and crack type defect of Fig. 4.17(b) and (d).

Ph.D.

A. Kehoe

1990

83

Chapter

Fig.

4.20

oJ

Image

(a) and (c) Binary

Processing

Techniques

for

2D Defect

type defects,

image

Inspection

(b) and

resultant

Fig.

Ph.D.

4.21

Resultant

A. Kehoe

1990

defect

images

after

the blob

(a)

84

Image Processing

Chapter 4

4.2.3
The

Dimensional
dimensional

analysis

image and the merged


the

suspect

suspect

defect.

defect

Analysis

The

defects

Techniques

techniques

make

region image to obtain


local

into a defect

the classified

Techniques for 2D Defect Inspection

against

shape

use

of

local

and global

attributes

are

both

required

type, the global attributes


acceptable

the

defect

pixel

information

to classify

are required

of
each

to evaluate

limits of inspection.

Each defect in the merged region image, 1m, is examined in tum and the 2D
local

attributes

density
defect
region.
of

of region

are determined.
pixel

image,

Id,

area,

region

The merged regions


to signify

From these corresponding

defect

orientation

area,
are

perimeter,

maximum

which
and

elongation

and region

are then used as templates


defect

defect pixels,

length

region
pixels

represent

Pd(X,y),

width,

in the

which

defect

the 2D local attributes

defect

position

and

defect

determined.

2D Local Attributes from the Merl:ed Rel:ion Imal:e


For

defect

normalized
independence

classification

width
from

the

and

normalized

scale

within

defect

attributes

of

were

chosen

length

elongation,
because

density,
of

their

the image.

From the merged region image the pixel area of each region Ar is given by:
n

Ark

Pm (x,y)

k=l

where f(x)=k,

(4.33)

the colour of the merged region as given by the blob colouring

method described
The perimeter

above, and n the number of regions in the image.


of the region Pr is given by:
n

Prk =

L
k=l

Ph.D.

A. Kehoe

1990

Pm (x,y)
k

(4.34)

85

Chapter 4

Image Processing

Techniques for 2D Defect Inspection

where the value of Pm (x.y) is limited by the following:


+1

.J Pmk (x+m, y+n) J 8


~

m.n= -1

The elongation.

Er. and density. Sr, of the defect region is determined by:

(4.35)

where Er

->

1 for a circular defect

D~
Sr =-k

Ark

(4.36)

where Sr

->

1 for a high density defect.

2D Local Attributes from the Defect Pixel Ima~e


Using each defect in the merged region image as a template

to determine

which pixels are related in the defect pixel image.


Each defect in the merged region image is given by:

(4.37)

with intensity value of each pixel. Pm(x,y),

the intensity colour of the merged

region !(x)=k.
The area of the defect Dd is given by summing all the pixels. Pd (x ,y), in the
defect pixel image covered by the region template,

defined

above:

(4.38)

The intensity

volume

of the defect

Vd is given by summing

the intensity

values of all pixels in the defect pixel image covered by the region template:

(4.39)

Ph.D.

A. Kehoe

1990

86

Chapter 4

Image Processing

Techniques for 2D Defect Inspection

the values I(x) of correspond to the pixels in the defect pixel image Pd (x.y}.
First and second order moments of the defect are given by:
1st Moments

Xdk=
Yd =
k

L
L

f(x) . I
f(x) . m

L f(x)
XYdk = L f(x)
XXdk=

2mMoments

. 12
I.m

where I and m are distances of the pixels Pd(X.y)


pixel

from the origin of the defect

image.

The centroid position.

CXd and CYd. of the defect is then given by:

(4.40)
In order

to determine

Ld, and the principal

the orientation.

principal

maximum

length

maximum width Wd of the defect in the image:


A

X~k
Vdk

2
- Xd

D=
The principal

the

edt

maximum

YYdk 2
XYdk
B=-Yd C=- (XdYd)
k
Vdk
k
Vdk

(A _B )

+ 4C2'

length and the principal

maximum

width of the defect

is given by:

Wdd

Ph.D.

A. Kehoe

1990

= J2(

A + B - D)

87

Image Processing

Chapter 4
with normalized

length

Techniques for 2D Defect Inspection

and width given by:

(4.41)

(4.42)

where

-> 1 for a circular defect

NWd. and NLd

The principal

vector of the defect is given by:

-2.C

Principal vector

PX~

L<\ - 2B
PY~=

The orientation

of the defect is given by:

e~=

-1( PYdk )
tan

PX~

(4.43)

2D Global Attributes from the Merged Region Image


The

whole

attributes

merged

of defects:

surface

areas

merged

region

defined

by the blob

region
these

of defects
image

Td

image

include
in the

1m is

total

image.

analysed

number
The total

of suspect
number

the 20

defects

colouring

global

and total

of defects

is given by the total number of intensity

in the

colours. as

technique:
Td=k

where f(x}=k.the

to give

intensity colours.

(4.44)

and n the number of regions in the image:


n

TDd=

LD~
k=l

(4.45)

. and the total area of defects TDd is given by the summation of all values of

Ph.D.

A. Kehoe

1990

88

Chapter 4

Image Processing

pixel area Dd for the merged

Calibration

calibration

optical
features

the attributes of the defect in dimensional

factors

calibration
of known

regions.

of the Defect Attributes

In order to express
pixel

Techniques for 2D Defect Inspection

are

required.

These

may

grid.

as shown

in Fig. 3.17.

size

appearing

in the image.

be

units a set of

obtained

by

or by analysis
Calibration

using

an

of component

factors

for pixel

row. CLx
pixel column. CLy.and
pixel area may be determined. CLxy to
convert the defect attributes of area. length. width. and centroid position into
dimensional

units.

For the centroid

position

Calibrated

of the defect region:


centroid

position

=CXd.CLx

= CYd. CLy

(mm)

(mm)

For the defect area :


Calibrated
For the principal

defect area

maximum

Calibrated

length

and width:

length
=~~-Ld--.-C-OS-9-)-.-CL-x-)-+---Ld--.-Sl-n-9-)-.C-L-y-)
(mm)

Calibrated

width

=
A sample
Table.

4.1.

C( Wd . cos9 ) . CLx) + C( 'Wd . sin9 ) . CLy)

set of outputs
These

correspond

from the dimensional


to the cavity.

analysis

crack.

(mm)

system are shown in

and porosity

type

defects

shown in Fig. 4.21.


Er

NLd

NWd

Dr
mm

Ld
mm

Wd
mm

Sr

235.~

35.1

8.0

0.66

4.03

1.36

0.07

0.7

1.2

0.9

0.14

1.07

0.44

8.2

6.2

2.8

0.29

1.46

5.2

2.8

1.9

0.34

2.6

1.9

1.4

0.9

1.3

2.5

6.4

Defect No

Table 4.1 (a) Dimensional


Ph.D. A. Kehoe

1990

9d

Cxd
mm

Cyd
mm

88

24.1

25.9

0.26

56

42.0

6.3

0.97

0.19

55

44.4

11.8

1.28

0.37

0.18

71

31.3

13.9

0.27

1.15

0.34

0.19

81

43.4

19.7

1.1

0.15

1.19

0.49

0.29

42.6

35.4

1.6

0.16

1.39

2.79

0.16

35

44.8

41.4

analysis output for cavity defects in Fig. 4.21 (a).


89

Chapter 4

Defect No. Dr
mm

Image Processing

Ld
mm

Wd
mm

Sr

Er

Techniques for 2D Defect Inspection

NLd

NWd

Cxd
mm

Cyd
mm

ad

71.4

40.7

8.5

0.36

7.30

3.71

0.16

25

34.0

12.1

91.6

37.6

3.4

0.46

4.41

4.04

0.03

89

24.5

41.8

1.5

1.8

1.6

0.19

1.18

0.34

0.26

12

44.0

25.5

0.7

1.2

0.9

0.13

1.16

0.51

0.30

63

11.0

29.4

Table 4.l(b)

Dimensional

analysis output for crack defects in Fig. 4.21(b).

Er

NLd

Cxd
mm

Cyd
mm

6.48

90

42.9

10.4

2.70

0.51

74

44.5

29.9

1.17

0.36

0.18

54

40.0

45.4

1.27

0.77

0.15

46.8

50.3

Dr
mm

Ld
mm

Wd
mm

Sr

2.1

1.5

1.2

0.27

1.19

0.29

94.2

30.7

13.4

0.29

6.48

3.8

2.6

1.8

0.28

8.1

6.9

3.1

0.32

Defect No

NWd

ad

Table 4.1(c) Dimensional

analysis output for porosity defects in Fig. 4.21(c)

Defect No. Dr
mm

Ld
mm

Wd
mm

Sr

Er

NLd

NWd

Cxd
mm

Cyd
mm

ad

9.2

7.5

2.2

0.35

1.59

0.90

0.07

28.1

4.0

9.9

4.9

2.4

0.39

1.37

0.54

0.13

64

17.7

5.1

19.9

13.2

5.4

0.32

1.94

1.42

0.24

28

32.5

11.3

1.1

5.4

2.1

0.07

1.75

4.82

0.69

38

9.4

12.9

80.4

40.9

5.2

0.64

3.98

3.07

0.05

17.6

33.3

1.8

2.0

1.3

0.21

1.16

0.42

0.18

46

12.9

42.3

42.9

23.1

7.03

0.33

4.99

3.00

0.27

71

18.3

59.8

Table 4.l{d)

Dimensional

Ph.D. A. Kehoe

1990

analysis output for crack defects in Fig. 4.21(d).

90

CHAPTER 5
INTELLIGENT KNOWLEDGE BASED SYSTEM
DESIGN CONSIDERATIONS

Ph.D. A. Kehoe 1990

Chapter 5 IKB System Design Considerations

IKB SYSTEM DESIGN CONSIDERATIONS

The design
a

database

purpose

with

knowledge

of the

classified.
inference

is

based

on

rules

guide

the

inference

inspection

to

For

domain

of

evaluation.

to

of

classify

inspection.
mechanism.

the
for

defect

general

reasoning

with

and

knowledge:
types

types

the

including

of defect

to be

evaluation.

The

and

the

ensuring

evaluation

component.

defect

whilst

in Fig. 5.1:
a

classification

range

information

designed

inexact

engineering

under

assurance

for

shown

knowledge.

machined

a wide

mechanism

acceptability
designed

quality

parts.

domain

provision

or

component

main

the

structure.

cast

contain

particular

and

of

with

a control
in

must

of three

representation

and

occurring
base

consists

mechanism.

evidence.

defects

details

explicit

inference

uncertain
of

of the IKB system

determine

control
reliable

their

structure
and

is

efficient

results.
I

Defect
description
Knowledge
Base

-...

..

Inference
Engine

Control
Structure

l'

~~

..~

l'

Defect
Classification

IKB System-

"
~

Zoning and
Grouping

.
-

Defect
Evaluation

Results of
inspection
I ..

IKB Sytem for 2D Defect Inspection


Fi2. 5.1 Design

Ph.D. A. Kehoe

1990

of the IKB svstem

for 2D defect

inspection.

92

Chapter 5 IKB System Design Considerations

5.1

KNOWlEDGE REPRESENTATION

Domain

knowledge

knowledge.

Static

the component
of

the

into

knowledge

being

inspection

cycle

This

evaluation.

Information

two

broad

for defect

inspected.

inspectors.
defects

falls

knowledge

inspection

the range

and

heuristic
remains

information
unchanged
data.

results may be classed

static

consists

of defect

such as component

and inspection

categories;

the

gained

from

for

each

local

as dynamic

or generated

of

knowledge.

production

considered

rules. semantic

Production

rule

representation.

systems

being

are

used

in

MY C I N and P U F F

(Buchanan

This

basically

representation

<action>'

main

similarity
control.

method

knowledge.
global

is

such

search

very

upon the ordering


In
series
defining

consists

the

relationships

nodes with a joining


method

of

objects

and the

knowledge

Ph.D. A. Kehoe

the

process.

inference
many

and inference

between
representation

between

of

knowledge
such

rules

With

are

problem

solving

complex

domain

required

which

is heavily

knowledge
linked

(Galambos

This

to

makes

dependant

base.

or concepts.

them.

then

into the rules. The


the

efficiency

an

1983).

and the ease with which

process.

offers

as

may be attributed

is that

domain

objects

system:

applications;

is

effective
is most

stored

as

by a set of arc s

and others.

arc may be thought of as representing

relationships

1990

objects.

knowledge

of ' if <condition>

systems

representation

representing

method

may be incorporated
rule

the

frames.

of the representation

reasoning

for

base.

1984a; Aikins and others.

of a series

of

Such data

inspection

systems

of the rules in the knowledge


network

defect

established

expert

inspection.

inefficient.

a semantic
of nod e s

in

as defect

schemes

and Shortliffe,

production

inherent

Three
20

well

or 'rules of thumb'.
with

be capable

the

many

to the human

disadvantage

search

attributes

it is supplied by the

must

and hierarchical

type rules. The popularity

its close
heuristic

for

networks

under

of encoding

whole

were

component

used

scheme

representation

expert

knowledge

representation
domain

the

as part of the current

The knowledge

of

requirements

knowledge.

image processing

dynamic

features

and global

inspection cycle on a component;

range

of the

classes.

is specific to a particular
system

and

1986).

Two

a simple fact. This


means

of

defining

useful

for

limiting

93

Chapter 5 IKB System Design Considerations


the

search

procedures

semantic

network

knowledge

results

necessary

during

representation

scheme

in a large network.

inconsistent.

This

makes

the

maintenance

of the network

inference.
that

main

very

which can easily

design
very

is

The

of efficient

drawback of
complex

become

search

domain

disordered

algorithms

and

and

the

difficult.

Frames
A frame based
has

an

representation

underlying

encoded

into

structure;

a formalized

a series

information

domain

each

the properties

tram e

representing

the

frames

representing

more

representation

scheme

several

attribute

object

objects

knowledge

properties
1981).

names.

of

may

in

frame taxonomies

in the frame taxonomies

A frame

These

manner

the

class.

class.
In

may exist

be

Each frame
hold

The relationships

the

to as t a x o nomi e s .

During execution

the domain knowledge.

(Bennet.

in a hierarchical

general

specific

referred

of object classes.
objects

most

often

their

of the object.

of the same class are defined

are

and

structure

having

objects

structures

when the domain

it with a concept or object it represents.

of slots.

describing

objects

hierarchical

has a name which identifies


contains

is most suitable

the

between

with the roo t


and

These

consecutive
hierarchical

complex

knowledge

to describe

a series

of the IKB system specific cases of general


are created

to represent

These are referred to as instances

the current
of frames

state

of

(Ringland

and Duce. 1988).


The

relationships

between

frames.

instances.
further

taxonomies

may

be described

which may be stored as information

by simple

links

in slots of the frames or

In this way a very complex knowledge base may be easily built up. A

feature

hierarchy

between

of frame taxonomies

may

inherit

the

is that frames

properties

at the lower levels of the

of frames

at the

higher

levels.

This

allows the more general properties of a class to be stored at the root frame and
for these to be inherited by all the subclasses
generally

contain

values

frame.

Values

object.

or current,

class.

Default

may

or

related

to

be default.

representing

representing

the specific

the
the

values

replace

general

objects

are present

defect

inspection

Ph.D. A. Kehoe

1990

default

values

in

a slot

in the knowledge
a frame

based

object
general

attributes

values may be used as assumptions

current

For

facts

in the taxonomy.

Slots of frames

represented
case

by

of a class

for an instance

the
or

of the

or expectations

of the class.

when

instances

domain(Frost.

knowledge

specific

of

1986).

representation

scheme

is

94

Chapter 5 IKB System Design Considerations


the most

suitable.

taxonomies;

The domain

such

knowledge

as

knowledge

defect

classes

may be encoded

may be divided

and

component

into these taxonomies

slots to describe

the generalities

or assumptions

requirements

the

cycle

may

containing

the

of

taxonomy,

with

inspection

frame

slots

each defect

type. Instances

knowledge

of

instances
of

defect

of defect

the

static

current

as

using

also

be

knowledge

or

be updated

with

values

as

requirements
classified

of
The

a frame

relating

to describe

are

static

knowledge.

represented

individual

defects

The

the default

of the domain

frames are made. These may inherit

to

the dynamic

and

evaluated

some of the properties

current

values

to

reflect

the

situation.

The FLEX IKB system building


Prolog

system

necessary
has

features.

of frames may be created

inspection;

into several Trame

with

functions

a frame

based

programming

for constructing

in-built

procedures

dill a driven

procedures.

5.2

tool has been used to supplement

for

frames

frame

system.

and

inheritance,

This

taxonomies.
frame

gives

The

instance

the basic
all

the

system

also

creation,

and

INFERENCEMECHANISMANDUNCERTAINTY

The

inference

inspection
zoning

mechanism

which

and

consists

grouping,

performs

of three

and

the problem

distinct

defect

stages;

evaluation.

based on the local shape attributes

solving
defect

The

process

classification,

classification

of suspect defects

type,

including

the defect
rules

crack,

is linked

of locality

attributes
between

are

attributes,

defect

data

Ph.D.

built

up

porosity

describing

or inclusion.
this
the

cycle of defect inspection


rules

are within

is

as either a defect

as one of a series of defect

and grouped

From

operation

Following
to other

this

defects

operation,

a further

relationships

between

operation
based on

set of defect
defects,

and

and component.

is used

A. Kehoe

cavity,

to the component

the defects

defect

and further classified

and similarity.

The evaluation

defects

feature,

defect

and rules of classification

stored in the knowledge base. Each suspect defect is classified


or as a component

for defect

of inspection

to determine
acceptable

1990

limits.

makes use of both local and global

and quality

if the

assurance

dimensional

The global

defect

knowledge.

attributes
attributes

Local

of individual
are used to

95

Chapter 5 IKB System Design Considerations


determine

whether

and number

the

are

approach,
refers
the

two

predetermined

chaining

situation

with

the

(Black,

as the

position

the

current

backward

process.

In backward

selection

of

one

problem.

Forward

of

suited

until a problem

to problems

which

solution

susceptible

to reaching

'dead

series

begins

by matching

to the

the

input

data,

base is well defined.

ends'

of

is found. This type of

are sensitive

are few and the knowledge

chaining

chaining

in the problem data, and continues

hypothesis

chaining

1986). The type of inference

of the reasoning

to

conditions

very

such

requirements.

mechanisms:

approach

position

solutions

is most

where initial

inference

begins

to stored

however,

to inspection

process

with an observed
reasoning

conform

main

to the starting
inference

of defects,

and Backward Reasonine

or forward

situation

attributes

of defects,

Forward
There

topological

in the

search

It is,

for solutions

which do not exist.


Backward

chaining

has

strategies

when the problem

solutions.

In this

and

guarantied

data

it is

case

to

also

solution

unreliable

input

inference

search

the

arrive

data

and the defect

The

defect

classification

based

on

longitudinal
porosity,
exist

succeed

very

acceptable",
"the defects
on

the

system

are acceptable".
quality

Ph.D. A. Kehoe

efficient

producing

uncertain

to ensure

that

base.

for

As

both

type

to determine

from

annular

one

ring,

of

piping

defect.

the

such

the

to
this

defect

or

As only

search

all

the component

small
seven

possible

solution

into smaller

are acceptable",

type

cavity,

defect

classes

solutions

in

the

and

similarly,

or unacceptable.
"the component

is

such as

to "the crack type

Any defects which are found to be unacceptable,


results

types:

sub-solutions,

and further

of

type

process,

is acceptable
the

the

following

a defect. The defect evaluation

standards,

is much less susceptible

is required

down the solution

assurance

1990

is relatively

knowledge

may be used to confirm

in the component

chaining

stages.

exhaustively

solutions;

by breaking

forward

solutions

suitable

attributes,

may

in classifying

reasoning

defined

evaluation

and unknown

chaining

process

possible

considered

crack,

over

In applications

all

a poorly

local

transverse

few output

Backward

defects

its

inclusion,

backward

always
has

or

a solution.

was

classification

defect,

reasoning

This type of inference

and

mechanism

advantages

space is limited to only a few alternative

to process

found.

of

backward
at

possible

reasonable

a number

rejection

of

the

based
overall

96

Chapter 5 IKB System Design Considerations


solution.

and

the

confirmation

of

the

new

solution

"the

component

is

unacceptable"
The

artificial

implementation
backward
has

intelligence
of

IKB

reasoning

an in-built

inference

strategy

mechanism.

instantiating
between

chaining
may

evidence

competing

or

determines
by

solutions

solving

hypothesis.
process

reasoning

has been found to work very well. however.


base

deterministic

input

reasoning

reasoning

have

requirements

data

is

been

proposed.

sums and products

of probabilities

hypothesis.

Although

these

independent

and

defined

interacting

well

propositions.

more capable

values on a numerical
applied

to

represented
to exist.
measures
heuristic
(Buchanan

are

data.

they

into

1990

to

by

discriminate

system.

in

such

methods

cases

of

In the
this

for

the

simple

approximate

use

have

been

against

developed

well
are

of truth values

suited

to

the

upon

unsatisfactory

Fuzzy-logic

for

system

of fuzzy-logic.
has.

a knowledge

been
base

for

used
use

and

are much

represent

truth

rules to those

allows
using

with

vague

systems

using similar
also

for an

problems

truth

and for more than one solution

factors

state

For simple applications

a series

to

be

to a problem

a set of belief

successfully

to

encode

in medical

diagnostics

1984b).

of backward

reasoning

for 2D defect

means of a series of rules held in the knowledge


Ph.D. A. Kehoe

order

logic. or fuzzy-logic

implementation

and Shortliffe,

The implementation

systems

to produce

reasoning.

certainty

information

In

reviewed

scale and can be evaluated

One particular

of

1984). These use a system of mathematical

methods

as a relative concept
called

to the problem

with this type of data. These

deterministic

in a variety

problem.

Multi-valued

of dealing

a rudimentary

process.

inexact.

were

truth

(Ally and Coombes.

provides

Prolog

is used (Davis. 1982). This is a

Various

which

based

1988).

and

for more complex applications

often

inspection

of statistically

Theorem

are

inappropriate.

of the defect

A number
Bayes

and

methods

uses a truth

system based on two valued logic; true and false.


knowledge

to the

Mechanism

the reasoning

majority of IKB systems deterministic

search

and controlled

the solution

proving

itself

and others.

which

be enhanced
problem

lends

extensive

mechanism

and the Inference

mechanism

Prolog

1986; Walker

a more sophisticated

inference

language

incorporating

(Bratko,

This

Uncertainty
The

systems.

backward

ways to deliver

programming

inspection

is by

base and a backward chaining


97

Chapter 5 IKB System Design Considerations


mechanism.
means

The

rules

are

of confidence

factors.

inclination

for acceptance

backward

chaining

system.

5.3

These

incorporate
are

based

a measure
on

of a panicular

deals

confidence

the rules

of competing

to

or rejection

process

which defines

selection

designed

with

for combination

human

of

evidence

hypothesis.
factors

belief

of the

or rule. The

by

of confidence

by

fuzzy-logic

factors

and the

solutions.

CON1ROL S1RUCIURE AND SOLUTIONSEARCH

In a complex
various

input

problem.

IKB system the number of possible

conditions

and

may

finding

the

path

solution

as the

matching

the input conditions

time.

In order

space

all

the

process

of

between

of inference.

alternative

as

initial

Progress

suitable
need

from

strategy

for the selection

of control

strategy;

the

correct

is made

by

in the search

and the

possibility

of

of an IKB system defines

of the appropriate
the search method

process (Ally and Coombes.

search

base at a particular

any point

to be explored.

for

space

and

this _ path

knowledge

path

which exist

state

conditions
along

with the current

paths

a large

at each stage. The control structure

are two aspects


reasoning

thought

to find the most

success evaluated
the general

be

solutions

solution

paths.

and the control

There
of the

1984).

Solution Search Method


Blind
possible

search
path

is a simple search method which exhaustively

through

the

space

however.

a very

problems.

More efficient

are depth-first

depth-first

search

attempts

space

time

state

method

by following

method

backtracks

method

involves

sequential

order.

consuming

a chain
to
the

the

until

operation

impractical

to find a successful
recent

investigation

the path through

and

is

and breadth-first

of inferences
most

a solution

of
being

all

selected

for

search

every

This
real

methods.

A breadth-first

in
from

the

search

is.

world
A

the state

When unsuccessful

paths.

states

found.

path through

to its end.

untried

examines

the

search
space

in

the most successful

at

each level of the search.


The

implementation

programming

language

Ph.D. A. Kehoe

1990

of the

IKB

Prolog dictated

system

for

20

that the search

defect
method

inspection

in the

was, by default.
98

Chapter 5 IKB System Design Considerations


depth-first

search. This is a most suitable method for the problems to be 'solved

by the system.

Meta-level

Task Control

At each state in the search space of a complex


rules

which

method
There

apply

would
are

the

(Walters

to

solution

may

require

solving.

simplify
be

This

includes

experts

human

expert

pattern

ease

does

the
not

matching

most

search

method;

control and modular

control

task structures

base. Often

maintenance.

The

overall

task

structure

sub-problems
guides

and stating

are termed

consciously

or

the

rule-set

hierarchical
system

tasks

inference

how each

of which

which
process,

sub-problem
to apply

experience

should

to a given

information

The adopted

use strategies,
the

This

expert

of simple

matters
These

the

evaluation

process

meta-level

Ph.D. A. Kehoe

during

1990

of

problem

a
the

methods
ability

of the 2D defect
task structure

and non-procedural

solution

search

evaluation
such

to

without
and

short

base as heuristic
inspection

cuts

expert,
rules.

system uses a
control

task structure

operations,

such

determining

with a domain

and heuristic

and verify

functions

short cuts:

functions

1988). After consultation

mechanism

procedural

using

of the problem

level problem solving tasks. In this way the meta-level


both

methods

search

develops

and using

may be added to the knowledge

control

solving

exhaustive

is achieved

of the problem,

approach.
(Bonnet,

When

solving

solution paths to a problem and select the one

with the low-level

high-level

the problem

structure.

Instead

for success.

heuristics

combination

knowledge

all the possible

through

correct

reasoning

are used in

into

of capturing

techniques.

potential

as not dealing

control

explosion.

organized

several

the selection

is a means

into

quickly evaluate

heuristic

the

search

Control

control

human

the

are

into

structure,

the

and how each rule should be used.

Heuristic

acquired

and

meta-level

cases

or rules about the knowledge

systems

down

task

to assist

1988). Meta-level

execution

The

designed

In such

by combinatorial

structures, heuristic

large

broken

Heuristic

with

of

the overall

be solved.

or

of control

task

path.

from continuing

and Nielsen,

base

structure

situation

solution

system to encode knowledge

knowledge

defining

methods

or meta-level

structures

possible

soon be prevented

several

high-level
complex

to each

system there may be many

guide

the intermediate

for lowis used to

the

overall

states

of

99

Chapter 5 IKB System Design Considerations


problem
during
rule-sets,
possible

solving.
the

Heuristic

search

through

selecting

rules

control
the
at

state
a

is

used
space,

particular

to
such
state

check

the

as adding
and

reasoning
priorities

discriminating

process
to the
between

solutions.

Ph.D. A. Kehoe

1990

100

CHAPTER 6
INTELLIGENT KNOWLEDGE BASED SYSTEM
FOR 2D DEFECT INSPECTION

Ph.D. A. Kehoe

1990

Chapter 6 IKB System for 2D Defect Inspection

IKB SYSTEMFOR 2D DEFECf INSPECTION

The operation
classification,
illustrated

of the IKB system is divided into three distinct

defect

zoning

grouping,

in Fig. 6.1. The classification

system

is designed

regions

in the component

defect

and

types.

attributes

to take,

The

suspect

region

crack,

annular

unknown

operation

and rules

as one of the following


ring,

type

piping

or

defect

based

the

on

of classification,
types:

of classified
20

shape

to classify

longitudinal

cavity,

of suspect

local

used

as

inspection

of a number
a series

is

type

evaluation,

as output,

defect

small

defect

of the 20

the description

image and produce,

defects,

finally

operation

as input,

classification

of suspect

and

stages: defect

porosity,

the

or transverse
inclusion,

and

defect.

K Sytem f or 2D D ef eet Inspectron 18

...

...

Defect
Classification
.H

Zoning and
Grouping

~~

Rules of
inspection

Quality
assurance
knowledge

Component
knowledge

Rules of
classification

......

Defect
Evaluation

j~

Defect
knowledge

Re suits of
ins pection

Defect groups

Defect types

2D defect
description

for 20 defect ins ection.


The IKB system for zoning and grouping of defects is designed to perform a
similar

tasks

inspection
location

cycle.

The

within

the

classification
defect

Ph.D.

to that undertaken

type

system

component,

and proximity.

classification

A. Kehoe

IKB

1990

by

by the expert

adding

inspector

whilst

places

defects

into

and

groups

defects

This

operation

a further

set

of

zones

builds
20

performing
based

based
upon

attributes

on their
on

the

the
their

output

to the

of

local

102

Chapter 6 IKB System for 2D Defect Inspection


attributes
defect,

describing

each

and each defect

their

acceptability.

then

the system

defect.

group,

Should

The

defect

against

this

system

a set of evaluation

any defects,

records

evaluation

or defect

in the current

the component as unacceptable.


It should be noted that the component

group,

checks

rules

each

to determine

be found unacceptable

knowledge

base

and subsequently

inspection

is in a known

defines

position

and orientation,

location

and size.

6.1

and appears

under

in the radiographic

image

at a constant

IKB 1ECHNIQUES FOR DEFECf INSPECnON

6.1.1

Frame Based Knowledge

The
may,

domain

knowledge

therefore,

representation

be

scheme.

Representation

for 2D defect

efficiently

expressed

The knowledge

divided into two sections:

inspection
by

is highly

frame

base for the defect

structured

based

knowledge

inspection

the static and dynamic knowledge

and

system

is

base.

Static Knowledge Base


The content
diagram
been

and structure

of the static knowledge

shows the frame taxonomies

connected

various

classes

defined

simulates

the

inspection,

held by the expert

The
concepts

relating

concepts

have

structure

individual

in the

of

6.2. define

image.

1990

and

the

under

reports

This

type

experience

static

between
of

of

also

cycle

the

knowledge

radiographic

The frame

concepts

related

between

base are determined

Fig.
on

which

a component.

These

during

links,

describing

encoded

into

of unknown

to the defects
these

inspection
define

are

taxonomies

define

these

and 'contains'

6.2,

include

these

The taxonomies

performed
base,

base

taxonomies,

included,

by 'has'

knowledge

knowledge

zones

evaluation.

are

related

The relationships

knowledge

Ph.D. A. Kehoe

static

relationships

taxonomies.

and inspection

of the taxonomy.

Fig.

static

the

in

inspection

been closely

frames

and defects.
component

features

to the

the

the

base, which have

inspector.
used

and inspection

taxonomies

by

to a component

relating

to describe

knowledge,

taxonomies

component

requirements

the

specialized

frame

component,

of the static knowledge

by a set of links,

object

is shown in Fig. 6.2. The

occurring

two taxonomies
the inspection

the

feature
in the

and others
cycle,

and
103

Chapter 6 IKB System for 2D Defect Inspection


as such these relations
dynamic

knowledge

are classed as dynamic knowledge,

base.

Component

Defects

Unknown
Feature

Fi . 6.2
taxonomy

general

concept

"

and a series
values

Taxonomies of the static knowled e base.

component

general

a single

under evaluation.

attributes

and its unique

batch

which
used

frame

to

The frame

the

of a component.

identification

component

for the component

frame, contains

describe

the

representation

These

number,

belongs

to define

the

and

total

their

and its function.

include
number

is

and other

frame taxonomies

there

are no further

specific

types

in the static

the initial

the

type

of

of in the

description,

and

the

The final two slots of the

and h as have been used to define the relationships

frame

further

only

in Fig. 6.3. The frame has been given the name component

component
materials

contains

of slots, each of which have default values

of the
to

Inspection
Zones

of a component

shown graphically

Component
Features

contains

has

Inspection
Results

The

and so pertain to the

knowledge

of component,

this

base,

taxonomy

between this
Fig

6.3. As

requires

no

frames.
Frame: Component
type

generic

unique no

R999

total

description
materials

a general

steel casing, some fiIIing

function

design, development

contains

insp zone~compon

has

1990

ent_features

insp requirements, inSPJesults

Fi . 6.3 The frame re resentation

Ph.D. A. Kehoe

component

of the

eneral conce t of a corn onent.

104

Chapter 6 IKB System for 2D Defect Inspection


The frame taxonomy
evaluation

has

describing

the particular

Figure

a root

6.4 shows

used to describe

the features

of the component

frame.

component

features.

and

child

frames

types

of features

occurring

in the component

image.

the component

features

taxonomy

further

for an example

with two frames making up the complete taxonomy;

base cavity

These

the

frames

represent

component

feature

hierarchical

structure

root

frame

by

corresponds

more

and

have.

specific

cases

therefore.

of the taxonomy.

an

under

'is_a'

relation.

to a parent-child

of

been

The

frames

defined

in

and outer ring.

general

placed

concept

further

have
the

component

been

frame

of

down

linked

a
the

to the

structure:

this

frame relationship.
Component
Features

~.-is a"

""'"
is a

-~

Base
Cavity

Fi . 6.4
The

Com onent features taxonom

more

complex

classified

during

porosity,

inclusions.

and small
the

taxonomy

frame

the inspection

cavity

relationships.

Outer-Ring

cycle

longitudinal

type defects.

with parent-child
These

defects taxonomy

taxonomy

of the static know led e base.


representing

is illustrated

and transverse
The figure

in Fig.
cracks,

types

defined

are also shown

annular

by 'is

in Fig.

to

6.5; these

a'.

piping

structure

of

and 'kind

of

6.6. which

lists

cracks.

child

the

in a similar manner to the way in which it would be encoded

into the IKB system. The figure contains details of the root frame, defects,
further

be

include

ring.

shows the hierarchical

relationships

relationships

defect

frames.

porosity

The root frame contains

and inclusion,

and

a sub-hierarchy

a series of slots, describing

of

two

frames.

the attributes of the

general concept of a defect. The slots contain the default, or assumed, values of
the

attribute;

intensity

all

defects

are

initially

to be

acceptable,

and

their

is low, Fig. 6.6. The child frames contain further slots which describe

the particular

attributes of a class of defect; the slot intensity

has the default value high describing


Inheritance
attributes

assumed

has

been

used

a specific

within

the

in frame inclusion

case.
defects

taxonomy

to

allow

the

relating to the general concept of a defect to be given to each of the

specific classes of defect. The slots acceptability. explanation,


and member_of,

Ph.D. A. Kehoe

and their values,

1990

are selectively

inherited

intensity. zone_location,

from the root frame

105

Chapter 6 IKB System for 2D Defect Inspection


by

each

of

technique
without

the

is that
being

child

frames

and

information

duplicated.

may

A child

sub-hierarchies.
be

distributed

frame

The
across

advantage
the

of

knowledge

can be made to inherit

values

this
base
from

any of its parent frames. which in tum can be made to inherit values from the
grandparent

frame

and

so

on.

Inheritance

may

also

expressly stated. as for the slot su m and contained_in


Such features

are useful

when attributes

relate

be

prevented

if

in the frame porosity,


to the most general

it

is

Fig. 6.6.
concept

of

the class and not to the more specific concepts.

Defects
is_a

is_a

I~...

Porosity

c~m~ck.s
....

kind of--kind

I.1~...

of

c.av~n~ie~s
....

Transverse

crack

crack

LwIIII

~.I.n.CI.u.Si.o.ns
....

.=5 ~
:. .......
~

/
.:

Longitudinal

\';,

.::

--=:...~

':.

kind of

kind of

kind of

=III/, r

r:

1~...

Annular
ring

Fi
The
zones.

6.5 The hierarchical


remaining

frame

inspection

frame structure

taxonomies

requirements.

and

detail in Fig. 6.7. Each taxonomy

p.iP.in.g...

of the static
inspection

knowledge
results

relationships

use

operation

held

taxonomies

Ph.D.

is described

A. Kehoe

1990

the

are

base.
shown

inspection
in

more

has a root frame with child frames and sub-

linked by 'is a', and 'kind of


of

c.av.itY
....

of the defects taxonom .

hierarchies
and

11~...

knowledge

in the following

within

as described
the

frames

above. The
of

these

section.

106

Chapter 6 IKB System for 2D Defect Inspection

frame defects
default sum is 0 and
default acceptability is yes and
default explanation is { none } and
default intensity is low and
default zone_location is { zoneX } and
default member_of is { groupX } and
default contained_in are { component and insp_zones }.
frame porosity is a defeets
default total is 0 and
do not inherit sum and
do not inherit contained_in.
frame cracks is a defeets
default total is 0 and

frame longitudinal_crack
do not inherit total.

is a kind of cracks

frame transverse_crack is a kind of cracks


do not inherit total.
frame inclusion is a defects
default intensity is high and

Fig. 6.6 Frames of the defects taxonomy. including root frame defects and
child frames cracks. norositv and inclusions
A frame
used

to

based

implement

procedures

may

other

value

slot

driven

programming
the

control

be attached
may

procedures

system
flow.

to the

be inherited

are designed

allows
or

slots

data

logic.

driven

of

the

of individual

by other

to activate

frames

procedures

IKB

system.

frames.
in the

when there

to be
These

and like
hierarchy.

is a request

any
Data

to either

update or access the value of a slot. or create an instance of a frame to which


they are attached.
used; launch
procedure
static

procedures

Ph.D.

procedure.
(Walters

knowledge

ensuring

There are four type of data driven procedures

that

constraint

and Nielsen.

it

is

efficient

1990

watchdog

1988). Such procedures

base to maintain

used are outlined

A. Kehoe

procedure.

and

which may be

procedure.

and demon

have been used in the

the dynamic

knowledge.

created

at run time.

consistent.

Examples

of

data

the

driven

in section 6.4.2.

107

Chapter 6 IKB System for 2D Defect Inspection

Inspection
Zones
is_a

a
H"is_

11~.........

ZoneB

~.z.o.ne.A ...

ZoneC

kind of
.-

II

ZoneC1

kind of
:=.

ZoneC2

Inspection
Requirements

. a ...
N"IS_

I r;:oneA I
IS

IS

is a

is_a

req_zoneC

req_zoneB
is a

__
~
is_a ~_ is_a

ml-lllllll-r"";::L.q_-"L

rreSlllllllll-..;:re:t..q_-"'!

Icrack_A

re~

Icrack_B

111111111
req_

cavs_C

Icrack_C

kind of

kind of

ZoneC2

ZoneC1

Inspection
Results
is_a ,..
results
_zoneA
is_a
defect
groups

is a

is_a

results
_zoneB
is_a

is a

I dJ'ec1S I

defect
groups

results
_zoneC
is_a

iis_a "\.

~I
l.=:Ji

is a

def~t-~
groups

kin~ of

6.7 Inspection

zones,

taxonomies
Ph.D.

A. Kehoe

1990

Inspection

requirements

r=J

k~d of

ZoneC1

Fig.

;,_

ZoneC2

and Inspection

results

of the static knowled e base.


108

Chapter 6 IKB System for 2D Defect Inspection

Dynamic KnQwled~e Base


Dynamic

knowledge

is generated

by the

image

processing

the IKB system, during each cycle of the inspection


the

particular

the state
solving

component

under

of the knowledge
states

inspection

the

cycle.

of a series
describe

the various

inspector

of

this

of knowledge

and simulates
during

illustrated

and a set of links


new

knowledge

These links are formed by the IKB


taxonomies

type

through

base,

the problem

the

conventional

in Fig.
which

with

the

represents

consists

6.8,

are created
existing

system at run-time

to the frame instances:

and by

process and relates only to

time,

passes

knowledge

of frames

relationship

This

base at anyone

The dynamic

of instances

the

knowledge.

expert

evaluation.

system,

to

static

and connect

such as componentR662,

and

through to defect14, Fig. 6.8.

defect2

Inspection
Zones

zoneA

II1111

Zonee

..

groups

~"~
t
~
~

defect
groups

~
~

The IKB system is made to generate,


instance

component

under

of

the

inspection.

component

frame

different

Ph.D.

from

component

A. Kehoe

1990

the
and

default
so

which

describes

componentR662,

knowledge,
the

total, description

values.

distinguish

These
it

from

particular

listed in Fig. 6.9, is

as its parent frame, component

Fig. 6.3. However, the slots type, unique_no,


particular

..

as part of the dynamic

The instance

made to have the same slot structure


values

~
~~

namic knowled e base for the 2D defect ins

Fi

single

~v

shown

in

and function contain

values

are

others

in

specific
its

class.

to

The
109

Chapter 6 IKB System for 2D Defect Inspection


remaining
these

slots

of the

attributes

instance

represent

are

the

inherited

general

values

from

information

the

which

parent

applies

frame;

to

many

components.
The

specific

slot

current

values

are

situation

of

referred

as current

to

knowledge

reflect

the

funher

part

system.

They not only apply to the slots of instances

frames

themselves.

of the dynamic

the

knowledge

base.

created

values,
Current

during

they

because
values

are

of the

operation

IKB

but also to the slots of

instance componentR662
current values
type is production and
unique_no is R662 and
total is 1 and
description is 'The first batch for trials' and
function is { manufacturing prototype } and
inherited values
materials are { steel_casing and some_filling} and
contains are { insp_zones and component_features} and
has are { inspection_requirements and inspection_results }.
instance defect2
current values
type is porosity and
area is 40 and
density is 0.8 and
c_of_g_y is 11.5 and
default values
zone_location is zoneX and
member_of is groupX and
inherited values
acceptability is yes and
explanation is { none }.
intensity Is low.
Fig. 6.9 Instances of the component frame and the porosity
type frame after the classification
operation.
The
frames

classification
in both

operation

the component

upon the information


processing

is designed

system.

received

Figure

feature

to generate

and the

from the defect

6.10 shows

defect

analysis

a meta-level

task

several

instances

taxonomies,
operation
designed

depending

of the image
to create

new instance of a defect frame. It will be noted that instance defect2,


Fig.

6.9,

porosity

has
listed

description

been

generated

in Fig.

of the suspect

6.6.

with
These

defect

many

more

new slots

slots
contain

and are relevant

than
values

its

of

listed in

parent
taken

only to a particular

frame,

from the
instance

of the porosity type defect. The instance has, however, been made to inherit all

Ph.D.

A. Kehoe

1990

110

Chapter 6 IKB System for 2D Defect Inspection


of the slots of the parent frame and the default
frame relationship

of such an operation

is illustrated

instance-

in Fig. 6.8, with instance

of the porosity frame.

defect2

The

final

taxonomies,

type

of dynamic

frames

describe

knowledge

the

knowledge

or individual

be used to access information


to

values. The resulting

current

slots

consists

within

of links

frames.

in remote taxonomies

relationships

between

Such

created

between

relationships

of the knowledge

defect

instances

and

may

base, or
the

static

base.

create_defect_instance(
Defect)
if
{[Type, Cert, A, On, El, N_w, N_I, Or, CGX, CGY)) is equal to suspect_defect
DefectNo Is a new Defect and
whose defect_tiUe Is DefectNo and
whose type is Type and
whose area is Area and
whose density is On and

and

whose c_of_g_y is CGY and


and retract the ~uspect_defect.

Fie. 6.10 Meta-level task for the creation of a defect instance.

6.1.2

Meta-level

The meta-level

Task Structure
task structure

is the high-level

control

strategy

of the IKB

system, used to guide the search method of the inference

mechanism.

be thought

of as information

about

solving

methods,

the

inspector,

into the knowledge

base.

The defect

expert

problem

has

organized
contained

encoded

been

into

broken

down

hierarchical

at each level defines

the problem
into

several

structure,
the strategy

shown

sub-problems,
in

of problem

Fig.

or
6.11.

solving.

This may
adopted

by

inspection
tasks,

and

Knowledge

which rules to

apply in a given situation and how these rules should be used.

Ph.D.

A. Kehoe

1990

111

Chapter 6 IKB System for 2D Defect Inspection


20 Inspection
System

component
data

and

nd

a~

Initialisation

..

Inspection
reports
Inspection
reports

System cycle

Defect data

e--;

and

-~

lor

Fig. 6.11 The hierarchical

meta-level

tasks

shown

structure

for the defect

in Fig.

6.11

for the 2D defect

task structure
system.

inspection
The task

Defect
Evaluation

Zoning and
Grouping

Classification

inspection

as initialization,

system

start

consists

cycle,

of three

and inspection

These tasks are listed in detail in Fig. 6.12 as start_inspection,


start_results.

reports.

start_cycle

including

to be carried out. The task start_cycle

start_classification,

start_zone_n_group

activates

several

and start_evaluation,

6.12. Each of these tasks has, in turn, further sub-tasks to be completed.


way a hierarchical
of the task

and more specific

structure

rule set designed

contains

to perform

The hierarchical
designed

task

to maintain

a series of directives

some very particular

structure

the

tasks in subsequent

also contains

consistency

the

subsequent

searching

levels. The lowest


which operate

a series

of conditional

over

the whole

classification

task initialise_inspection,
structure

knowledge

operation

is

on a

checks

series

'and' and 'or' operations.

Fig. 6.12, contains the+sub-task classify_status

the current

in the task

In this

operation.

of operation

tasks, these are shown in Fig. 6.11 as the 'start',


task start_cycle,

Fig.

task structure is built up, with the most general tasks at the

root of the structure


level

and

In order to be completed each of these tasks requires a further set

of tasks, or sub-tasks,
sub-tasks

main

required.

base for the status

This

of
The

which checks that


is

information

achieved

by

added by the

Fig. 6.12. Such checks have been added at several points


to prevent

the IKB system

from performing

unnecessary

operations.

Ph.D. A. Kehoe

1990

112

Chapter 6 IKB System for 2D Defect Inspection

start_inspection
if
initialise_inspection
and
initialise_component and
get_defect_data and
start_cycle.

classification(RuleGroup)
if
Rule is a member of RuleGroup and
backward_chain( Rule).
start_zone_n_group
if
start_zoning and
zoning_end and
start_grouping and
grouping_end.

start_cycle
if
initialise_cycle
and
classify_status
and
start_classification
and
grouping_status and
start_zone_n_group
and
evaluation_status and
start_evaluation.

start_zoning
if
Defect_instance

is a member of
defect_instances and
fire_rule_group(
zone_rules ).

start_classification
if
start_compfeature_classify
and
classify_done and
start_defect_classify
and
classify_done and
classify _unkn~wllfeature_classify
classify_end.
start_compfeature_classify
if
get_suspect_compfeature
and
classify(identify_comp_features)
[ check_instances(comp_features)
create _component_instance
or
start_compfeature_classify
]

fire_rule_group(RuleGroup
if
forward_chain( RuleGroup ).

and

and
and

classify(RuleGroup)
if
Rule is a member of RuleGroup and
backward_chain( Rule) and
dlsable_rules( [ Rule ] ).
start_defect_classify
if
classify_status(
required) and
start_pattern_classification
and
classify_done and
start_confidence_classification
and
classify_end.
start_pattern_classification
if
get_suspect_defect and
classification( classify _ru les)
start_pattern_classification.

start_grouping
if
get_zoned_defects( Zone, DefectList ) and
check_for_groups( Zone, DefectList ).
check_for_groups( Zone, DefectList )
if
get_def_group( DefectList, GroupList ) and
create_defect_group( GroupList, Zone ).
create_defect_group(
Defect, GList, Zone)
If
DefType is equal to type of Defect and
Length is equal to length of GList and
GroupNo Is a new group and
whose defect_type is DefType and
whose zone_location is Zone and
whose defect_total Is Length and
whose defect_members are GList and
global_data( GroupNo, DefType, GList ) and
update_group_members( GList, GroupNo )

and
update_group_acceptability(

GroupNo ).

and

Fig. 6.12 Meta-level tasks for the 20 defect inspection system.

Ph.D.

A. Kehoe

1990

113

Chapter 6 IKB System for 2D Defect Inspection

6.2

DEFECT CLASSIFICAnON SYSTEM

The

human

inspector

cycle

is required

inspection

performing
to locate

the
defects

conventional
occurring

within

and classify those found into one of a series of predefined


cracks,

cavitation,

porosity,

the radiographic
identify

image, may be mistaken

and eliminate

operation

of shapes

within

the bounds
type.

shape

classification
The

such

rules

expertise

as elongation

radiographic

of

inspector

inspection

formation,
the

component

quality

inspector

assurance

expert

cycle,
details,

develop

short cuts to quickly

In this

decision

than

take,

as input,
task

inspector,

with

methods,

expert

inspector.

Ph.D.

same

the classification

solving

A. Kehoe

has

including
of

defects

inspector

and

1990

and

cycle.
operation

to the problem,

specialized
of

but

knowledge

of the

radiographic

image

in the

inspection

along

in their

is able to draw upon during

occurring

the

have a

dimensional

classification

knowledge

types

and

on a set of heuristic

applied

component,

process.

The

with experience

is able

built

and conflicting

and determine

of the defect

make

inspection

of a number of suspect

as output, a series of classified

the

structure

and
expert

up from

data and to

their classification

a much

more

reliable

inspector.

operation

a description

image and produce,


this

inspector

analyse

non-expert

The classification

the

in

is able to

are unique

of the inspection

to deal with ambiguous

way the expert


the

occur

and orientation

their

based

reasoning

is able to use this knowledge,


inspection

from

the inspector

defect

previous
type.

of the

such defects

performing

requirements

cycles,

which

at any position

and density,

from experience

The

The inspector

defects

devised

cycle.

for defects.

image;

not from the level of intelligent


inspection

features,

these

from the broad width of knowledge


the

Component

and may occur

classifies

the

defect types, such as

from his knowledge

of the component
inspector

a component

Defect types such as cracks, and cavitation,

and sizes,

The

attributes,

arises

such features

of the component.

variety
class

or inclusion.

radiographic

reliability
system

contain

the

and

system

regions

is designed

in the component

defects. In order to perform

efficiency

as

the

human

must to adopt the same intelligent


same

domain

to

knowledge

as

held

expert
problem
by

the

114

Chapter 6 IKB System lor 2D Defect Inspection

6.2.1

Component

When

Feature

classifying

evaluate

each

radiographic

component

individual

image

the inspector

expects

to be

experience

of

the

size

shape,

image.

defect

these images to quickly

The

by

means

of

picture

inspection

cycle.

of each

of each

in a frame

component

a pattern

description

the

This

feature.

.. and

has

structure

all occurrences

been

built

and includes

features

a series

component

of each component

component

matching

features

is

expected

The

which

previous
such

inspector

into

uses

as
uses

in the

The pattern
fall within

the

frame

classification

to appear

feature

he

in the image.

in the form of a pattern.


of the component

up from

implemented

technique

feature

information

feature.

of component

feature,

not

or not it is a component

mental picture

a suspect

does

in the

of Patterns

representation

such that

whether

up

inspector

region

Representation
of

expert

makes

all component

knowledge
held

the

identify

classification

system

deciding

and location

Frame

which

has a clear

in the
the

features.

attribute

before

Instead

Classification

IKB
based

rules.

image,

is

is designed

the bounds

of

pattern.
From

the

described

defect

in section

suspect

defect

density.

normalized

defect.

Such features

possible

4.2.3.
width

operation

of

the

These

include

and length,

are very useful

the local

position

to build

and

knowledge

a pattern

of each

processing

system.

are provided

for each

attributes

and orientation

for classification

the image, and are. therefore,

features.

image

a set of local 2D attributes

in the image.

of scale within
component

analysis

component

of each suspect

as they are independent

very robust.

gathered

of elongation.

from

From evaluation

expert

feature

inspectors,

based

it

of
is

on these

local

feature.

'outer

attributes.
The

frame

pattern

used

to describe

an example

component

ring', is shown in Fig. 6.13. The frame has the name p_outer_ring, and a series of
slots

which

describe

the

attributes

of the

component

feature

Each slot in the frame contains two default values; the maximum
expected

values

of each

identlfy_outer_ring.

suspect

defects

attribute.

A. Kehoe

component

feature

image.

and minimum

classification

rule

Fig. 6.13, is designed to use these default values to classify

in the image

as the component

has been given an 'if <condition>

Ph.D.

The

in the

1990

then <action>'

feature

'outer

type structure.

ring'.

The rule

with the action

115

Chapter 6 IKB System for 2D Defect Inspection


part only activated

when the condition

In the condition
defect

to the default values

frame of the component

fall between
the

part of the rule the values

are compared

pattern

rule

the maximum

is

fired.

component

feature

component

feature

part is satisfied

The
of

feature.

of the attributes

of the corresponding

If all the attribute

and minimum default


action

the

part

type

in full.

of

exists

rule.
and

of a suspect

attribute

in the

values are found to

values

then the action pan of

firstly.

checks

then

creates

that

no

an instance

other
of the

frame. Fig. 6.13.

group identify_comp_features
identify_base_cavity, identify_outer_ring.
frame p_outer_ring is a p_comp_features
default density is ( 0.25 and 0.55 } and
default elongation is { 1.50 and 1.95 } and
default norm_widthis { 0.3 and 0.5 } and
default norm_length are { 3.5 and 5.5 } and
default orientation is { 70 and 110 } and
default c_of_g_x is { 25.0 and 40.0 } and
default c_of_g_y is ( 37.0 and 43.0 }.
rule identify_outer_ring
if
{Min_Onand Max_On}is the density of p_outer_ring
and the def_dens of the suspect_defect-< Max_On
and the def_dens of the suspect_defect>. Min_On
and
.
and {Min_Cyand Max_Cy}is the c_of_g_y of p_outer_ring
and the def_cofgYof the suspect_defect.< Max_Cy
and the def_cofgYof the suspect_defect >- Min_Cy
then check_no_instance( outer_ring)
and
create_component_instance( outer_ring).
Fig. 6.13 Rule group. pattern frame and classification rule for the
component features classification
svstem.

Meta- Task

Structure

The

hierarchical

task

in Fig.

6.14. with

the general

specific

tasks

within

structure

tasks

at the lower levels.

the static

knowledge

groups are illustrated

for

the

classification

at the

root

system

of the

structure

The lower level tasks

base to perform

a particular

is illustrated

operate

on rule sets

operation.

as the bottom elements of the structure

and more
These

rule

in Fig. 6.14.

Each of the tasks are listed in detail in Fig. 6.12. as start_classification,


start_compfeature_classify,
task
.

for component

each

suspect

Ph.D.

A. Kehoe

defect

1990

start_defect_classify

feature
in

classification.
the

current

and start_unknownfeat_classify.
start_compfeature_classify,

knowledge

base

using

The

examines
the

sub-task

116

Chapter 6 IKB System for 2D Defect Inspection


For each suspect defect. all the classification

get_suspect_compfeature.

identify

the component

features.

in the rule group identify_comp_features

6.13. are made to fire in a backward


to determine

classify,

pattern

frames.

a single

instance

taxonomy.

suspect

is made

matches

relevant

from

component

the

feature

is designed

to

current
occurs

disable

as a component

frame

in the

in subsequent

the

is efficient

have

been

base.

rule

which

and the

cycle

feature.

component

As only

a single

then

features

instance

the sub-task

has

fired

successfully

Fig.

6.12.

This

ends

when

instances

classification.

feature

and the suspect defect is

in the image of the component.


the

considered
search

knowledge

sub-task

that of any component

defect is classified
of the

Fig.

manner by the further

by the sub-task create_component_instance.

removed

features

chaining

if its description

If the

rules to

classify

so that

operation
of

of a
is not

ensures

that

all component

created.
2D defect
description

Classified
defect types

Classification
system
or

Component
features

or
Unknown
feature

Defects

ertalnty
factor
classification

Fig. 6.14 The hierarchical

structure

of the meta-level

classification

6.2.2

s stem.

Defect Classification

When classifying
image

tasks for the

the

component

expert

defect

types

inspector

features.

mental

picture.

consist

of information

typical

size

uses

From

or model.

1990

a similar

previous
of a typical

such

of its features,

Ph.D. A. Kehoe

from the suspect

method

experience
defect

as the range

regions
the

that

where

for

inspector

of a particular

of shapes

and the location

to

in the radiographic

a defect
it usually

classifying
develops

type.

This may

may

adopt,

occurs

the

in the

117

Chapter 6 IKB System for 2D Defect Inspection


component.
During

the

defect

classification

quickly

locate

and identify

defects

cannot be guarantied

the inspector
attributes,

defect

type.

Following

from

the

several

results
his

start_confide

cycles

of such

mental

the

analysis

technique,

suspect

using

defects

region,

factors,

which

classification

frames

identified

knowledge
evaluation

of classification

measure

of

of operation.

of

rules

truth

to

the

a series

of

The conditional

if the main task is to be performed,

c I ass ify _ don e

determines

if

the

of each

defect

sub-task

is required.

Classification
containing

are

defects

rule set. The

also contains

the consistency

check

based

of
and

to classify

frame

a series

give

determines

start_confidence_classification

The

experience;

Fig. 6.12, consists

based on a lengthy

using

which

ensure

conditional

Pattern

inspection

is designed

and a defect

to classify

confidence

the

may learn

start_pattern_classification

The first sub-task

'classify_status(required)'

whilst

regions

it as of a particular

system,

and two sub-tasks,

matching

of each

checks

to

however,

of the suspect

this

of a rule. The task start_defect_classify

conditional

features,

the inspector

upon

for the defect classification

is designed

incorporating

model

In such circumstances

analysis

classification

and build

for each defect pattern

attributes

check

component

these

picture.

pattern

sub-task

outcome

of defect

nee_classification.

representation
latter

Unlike

uses

to comply to a set pattern.

the task start_defect_classify


on

types.

inspector

each one in tum in order to classify

The task structure

based

the

has to revert to a more thorough

evaluating

modifying

cycle

organized

the
into

pattern

description

a taxonomy

which

reflects

that

type

to be

of the

defects

taxonomy, shown in Fig. 6.5. Each frame is designed to describe a defect type in
the

form

of

a template,

pattern

taxonomy,

appears

in the component

type

including

orientation.
values
From

with

of the expected
evaluation

expert

inspectors,

these

local

Ph.D.

A. Kehoe

each

elongation,

The slots

much

like

These

density,

two default
defect

of

the

an attribute

are the local

normalized

range of values

of previous

frames

slot describing

image.

contain

the

width

values,
for each

occurrences,

component
of the defect

attributes
and length,

the maximum
attribute

features

of the defect
position

and

and minimum

of the defect

and knowledge

as it

gathered

type.
from

it is possible to build a pattern of each defect type based on

attributes.

1990

118

Chapter 6 IKB System for 2D Defect Inspection


The root frame of the taxonomy. p_defects
general

knowledge

about

consists

of a series

of slots each describing

for a single
default

attribute

values.

corresponding

the

defect

of the defect

the maximum

Fig. 6.15. is designed to contain the

patterns

patterns.

and minimum

in

the

hierarchy.

the overall

p_porosity

and

which

describe

the

p_longitudinal_crack
general

values

of density

of

frame

of values
has two

taken

from the

ie. the density

The taxonomy

properties

taxonomy; such as the frames p_cracks

distribution

The slot density_range

slots in the child frames of the taxonomy;

frame

The

has

further

sub-hierarchies

slot of
frames

within

the

Fig 6.15.

frame p_defects
default density_range is { 0.01 and 0.65 } and
default elongation_range is { 1.0 and 15.00 } and
default norm_width_rangeis { 0.01 and 3.5 } and
default norm_length_range are { 0.25 and 12.5 } and
default orientation_range is { 0 and 90 } and
default cofgx_range is { 0.0 and 180.0 } and
default cofgy_range is { 0.0 and 80.0 }.
frame p_j)orosity is a p_defects
default density ~. { 0.01 and 0.25 } and
default elongation is { 1.0 and 3.5 } and
default norm_widthis { 0.75 and 3.5 } and
default norm_length are { 0.75 and 3.5 }.
frame p_cracks is a p_defects
default elong_cracks is { 4.0 and 10.00 } and
default nwidth_cracks is { 0.01 and 0.9 }.
frame p_longitudinaJ_crackis a kind of p_cracks
default density is { 0.25 and 0.65 } and
frame p_transverse_crack is a kind of p_cracks
default density is { 0.25 and 0.65 } and
Fig. 6.15 Frames of the p_defects taxonomy for use in the defect
classification
system.
The frame p_porosity
and norm_length.
The slots
values

has been given four slots. density. elongation.

describing

contain

the typical porosity defect in the image. Fig.

the default

for a porosity

type

values

defect:

describing
for example

the typical
porosity

density and does not appear elongated. The frame p_cracks


sub-hierarchy

containing

frames

p_longitudinal_crack

which are linked by the 'is a kind or


slots. elong_cracks
defect

attributes

Ph.D. A. Kehoe

and nwidth_cracks,
held

1990

by

norm_width

both

child

relation.

range

normally

6.15.

of attribute
has

a low

is the root frame of a

and p_transverse_crack.

The frame has been given two

which contain the range of values for the


frames

of

the

sub-hierarchy:

cracks

119

Chapter 6 IKB System for 2D Defect Inspection


normally

appear

in

the

component

image

elongated

and

with

very

small

width.
group classify_rules
classify _porosity , classify_cracks,
classify_inclusion.
group crack_rules
classify_longitudinal_crack,

classify_transverse_crack.

group cavities_rules
classlfy_annular_ring_cavity,
classify_cavity.
rule

classify_cavities,

classlfy_piping_cavity,

classify_cracks
if {Min_EI and Max_EI} is the elong_cracks of p_cracks
and the deCelg of the suspect_defect=< Max_EI
and the def_elg of the suspect_defect >- Min_EI
and {Min_Nw and Max_Nw} is the nwidth_cracks of p_cracks
and the def_nwd of the suspect_defect -< Max_Nw
and the deCnwd of the suspect_defect >- Min_Nw
then classification( crack_rules ).

rule classify_longitudinal_crack
if {Min_On and Max_On} is the density of p_longitudinal_crack
and the deCdens of the suspect_defect -< Max_On
and the deCdens of the suspect_defect >- Min_On
and
and
and
then

{Min_Or and Max_Or} is the orientation of p_longitudinal_crack


the deCorn of the suspect_defect -< Max_Or
the deCorn of the suspect_defect >- Min_Or
create_defect_instance( longitudinal_crack).

rule classify_transverse_crack
if {Min_On and Max_On} is the density of p_transverse_crack
then create_defect_instance( transverse_crack).
Fig.

6.16 Defect classification rules, based on the patterns of frames in the


n defects taxonomv for use in the defect classification svstem.

Such
based
The

an hierarchy

inference
rules

manner.

for

to

elongation
held

has

and width

in the pattern

classification

frames

the

reasoning

classification,

also

classify_cracks

pattern

control

pattern

which

of

reflects
a

condition

attributes
frame

that

process

Fig.

6.16,

of

the

part

and

defects

which

a further

two

rules.

limit

the

set of

in

against

the

in

search

space.

The

values

defined

in

rule

of

the default

part is satisfied
rules;

rule

a hierarchical

taxonomy.

compares

If the condition

with

effectively

are described

of the suspect defect

p_cracks.

task is restarted

can be used very

the

values

then the
the rule

group crack_rules.
This

Ph.D.

group

A. Kehoe

consists

1990

of

classify_longitudinal_crack

and

120

Chapter 6 IKB System for 2D Defect Inspection


which determine what type of crack the suspect defect

classlfy_transverse_crack.

represents.
type

Should either of these rules be fired then an instance

is created.

classification

If the condition

operation

of the rule classify _cracks

of the defect
fails.

then the

moves onto a further set of rules. such as cavities_rules

Fig. 6.16, wasting no more time attempting

to classify

the suspect

defect as a

type of crack.
The task start_pattern_classlficatlon,
through

each

sub-task

classification,

backward

suspect

chaining

defect

in

shown in Fig. 6.12, is designed to cycle

the

current

knowledge

manner, in an attempt to classify

firing of a rule, or classification

is

the

suspect

of

defects

goal states,
search

defect

frame.

This

exist in the current

most appropriate

executing

which fires the rule group classify_rules,

each successful
created

base,

method of reasoning

each as a defect type. For


continues

until

base. Backward

in this case because

or defect types, for the problem

Fig. 6.16. in a

of a defect type, an instance

operation

knowledge

the

further

chaining

is the

there

of classification,

will always arrive at an answer with relative

no

are very few

and the solution

speed and reliability.

Confidence Factor Classification


Suspect

defects

classification

remaining

unclassified

do not fit into the patterns

after

the

first

stage

of

defect

for typical defects. These defects

have

to be analysed in more detail in order to determine their type. This operation


performed

by

designed

to use

and

inference

an

confidence
a series

factor

classification

of classification

mechanism

which

is

rules

system
containing

capable

of

which

has

confidence

reasoning

is

been
factors,

with

uncertain

task

structure.

data.
The

main

task

of

the

confidence

each

defect

defect

chaining

remaining

is encountered.

firing

of

in

the

current

knowledge

and executing the sub-task cf_classification

get_suspect_defect,

suspect

classification

is shown in Fig. 6.17. The task is designed to cycle

start_confidence_classification,

through

factor

all

the

The

sub-task,

classification

in

rules

turn,

base,

each time a new

performs

containing

calling

a backward

confidence

factors

using the further sub-task confidence_in.


The input to the task cf_classification
the

possible

defect

solutions

hypothesis.

describing

to the

defect

defect_hypothesis,

is a collection
classification

of hypothesis

problem.

defect_is_cracks

Three

staling all
groups

of

and defect_is_cavities,

the types of defects to be identified are shown in Fig. 6.18. For each

Ph.D. A. Kehoe

1990

121

Chapter 6 IKB System for 2D Defect Inspection


hypothesis
for

the task cf_classlflcatlon

each

solution

confidence

in the

factor

threshold

value,

confirmed,

of

form

any

is designed
of a confidence

hypothesis

be

factor.

greater

than

the level of truth

Should
the

Fig. 6.11, then the hypothesis

Cf_ Threshold

and an instance

to determine

is created

of the appropriate

the

resulting

confidence

factor

is considered

to be

frame

in the defects

taxonomy.
start_confidence_classification
if
get_susp8Ct_defect and
cf_classification(defect_hypothesis)
start_confldence_classification.

and

cf_classification(HypoGroup)
if
cf_threshold is equal to Cf_Threshold and
Hypothesis is a member of HypoGroup and
confidence_in( [ Hypothesis, true), CF ) and
add to current_k_base found( Hypothesis, CF ) and
CF is greater than Cf_Threshold and
[ isa_group( Hypothesis, _ ) and cf_classification(Hypothesis)
or
create_defect_instance(
Hypothesis, CF )
cf_classification(

AnyHypothesis)

If
find_all( Cond_Factors, found( -J Cond_Factors),
Cf is the maximum of CFLlst and
find DefectisType with CF and
create_defect_instance(
Hypothesis, CF ).

Fig. 6.11

Meta-task

The

of confidence

level

mechanism,
confidence

using
factor

structure

rules

of the confidence
svstem.

in an hypothesis

which

contain

on the conclusion

each of the conditions

the rule when the conditions


factors

confidence

classification

knowledge
confidence

base.

include

Ph.D.

20

The

types
rule

the

factors;

and a confidence

a
on

factor on the conclusion

of

that applies to the outcome or hypothesis

of

conditions

general

confidence

inference
factor

and prerequisites

system

of

by the

of

using

formal

of

the
the

of the rule are satisfied.


rule
defect

are

determined

data

classification

in

rules

The

by

the

the

current

which

contain

factors is shown in Fig. 6.19.

The conditions
local

on

two

of the

factor defect classification

is determined

of the rule. The confidence

the rule is the level of confidence


confidence

CFList ) and

defect
features

A. Kehoe

of the confidence
attributes
such

1990

used

factor classification

in the pattern

as elongation,

density,

frames

rules are based on the


of defect

normalized

width

types.

These

and

length,

122

Chapter 6 IKB System lor 2D Defect tnspectio


position

and orientation

of a defect.

In this case,

given one of a small number of descriptors,


such

as

low,

conditions

are

analysis

medium,

or

determined

operation,

high.
by

the

performed

confidence

factors

applied

evaluation

of previous

the expert inspectors.

The

confidence

and

from

these

the

defect

system.

The

by the

gathered

of rules of thumb,

then it is a longitudinal

as, 'it is almost certain

value:

are determined

knowledge

are

to

by

processing

of a rule
heuristic

applied

provided

image

may consist

'if a defect is a crack and it is vertical

factor

data

of the

This information

may also be interpreted

of

to the conclusion

defects

the attributes

based on the actual attribute

quality

as part

however,

from

such as

crack':

which

that a defect is a longitudinal

crack if we are sure it is a crack, and we are sure that it is vertical'.


group defect_hypothesis
defect_is_porosity, defect_is_cracks, defect_is_cavities, defect_is_inclusion.
group defect_is_cracks
defect_is_longitudinal_crack,
group defect_Is_cavities
defect_is_piping_cavity,
defect_is_cavity.

defect_is_transverse_crack.

defect_is_annular _ring_cavity,

known( Hypothesis, Cond_Factor)).


known( density_Is_low, 95.
known( elongatlon_ls_hlgh, 95.
known( nlength_is_medium, 95)).
known( orientation_is_horizontal, 95.
Fig. 6.18

Five
in

defect

Fig.

Defect hypothesis groups, and known facts about defect


attributes added to the current knowledge base.

classification

6.19.

The

rules

final

defect_is_longitudlnal_crack,
prerequisite
been

defect_Is_cracks,

satisfied.

expressed

as

complete

confidence.

for a hypothesis
crack

confidence

rule

in

the

figure

which

is the conclusion

factors

has

are shown

the

hypothesis

of the rule

and the condition orientatlon_is_vertical

The confidence
a percentage;

incorporating

factor
where

Confidence

applied
0%

factors

to the conclusion

represents
assume

no

that

have both
of a rule

confidence
the

level

when the

and

is

100%

of confidence

being true and also being false total to 100%. If a defect is a

and its orientation

is vertical

then we are 95% sure it is a longitudinal

crack: and we are 5% sure that it is not a crack.


The

prerequisite

confirmed,
prerequisite

Ph.D.

or refuted,

of

a rule
before

is

1990

secondary

hypothesis

the rule may apply. The confidence

is not used to compute

A. Kehoe

some

the confidence

factor

that

must

factor

be

of a

for the hypothesis

of

123

Chapter 6 IKB System for 2D Defect Inspection


the

rule.

However.

threshold
provide

value

its value

must

for considering

no support

be greater

than

an hypothesis

any set confidence

as confirmed.

or the

factor

rule will

for the conclusion.

Hypothesis. Confidence Factor, [ PreRequisites ], [ Conditions ]. ).

c_rule(

c_rule( defect_is_porosity,
90,

[no_prerequisite].
[[ density_is_low, true ], and,
[[ elongation_is_low. true ], and,
[[ nwidth_is_low, false ], and,
[ nlength_is_low. true ] ]]] ).
c_rule( defect_is_porosity.
95,

[no_prerequisite],
[[ density_is_low, true l. and.
[[ elongation_is_low. true ], and,
[[ nwidth_is_high, true ], and,
[ nlength_is_low, true ] ]]] ).
c_rule( defect_is_cracks.
85,

[no_prerequisite),
[[ dens ity_is_1ow, false ), and.
[[ elongation_is_high. true l. and,
[[ nwidth_is_low, true ], and,
[ nlength_is_low, false ] JJ) ).
c_rule( defect_is_longitudlnal_crack,
95,

[ defect_ls_cracks ],
[ orientation_is_vertical. true ] ).
Fiz,

6.19

The condition
be

confirmed.

Defect classification

rules containing

confidence

of a rule may contain singular or multiple


and

their

cumulative

confidence

factor

factors.

terms. These must

determined

before

conclusion can be drawn. Each of the conditions of the rule defect_Is_cracks.


6.19,

are determined

appropriate
the

certainty

current

using
factor

data
assigned

knowledge

base

known(Hypothesis,Cond_Factor)
the

input

produced

data:

it is

. rule,

Ph.D.

CFh'

the inference

A. Kehoe

1990

defect

analysis

operation,

to each. This knowledge

in

the

form

of

data

or

and

an

is then added to
facts;

such

as

95), due to the level of confidence in the quality

considered

by the image processing

In order to determine

the

Fig.

in Fig. 6.18. The confidence factors in this case are

very high, known(density_is_low,


of

from

that

system,

the overall
mechanism

the

defect

attribute

information,

is of high integrity.

confidence

factor

has to combine

for an hypothesis
the confidence

factor

of a
for

124

Chapter 6 IKB System for 2D Defect Inspection


the conclusion
the

rule,

of the rule, CFr, with the confidence

CF c-

This

is

simply

achieved

by

factor for the conditions

the

operation

in

the

of

sub-task

evidence_that, Fig. 6.20:


(6.1)
For the rule defect_is_longitudinal_crack,
the condition
conclusion

orientation_is_vertical

of the

hypothesis

rule

A successful

have

complex

=
=

crack

confidence

factor

applied

conditions

mechanism

71.25 %

CFc' is given by:


'not'

A conjunction

theory

by the

confidence.

relationships

must be able to compute

condition,

CFc - 100

of probability,

that the

The majority

of rules

'and', 'or' and 'not'.

the confidence

factors

it is assumed that the confidence

The

for such

factor for a

(CFc - 100)

(6.2)

using the 'and' relation

is dealt with according

or

of conditions

the

(95 x 75) /100

joined

For the 'not' relation

to

is given by:

with 71.25%

conditions.

the

the

factor of the

firing of the rule above would lead to the conclusion

is a longitudinal

inference

to

then

defect_is_longitudinal_crack

CFh

defect

is 75%, and the confidence

is 95%,
Fh

Fig. 6.19, if the confidence factor of

CFc

where

the

minimum

confidence

factor

of the

conjunction of hypothesis is selected. This is illustrated in the task confidence_in


shown in Fig. 6.20. For two hypothesis, HI and H2' with confidence factors,
CFhl and CFh2'

the confidence

factor of the overall confidence

factor is given

by:

This is termed the opportunistic


systems

incorporating

confidence
confidence

It

is

factor

factors.

of the conjunction

factor and is used most in IKB

For the

is chosen,

'or'
this

relation

the

pessimistic

is the maximum

of the

factors.

useful

representing

a
being

assumption

is
to

Ph.D. A. Kehoe

to
false

hypothesis
considered

confidence

confidence

consider

hypothesis:

true,
used

be

then
to

false.

1990

confidence
the

the higher

compute
Firstly,

the
the

factors
lower
the

that

the

confidence

below

confidence

confidence

confidence

fall
that

factor
factor

factor

the

any

as

for

it is false.

of
of

50%

This

hypothesis

hypothesis

is

125

Chapter 6 IKB System for 2D Defect Inspection


determined

as if it were to be considered

this is computed

Fig. 6.20. This value is then used to determine

confidence_in.

factor for the hypothesis


facts

or classification

that

there

hypothesis

true;

is

no

for a particular

evidence

to

support

the

hypothesis

then

hypothesis.

it is considered

In

to be false. and a default confidence

to the hypothesis. The task confidence_in


a hypothesis.

the confidence

being false by Eqn. 6.2 above. If there are no known


rules

is considered

by the task

such

cases

factor is assigned

assigns a confidence factor cf_unknown

and asserts the new fact into the current

the

knowledge

to

base.

confidence_inC [ Hypothesis, true ], CF )


if
known( Hypothesis, CF ).
confidence_inC [ Hypothesis, true ], CF )
if
find_all( Rules, evidence_that( Hypothesis, Rules). RuleList ) and
find_all( CFs, member( [ CFs, _ ], RuleList), CFList ) and
CFList is not equal to 0 and
maximum( CFList, CF ) and
assert( known( Hypothesis, CF

confidence_inC [ Hypothesis, true ], CF )


if
isa_value( cf_unknown, CF ) and
assert( known( Hypothesis, CF

confidence_inC [ Hypothesis, false ], CF )


if
confidence_inC [ Hypothesis, true ], CFO ) and
CF is ( 100 - CFO ).
confidence_inC [ Conjunctl, and, Conjunct2 ], CF )
if
confidence_inC Conjunctl, CF1) and
confidence_inC Conjunct2, CF2) and
minimum( [ CF1, CF2 J, CF ).
confidence_inC ( Disjunctl, or, Dlsjunct2 ], CF )
confidence_inC Disjunct1, CF1) and
confidence_inC Disjunct2, CF2) and
maximum( [ CF1, CF2 J. CF ).
evidence_that( Hypoth, [ New_CF, [ CF_Rule, PreRequisites, Conditions]]
if
c_rule( Hypothesis, CF_Rule, PreRequisites, Conditions ) and
confirm( PreRequisites ) and
confidence_inC Conditions, CF_Cond) and
New_CF is equal to ( CF_Rule * CF_Cond )/1 100.

Fig. 6.20

When several

Ph.D.

A. Kehoe

Inference

classification

1990

mechanism
classification

for the confidence


system.

rules apply to a single

factor defect

hypothesis.

as shown in

126

Chapter t5 IKB System for 2D Defect Inspection


Fig.

6.19,

each.

then

One

method

hypothesis
evidence

the

of

selecting

for the hypothesis,

the

assume

the

total

evidence

the confidence

and combine

for

the

that each confidence


represents

produces
factors

the best evidence

from

several

Unknown
Should

such

A more

unknown

feature.

simple

confidence

approach

is to

for an hypothesis.

factor from each of the


It is this

latter method

system, to select a confidence

Classification

that

unpredictable

the

of the two results would

for the hypothesis.

remain

to identify

in the component

for

factor

rules.

defects

operations

it is considered

matter
of

Feature

any suspect

classification
then

competing

for

factors below 50%, to

can only give evidence

of the maximum

factor

above 50%, to get the

A comparison

which has been adopted in the defect inspection


factor

confidence

the confidence

hypothesis.

factor

a confidence

appropriate

against the hypothesis.

In this case the selection


values

mechanism

would be to combine

get the evidence


yield

inference

these

in the current

both component
features

and an unusual
and

rare

are

All such suspect

features

defects

base after the

and defect

of an unknown

component

occurrences

knowledge

feature

which

may

type.

types,
Foreign

are two examples


be

defined

are made instances

as

an

of the frame

unknown_feature.

In the latter stages of defect evaluation the instances of unknown_feature


be

passed

to

a special

operation,

within

determine

if the feature

may be identified

since

classification,

or

its

Alternatively,

unknown

inspector

who

may

determine

its

assess

importance

from

features
and
to

Ph.D.

A. Kehoe

defect

inspection

knowledge

created

of

previous

inspection

cycles.

simply

identify

the

exact

nature

cycle.

Such

inspection

to

dynamic

be

the

system,

using

may

then stored in the static knowledge


circumstances

knowledge

the

m ay

reported

to

of the

an

expert

artifact

information

may

and
be

base and used at a later date when similar

arise.

1990

127

Chapter 6 IKB System for 2D Defect Inspection

6.3

DEFECf ZONING AND GROUPINGSYS1EM

In order
inspector

to carry

has

component.

to

This

inspection

out the subsequent

determine

the

information

is

requirements
type.

inspector

must perform.

group
used

attributes

group

members.
during

inspection

relationship
important

which describe
and

the

for

and close proximity.


The inspector

stages

requirements

for

of defect
of

the

areas.

defect

describing

the

component.

This

is

correct

of defects.

based

the expert

a set of attributes

in

of defects

for

such as number
global

attributes

comparison

of
are

with

the

the defects.

in two

is designed

to perform

The input to the system is a series

a set of global

between

achieved

the

component.

with the output.

relationships

and

the

operation

These

evaluation

similar tasks to that of the expert inspector.


defects.

of

The grouping

has to determine

the expert

defect

selection

is a further

The IKB system for zoning and grouping


of classified

the

each

its global characteristics;

summation

latter

evaluation

between

to apply to the defects.

on their

each defect

stage of defect

distinct

attributes

and between
stages.

for the defects


the defects

Firstly.

each

and

individual

defect instance is linked with an area of the component defined as a inspection


zone;

these are well defined

areas within the component

part of the inspection

requirements.

defect

on

groups

position

in

determined

effect

attributes

component.

of this

each

between

This

grouping

shows
general

static

knowledge

Ph.D.

A. Kehoe

adding
defect.

defects.

task

hierarchical

defect

base.

as
into

dimensional

attributes

and

a set

attributes

are

the number

of

of

values of attributes.

is to build

upon

a further
These

set

are

between

the

tasks

specific

the
of

global

relationships

the

specified

are placed

of the group;

output

to

attributes

operation
between
which

of the

attributes

component

lower level tasks activate

defining

instances

group

characteristics

and more specific

These

1990

and

type.

of the zoning and linking

the

operations.

each

and minimum

by

task structure

the most

For

operation

operation

defect

classification

the overall

describing

relationship
overall

their

and the maximum

classification

6.21.

the

describing

members.
The

based

Secondly.

generally

and

the

perform

the

defects.

The

tasks.

in Fig.
including

the zoning

rule sets contained

requirements

of

local

describing

is illustrated
the

defect

the

and

in the

operation;

128

Chapter 6 IKB System for 2D Defect Inspection


including rule set zone_rules

Fig. 6.23.

Classified
defect types

Defect
groups

Defect grouping

Defect zoning

Fig. 6.21 The hierarchical

6.3.1

structure

of the meta-level

Defect Zoning

The implementation

of the defect zoning operation

of zoning rules and a series of frames, describing


of the

component,

inspection
checks

tasks for the zoning and

cycle.

highlighted
For each

the position

in the

defect

quality

the various

assurance

in the current

of the defect

against

is designed

inspection

requirements

knowledge

the region

to use a set

base

zones
for the

the

system

of each inspection

zone.

When a defect is found to be in a particular inspection zone then it is linked to


the zone by mean's' of a relation, held as a current value in the slot of the defect
instance.
The

hierarchical

component

is shown
inspection

of major

sub-zones.

zones

of

inspection

Additional

within

a zone

the

taxonomy

slots

zones

under

evaluation.

which

initial

overall

and the number

are all inherited

describe the initial number

and the

The

root

which indicates the

the component,

in the root frame,

an example

and zoneC etc which describe the

component
within

for

has been given a root frame,

Fig. 6.22, has a single slot insp_zones

child frames in the taxonomy,


groups

zoning

in Fig. 6.22. The taxonomy

frame inspection_zones,
number

of a defect

and child frames, zone A, zoneB,

inspection_zones,

particular

structure

of defects

acceptability

of the

of

by the

and defect
inspection

zone.
The

frame

inspection

Ph.D.

zone,

A. Kehoe

z 0 n e C, Fig.

6.22,

contains

such as its location

1990

specific

with respect

details
to other

about

a particular

zones,

the defined

129

Chapter 6 IKB System for 2D Defect Inspection


region

within

features

the

contained

component,
within

been made to inherit

the

the

status,

zone.

attributes

The

the

remaining

number
slots

from other taxonomies

base. The values for slots group_rules


frame req_zoneC,

and

in the inspection

and defect_rules
requirements

of

component

of the

frame

in the static

have

knowledge

are inherited

from the

taxonomy.

group inspection_zones
zoneA, zoneB, zoneC, zoneC1, zoneC2.
frame inspection_zones
default insp_zones are { zoneA and zoneB and zoneC and zoneC1 and zoneC2 } and
default defects are { none } and
default defect_groups are { none } and
default defects are { none } and
default acceptability is yes and
default contained_in is component and
default has are { inspection_requirements }.
frame zoneC is a inspection_zones
default location is { aboveB and aboveA } and
default status is medium and
default region is { 0.0 and 0.0 and 50.0 and 80.0 } and
default comp_feat are { base_cavity and outer_ring} and
do not inherit defect_zones and
do not inherit contained_in
inherit group_rules from req_zoneC and
inherit defect_rules from req_zoneC.
frame zoneC 1 is a kind of zoneC
default location is { in_C } and
default status is high and
default region is { 0.0 and 5.0 and 12.0 and 20.0 } and
default camp_feat are { none} and
inherit group_rules from req_zoneC1 and
inherit defect_rules from req_zoneC1.

Fig. 6.22

Frames in the inspection zones taxonomy for use in the


zoning and zrouninz svstem.

The frame zoneC 1 is very similar to its parent frame. The default values of
the slots,
location

define

however,

define

the individual

contains the default value 'in_C',


an area within

the parent

characteristics

of the zone.

The slot

and the default values of slot inner_region

inspection

zone. This inspection

own set of rules for zoning and grouping defects

zone has its

which are inherited

from the

frame req_zoneC 1
In order to check the position
region of a inspection

Ph.D.

A. Kehoe

and zonaC_rules,

and defects_in_zoneC1

1990

defect

instance

zone a set of zoning rules are used. Figure

the rule groups zone_rules


defects_in_zoneC

of an individual

and the individual

for the example

component.

against

the

6.23 shows
zoning

rules

The zoning

130

Chapter 6 IKB System for 2D Defect Inspection


rule defects_in_zonee

is designed to use the default values of the slot region,

defined in frame zonee Fig. 6.22. to check the values of the centriod position for
the defect

instance:

successful
further

'c_of_gx'

and c_of_gy.

If the condition part of the rule is

then the action part of the rule is made to fire. which consists

call of the rule firing procedure

zonee_rules.

of a

using a second group of zoning rules;

This would result in a firing of the rule defects_in_zoneel

defects_in_zonee2.

and

Should both of these rules fail to fire. then the slot zone_location

of the defect instance is updated with the current value of zonee


of the defect instance is included in the slot defects

and. the name

of the frame zonee.

group zone_rules
defects_in_zoneA. defects_In_zoneB. defects_in_zonee.
group zonee_rules
defects_in_zoneel.

defects_in_zonee2.

rule defects_in_zonee
if
Defect is the defect_instance
and {Xl and Y1 and X2 and Y2}is the region of zonae
and the c_of_g_x of Defect >- X1
and the c_of_g_x of Defect =< X2
and the c_of_g_y of Defect >_ Yl
and the c_of_g_y of Defect -< Y2
then fire_rule_group(zonee_rules)
or the zone_location of Defect is zonee
and include Defect in the defects of zonee.
rule defects_in_zoneel
if
Defect is the defect_instance
and {Xl and Yl and X2 and Y2}is the region of zonae
and the c_of_g_x of Defect >- X1
and the c_of_g_x of Defect -< X2
and the c_of_g_y of Defect >- Y1
and the c_of_g_y of Defect -< Y2
then the zone_location of Defect is zonee1
and include Defect in the defects of zenecr.
Fig. 6.23

Individual and groups of zoning rules for the zoning


and grouping system.

The task structure

for performing

Fig. 6.12. The task start_zoning


the current
forward
group

knowledge

chaining
are

when

conditions

are

operation

manner

exhausted.

inference

base.

the
few

firing

until

of

the

Ph.D.

A. Kehoe

system
1990

yet

fires

chaining

problem
the

the rule group

a rule
is

may

is

sensitive

knowledge

each of these criteria

result

zoning

operation

is shown in

is made to cycle through each defect instance in

Forward
and

the defect

only

successfully.
the
to

base

are satisfied,
adopt

zone_rules.
most

the

or all rules
appropriate

input

is very

Fig. 6.23. in a

data.

well

method
when

defined.

the input data is critical


very

few

initial

in the

states,

of

initial
In this
to the
and

the
131

Chapter 6 IKB System for 2D Defect Inspection


inspection

6.3.2

zones are few and well defined.

Defect Grouping

The task structure


6.12.

for the defect

grouping

The main task, get_zoned_defects,

knowledge
These

base for all defect

are passed

defects

in the zone which

Such defects

linked

to a particular

check_for_groups,

are of the same type

similar

the

attributes.

of the frame, defect_group, Fig. 6.12 by the sub-task create_defect_group.

This sub-

the global

in the set group_data_rules.

upon

the type

and determines

of each defect

the types of global

of defects

shows the rule cavity_gdata,


cavity,

attributes

group by using rules

Fig. 6.24.

Each rule in the set defines


depending

together

determines

zone.

an instance

also determines

grouped

the current

inspection

which

and have

in Fig.

and used to create

task

are subsequently

is also shown

is made to interrogate

instances

onto the sub-task,

operation

which

which

make

attributes

to be calculated

up the group.

Figure

6.24

is made to fire if the defect group is of type

the summation

of area and the maximum

value of area

of all defects in the group. These values are then placed into the newly created
slots sum_area

and max_area

of the defect group instance.

group group_data_rules
cavity_gdata, annring_gdata, porosity_gdata, piping_gdata,
tcrack_gdata, Icrack_gdata.
rule cavity_gdata
if
the group_type is equal to cavity
and GroupNois the group_no
then find_sum_area( group_defects, SumArea )
and find_max_area( group_defects, MaxArea )
and new_slot( sum_area, GroupNo,SumArea )
and new_slot( max_area, GroupNo, MaxArea )
rule Icrack_gdata
if
the group_type is equal to longitudinaLcrack
and GroupNois the group_no
then find_max_width( group_defects, MaxWidth )
and new_slot( max_width,GroupNo, MaxWidth)
Fig. 6.24

Rule groups and individual rules for the grouping of


defects within the com_Qonent.

The inference
grouping,
fired
Ph.D.

mechanism

forward

in a forward
A. Kehoe

reasoning.
chaining

1990

for this type of problem


The

rule

manner.

group

This

is, like that for defect

group_data_rules

method

delivers

is, therefore,

a problem

solution

132

Chapter 6 IKB System for 2D Defect Inspection


in the

most

efficient

manner

and may be controlled

most

effectively.

6.25 shows a typical instance of the defect group frame; group1.


instance

show

current,

default

and

inherited

attributes of the defect group; such as defect_type,


Following
6.12,

a successful

completion

of slots

in the current

a series

defect_groups,
is

updated

the

name

of the

knowledge

base

group;

current

are

also

knowledge

inspection

updated

with

base. A typical

current
defect

are

describing

updated.

Fig.
The slot

zone under investigation,

reflecting

present in the inspection zone. The slots zone_location


instance

each

create_defect_group,

the inspection

new

The slots of the

and defect_total.

of the sub-task

of the frame describing


with

values,

Figure

the

defect

and member_of

values,

reflecting

instance,

defect2,

the

groups

of the defect
state

of

the

at this stage of the

cycle is shown in Fig. 6.25.

frame zone_groups
default zone is zoneX and
default defect_type is none and
default acceptability is yes and
default defect_sum is 0 and
default defect_members are { none }.
instance groupl
current values
zone is zoneA and
defect_type is porosity and
defect_sum is 2 and
defect_members are { defect2 and defect11 }.
inherited values
acceptability is yes.
instance defect2
current values
type is porosity and
area is 40 and
density is 0.8 and
c_of_g_y is 11.5 and
zone_location is zonee and
member_of is group1 and
inherited values
acceptability is yes and
explanation is { none }.
intensity is low.
Fig. 6.25

Instances of defect group and defect following the


zoning and grouping operation.

The output of the defect grouping operation


relate

individual

characteristics

Ph.D.

A. Kehoe

defects

of the

1990

within

group.

inspection

Additionally,

is a set of defect groups which


zones,

individual

and

describe

defects

the

unrelated

global
to any

133

Chapter 6 IKB System for 2D Defect Inspection


other

defect

in

the

component,

linked to the inspection

6.4

powers

the defect

type

or

proximity,

remain

zones of the component.

assurance
against

standards
the

acceptable,
several
and,

is to evaluate

inspector

is given

of

and

determine

their

be unacceptable
and

inspector

group

of

acceptability.

quality
based
defects,
Should

then the system

subsequently

6.4.1

the

represented

records

Inspection

the

and

many

defect

between

defects.

The

of

system
of

or defect

A. Kehoe

1990

constraints
zone,

the

between

out a similar
process

format
the

evaluation
group,

this into the current

to
used

to

the

inspection

evaluates

each

rules

to

be found to

knowledge

base,

as unacceptable.

Requirements

The input to the defect evaluation system is a series of classified


Ph.D.

the

requirements

based

representation.

component

include

The inspection
standards

defect

specify

reasoning

assurance

asserts

which

to carry

rule

this

evaluation.

relationships

a backward

a series

From

inspection

acceptable

as

types,

of each

under

Such criterion

any defects,

This

covering

requirements

zone.
specified

component

out

of defects,

those

the acceptability

in

using

carried

inspection

is designed

is acceptable'.

are

in a frame

each

the

adopting

'component

defect,

and

inspector,

if the

encoded

acceptability

operation

in a particular

system

determine

with

of defects

evaluation

expert

process,

type.

the

attributes

process

of the

defects,

to the
expert

for

relationships

of a defect

numbers

attributes

process

the

and each collection

a set of inspection

operation

reasoning

and

the acceptability

position,

The basic

is able to determine

The IKB defect

the

between

reasoning

defects,

for acceptability

maximum
defects.

comparison

of

The inspector
defect

process.

requirements

or a more complex

consequently,

criterion

is able to use his

to determine

each individual,

inspection

a simple

the

inspector

judgement,

of the inspection

collections

operation

and subjective

relevant

involve

cycle the expert

based on local and global 20 defect data, and on the quality

by the inspector
may

evaluation

of reasoning,

of the component

by

classification

DEFECfEVALUAll0NSYS1EM

During

on

by

defects and

134

Chapter 6 IKB System for 2D Defect Inspection


defect groups,
evaluates

described

each

acceptability
individual

defect
of

quality

the

evaluation

group

defect

defect

the

using

a series

collections.

instance

assurance

component

by both local and global attributes.

against

cycle

the

IKB

inspection

Secondly,

a second

requirements

of

the

based upon the outcome

rules

system

set of inspection

for individual
system

The system, firstly,

defects.

determines

defining

the

evaluates
rules,

each

reflecting

Upon completion

the

acceptability

of

of

the

as

the

of these operations.

group inspection_requirements
req_zoneA, req_zoneB, req_zoneC, req_zoneC1, req_zoneC2.
frame insp_requirements
default zone_reqs are { req_zoneA and req_zoneB and req_zoneC
and req_zoneC1 and req_zoneC2} and
frame req_zoneA is a insp_requirements
default def_reqs are { req_cavs_A and req_annring_A and req_porosity_A
and req_piping_Aand req_tcrack_A and req_lcrack_A } and
default group_rules is grules_zoneA and
default defect_rules is drules_zoneA
inherit region from zoneA and
do not inherit zone_reqs.
frame req_cavs_A is a req_zoneA
default max_sum_area is 40.0 and
default max_single_area is 20.0 and
do not inherit def_reqs and
do not inherit group_rules and
do not inherit defect_rules.
frame req_porosity_A is a req_zoneA
default max_sum_:area is 13.0 and
frame req_tcrack_A is a req_zoneA
default max_number is 1 and
default max_width is 1.5 and
default max_location is { 130.0 and 0.0 and 155.0 and 80.0 } and
Fig. 6.26

The
frame

inspection
taxonomy

Frames of the inspection requirements taxonomy used


in the defect evaluation svstem.
requirements

describing
frames

are

describing

Ph.D.

The

of the
frame

inspection

has

each of the frames


the
the

A. Kehoe

represented

inspection_requirements,

insp_requirements,
component.

are

root

frames

inspection

1990

been

Figure
requirements

6.26

IKB

system

shows

the

root frame,

taxonomy

for

an example
value

at the next lower level of the hierarchy.

These

criteria

a single

the

a default

of

given

in

sub-hierarchies
for

a particular

slot
within

with
the

inspection

taxonomy,
zone

within

each
the

135

Chapttr
component.

More

inspection

specific

requirements

inspection

zones.

6 IKB System lor 2D Defect Inspection

frames

of

in

particular

This structure

the

sub-hierarchies

types

of

is very similar

defects

describe

within

each

the
of

the

to that of the inspection

zone

taxonomy. shown in Fig. 6.7.


The

frame

describing

req_zoneA.

the inspection

defect_reqs

Fig.

6.26.

requirements

and defect_rules

evaluating

for zoneA. The default

define

value of the slot

which

rule

sets

should

be used

when

the defects. and defect groups. within the zone. The final slot of the

frame is made to inherit values


defining

hierarchy.

the

in the static knowledge

in the lower levels of the sub-

req_porositY_A. and req_tcrack_A Fig. 6.26. are designed to

acceptability

within

of defect

types

cavitation.

porosity

and

transverse

zoneA of the component.

The frame req_cavs_A


criterion

from other taxonomies

the region of the zone. Frames

req_cavs_A.

describe
cracks

of the sub-hierarchy

defines each of the frames in this pan of the taxonomy. and the slots

group_rules

base.

is the root frame

for cavity

has been given two slots to describe

type defects

within

zoneA.

the inspection

The slot max_sum_area

has a

default value which defines the maximum allowable sum of area for a group of
cavity

defects.

maximum

Whilst

the default

allowable

req_porosity_A

area

of

value
an

individual

of

a porosity

three. inspection

criteria

type

defect

defined

in the zone.

by the

are described in the frame req_tcrack_A.


the

allowable

maximum

value of the slot max_wldth


before

it becomes
a region

crack

unacceptable.

6.4.2

Evaluation

The
criteria
evaluation
defect

evaluation

stored

in

group

outcome
acceptable

of

the

These
instance.

this

the

The

defines

defect.

The

the

frame

to describe

Transverse

assurance

the

cracks

requirements.

have
these

The default value of the slot max_number


of transverse

the maximum
third

inspection

slot
zone

cracks.

width

of the

and the default

a crack
frame

in which

may adopt

max_location

a single

transverse

use

inspection

Rules

defect
rules.

defines

within

quality

number

unacceptable.

describes
is

cavity

has been given a single slot. max_sum_area.

acceptability

defines

of slot max_single_area

system

inspection
rules

been

designed

requirements
the

determines

quality
if

to

taxonomy

are used to compare

against

comparison

has

within

each individual

assurance
the

the

defect.

a series
defect.

requirements.
or

defect

group.

of
and
The
is

or not.

Ph.D. A. Kehoe

1990

136

Chapter 6 IKB System for 2D Defect Inspection


The
defect

defect
group

rules

rules

define

inspection
the

evaluation
the

have

and individual

acceptability

or

evaluation

defect

evaluation

group

rules.

of the various

group,

falls

evaluation

rules, drules_zoneA,

into

In each

defect

outside

the

component

rules,

<action>'

described
local

type

and global

6.2.1.

as the

component

In the condition

attributes

a particular
to succeed

requirements.

are shown

of
if

Two

in Fig. 6.27. These

and

individual

defect

for zoneA of the component.

structure

in section

a series

within

inspection

grules_zoneA,

categories;

category

types

The defect group evaluation rule grule_porosity_A


then

two major

All of the rules are designed

rule sets for an example


defect

been divided

defect

zone of the component.

defect,

contain

rules

has the same 'if <condition>


classification

rules,

pan of the rule the values

of the

of an input defect

features

group

are compared

against

the

default values of the slots in the frame req_porositY_A.

Fig. 6.26. The first pan of

the condition

group instance,

is a check

on the type of the defect

that the rule is applicable.


if the global attribute
maximum
Should
failing,

Following this, a second check is made to determine

defining the sum of defect area in the group exceeds the

allowable

sum of defect

this check succeed

is unacceptable,

to ensure

and

area

for porosity

then it is considered

a reason

for the

is placed in the explanation

rule

type

defects

that the defect

succeeding,

in zoneA.

group instance

or the

defect

slot of the defect group instance.

group
and the

action pan of the rule is fired.


The
which

action

part

update

of the

rule

the dynamic

consists

knowledge

of three

base.

main

The first

place the current value 'no' in the slot acceptability

sub-actions,

and second

each

of

sub-actions

of the defect group instance,

Fig. 6.25, and the frame zoneA, Fig. 6.22. Lastly, the individual defect rule for the
porosity

type defect is disabled

making

in the current knowledge

up the defect group, in this particular

be checked in the next stage of evaluation

inspection

base; defect

instances

zone, do not need to

if they are found to be unacceptable

collectively.
A

further

defect

group

evaluation

rule

for

zoneA

of

the

example

component

is shown in Fig. 6.27. The rule grule_cavs_A

has a more complex

condition.

consisting

check

determine

of

action

that either

pan

grule_porosity
Ph.D.

main

parts.

the type of defect group instance

rule. The two remaining


indicating

three

of the

carries

1990

out

a similar

above. updating

is

made

the application

are joined

may be true for the condition

_A. described

A. Kehoe

initial

and validate

parts of the condition

pan
rule

An

operation

the acceptability

to

of the

by an 'or' relation,
to be satisfied.

The

to that

rule

of the

of both the defect


137

Chapter 6 IKB System for 2D Defect Inspection


group

instance

disabling

and the inspection

the individual

zone frame

with

the current

value

'no',

and

defect rule drule_cavs_A.

group grules_zoneA
grules_cavs_A, grules_annring_A, grules_porosity_A,
grules_piping_A, grules_tcrack_A, grules_lcrack_A.
group drules_zoneA
drules_cavs_A, drules_annring_A, drules_porosity_A,
drules_piping_A, drules_tcrack_A, drules_lcrack_A.
rule

grules_cavs_A
if
the group_type is equal to cavity
and GroupNo is the group_no
and [the sum_area of GroupNo > the max_sum_area of req_cavs_A
and Fault is 'Sum of cavity areas too large'
or
the max_area of GroupNo > the max_single_area of req_cavs_A
and Fault is 'Maximum area of single cavity too large'
]
then the acceptability of GroupNo is no
and include Fault in the explanation of GroupNo
and the acceptability of zoneA is no
and disable the rule drule_cavs_A.

rule

grules_porosity_A
if
the group_type is equal to porosity
and GroupNo is the group_no
and the sum_area of GroupNo > the max_sum_area of req_porosity_A
and Fault is 'Sum of porosity areas too large'
then the acceptability of GroupNo is no
and include Fault in the explanation of GroupNo
and the acceptability of zoneA is no
and disable the rule drule_porosity_A.

rule

drules_cavs_A
if
the defect_type is equal to cavity
and Defect is the defect_no
and the area of Defect> the mu_single_area of req_cavs_A
and Fault is 'Maximum area of single cavity too large'
then the acceptability of Defect is no
and include Fault in the explanation of Defect
and the acceptability of zoneA is no.

rule

drules_lcrack_A
if
the defect_type is equal to longitudinal_crack
and Defect is the defect_no
and [an_individual_defect > the max_number of req_lcrack_A
and Fault is 'Too many longitudinal cracks'
or
Fig. 6.27

For

each

evaluation
position

Group and individual evaluation rules for zoneA of the


comnonent
used in the defect evaluation system.

inspection

rules

zone

in

have been given

a component

a similar

for

of

each type

of the defect group in the component,

Ph.D. A. Kehoe

1990

defect.

a whole

set of

defect

Depending

group

upon the

rule set are made to fire

138

Chapter 6 IKB System for 2D Defect Inspection


in an attempt
cause

to evaluate

the defect

any group rule to succeed

acceptable,

and the default

taxonomy
group

are

left

Any defect

after one complete

values

unchanged,

group.

continue

to

which does not

cycle is considered

for acceptability

and

group

held
be

to be

in the defect

inherited

by

groups

the

defect

instance.

After

consideration

designed

of all the

to evaluate

defect

group

each of the individual

part of defect evaluation

rule drule_cavs_A,

that the rule is applied to the appropriate

instances

defect

the

instances.

IKB

system

is

In the condition

Fig. 6.27, the first check determines


defect type. Secondly,

the area of the

defect instance is checked against the default value in the slot max_single_area
of frame req_cavs_A,

Fig. 6.26. Should these two conditions

succeed

then the

rule fires the action part. The first task of the action part of the rule is to place
the current value 'no' into the acceptability
frame

zoneA.

This

with evaluation

operation

results

effectively

slot of the defect instance


updates

after each successful

the dynamic

to

individual

component.

Further

defect
rule

defects

instances
sets

applicable

to

completion

of the evaluation

a singe defect
inspection

within

rule within

requirements

for

Defect Evaluation

have
other

occurring
been
zones

of

the

zoneA

of

to

define

rules

component.

the

example

which

are

Following

the

which has failed to fire


to be acceptable

to the
..'

component.

Tasks
Defect
evaluation

structure

Defect
groups

Defect
evaluation

Defect group
evaluation

The hierarchical

given

in

the rule sets is considered

Defects and
defect groups

Fig. 6.28

base

Fig. 6.27, are applicable

cycle any defect instance

the

knowledge

firing of a rule.

The defect rules defined by the rule set drules_zoneA,


only

and the

of the meta-level

tasks for the evaluation

s stem.

Ph.D.

A. Kehoe

1990

139

Chapter 6 IKB System for 2D Defect Inspection


The task structure

for the defect evaluation

system is illustrated

This consists of one main task start_evaluation,


zone_inspection,
inspection
defect

groups

zone_inspection.
current
stage

within
and

rule

This

defect

instances

base,

sets

of

which

apply

is designed

and all individual

the

defect

by

groups,

to use this

the

evaluated

for both

following

sub-task

concerns the retrieval,

to the chosen

and

is designed to select one of the

zone is then

The first stage of zone_inspection

of the task

groups,

the component.

individual

knowledge

evaluation

and two sub-tasks, get_a_zone

Fig. 6.29. The sub-task get_a_zone

zones

in Fig. 6.28.

individual
inspection

information

from the

defects
zone.

to evaluate

and

The

the

second

the defect

defects.

start_evaluation:if
get_a_zone( Zone) and
zone_inspection( Zone ).
zone_inspection( Zone)
if
GroupListis the grouped_defects of Zone and
GroupRules is the group_rules of Zone and
DefectList is the individuaLdefects of Zone and
DefectRules is the defect_rules of Zone and
inspect_groups( GroupList, GroupRules ) and
inspect_defects( DefectList, DefectRules ).
inspect_groups( GroupList, GroupRules )
if
get_group_data( GroupList ) and
evaluation( GroupRules ).
inspect_defects( DefectList, DefectRules )
if
get_defect_data( DefectList ) and
evaluation( DefectRules ).
evaluation( RuleGroup )
if
Rule is a member of RuleGroupand
backward_chain( Rule ).
Fig. 6.29

Meta-level tasks in the defect evaluation

The tasks inspect_groups


which

performs

and inspect_defects

a backward

chaining

system.

call a further sub-task, evaluation,

execution

of

the

two

evaluation

rule

sets, Fig. 6.29. This sub-task fires all the rules in a particular

rule set until one

rule is found to be successful,

When both of the

tasks

are

completed

the

or all the rules are exhausted.

defect

evaluation

cycle

inspection

zone is selected by the task get_a_zone

continues.

This cyclic

Ph.D.

A. Kehoe

1990

operation

is designed

begins

again;

and the evaluation

to proceed

until

further
process

all the inspection

140

Chapter 6 IKB System lor 2D Defect Inspection


zones

are examined,

current

knowledge

or until

no more defects

according
overall

acceptability

groups

and

of defect

of the

individual

change

the

with

the current

monitors

the acceptability
value

member

changes

the

knowledge

are designed
acceptability

base

to infer the
of the

defect

Fig. 6.30, are made to monitor the acceptability

slot of all

defect

demon

the dynamic

These

from

in section 6.1.1, have

and

current

instance

defect

The

instances

value

of

takes place the demon updates

its current

in the

component_acceptabillty1

and individual

when

evaluation.

component

defects.

component_acceptability2,
determine

as described

into the IKB system to update

to the results

defect group

to be evaluated

base.

A series of data driven frame procedures,


been incorporated

remain

value

'no'.

the

in the dynamic
slot

changes

the acceptability
A further

knowledge
to

'no'.

base to

When

slot of the component

demon,

group_acceptability,

slot of every defect group instance to determine


to 'no',

and then updates

this

the acceptability

when

of each

in the group.

demon component_acceptabilitY1
when the acceptability of any defect__groupschanges to no
then the acceptability of component is no.
demon component_acceptability2
when the acceptability of any defects changes to no
then the acceptability of component is no.
demon group_acceptability
when the acceptability of any defect__groupschanges to no
then GroupNo is the group_no
and update__group_acceptability(GroupNo ).
Fig. 6.30

Ph.D.

A. Kehoe

1990

Meta-level tasks in the defect evaluation svstem.

141

CHAPTER 7
DEMONSTRATOR SYSTEM
FOR 2D DEFECT INSPECTION

Ph.D.

A. Kehoe

1990

Chapter 7

Demonstrator

System for 2D Defect Inspection

DEMONSlRATOR SYSTEM FOR 2D DEFECf INSPECTION

As a final pan of the work, making up the initial stage of the project,
image

processing

demonstration
techniques,
inspection,

and

system

for

described

in

described

complete

inspection

a single

image

In order

IKB

2D

section

cycle

on
from

to determine

inspection

results

system are presented


equipment,

7.1

4,

and

together

Using

the
cast

a .conventional
reliability

IKB

the

to

image

techniques

engineering

photographic

form

processing
for

defect

to perform

component,

using

film.

of the demonstration

system,

against

a series of test images have been used which were

both

of skilled

conventional

in the following

the techniques

brought

inspection.

a particular

by a number
from

were

6, the system has been designed

the

that of the expert inspector,


evaluated

defect

in section

captured

previously

developments

the

inspectors.
methods

chapter,

used and the overall

A comparison
and

the

of the

demonstration

along with a description

of the

system design.

DESCRIPTION OF EQUIPMENT

For

the

equipment,
image

outlined

capture

radiographic
This

implementation
system
was

lighting

ensure

that

image,

the location

Ph.D.

in section

the

demonstration

2.3 and shown

consisted

of

light

film, and a CCD camera, equipped

equipment

background

of

the

A. Kehoe

placed

in

from affecting

component

an enclosed
the quality

appeared

of the photographic

1990

system

the

in Fig. 2.2,
box,

for

was utilized.

illumination

with a high quality


and

darkened

room

of the captured

in a constant

position

film was registered

development
of

The
the

video lens.
to prevent

image.

Also, to

in the

digitized

during

each image

143

Chapter 7
capture

Demonstrator

System for 2D Defect Inspection

cycle.

For

digitization

digitizer/display
defect

and

storage

of the

radiographic

module and image framestore

representation.

outlined

in section

image.

the

OAT ACUBE

were used. From the analysis

3.3. the required

pixel

resolution

of
for

image capture was selected using Fig. 3.21. With a minimum size of defect to be
detected in the component image being l.Smm2 as specified by the inspection
requirements.

and

an acceptable

which should represent


by the

appropriate

use

value

of

10%. the

number

of pixels

the minimum size of defect was found to be 30 pixels.

This gave a corresponding


and

error

of 0.07Smm2/pixel.

pixel resolution

of component

features

of a known

pixel row and column values

size

were selected;

From this value.


in the

image.

the

an image of 2S0(rows)

x 4S0(cols) pixels. at a greyscale resolution of 8 bits. or 0 - 255 intensity levels.


The SUN computer
the

DATACUBE

operations

of

were entirely

workstation

modules.
the

was made to act as the host controller

and as a platform

demonstration

implemented

system.

in software.

for the

The

using

implementation

image

processing

the high level

for

of the

techniques

language

C. The

IKB defect inspection system was implemented in both Prolog and the FLEX KSL
language.
possible

Fig.

2.3.

Using

to integrate

complete

user

windows

buttons

completed

the image

interface

was

system.

also

software

complete

demonstration

improved

efficiency.

device.

object
system

code.

by the

operation

built

within

also

allowed

giving

the

as a 'stand

alone'

Prolog

system

into the
the

to indicate

functions

Further

into

provided

processing

and a pointer

compiled

7.2

functions

it was

IKB system.

Prolog

system.

using

a prototype

interface

for a

the

IKB

capability

system

of

application.

to

operating

be
the

and with much

OU1LINE OF SYSTEM DESIGN

The

operation

inspection
three
The

is illustrated

separate
image

presented

stages;
calibration

the

demonstration

A. Kehoe

image

calibration.

operation

to transform

1990

system

in Fig. 7.1. The image

to the demonstration

was necessary

Ph.D.

of

ensures

defect

detection.

that
values

automated

processing
each

system is consistent.

the intensity

for

2D

system

consists

and defect

captured

defect

digital

analysis.
image

As pan of this operation

of the captured

digital

of

it

image.

144

Chapter 7
by

a simple

available

linear

intensity

unimportant

operator,
levels.

features.

in the photographic
placed

over each

Demonstrator

This

ensures

Additionally

such

System for 2D Defect Inspection

they

occupied

it was necessary

as component

fixturing

the

full

to mask

and

range

of

a variety

of

adjacent

components.

film. This was achieved by means of a black card template


component

image.

1. Single image capture


~

Image Capture System -

....

2. Image calibration

'-

~I

3. Defect detection

'-

..

4. Defect analysis (20)

"-

Image Processing System-

II

5. Defect classification

"-

Is. Defect zoning and grouping

"-

7. Defect evaluation
~

IKB Ins pection Sy stem Fig. 7.1

Operation of the demonstration

system for automated 2D defect

ins ection.
The overall

defect

reduction

technique,

adaptive

threshold

detection
the

process

involves

contrast

Ci-of-G

defect detection

crack.
images.

cavitation.

and

it was possible

of the above operations.

porosity

type

enhancement

technique.

shown in Fig. 7.2. Through experimentation.

occurring
values

The image integration

were

used.

Ph.D.

A. Kehoe

1990

of

further

images

and

the

in section 4.1 and

was

in

similar

component

for the parameters

technique,

was found to give adequate noise reduction


use

no i se

with a series of example images of

4.1.1.

The

integration

technique,

as described

defects

to select appropriate

the image

described

of each
in section

when nine successive


found

to

give

images

negligible

145

Chapter 7
improvement
technique
good

in

noise

Demonstrator

reduction.

For

System for 2D Defee: Inspection

the

C-of-O

contrast

a mask size of SxS pixels was chosen, as shown in Fig. 4.7. This gave

contrast

enhancement

for all types

of defects

used for all input images to the demonstration


The

adaptive

be selected.

threshold

technique

and could,

therefore,

be

of two parameters

to

system.

requires

the values

These are the size of the window and the magnitude

value; as described in section 4.13. A single set of parameters


for

enhancement

automated

on-line

inspection

and

is most desirable

experimentation

defects

of threshold

concentrated

achieving

this. For most example

a mask size of 20x20

threshold

value of 0.75 were found to give good representations

pixels

merging,

analysis

the

dimensional

of the closing

colouring

fo r defect

analysis

techniques,

as described

the

technique,

consists

blob

7.2. The complete


selected;

process

process

level

section

of

in section

and

for defect
a

series

4.2 and shown

4.2.1.

and

Through

dilation

used

experimentation

by

the

with

defect

the

of

in Fig.

requires only the value of a single parameter


erosion

area

system.

technique

segmentation.

and a

of defect

and shape. These were selected as the values for the demonstration
The defect

on

to be

merging

defect

images

described

above, it was found that 4 steps of erosion and dilation were found to

correctly

merge defects giving good estimations

of defect shape and size.


pefect

pefect

linear transform

image integration

closing technique

(images-9)

(steps-4)

C-of-G contrast enhancement

blob colouring

mask features

petectlon

Analysis

Image Calibration

(mask=SxS)

adaptive threshold
(mask-20x20;

Fig. 7.2

Techniques

output

attributes
4.2.3:

for

these

elongation,
the
.

dimensional

defect

include
image.

area,

width

system for the demonstration

arameters.
analysis

in the component

defect

normalized

component

of values for

of the
each

thresh:-O.7S)

of the image processing

s stem and selection


The

dimensional analysis

maximum

and length,

operation
image,
width

and

orientation,

For the demonstration

is

system,

a series

2D defect

as described

in section

length,

and centroid

with an area value equal to, or less than, the combined

pixels

represented

Ph.D.

A. Kehoe

1990

remaining

in the

component

density,

position

it was considered

defects

noise

defect

image.

in
that

area

of two

These

defects

146

Chapter 7
were eliminated

Demonstrator System lor 2D Delect Inspection

from the dimensional

the subsequent

steps of defect

analysis

system consists

shown in Fig. 7.1: defect classification,

defect

evaluation.

system

indentification
image.

defect

Component

are identified
in sections
initialize

is

and defects

are identified

values

expected

pattern

frames

held

to appear

by the

achieved

using
images

the

inspection
the

a particular

typical

of the

above.

component

whilst defects

rules,

system

as described

it was necessary

describing

the

to

component

shown in Fig. 6.13, and the

defects

of

the

shown

defect

analysis

series

of

feature

for

in the component

based

frames

as

system

based rules,

factor

as

and defect

based

occurring

image,

requirements,

results

detailed

pattern

in the digital

describing

required

the

rule

by pattern

and confidence

in

of three operations,

zoning and grouping,

6.2.1 and 6.2.2. For the demonstration

features

describing

features

features

by both pattern

the

defect

classification

of component

in order not to effect

classification.

The IKB system of the demonstration


The

operation

in

classification
Fig.

6.15.

operation

values

or defect

for

on
each

type

were

types

This

was

the

example

2D

attribute

analysed,

with

the maximum and minimum of the range used as the slot values of the pattern
frames.
For

the confidence

operation,
factors

described

contained

the component
confidence
using

on other

under evaluation.

quality

the

component

component

zones

taxonomy

described
component.
contained.

specified

image.
and

This
the

in section

component

The

assurance

images.
the

built

conventional

the confidence

of the application
and content

and

of the

from

past

experimentation

previously

radiographic

gathered

inspection

from
cycle

for the demonstration.


requirements

of

the

the number

and nature

information

was used

zoning

rules

of

6.3.1. This consisted

critical

up

and knowledge

nature

the

inspection

process

of the inspection
to complete
defect

of such details

image covered by the inspection


the

the nature

of the structure

experience

performing
chosen

Examples

to select

classification

rules are shown in Fig. 6.19. This was achieved

documentation,

on the component

of the defect

6.2.2. it was necessary

in section

type of component

The

system

within each rule to reflect

inspectors

chosen

classification

factor classification

existing

expert

factor

zoning

zone.

and

any

requirements

also

specified

the

zones in
inspection

operation.

as

as the region of the

zone, referenced

of the

the

for

to a datum in the

component

features

it

as shown in Fig.6.22.
quality

assurance

Ph.D. A. Kehoe 1990

inspection

criteria

for

147

Chapter 7
each inspection

zone. including

position

and relationship

in

inspection

the

defect evaluation
inspection
as

interface.

was
of

and types of defects

the image

region.

taxonomy

and

presented

the

in

overall

indicated

types of defects

7.3

within

System for 2D Defect Inspection

This

the

allowed.

information

evaluation

their

was used

rules

of

the

operation. as described in section 6.4.2 . The output of the IKB

part

This

the number

requirements

system

format.

Demonstrator

the

graphical

design

of

acceptability

in the component.

computer

the

window

demonstration

of the

component.

and an explanation

based

system

user

the number

of the inspection

and

result.

EXPERIMENTAL RESULTS

In order
that

of

to compare

the

reliability

skilled

the performance

and the operational

The Component
The

component

metallic

engineering

screw

and

threads

approximately

The

process

identified

in

the

for

included:
type

Ph.D.

features.

inspection

inspection

demonstration

basically
The

method.

system

cylindrical
size

giving

component.
image.
apply

of

in

the

was

shape

with

such as holes.
component

radiographic

representation

7.3

major
shows

reliability

1990

of

the

specified
and

to

as illustrated

was

image

of the

of

radiographic

conventional
the

a series

the

types
of

defects.

of

regions

These

are

radiographic
defect

to

within

which

the

longitudinal

and

minor

cavities.

representations

criteria

cracks.

applicable

of the demonstration

annular

porosity.
of

such

to be

ring
and

defects.

within

each

system

is affected

be

inspection

in Fig. 7.3. The types of defects

and
typical

of the inspection

inspection

A. Kehoe

the

requirements

transverse

cavities.

Figure

summary

The

the

ReQuirements
the

A graphical

criteria

zones of the component.

brief

was

(mm).

(mm).

component

inspection

inclusions.

type

assurance

inspection

detected

determine

against

image is shown in Fig. 7.3.


quality

different

with

system

set into the main body of the casting.

sealing

150x300

use

This

1SOx1OOx300

approximately
component

for

to

of the automated

ana Inspection

casting.

features

necessary

efficiency

chosen

some ancillary

piping

it was

inspector

of the demonstration

and

foreign
and

zone.
by two

148

Chapter 7
main

classes

which

do

not

acceptable
reject

of

inspection

correspond

Demonstrator

error:
to

suspect

actual

are

found

and

defects

unacceptable

are

found

to

when they are not. The first type of error may be considered

and increased

operational

acceptance

the quality
It is

system

regions

defects;

rate, which would cause problems

a false

System for 2D Defect Inspection

possible
by

inspection

set

repeatability,

would

and integrity

of

representative

which

to determine

use
this

of

of

method

does

more

inspection
known,

component

serious

reliability

artificial,

images.

not

images evaluated

This gives a direct comparison


inspection

error

efficiency

problems

as

affecting

of the component.

the

series

cause

give

any

of the

defects

indication

demonstration

occurring

Although

error for real defects. A more satisfactory

set of component

production

a false

costs. The second type of error may be considered

rate,

assurance

such as reduced

be

in

affording
of

the

high
rates

of

method is to use a sample

by both conventional

and automated

means.

between the two methods and a measure of the

rates of the demonstration

system.

features

Inspection Requirements

11 ~1~::1
Cavities: Max Area < 20mm 2Sum of Areas < 80mm
Porosity: None in ZoneC1
Piping:

Sum of Areas < 80mm

Max Area < 40mm ~ax

Ann-Ring: None in ZoneC

Width < 3mm

Max Width < 3mm in

ZoneC2

": Piping: None


,.:Ann-Ring: None
Tr-Crack: Max 2 cracks
: 19-Crack: Max 1 crack

Fig. 7.3
quality

Graphical
assurance

representation
requirements

of the radiographic
of

the

conventional

Max Width < 1.Smm


Max Width < 1.Smm

component

image, and

radiographic

inspection

rocess.
A

set

component,
represent

Ph.D.

of

eight

were
a good

A. Kehoe

radiographic
selected
cross

1990

for

section

film

images,

experimentation.
of

component

each

depicting

These
images,

were
showing

different

thought
single

to
and

149

Chapter 7
multiple
four

defect

skilled

assurance

occurrences
inspectors

the

conferring

the

overall

this

was

minute

be

per

outcome

of

Such

an

acceptability
seen

that

eight

the

and

component

images

accepted

exercise

was

Table

and

taken

for

approximately
to

true

ensure

one

that

the

representation

of

inspection

image

is given

four

inspectors
four

three

in Table
was

decisions.

with

of

inspectors.

and

the

two

overall

table

it can

on only

images
The

the

From

consistent

rejected.

mixed

for

7.1.

component

unanimously

received

results

five

found

fully

remaining

three

component

a single

of

images

component

image

decision.

Images

R874H

R875H

R876H

R877H

R878H

R879H

R880H

R881H

Accept

7.1

automated
The

his

Inspection

Component

Inspector
Decision
Acceptable
Reject
Inspector
Mean
Decision
Automated
System
Decision

time;

on

acceptability.
time

to

without

report

the

necessary

gave

with

image

by only

a split

of the
images;

one

and

cycle

asked

image.

a short

to

quality

was

component

Additionally,

given

standard

inspector

location

inspection

conventional

decision

of

were

evaluation.

component

component

acceptable.

receiving

the

for each

complete

their

Results of Conventional

of

to

inspection
in

Each

each

and

films

copy

on

component.

normal

These
a

cycle.

detected.

conventional

summary

being

the

with

process

the

System lor 2D Defect Inspection

images.

along

inspectors.

of

error

free

inspection

defects

within

and

7.3.1

the

the

component.

inconsistency

be

other

acceptability
to

the

inspection

the

including

defect

evaluate.

for

complete

with

findings;

to

requirements

perform

and

Demonstrator

Accept

Accept

I/Reject

Acce_j)_t Accept

Reject

Accept

Accept

Accept

Accept

Relect

Acce_j)_t Accept

Reject

Accept

AcceJ)t

Results

for

inspection
complete

are

given

and

location

overall

acceptability

for

conventional

and

methods.

results

in Tables

component

B.l

of defects

Ph.D. A. Kehoe 1990

of

conventional

to B.8
detected

inspection

in Appendix
in each

for

B. These

each
include

of the component

component
the

images

type,

image
number

by the skilled

150

Chapter 7
inspectors.
the

along with the evaluation

component.

detection

Demonstrator

These

tables

and evaluation

the inspectors

give

of the acceptability
an indication

by conventional

on detected

defects

System for 2D Defect Inspection


of the defects

of the consistency

inspection

were consistent

methods.

images

the

location

and acceptability

results

the

inspection

consistency

of individual

correspondence

7.3.2

for example.

it was not possible

images.

For this reason the results

baseline

for comparison.
a

other

of

This

makes

demonstration

system very difficult.

mean

for

of

the

component

produced

n ty

conventional

examined.

by sectioning

the exact nature and size of the

deviation

in the radiographic

inspection

image

are

very

well

is

present

a comparison

film

were taken as a

inspection

were

the

the

results

results

of

this problem

of
the

a set of

determined.

inspection

for the overall

Table

7.1,

shown

in

system.

The table

for each

component

along

acceptability

with

the

results

shows that the demonstration

those

image.

a component

which

conventional

inspection.

The

demonstration

system for each component image are shown in Tables B.l to B.9

of Appendix

B. In comparison

these

tables

system.

complete

for

giving

decision

acceptabi

matched

in

with

In order to overcome

for conventional

by the demonstration
performed

system

conventional

results

physically

of conventional

amount

inspection.

mean

performing

Although the sample size is small. it is clear from the

certain

The

presence.

is very poor. Using the above

than those appearing

conventional
results

the

Inspection

to determine

in the component.

that

on

seven

over the whole range of defect types.

had not been

defects

above

of the remaining

inspectors

inspectors

defect detection

components

of

of components.

Results of Automated

As the test

findings

as:

acceptability

68% for individual

the

defects.

between

may be summarized

70% for overall

between

of defect

for only a single component

image. R877H as shown in Table B.4. In the inspection


component

The

and of

inspection

to the mean results

show that two inspection

errors

Two false reject errors occurred:

the
results

mean

produced

of conventional

were caused

by

of
the

inspection

by the demonstration

one for the component

shown in Table B.3, and for the component

results

image R876H.

image R879H, shown in Table B.6

Appendix B. Both of these resulted from a group of cavity type defects. within a
the

inspection

combined

Ph.D.

areas.

A. Kehoe

zone

B. being

when

1990

found

compared

to

to have
the

an unacceptable

inspection

sum

requirements.

of their
From

the

151

Chapter 7
above

observations

be summarized
for

the inspection

reliability

System for 2D Defect Inspection

of the demonstration

system

may

as:

overall

component

the mean
2

Demonstrator

results

false-reject

acceptability

of conventional

errors

the

demonstration

fully

matched

inspection.

occurred

over

the

sample

size

of

component

images.
The time taken
to

component.

operate

to evaluate

The

image

at a constant

dependant

upon

Typically

processing

operations

time cycle.

whilst

number

defects

of

image

varied

of the

from component

demonstration

system

the time taken by the IKB system is


detected

in

the

component

image.

the cycle times were:

Image

Processing

5.22

7.4

the

each component

IKB System
1.00 -> 4.40(mins).

(mins)

CONCLUSIONS

The

results

inconsistency
cycle;

conventional

occurs

between

inspection

show

inspectors

with only 70% correspondence

images.
the

of

performing

detection

viewer.
of

making

defects

correspondence

interpretation

inconsistent.

value

for

defects

large

the

This

is

detected

in the

found

to perform

inspection

image presents

content

reflected

of

size of component

the radiographic

of image

amount

same

over the small sample

This is mainly due to the difficulty

human

that

very
in

the

component

to

difficult

and

very

low

image.

at only

68%.
The

demonstration

component
and

images.

detecting

inspection.
seen

to

results

all

correctly
the

The levels
be

completely

system

indicate

that

identifying

defects

listed

of inspection

acceptable
matching

was

and
the

component
in

the

mean

very

well

with

features

in

each

results

of

conventional

error for the demonstration

the

results

of

mean

results

of

the demonstration

system

overall

component

conventional
is capable

all

the

image.

system can be
acceptability

inspection.

Such

of performing

on a

and reponed

many

level equal to that of the expert inspector.


It was observed

Ph.D.

A. Kehoe

1990

that the demonstration

system

detected

152

Chapter 7
more

defects,

across

all of the sample

by the inspectors.

This resulted

the

of conventional

mean

results

results

Demonstrator

System for 2D Defect Inspection

component

images.

in a two false reject errors, when compared to


inspection.

It was,

had not been reported

value was produced.


could

not

defects,

in sufficient

This difference

benefit

from

or, full reporting

numbers

image

enhancement

of defects

techniques

was not completed


There

resulting

the

this

from

detected

defects.

Although

considered

that a larger sample size of component

indication

of the non-reject

The

time

taken

inspection,
minute

and

performance,

inspection

inspection

factors

system

component

report.

Moreover,
the

dramatically.
processing

There

are

conventional
produces
produces

several

performance

the

as fatigue,

size

of

limited

Ph.D.

of the automated

are repeatable

A. Kehoe

1990

and

such

system

is, however,

full

system

has

should

on

to the
improve

real-time

image

at an inspection

cycle

inspection.
the

reliability

inspection.

affected

by

former
latter

analysis.

The

several

factors,

ultimately,

this could not be

that

conclusive

of

the

which,

Although

very

The

analysis,

quantitative

it is considered

bring

cycle of

produce

system

inconsistency

reliability.

techniques,

inspection

The

developments

qualitative

would

scope of image processing

further

aiming

greatly

and caused by factors

consideration.

comparing

on

is

experiments,

poor

inspection

based

inspector

this is a relatively

automated

automated

on

defect
one

and

visual

component

approximately

concentrate

of

each

acceptability,

when

on inspection

images

takes

automated

of concentration,

the present

component

performance
errors

from

it is

image processing,

a complete

computer

based

result,

effect

encouraging,

inspect

into

With

will

that

result,

human

lack

have a detrimental
concluded

with

objective
of

the

difficulties

subjective

an

its

of

speed

to

taken

than, conventional

inspection
a

be

and flexibility.

and high

time equal to, or better

errors

images would give a better

inspector

present

improvements

hardware

once

were no non-reject

task. Although

of

the

performance

These

detecting

by the inspector

including

to perform

regardless

for reliability

implementation,

the inspectors

when

is very

system

The

should

was designed

image,

designed

reporting.

the same inspection

further

demonstration

demonstration

6:22 and 10:02 minutes,

to perform

an error

rate.

by the

image was between

from the

image, yet, as

was due to two possibilities;

was found to be unacceptable.

such

clear

by the inspectors

the component

been

however,

that some form of defects were present in the component

these

the

than were reported

a large
evidence.

systematic.

sample
The

Inspection

such as lack of domain knowledge,


or poor image capture

set up. It

153

Chapter 7
is,

therefore,

the

automated
The

always

and

inspection

quality

acceptability
quantitative
the

requirements

of a defect
The

he

between

difficult

to

screens.

The

analysis

of the

defects

inspection

reliability

and performance

of the

inspection

process

very

determining

either

from

component,

of

may

arise

perform

performing

between

size,

such

qualitative
defects

and

attempts

from the radiographic

image;

is very

photographic

real-time

intensifying

a complete

quantitative

film

or

performs

the dimensional

The

be

when

the

the inspector

system

image.

at

express

of position,

to

the relationships

determining

component

attributes

difficult

adept

Errors

inspection

above

it
more

components.

automated

results

much

measurements

achieve

in the

finds

is

of the component,

to take dimensional

the

based on its dimensional

inspector

analysis,

differences

to improve

System for 2D Defect Inspection

system.

assurance

frequency.

analysis

possible

Demonstrator

discrepancies

partly

attributes

between

attributed

which

to

of all

the

these

two

the

sets

of

differences

of

operation.
Improvements
the

false

to the

alarm

performance

and non-reject

with the image capture


reliability
in

with

of defect

detection

rate. This observation


in

section

accuracy
A

3.35,
of

pixels

improvement

process.

At

features

in the image.

method

which

will

consequently

Further

give

a more

present
much

accurate

which

require

further

experimentation

capture

to

the

film,

set up.

automated

This

increase

in

value

of

error

although

would

give

and so reduce

may

resulting

an

improved

the inspection

inspection

Such

inspection

to

this

achieved
is

system,

an

object

by

the

error

as outlined
greater

dimensional

robust
to

are

poor

image

such

the

the

poor

inspection
dirt

handling,
not,

and

however,

operating

inspection

illumination
and

poorly

have

on-line

of

such
in

image

component

on a calibration

analysis

with

as

robust

known

more

will

system

through

will concentrate

extensive

factors

achieved

more

developments

contribute

digitized
due

be

comparison

factors

radiographic

experimentation

single

resolution;

representing

may

Lastly,

introduced

performance.

to reduce

representation.

further

calibration

pixel

and analysis,

more

through

in the acceptable

is true for any automated

the

system,

set up. The largest

of a higher

operational

demonstration

may be achieved

by a reduction

and the selection

a trade-off

accuracy

rate,

and digitization

may be achieved

digitization

of the

results,

and

requirements.

reliability

which

the

noise

film,

scratches

on

the

engineered

image

an effect

on an

the

production

environment.
Ph.D.

A. Kehoe

1990

154

CHAPTER 8

CONCLUSIONS

Ph.D.

A. Kehoe

1990

Chapter 8

CONCLUSIONS

The

overall

inspection
cast

aim

process

of

the

completion
several

an

types

development
based

of
of

on

of

2D

occurring

limitations

Future
processing
earlier

development
defect
An

overall

inspection

Ph.D.

inspection.
defects

of

images.

This

in

The

the

and

and
on

includes

and

film

the

analysis

images,

evaluation
the

in

in this thesis

and

of
the

of defects,

quality

inspection

descriptions.

design

of

of performing

radiographic

has

indentified

and IKB techniques,

assurance

film
the

image

development

3D

analysis

of

defects

with

Preliminary

from

capability

work on these

automated

aspects

A. An image processing
radiographic

system

image

real-time
based on

to classify

for

and

of system

method

along with an IKB system for 3D defect


an

of

will be developed,
the

the

inspector.

the

system,

a
and

and also indicated

to the expen

an IKB system

of

capabilities

concern

of

system for
an off-line

will

in Appendix

is outlined

is capable

single

system

project

Additionally,

is presented

to form a demonstration

system compared

capable

2D defect

analysis

classification

occurring

This

detection

radiographic

attributes

of an automated

3D defect

for

radiographic

of defects

development.

system,
in

the

The work described

have been combined

techniques

radiographic

automate

component.

component.

stages

to

evaluation

system

for

of the image processing

performance

evaluate

system

dimensional

of

predetermined

the

defects

radiographic

inspection

of

processing

The above systems


automated

and

is

components.

image

the

work

detection

stages

an IKB

their

requirements

the

research

industrial

initial

of

the

for

or machined

comprises

the

Conclusions

for 3D

inspection.
3D

defect

is also discussed.

A. Kehoe

1990

156

Chapter 8

8.1

Conclusions

IMAGE PROCESSINGTECHNIQUES

It is thought

difficult

problems

contribution
systems.

of the specific

process.

image.

The

defect

high

of

are

for the large

and are difficult

intensity

gradient

technique

was

gradients

in

as

for detection

giving

in the

enhance
techniques

which

the
for

make

no

of the image.

techniques.

occur

in

all

defect

radiographic

shapes
images.

of defect regions was based on


as a statistically
in the image

accommodate
a

is an area

selectively

to extract

of pixels

to

with

information

in the background

and Kale. but implemented

background.

This

enhancement

was designed

further _ developed
the

to

processing

backgrounds.

inspection

designed

images.

transformations.

as on-line

on a large population

was

intensity

order

contrast

variations

technique

industrial

is a

are all novel to some extent.

all the

point

technique

threshold

operating

automated

enhancement

in

published

to implement

the methods of Rosenfeld


process.

a pixel

intensity

to which it is solved

of radiographic

modest

detection

The adaptive

nature

of

images

contrast

to accommodate

majority

radiographic
allowance

designed

neighbourhood

The

for

for image enhancement


for

images is one of the more

The extent

processing

t e c h n i que

surrounding

from

image

The techniques

consideration
based

of image processing.

towards

C -of-G

The

that defect detection in radiographic

much

very

more

based area
(1982).

high

robust

This

intensity

and

reliable

algorithm.
The above
sizes,

techniques

of defects

intensifying
contrast

using digitized

screens

of real-time

enhancement
is significantly

defect

pixels.

technique.

different

Noise pixels

following

found

to give

good results

for all types,

and

images from both photographic

film and from

imaging

technique

tends to increase

which

however.

were

from

systems.

The C-of-G

the contrast
its neighbours;

of any pixel in the image


these

in the image are also enhanced

a noise reduction

technique.

for

are

generally

the

by this technique.

such as the image

integration

this was found to be acceptably low.

Since the C-of-G


it is capable

technique

of enhancing

Ph.D. A. Kehoe

1990

does

not rely upon

any type of defect.

any structural

Similarly

information

the adaptive

threshold

157

Chapter 8
technique
rather

is capable

than

technique
actual

of detecting

structurally

pixels of any defect type, as it is statistically

based.

When

used

with

was found to produce good representations

defect

in

the

Conclusions

radiographic

image;

large

area

size

this

of size, and shape, of the

particularly

for

very

large

pixel

window sizes, s(m,n) for

15 < w < 35, as described in section 4.1.3. In this way

the

each

population

highlights
require
were

around

defect

pixels

a great
designed

deal

pixel

is

particularly

more

well.

computer

as area processes
processing

hardware

processing

system

(Datacube,

1988).

segmentation,
techniques

techniques

and defect

analysis

are

been

adapted

most

efficient

closing

analysis
based
for

and

the

and

erosion

transforms

described

in

Joyce

region

of

performing

into

area,

dimensional

is

methods

attributes.

defect

defect

All of these

but

radiographic

into
image

merging,

methods,

which

have

inspection.

The

merging

of splitting

colouring

The
defect

technique

techniques

the accuracy
~

The amount

equipment

is

by

and merging of

segmentation

process

region.

is done

small

very good

techniques

with

region.

and position,

required

of on-line

required

for each
into

and

attributes,

to classify

global
such as

each

suspect

such as number of defects,

required

against

evaluate

inspection.
background

Once

an

Ph.D.

the

any number

dimensional
system

the

does,

analysis
however,

inaccurate

A. Kehoe

defect

1990

classified

defect

defects

regions

of dimensional

system.
heavily

The
rely

definition

have
attributes

performance
upon
will

acceptable

been
of

limits

segmented

may

the

previous

result

in

from

be determined

the

dimensional
processing

inaccurate

in

operation.

local

The local shape

are

steps

implementation

the

for

representation

of processing

determine

results

and contraction

of the defect
and

This

defect into a defect type. The global attributes,


to

the

of Ballard and Brown

gave

would be capable

to each defect

elongation

(1985).

a continuous

relatively

analysis

relating

density,

however,

above

defect

of the number of expansion

analysis.

operation

high speed computing

information

analysis

Loebl

and determines

step of image

The

of the

include

industrial

and segmentation

types. The choice

analysis

does,

by Ballard and Brown (1982), and on the methods of dilation

is very important
image

analysis

as part of an on-line

of

way

statistical

may be implemented

This is based on the techniques

The merging

the next

Both

to operate

image

application

each merged

all defect

window

for two dimensional

using a technique based on the blob


(1982).

large

that they

developed

previous

effective

technique.

regions described

on

and

in order

image

image

large

processing.

specialized

The

very

are
of
the

by the
analysis

operations;
dimensional

158

Chapter 8

Conclusions

attributes.

8.2

INTELUGENT KNOWLEDGE BASED TECHNIQUES

The majority
manner

of testing,

Such inspection
guide-lines,
product

against
of

general,

defect

approach

particular

application

The

towards

extracts

as being

added to the attributes


the next stage

set of global 2D attributes


description,

to

inspection

evaluation

description

to

requirements,
base.

From

enhancing

system

determine

in

Although

not

of the IKB system

and the

to adopt a bottom-up

approach

data

from

image.

the radiographic

The
image

Using a set of defect

base, the defect

classification

system

The defect type is

which are then passed on to

and grouping

if

the

representation

has been designed

operation

determines

the

defect

is

in

operation

the

acceptability

of

is added to the
the

defect.

to use the completed


conflict

which are held as a series of inspection


this

systems

of the defects in the image, such as the relationships

further

IKB defect

based on

of IKB techniques

between defects and the totals of defect types. This information


defect

of
to

the suspect region represents.


The zoning

lor

confined

in the radiographic

of the defect description,

of inspection.

not

inspection.

regions and 2D attributes.

the type of defect

fitness

novel.

of defects

rules held in the knowledge

the

and implementation

automated

the structure

assess

its

problem;

radiographic

low-level

inspector

and evaluation.

application

has been designed

in the form of suspect defect


determines

successful

and evaluation
system

generic

inspection.

to a strict set of

determine

The design

to automated

inspection

The
to

by some

of visual

working

classification

is

contribution

are regarded

to the classification

classification

feature

to the problem,

The 2D defect
processing

knowledge

controlled

amount

requirements.

requirements,

and in particular

a great

requirements.

for image

is a good

are primarily

out by operators

relevant

analysis.

a unique

image

contains

assurance

such quality

system

problem

often

the

inspection

radiographic
this

quality

gathers

an automated
set

which

processes

has to be carried

or

and

purpose
a

of manufacturing

of the

with

the

The
defect

inspection

rules in the knowledge

component

is determined,

which is the outcome, or top-level action. of the IKB system.


Although

the

Ph.D. A. Kehoe

developed

1990

IKB

system

has

been

designed

to

perform

159

Chapter 8
automated
system

radiographic

have

sufficient

application

fields;

inspection,

quality

and

the

knowledge
similar
for

assurance

of

property

analysis.

structure

tasks

replaced

be

with

requirements

knowledge

some

more

of the

for

including

and

consists

knowledge

requirements,
documentation,

base

may

be

The

dynamic

component

and

of

the

grouping

operation

the

inspection

by

of

be easily

point

general

component,

from

several

sources,

inspectors,

expert

subsequent

for defect

which

steps

IKB

defect

classification:

which

have

made

robust

inspection

was

and

cycle

evaluation

correctly

classified.

1990

the use

The
depends

to

including

the

and

The

of pattern

heuristic
about

component.

This
updated

and may also

most
operation

important
of

upon the results

easy matter

classification

matching

the

successful

is a relatively

existing

base.

be

heavily

2D

inspection

as they may be easily

found

system.

defect

through

Ph.D. A. Kehoe

system

in the inspection

been

descriptions,

of the

information

in

enables

This information

knowledge

occur

and is

also

information

represents

on slots

applications.

types,

defects

structure,

efficient,

for the system.

base

The advantages

of scheme

for differing

the

defect

type

this

into the

procedures

base is compact,
this

Using

knowledge

data from within the static knowledge

the

be

form of

encoded

knowledge.

and data driven

represents
the

problem.

hierarchical

specified

knowledge
the

inspection
could

Moreover,

acquired

classification

of

task

may

of the IKB system or by the data driven procedures,

defect

however,

operation

by operations

The

For

meta-level

is useful

the default

system
further

operation,

representation
inherit

the

applications

dictated

knowledge

a starting

about

experience

assumptions.

analysis,

of

other

into the IKB system.

and dynamic

taxonomies,

application;

and

particle

simple

and

defect

with

modify.

of vknowledge

particular

2D

bases to be more easily

inspection

surface

differing

modifications

knowledge

scheme

are that the resultant

defect

industrial

base

of

was found to be most suitable

both the static

of frames,

static

as

bio-medical

operations

the

of data in frame

knowledge

variety

such

For

of the

wide

knowledge

zoning

frame based system

maintain

and substituted

and the

inheritance

The

The

and principle

application.

representation

to

to

products,

further

all of the domain

IKB system,

applied

data.

specific

representation

representation

structure

this would be a relatively

required,

A hierarchical

easy

food

specific

applications

may

the

applications

bases may be constructed

inspection

be

include

application

diverse

of

inspection,

flexibility

these

metallurgical

contains

defect

Conclusions

of

with defects

of defects

techniques

the

has been

and a certainty
160

Chapter 8
factor

classification

knowledge

against

defect

through

that

types

containing

expert

a natural

classification
backward

of

of

addition
processing

the

be

processing.

in

component.

the

knowledge
The

taxonomies

A series

and

defect

which

allows

if

satisfied

requirements
modified
a solution
Ph.D.

and

at a

defect

defaulting

the

to an

defect

types,
a

or by the

trade-off

with

of

the

defect
may

consequently

determined
value

by

detection

by

updates
and

and

acceptability

rules

component

modifications

inheritance

of

these

the
the

way of
into

to

mechanism

to access

image

identify

was found to be an efficient


of

the

of a defect

incorrectly

the

only

the

be easily
of

requirements

frame
for

cycle.
rules

rule

renders

to a problem.

type.

Should

system

the evaluation

to suit. A backward

1990

to a problem

to the problem:

entirely

requirements

driven

by a backward

of implementing
represents
the

defect

are added. or removed.

A. Kehoe

factors are

produced

However,

was

inaccuracies

allowed

to be an ideal method

which

suspect

system was found to be affected


system.

structure

of evaluation
Each

specific

which

assurance

hierarchical

system.

with

rules

and. with the usc of a

defect

rules.

evaluation

use in the defect evaluation

IKB

factor

to

defect

quality

also

of

has

at a solution

more

processing

due

the

base.

series

may be built into the system by the addition

A frame based representation

encoding

dealing

reliable

to be of some

input;

image

the

of

enhanced

be experienced.

data

error

then

acceptability

arrives

confidence

of

rules

flexible.

describing

would

of the

for

they may be easily modified

and

of the defect evaluation

integrity

attribute

frames
always

frames,

further

performance

the

the

further

defect types. Confidence

Additionally.

reliability

efficiency

capable

to typical

was determined

The outcome

found

in

be

to express their belief in the solution

strategy.

pattern
of

made.

held

of the inspection cycle is built up.

type. Further

further

may

arc

system which is efficient.

region

and

which

hierarchical

chaining

unknown

knowledge.

factors.

later date as experience

by

arc

may be constructed
uses

way for experts

use

Such patterns
classification

given a set of initial conditions.

of

defects

factor

which do not correspond

suspect

typical

Certainty

confidence

The

of

of the pattern.

using

experience.

defects

Patterns

base. These are used by a series of rules to match the suspect defect

description
several

system.

Conclusions

chaining

the inspection

a particular
unacceptable.

strategy

was

requirements

into

requirement
As

of inspection,

further

inspection

then the rules in the system may also be

chaining

strategy

by its nature always determines

and may begin with goal "the defect

is acceptable".
161

Chapter 8
Acceptability
operation

of the component

by use of data driven

particular

slots

knowledge

8.3

may be easily

of

frames

procedures.

and

activate

updated
which

from the results of this

may access

operations

Conclusions

on

the values

related

slots

in

of
the

base.

AUTOMATED RADIOGRAPHIC INSPECTION SYSTEM

From the results


largest

single

problem

inconsistency
automating

of
the

of operating
skilled

of conventional

inspection

process:

producing

equal

to. or better

the

inconsistency

the

of

allow

full

unlike

inspection

automated

cycle

with

Ph.D.

be

argument

a system
than.

becomes

the

essential

in

and

the

skilled

cycle

times.

data

this

capable

stronger.

necessary

At

for

evaluation.

of

inspection

the

that of the

of

performance

implemented.

become

system.

outlined

further

in

cycle.

systems

the same reliability


through

system

point
great

section

these

required

to

automated
number

of

system.

outlined

inspection.

are

performing

developments
7.4.

in section

inspection

of conventional
capable

and

in section

the

set of test images. with

methods

enhancements
include

7.

of

as the skilled

automated

as described

inspector.

allow

to

the

image

and developments

8.2. The operational

the

Moreover.

reliability

developments.

This

to

be

For

the

capture

and

to the IKB
performance

system was found to fall far short of the skilled inspector.


cycle

and unlike
The

inspection

inspection.

a maximum

processing

to

the

to the the mean results

of the demonstration

inspection.

meet

importantly

will

demonstration

inspection

improved.

to

the

the

is

industries.

demonstration

having

manufacture

adopted.

adequate

more

reinforces

was found to be very good for the sample

improved

defect

automated

widely
be

control

conventional

digitization

more

process

that

inspection

for

longer

100% correspondence
indicates

need

and

the

reliability

eliminating

reliability.

manufacturing
For

of performance

and
elM

no

radiographic

inspection

radiographic

as the

flexibility.

radiographic
This

Additionally.
will

conventional

7. it is clear that the

performance.

on a level

concept

section

operator

inspector.

inspector

with

inspection.

use

time nine times

conventional
of

high

greater.

inspection.

speed

computer

However.

without

this may also be

loss to the reliability

hardware

for

both

the

of

image

and IKB system should reduce the cycle time to equal. or better. the

A. Kehoe

1990

162

Chapter 8

Conclusions

inspector.
The

demonstration

particular
be

system

application.

selected

and

was

requiring

the

found

only

five

initialization

parameters

of

domain

for

the

processing

to

knowledge

very

well.

the component
application
ensuring
Once

domain

then

for example.

all component

was robust

further

constant.

digitization

rectified

and

image

parameters

in the

would

capture

inspection

system.

this would be relatively

generalized

quality

system.

of the

inspection

assurance

or the

integrity
cycle.

performed
defect

conventional

cause

methods.

Automated

in

absolutely

the

important

the

manufacturing
necessary.

A. Kehoe

1990

the operational

been

environment

in the

With a

is its inability

to perform

not

cycle.
to

the

out

in an assembly
of the defect

which

Further,
the

must

be

any spurious

knowledge

further

of the

IKB

inspection

to

benefits

operational
reduced.

to replace

overheads

carries

part

refer

of

cycle.

increased

only

scope

inspector

offer

real-time

the

inspection

inspection

not

any

automated

domain

system

of

and

parameters.

an

Although

inspection

With

and the image

such as pans

would be greatly

industry.

have

on-line

skilled

inspection

adoption

rates.

monitored

outside

visual

automated

methods.

of

system

threads.

the

the system.

simple to achieve.

cycle times it may be possible


with

part

the

not defined

be

processing

component.

or subsequent

process

production

error

source.

to

the component.

screw

radiographic

Additionally.
systems

0'

disrupting

inspection

as

Often

an

the

of the inspection

with longer

Ph.D.

is

component.

would

conventional

costs

this

in a previous

in the

system.

of internal

in

a production

have

automated

requirements.

check on the features

inspection

used

upon

general

and defects

parameters

X-ray

in the image

image

more

to

to ensure that the image capture cycle

real-time

limitation

in

the

was found

inspection

processing

cycles.

of energy

or accommodated

One major

features

and reducing

inspection

The level

system

inspection

images could be used to initialize

knowledge

for

and

system be used in a typical

it would only be necessary

and

change

identifying

many more example

initialized.

capture

the demonstration

image. Should a similar

the

remained

processing

reliably

that the operation

zones.

with

Using only a small set of example defect images to determine

operate

inspection

base

requirements.

of image

data.

of image

up

feature
values

defect

the

to set

component
parameter

and

to be be easy

efficiency

the

On production

lines

many skilled

radiographic
will

image

associated

over

inspectors.

image

capture

processing

become

with film costs

will

163

Chapter 8
be

eliminated.

8.4

FUTURE WORK

8.4.1

Image Processing Techniques

The image

processing

work. as described
software
with

on-line

techniques

however.

processing

area

the

equipment

processing.

that

such

allowing

design

during

of these

the initial
techniques

The majority

implementation
(Datacube,

study of the system design


considered

the

considerations.

concerns

image processing

developed

phase of this

in section 4.1 and 4.2. have been implemented

operations.

in this

is

Conclusions

of these

exclusively

was undertaken

of further

work required

techniques

into

real-time

1988). This work would require

and processing
an

exercise

a greater

amount

operations

may

of the overall

improve

of image

as

the

data

a detail

system.

results

It

of

image

to be processed

in an

attempt to detect and analyse defects.


All of the techniques
processes

which

implemented
was

use

into

recently

processing

successfully

which

detection.

mask

and

convolution

image

processing

specialized

system.

modules.

for defect

undertaken

This

could

system

on

at relatively

high

speed

demonstrate

the

radiographic

inspection.

(Matrox,

application

hardware.

of

both

to operate

the

images

image

system and stored to optical disk. Through the demonstration


validate
images.

and

test

image

and to highlight

This

exercise

capture

and

images.

Image

noise.

the

and

processing

Ph.D. A. Kehoe

that

techniques

susceptible

1990

to

to correctly

further

when

intensifier- TV systems

techniques

techniques

areas of consideration

also highlighted

calibration
are

processing

deterioration

and

image
software

operations

on

to

was to
real-time

intensifier-TV

it was possible

real-time

to

radiographic

for high speed operation.


work

dealing

have

based.

of the exercise
an

easily

an exercise

processing

techniques
on

are

Such

hardware

image

developed
captured

these

IBM-peAT

1989). The purpose

of

using

4.1. are based on area

technique;

a small.

comprised

be programmed

section

is required

on the image

with

real-time

radiographic

a significant

amount

of structured

with

age.

In

detect and analyse defects

order

for

image

in the image it is
164

Chapter 8
necessary
image

to subtract

quality.

discusses
image

Such

is

radiographic

work

already

out

method

(1989).

required
to

been
for

Further

on

the

by

Throupe,

the

input

standardizing

to the work outlined

a variety

ensure

carried

of

component

robustness

and

to make

of further

classification

and

frames.

the 2D defect

work

zoning.

by use

enhanced

by

experimentation

The

factor

of

real-time
the

solution.
the

work. This

precise

with

of

image

for defect

A second area of enhancement

scheme

of the defect

of

ensure

applications.
remainder

that
the

base from the quality

base

this exercise

system.

an efficient

developed.

knowledge

At present.
of

Moreover.

the

a generic

work

on

rules

system may
gained

documentation

system

would

for

driven

construction

and expert

be highly

the

system
differing

some modifications
data

from

zone.

inspection

transferable

and:

for the automated

assurance

Such

truly

of

as determining

IKB defect

would require

including

system

is

also be

selection

zoning

such problems

in the

could

knowledge.

to the present

features

of features

methods

heuristic

a small

component

descriptions

classification

would overcome

robust.

employed

of

alternative

more

more

techniques

The robustness

use

system

location of a defect which lies across the boundary of an inspection

to

the

extensive

and

reliability

classification

defect

experimentation

the most appropriate

on the

of more

The certainty

through

inspection

is required

defect

be improved

improved

is

to

above.

type

who

Intelligent Knowledge Based Techniques

In order
amount

has

in

results.

8.4.2

be

for any fluctuations

correction

images.

processing

pattern

and make corrections

system

experimentation

could

this noise

a greylevel

processing

Conclusions

to the

procedures.

of a knowledge

knowledge

desirable

could be

for

industrial

applications.
Future
learning

mechanisms.

activated

from

techniques
perform

the

the

IKB

system

additional
results

of

concerns

operations

to

inspection.

and

the

introduction

allow

process

into

high-speed

computing

equipment.

a task

intelligently

they

be able

must

the

of
control

implementation

machine
to

be

of

the

systems

to

experience.

In

For

computer

to learn

from

order to to do this some form of machine learning has to be introduced (Black.


1986). These
according

are self-tuning

systems

to some predetermined

built

into

the

Ph.D.

A. Kehoe

classification
1990

which modify the operation

performance

system

of

the

measure.
2D

defect

Such

of the system

systems

inspection

may be

system

to
165

.'

Chapter 8
improve

the

the the

performance

reliability

of

defect

and efficiency

classification

of the

and

inspection

Conclusions

significantly

cycle;

much

improve

in the same

way that an expert inspector is able to out perform a novice.


One approach
previous

to machine

success

of

the

implemented

through

classification

rules.

These

classification

cycle,

successfully.

During

would

be

recurring

changes

values

understanding
of the

problem,
point

knowledge

each

attribute
are

expert

from

first

correspond
in the
the

current

experience

values

knowledge

of defect

to the description

process,

component

inspection

likely

This

method

of machine

analysis

system

which,

existing

Ph.D.

default

values

A. Kehoe 1990

and

from

the

in time. The pattern


to identify

defect

the

the

to update

of

values
of

are used

which

closely

due to changes
occurring

IKB

in

2D defect

the description

of

frames.
learning

could

be implemented
determine

defect
in

the

of defect

experience

defects

to adapt

it is necessary

a series

frames

types. However,

In order

allows

These

defects

would

of

of

of a typical

values.

system,

each

the

and minimum

of defects

values

level

advanced;

distribution

history

classification

for

expected

a recent

factor

frames

which

contain

from

confidence

to

knowledge.

system

to manufacturing,

system to these changes

the defect held in the pattern

the

classification

to change.

the

up the description

defects

of typical

base

taxonomies,

further

a priori

make

of

most

into the system

increase,

much

classification

moment

or improvements
are

becomes

of maximum

are

processing.

represent

considerably

indicate

scores

moment in time. With experience

become

which

fired

highest

knowledge

The

base

defect

which

which

extensive

time-scale.

may
to

defects

be

completed

rules
the

in the static

knowledge

problem

at a particular

stages

held

the

each

with

way

could

of

may be introduced

at a particular

values,

rules

this

this

each

to the

without

a longer

of the defect

default

In

learning

static

in the form

inspectors

in the

the

frames

values

taken

over

through

The

first.

system

following

going

those

scheme based on the

to

updated

scores

information

the

with default

type.

be

understanding

of

gained

The pattern
defect

this

applied

are classified

of the problem

starting

slots,

of

system

cycles

fired

the

occurring

classification

highest

to machine

of updating

default

the

the

be

approach

the

would

subsequent
to

is a rule selection

For

scoring

in the component

by means
and

rule.

with

selected

A second
reflect

learning

the

attributes.
pattern

From
frames,

this
the

as

a statistical

classified
the

by

the

distribution

of

information,
system

would

and

the

further

166

Chapter 8
determine

the new distribution

is important
becoming

to exercise

unstable.

of values

control

and update the each pattern

This may be done by constraining

the values

provide

area

of future

work concerns

an input to the control

statistical

analysis

component

and

system

be based

defect

evaluation

could

trigger.

the

cause

of

Faults

through

the

of inspection

from

to

generate

and

take

information"

could be stored

inspection

system

operation.

This

normal

would

operation
and

giving

8.4.3

preventive
generated

efficient

and an high

lower
operation.

of future

capture

speed

This

processing

and

inspection.

Further

system
IKB

make

which

system.

possible

on-line

computer.

a high-

of the

system

intelligence

alternative

be

solutions.

difficult

over

the

programming

to

although

implement

could

work

would

system.

image

interface.

area concerns

real-time

image

and

then

be

used

towards
also
an

fully

concern
a

image

to

the

System
integration

processing

into the demonstration

including

capture.

2D Defect Inspection
in this

techniques.

techniques

and an operator

in 3D defect

The

would

work

IKB system

demonstration

self-calibrating

of faults

down into a low level sub-system.

artificial

costs.

This

as part of the

control

purpose

performance

with

action.

the

costs.

aspect

inspection.

system.

increased

for

of

of the IKB 2D defect

to

special

the IKB

Automated Radiographic

image

computer

through

associated

increase

The main
real-time

give

maintain

very

considerably

high-speed

or by compiling

option

languages

may be achieved

speed processor.
latter

onto

From a

information

the process

to

a knowledge

in a hierarchy

procedures.

results

process.

in the component.

defect

"faults

data driven

use

The final area of future work is the implementation

line

which may

intervention

of the manufacturing

occurring

on the

rules.

the

it is possible

process.

of

could

system

of the defects

identification

The

it from

inspectors.

A further

the

frame. It

on such a system in order to prevent

be placed in the slots of the pattern frames. and by allowing


expert

Conclusions

system

of

equipment

for 2D defect

further

develop

the

image

automated

on-line

3D

defect

the

industrialization

component
database.

indentification
an

inspection

of the onsystem.
reporting

All of which could be adapted for later use

inspection.

Ph.D. A. Kehoe 1990

167

Bibliography

BIBLIOGRAPHY
Aikins, J.S. and others, PUFF: An expert system for interpretation
pulmonary

function

data. Computers

and bio-medical

research.

of

vol. 16. pp. 199-

208. 1983.
Agfa-Gevaert,

Industrial Radiology.

London:

Alty, J.L. and Coombs. M.J . Expert Systems:

Agfa-Gevaert,
concepts

1986.

and examples.

Manchester:

NCC, 1984.
Ballard,

D.H., Hierarchic

computer.

recognition

of tumours

Basel: Birhauser-Verlag,

in chest radiographs

with

1976.

Ballard. D.H. and Brown, C.M . Computer

Vision. New Jersey: Prentice-Hall,

Ballard. R. Prospects for expert systems in quality management.

C.M.E.

1982.

Jan .

pp. 16-18, 1987.


Balter, S. and Kithl, W . Medical image intensifiers
happened.
Barrett,

Proceedings

in 1980: what really

of the S.P.I.E. , vol. 233, pp.145-149. 1980.

H.H . Radiological

and processing. vol. 1 & 2.

imaging:

the theory of image formation

detection

New York: Academic Press. 1981.

Bartlett. S. L. and others. Automated solder joint inspection. I.E.E.E.


Transactions

on Pattern Analysis

and Machine Intelligence.

vol. 10(1), pp. 31-

42. 1988.
Bennet. J., Frames and scripts. In: Barr, A. and Feigenbaum, G . eds . The
handbook

of artificial

Black. W.J . Intelligent


Van Nostrand

intelligence.
knowledge

Rhienhold,

Boerner,

H. and Strecker,

castings.

I.E.E.E.

Los Altos: Kaufman.


based systems:

1981. pp. 217-222.

an introduction.

Wokingbam:

1986.
H., Automated

Transactions

X-ray inspection

on Pattern

Analysis

of aluminium

and Machine

Intelligence.

vol. 10(1), pp. 71-91, 1988.


Bonnet, A., Expert systems:
Wesley,

Principles

and practice.

Addison-

1988.

Bourne, S.R., The UNIX system. Wokingham:

Ph.D.

Wokingbam:

A. Kehoe

1990

Addison-Wesley,

1983.

168

Bibliography
Bratko, I. Prolog
Addison-Wesley.
Buchanan.

programming

for

artificial

intelligence.

Wokingham:

1986.

B. and Shortcliffe,

E. The problem of evaluation.

and Shortcllffe, E. eds . Rule-base

expert systems.

In: Buchanan.

B.

Mass.: Addison-Wesley.

1984(a),
pp. 571-596.
Buchanan.

B. and Shortcliffe,

E.. Uncertainty

and evidential

support.

In:

Buchanan.
B. and Shortcliffe, E. eds . Rule-base

expert systems.

Mass.: Addison-Wesley.

1984(b).
pp. 209-232.
Chesney. D.N. and Chesney. M.O., Radiographic
Blackwell.

bibliography.

Pattern

visual inspection
Recognition,

and Image Processing,

techniques

and applications:

vol. 15(4), pp. 343-357. 1982.

Chin, R.T . Automated visual inspection:

1981 to 1987. Computer

Vision,

vol. 41(2), pp. 346-381, 1988.

Clocksin, W.F. and Mellish, C.S. Programming


Verlag.

Oxford:

1971.

Chin. R.T.. Automated

Graphics

Photography.

in Prolog.

New York: Springer-

1981.

Closier, M. I . Automatic product analysis using X-rays. N.D.T.

International.

April.
pp. 59-65, 1981.
Cocklin.
Vision

M.L. and others, Digital processing


Computing,

Conners,

Image

and

vol. 1(2), pp. 76-78, 1983.

R.W. and others, Radiographic

Proceedings

of chest radiographs.

image analysis:

of 6th. Int. Con/. on Pattern Recognition.

past and present.

In:

Munich, Oct. 1982,

I.E.B.B. CH 1801-0. 1982. pp. 1152-1169.


Conversano,
World.

J., Diagnostic

expert systems minimise

robot down-time.

Robotics

Sept., pp. 23-27, 1987.

Datacube,

Maxvtdeo

Ph.D. A. Kehoe

family:

1990

image processors.

Datacube Peabody M.A . 1988.

169

Bibliography

Davis. R. Knowledge
Academic

Press.

based systems

H.. A difference

Pattern

Recognition

quality

for automatic

inspection

classification.

technique

X-ray system with fully automated

In: Proceedings

Newbury.

November.

of X-ray

real-time

Elgart.

of casting

parts.

and Image Processing,


M.F. and Richman.

defect detection

and

and image processing

1988.

DeSouza, P. Automatic rib detection in chest radiographs.


Graphics

New York:

Letters. vol. 2. pp. 125-129. 1983.

K. Real-time

symposium.

intelligence.

1982.

Decker.

Demandt,

in artificial

Computer

Vision,

vol. 23(2), pp. 129-161. 1983.

R.H.. Real-time

digital

techniques

for radiography.

In: Richman. R.H. and Retting, T. eds . N.D.E. of Turbines and Generators:
proceedings of the 1980 Conf. of the E.P.R.I., Washington, Oct. Palo Alto: E.P.R.I.,
1980, pp. 8-81-8-95.
Englemore, R, and Morgan, T., eds., Blackboard
Wesley,

systems.

Wokingham:

Addison-

1988.

Filbert,

D. and others, An application

to digital image processing

control of castings. In: Ollus, M., ed., Digital


applications:

proceedings

image processing

to the quality

in industrial

of the first I.F.A.C. workshop, Espoo, Finland, June,

1986. Oxford: Pergamon Press. 1986, pp. 131-135.


Fox. M.S.. Industrial

applications

of artificial

intelligence.

Robotics.

vol. 2, pp.

301-311, 1986.
Frost. R.A . Introduction

to knowledge

base systems.

London: Collins,

1986.

Fu, K.S. and others. Computer processing of chest X-ray images. In: Preston, K.
and Onoe, M., eds., Digital processing

of biomedical

images. New York: Plenum

Press, 1976, pp. 335-355.


Galambos, I.A. and others, Knowledge
Gevarter,

structures.

W.B., An overview of artificial

Hove: Ablex Publishing,

intelligence

and robotics,

1986.

vol. 1, parts

A, B & C. N.A.S.A., 1983 (N.A.S.A. TM85836).

Hall. E.L. Computer


Press.

1979.

Ph.D.

A. Kehoe

image processing

1990

and recognition.

New York: Academic

170

Bibliography
Halmshaw,

R., Fundamentals

of radiographic

Bracher, D.A., eds . Real-time


applications:

proceedings

radiologic

imaging.

imaging:

of a Symposium,

In: Garratt.

medical

Maryland,

D.A. and

and industrial

May. 1978. Philadelphia:

A.S.T.M. STP 716 ,


pp. 5-21, 1980.
Halmshaw,
Science,

R., Industrial

radiography:

theory

and practice.

London:

Applied

1982.

Hayes-Roth. F., Watennan, D.A. and Lenat, D.B., Building


Reading M.A.: Addison-Wesley.

expert systems.

1983.

Hood. W.G., Polynomial curve fitter. Byte.

June. pp. 155-160. 1987.

Hom, B.K.P., A.I. and the science of image understanding.

In: Dodd. G.G. and

Rossol, L., eds., Computer vision and sensor based robots. New York: Plenum
Press. 1979. pp. 69-77.
Joyce-Loebl,

Image analysis: principles

Joyce-Loeb),

1985.

Kercher,
modern

and practice.

B., The Crystal image processing


industrial

X-ray

applications.

Gateshead. Tyne & Wear:

system applied

to the techniques

Quantel Limited Newbury Berks,

of

1986

(QU 401/86).
Kernighan,

B.W. and Ritchie. D.M., The C programming

Prentice-Hall,

language.

New Jersey:

1978.

Kodak, Radiography

in Modern Industry, 4th. ed. London: Kodak. 1980.

Koshimizu, H. and Yoshida, T., A method for visual inspection of welding by


means of image processing

of X-ray photograph.

Transactions

of the I.E.C.E.

Eng., vol. E66(11). pp. 641-648. 1983.


Kriz, 1. ed . Knowledge
Horwood.

based expert systems in industry.

Chichester:

Ellis

1987.

Landy, M.S. and others. HIPS: a UNIX based image processing system. Computer
Vision, Graphics and Image Processing,

vol. 25(3), pp. 331-347, 1984.

Matrox, Matrox

brouchure.

Imager-AT:

a technical

Matrox, Quebec. Canada.

1988.

Ph.D.

A. Kehoe 1990

171

Bibliography

Mengers,

P., Real-time

digital

image processing

Garratt, D.A. and Bracher, D.A., eds., Real-time


industrial

applications:

for radiological
radiologic

imaging.

In:

imaging: medical

and

proceedings of a Symposium, Maryland, May, 1978.

Philadelphia: A.S.T.M. STP 716, 1980, pp. 267-276.


Miillenberg,
Review.

D., Real-time

radiology

of critical

engine

components.

Sensor

vol. 4(1), pp. 35-38, 1984.

Nichols,

R.W., Advances

integrity.

in non-destructive

London: Applied Science,

examination

for

structural

1982.

Oliver, D.W. and others, XIM: X-ray inspection module for automatic high speed
inspection

of turbine

In: Review
Plenum

blades

of progress

Press,

and automated

in non-destructive

flaw detection
evaluation.

and classification.

vol. 5(A), New York:

1986.

Panasonic,

CCD camera model WV-CD50: a technical brochure.

Panasonic,

Japan,

Pearson,

1986.

J.J. and others,

Proceedings

National-

Automatic

inspection

of artillery

shell

radiographs.

of the S.P.I.E . vol. 155, pp. 214-221, 1975.

Peli, T. and Malah, D. A study of edge detection algorithms. Computer


Graphics
Pfeiler,

and Image Processing.


M., Image transmission

Grasselli, A., ed., Automatic

Vision.

vol. 20(2). pp. 1-21. 1982.


and image processing

interpretation

in radiology.

and classification

In:

of images. New

York: Academic Press, 1969. pp. 399-415.


Pratt, W., Digital
Quintec,

image processing.

New York: John Wiley, 1975.

Quintec Prolog and FLEX expert system building tool: a technical

brochure.

Quintec, Oxford, 1988.

Ringland, G.A. and Duce, D.A., Approaches

to knowledge

representation.

New

York: John Wiley, 1988.


Roberts, E., Real-time

radiographic

inspection

facility.

N.A.S.A. Ohio, 1977

(NASA TND8529).
Rose, P. and others, Automated evaluation
processing.
symposium,
Ph.D.

In: Proceedings
Newbury,

A. Kehoe

1990

of X-ray

November,

of weld radiographs

real-time

by digital image

and image processing

1988.
172

Bibliography
Rosenfeld. A. and Kale. A.C . Digital picture processing.
Academic
Savel,

Press.

1982.

A.M . Li, C.C. and Hoy. R.J . Computer-aided

pneumoconiosis

opacities

in chest X-rays. I.E.E.E.

Analysis

and Machine Intelligence.

Scudder.

H.J., An introduction

the I.E.E.E..

vols. 1&2. New York:

recognition of small rounded


Transactions

vol. 2(5). pp. 479-482,

to computer-aided

on Pattern

1980.

tomography.

Proceedings

of

vol. 66(6). pp. 627-637. 1978.

Shubin. H. and others. IDT: an intelligent diagnostic tool. In: Proceedings


the National Con! on Artificial

Intelligence.

J. Boundary detection

Sklansky,

Los Altos. Aug..

in medical

Onoe, M. eds . Digital processing

radiographs.

of biomedical

of

1983.

In: Preston.

K. and

images. New York: Plenum

Press. 1976. pp. 309-321.


Skramstad.
processing
Analysis.

T.. Towards
methods.

automatic

radiographic

In: Proceedings

Scandinavia.

inspection

using

of the l st, Scandinavian

image

Conf. Image

Jan . 1980. pp 302-307.

Strecker. H. A local feature method for the detection of flaws in automated Xray inspection of castings. Signal Processing.
Sun Microsystems,
Microsystems,
Throupe,

vol. 5. pp. 423-431. 1983.

SUN 3 architecture: a SUN technical report. SUN

Mountain View C.A.. 1986.

D. Image processing

- beyond noise reduction.

In: Proceedings

of

x-

ray
real-time

and image processing

Ting, C.H . Processing

symposium,

of real-time

Newbury.

radiographic

November.

1988.

images. Proceedings

of the

S.P.I.E . vol. 241, pp. 70-74, 1980.


Turner.

A.F . Kruger, R.P. and Thompson.

of chest radiographs

for pneumoconiosis.

W.B., Automated
Investigative

computer

Radiology.

screening
vol. II, pp.

258-266, 1976.
Volk, W. Applied statistics for engineers. New York: McGraw-Hill,
Walker, A. and others, Knowledge
Wesley,

systems

and prolog.

Wokingham:

1958.
Addison-

1988.

Ph.D. A. Kehoe

1990

173

Bibliography

Walters, l.R. and Nielson, N.R., Crafting

knowledge

based systems:

Expert

systems made easy. New York: Wiley, 1988.


Wechsler,
detection
Processing,

Ph.D.

H. and Fu, K.S., Image processing


in chest radiographs.

Computer

algorithms

Vision,

applied to rib boundary

Graphics

and Image

vol. 7, pp. 375-390, 1978.

A. Kehoe

1990

174

APPENDIX A
AUTOMATED RADIOGRAPHIC SYSTEM
FOR 3D DEFECT INSPECTION

Ph.D.

A. Kehoe

1990

Appendix

A Automated

Radiographic

System lor 3D Defect Inspection

AUTOMATED SYSTEM FOR 3D DEFECf INSPECTION

Defects
take

occurring

any orientation.

which

occur

mistaken

proximity.

for a single

to accommodate
precise

and reliable
analysis

or size.

will appear

on 2D attributes

A.I

shape

at close

the component.

their

in the component

as shown

at any position.

in Fig.

or in similar

overlapped

defect.

may appear

3.2. Moreover.

positions

at different

in the radiographic

The current

image

image.

processing

of defects taken from a single radiographic


this problems

shape.

volume

operation

of defects

and fail to determine


and true position

of a fully automated

and may
defects

depths

in

and may be

techniques.
image.

based

are unable

the true number of defects.

in the component.

radiographic

For accurate

inspection

system.

3D

must be performed.

3D ANALYSIS OF DEFECfS

To date little

work has been done on image processing

analysis

of

detection

and 3D analysis of defects in industrial

Pixel

defects.

blocks

techniques

The

method

on a series

following

combines

section

the

outlines

images.

a method

radiographic

use of both

of radiographic

techniques

each

image

for

for 3D
automatic

images. The 3 D -

processing

showing

and IKB

a different

view

of the component. to estimate the volume, shape and 3D position of a defect.

A.1.1

The
skilled

3D Defect Analysis by Pixel Blocks

3D-Pixel

blocks

inspector.

performing

Ph.D. A. Kehoe

1990

technique

is

based

a conventional

upon

the

inspection

manner
cycle,

in

which

the

undertakes

3D

176

Appendix

A Automated

analysis

of defects

images,

each

Radiographic

in the component.

showing

a different

System for 3D Defect Inspection

The method uses a series of radiographic


view

of

the

component,

volume and position of a defect, and to determine

to

estimate

the

when defects regions overlap

in the image.

Imaa;e Processina; for Defect Analysis


The

first

techniques

stage

designed

defect

detection

image

using

technique;
defect

this

a noise

merging

highlights

same

series of 2D local attributes,


in

each

image

processing

of

the

series

detection

contrast

as described

image

defect

defects

analysis.

a defect

in section

Such

processing
The

in the component

and

attributes

technique.

of

and 20

enhancement,

a set of 20

segmentation

all the suspect

methods

determines
and

involves

defect

reduction,

the

operation

method

to perform

operation

using

analysis

of

2.2.

detection

The defect

for each defect


an operation

using

results

in a

describing the shape and 20 position of the defects

capture

cycle these attributes

sequence.

Upon

would be stored

completion

of

into a database,

the

image

accessible

to

the IKB system.

IKB System for Volume of pefect


A defect
region

in the component

of shadow

contrasting

region is effectively
of the defect.
the

image

actual

'[he maximum

approximate
in the

axis,

through

the

dimensions
overall

of height

dimensions

component.

Should
an angle of 900,

the

maximum

In this case the maximum

height

depth

still

dimensional
estimation

attributes

the

of height,

3.2(a).

This

overall

width

component

and

height

be rotated

radiographic

dimensions

in the component,
dimension

of

whilst
height.

about

image

of maximum

width of the region

of the
its

would

width and
approximates

the maximum
These

three

width and depth may be used to determine

an

of the volume of the actual defect in the component.

In the digital
DdOo,

with corresponding

of the actual defect

represents

Fig.

as a

and width of the region in

of

a second

region

the overall

background,

image

of the defect; a silhouette of the 30 shape

show the defect


height.

in the radiographic

with its immediate

a 20 projection

defect

vertical

is represented

radiographic

representing

The maximum
defect

analysis

Ph.D.

A. Kehoe

the digital

image

a defect

approximation

appears

as a region

of the projected

of pixels,

area, Fig. A.I(a).

height, H d max, and width, W d max, of the defect region, given by


in the image processing

1990

stage, is found by summing

the pixels

177

Appendix
in

each

A Automated

ordinate

rectangle

direction.

enclosing

the

Radiographic

These

defect

System for 3D Defect Inspection

dimensions

region,

Fig.

may

be

used

m~

!Hd

max

max

DdgOO

pixel

(a)

In
may

be

defined

a common
the

(b)

image,

of

unchanged

the

in

the

of

defect

image

the

a further
with

Fig. A.l(b).

captured

pixel

sides

at

rectangle

of maximum

The two rectangles

have

-H d m a x- of the defect in the "direction of

component.

as

first,

D d90o,

region,

height,

the

to the

Hdmax,

height,

maximum

rotation

900

at

the

and maximum

side,

axis

captured

surrounding

Ldmax,

depth,

(a) Pixel representation


of defect area in the digital image
0
0
0 , and b at 90 of rotation of the com onent.

a second

a pixel

Ld

!Hd

A.l

form

A.l (a).

.....

Fig.

to

This

component

dimension

is

made

remains

to

rotate

relatively
through

any

angle.
The

pixel

rectangles

which

completely

frame

is a 3D pixel,

occupies
defect.
area

in

the

encloses

the

second

the

thought

defect,

gives

method

by

be

or a pixel

frame

A simple
bounded

may

The

digital

for calculating

a single

pixel

as two

shown

block.

the

of

in Fig.

A.2.

number

of pixel

approximation
the volume

rectangle

volume

in Fig.

Volume

and

Actual Volume

accurate
the

of

of the

project

pixels3

A.S ,where

DdOo . Ldmax

= Dd90o. Wdmax

of a 3D pixel

this

Each

location

blocks

the

frame

the defect

volume

defect

in the

of

the

is to sum the

along

the

length

of

rectangle.

For the defect

For

sides

rectangular

estimate

estimate

is

shaped

defects

Ph.D.

A. Kehoe

very
the

high.

projected

1990

18 pixels3

(A.I)

= 18 pixels3

(A.2)

shaped

of volume,

defect
however,
In

order

areas

the
for

is a pixel block:

11 pixels3

above

operation

irregular

would

give

shaped

objects,

Fig.

same

method

to

to

apply

this

of the

defect

should

be made

into

very

A.I (a),
irregular

equivalent

178

Appendix
is

A Automated

Radiographic

System for 3D Defect Inspection

achieved

maintaining

the

rectangles.

This

rectangles.

Hdmax and modifying the two defect regions to occupy the smallest

rectangular

area:

this

by

may be thought

common

of as rearranging

into the smallest rectangle possible with side Hdmax

side

of the

the layout

pixel

of pixels

Fig A.3(a) and A.3(b). The

result of this operation on the example defect regions is shown in Fig. A.4.
Wd

max

Hd

Fig. A.2

3D pixel block representation

max

of a defect, with a pixel frame enclosing

the whole defect.


For the defect region Dd 00

the equivalent

rectangular

region,

Dd' 00 with

sides Hdmax and W drec is given by:


Dd'Oo = Wdrec . Hdmax

DdOO

(A.3)

W drec = DdOo / Hdmax

(A.4)

Wd

Hd

Dd' o 0

pixel 2

Dd'gOo
(b)

(a)

Fig. A.3

(a) Equivalent

max

rectangular

defect region at 00, and (b)

at 900 rotation

of the com onent.

Ph.D. A. Kehoe

1990

179

Appendix

A Automated

Radiographic

System for 3D Defect Inspection

similarly for a defect region Dd 90. the equivalent

rectangular

region Dd' 900.

with sides Hdmax and Ldrec :


Dd'9(f = Ddrec . Hdmax = Dd900

Ldrec

(A.5)

Dd90 / Hdmax

(A.6)

The volume of the defect is then given by

Volume

Dd'Oo . Ldrec

(A.7)

Dd'9(f . Wdrec

(A.8)

or

For the example defect shown in Fig. AA the volume is calculated as:

DdOo

6 pixels2

Wdrec = 6/3

Hdmax

= 2 pixels

Ldrec

Dd'Oo = 2 . 3 = 6 pixels2
Volume

Dd'900

6 . 2

6/3

2 pixels

2 . 3 = 6 pixels2

12 pixels3

In cases where the value of defect region. DdOo or Dd90o.


Hdmax
value.

then the value of Ldrec


this

estimation

overcomes

the

3 pixels

is not divisible by

or W drec should be taken to the nearest integer

problem

of introducing

significant

error

into

the

of volume.
Wd

ree

pixel

Hd
max

Dd' 0

Fi . A.4

3D

ixel frame enclosin

One major advantage


original

is that defects

which overlap

in the

and analysed individually. As the component


is made to rotate through an angle of 1800 from its original position. a series
Ph.D.

image

of this technique

may be separated

A. Kehoe 1990

180

Appendix

A Automated

of images are captured.


and the 2D attributes
processing

system.

detected

of area and co-ordinate


images

and their 2D attributes


linking

of consecutive

become

separated.

was expected,
intensity

determined

of the sequence

by the image

further

defects

in order

is apparent

to determine

multiple

views

is

when overlapping

when two defects

defect

suffers

illustrated

appear

a reduction

of a component

position

of a defect

in the component

position

of a defect,

relative

determined.

Over

relative

this

to

in

across a

where

defects
only one

in size and overall

A.S, which shows two


overlapping
defects in the original image taken at 00, Fig A.S(a), and a
separation of the defects in a second image taken at 300 rotation, Fig A.S(b).
Using

effect

are

calculated.

and the original


This

position

defects are detected

system would be made to monitor defects

images,

This

value.

System for 3D Defect Inspection

In the first image of the sequence

In subsequent

The IKB defect


series

Radiographic

has one further

of images

reference

point;

advantage,

may be determined.

to a reference

a series

Fig

3D

The 2D centroid

point in the image, may be easily

the

as the

the

position

of

component

a defect
rotates

will

the

change

defect

will

remain in the same plane of rotation but will shift its position along the plane,
as shown in Fig. A.S. By examining
the

captured

shows

two

component

image

sequence

example

defect

the various positions

a positional
positions

and the positional

path

of each defect over

may be built

at different

angles

of

up. Figure
rotation

A.6

of the

path of the defect.

Wd,
___ ......, m~ .............
_
Dd100

Dd

230

0 _..,

----lHd

---l~d~-

3
max

max

-,.-I

I
r

>:

(xctY

ch .....

Wd .._
3max

(a)

-(Xc3Y

(b)

defect regions at 00 rotation of the component, and (b)


se aration of defects at 300 rotation of the corn onent.

Fig. A.S

Overlapping

The motion of a defect along its positional path gives an indication of the 3D
position

of

opposed

the

in

in the component

in the direction

Ph.D.

defect

A. Kehoe

of motion

1990

the

component:

defects

which

are

diametrically

will appear to move in opposite directions.


of an individual

defect

indicates

that

A change

a maximum

181

Appendix
radius

A Automated

of rotation

has been

Radiographic

reached;

this

System for 3D Defect Inspection

is shown

as dimension

x 2 in Fig.

A.6(b). At this point the true 3D position of the defect may be determined from
the 2D position

of the defect. and the angle of rotation

the defect illustrated

of the component;

in Fig. A.6(b) the 3D position would be calculated

for

from an

angle of rotation of 1100 and a centroid position of (X2,Y2).


Wd max

Ddoo~.

Dd

110

~~~~~t~~~l~~~
-

(x ,y)
1 1

::
I

14

1
..

Axis of

Rotation

- - -

- -1- -

: (XZY

X2

- _L .J-\1_)-L - -- - --

I ....
----~-:------

--

I
I

"~I
I-

(a)

Fig. A.6
defect

(b)

Original defect position at 00 rotation of the component. and (b) the


osition alon
ath at 1100 rotation of the com onent.

This approach to volume and 3D position


implemented

into

arithmetic
together.

to

an

IKB

system.

functions.

Rules

may

monitor

when

positional

path

of

defects

arithmetic

functions

would

attributes

across
be

of a defect

be suitable

IKB

applications
problems

based

techniques

and

generated

to

relate

defects

split.

and

to

At

appropriate

several

activated

images.

by

the

rule

multiple

simple
images

determine

system

the

could

in the component.
be made

accuracy

of image
analysis

would give a good estimation

for implementation

system

it is considered
defect

rule

of defects may be easily

to

the
times

calculate

such as volume. or 3D position.

3D position
the

be

overlapping

The 3D-Pixel blocks technique


would

using

analysis

into high

to operate

of estimation

capture

The image

would

and the resultant

of volume and

processing

speed processing

at

an efficient
be acceptable.

image

quality.

techniques
system,

speed.

and

In most

considering

the

For these reasons

that the 3D-Pixel blocks technique would be adopted as the 3D


method

in

future

developments

of

automated

inspection

systems.

Ph.D.

A. Kehoe

1990

182

Appendix
The
and

A Automated

technique

3D

has.

positional

Radiographic

however.

calculations

technique

to

provide

technique

wruld be,

two

main

rely

heavily

a suitable
slow

input

in

System for 3D Defect Inspection

disadvantages.

to

upon

Firstly.

a good

2D defect

the volume

defect

analysis.

detection

Secondly.

operation

due to the amount of image data which has to be processed.


be possible

to reduce

processing

routines.

A.2

this

with experimentation

of image

capture

It may

and image

IKBSYSTEMFOR3DDEFECTINSPEcnON

Following

the determination

component.

as determined

that the operation

of the 3D local attributes

by the

3D defect

of the IKB system

would consist

of a defect

classification

and a final defect evaluation

A.2.1

input

to the classification

suspect

defect

in the component.

system.

The

component
defects.

classification
defect

classification

suspect

classification

existing

would be very

in section 2. This

system,

system

be a description

system.

and

be

section

component

by the defect

required

non-defect

a similar

to

types

strategy

features

analysis

determine

from

the

the

suspect

to that described

6.2; a set of pattern

would determine

of each

of both 2D and 3D local

determined

would

using

and typical

for

classification

defects,

and a

the type of the remainder

of

defects.

The pattern rules and confidence


attributes

inspection

a zoning and grouping

would

attributes,

types,

would be used to classify

confidence

system,

This would consist

operation

This would be achieved

the 2D defect

it is envisaged

system. described

operation

and 3D global

features,

method.

System

The

attributes.

for each defect in the

system, Fig. A.7.

Defect Classification

defect

analysis

for 3D defect

similar to that of the 2D defect inspection

rules

the

of defects

and component

documentation,

experimentation

with

Ph.D. A. Kehoe

1990

factor rules would contain both 2D and 3D

the

design
classification

features.
data,

These
expert

could

be obtained

inspectors.

and

from
by

results.

183

Appendix

A.2.2

Radiographic

System for 3D Defecr Inspection

Defect Zoning and Grouping System

The defect
set

A Automated

of

zoning

3D

relationships

global

and grouping
attributes

between

system

would

the

classified

for

defects,

and between

be required
defects,

defects

to determine
describing

and the component.

a
the

A set

of zoning rules would be used to check the 3D position of a defect against the
3D inspection

zones

of the component.

A defect

found to be contained

in a

particular zone would be linked to the zone by a 3D relation.


Following

this stage of operation

on their similarity
the component.
would
of

For each

be determined

defect

members,

members,

defect

describing
the

final

evaluation

stage

operation,

both the local


assurance

the 20

defect

would

evaluate

evaluation
contain

rules

inspection

additional

information

and

IKB defect
3D defect
for the

system,

individual

to determine

component

set of 3D global

the characteristics

of the group:

minimum

inspection

Fig. A.7. This operation

standards
each

a further

attributes

within

attributes

the number

of

the

defect

System

of the

and global

quality

group

and 3D position

extent of the group.

Defect Evaluation

The

would be placed into groups based

type, 3D attributes,

maximum

and the volumetric

A.2.3

defect

of classification

defects

data to compare

described

describing

cycle.

group

acceptability.

and
the

quality
3D

be a defect

the defects

against

In a similar

the

manner

to

in section 6.4, the defect evaluation

and each

information

would

would be required to make use of

inspection

their

system

of defects
The system

assurance
attributes

using
would

knowledge
of

the

a set

of

similarly
but

with

component

and

types.

Ph.D. A. Kehoe

1990

184

Appendix

A.3

A Automated

Radiographic

System for 3D Defect Inspection

PROPOSED SYS1EM DESIGN

The operation

of the proposed

automated

system

for 3D defect

would be very similar to that of the 2D defect inspection


section 2. The proposed

system design is illustrated

that such a 3D defect inspection

system

digital

for defect

in

in Fig. A.7. It is intended

of capturing

image data at video-rates.

radiographic

images in real-

and have a high speed IKB

inspection.

X-Ray
Image

Multiple
Images

Multiple 20
defect attributes

20 Defect
Desc

Digital
Images

Image
I- r~r- Database

Real-time
Xray

system. described

system should be capable of on-line operation.

As such. the system must be capable


time. processing

inspection

Defect
Detection

Defect
Analysis

!-~

Defect
Database

Suspect
defects

... f-

.___

ImageCapture

Image..
Storage

Defect Data..
Storage

Image Processing
System

,.
NOise

Non
Component
3D Defect
Description

.,.

...

Defect
Linking

Component
Acceptability

Defect
Classification

Multiple 20
Defect
Descriptions

Zoning &
Grouping

Defect
types

J
J

t~

Defect
Evaluation

II

Defect
groups

IKB System

Non-defects Unknown
feature

Fi . A.7
For 3D defect
-

inspection.

component

rotating

succession.

It is essential.

Ph.D. A. Kehoe

1990

through

a sequence
a

of images

predetermined

therefore.

angle.

are required.
and

showing

captured

that an image intensifier

in

the
rapid

- TV system

is

185

Appendix

A Automated

Radiographic

System for 3D Defect Inspection

used. which is capable of image capture in real-time.


also be required
been digitized

to store

each successive

by the image

processing

An image database

image of the sequence


system.

This

is shown

would

once it has
as the second

step of the operation in Fig. A.7.


The

current

image

been designed

processing

with consideration

processes.

using

mask

implemented

into

specialized

at near

video

rates

operation.

IKB

processing

system:

of

for on-line

and

image
are

available.

The

that a temporary

to

is heavily

to the

implement

into

have

These are area


may

and made

due

dependant

4.

which

hardware

asynchronous

storage

section

techniques.

However.

difficult

in

image processing.

processing

1988).

the process

described

convolution

(Datacube,

techniques

information

requires

techniques.

to operate

nature
an

be

of their

on-line

data

on the amount and quality

nature

of

these

is used for the results

two

of defect

systems

analysis.

defect data base placed between the two systems would prevent the IKB system
from slowing the inspection

FUIlJRE WORK

A.4

Future

work required

an image

processing

image capture
current
when

image

capture.

would

with

form

experiments

image capture
processing

however.
Further

in

4.1

and defect

an image

the basis

and. although

and

4.2.

analysis

for

an on-line

that

radiographic

may

a review
based on

also

techniques.

intensifier-TV

of

of both multiple

This may necessitate

of the system.

section

and development

capable

aspects

detection

incorporated

analysis.

data processing.

outlined
defect

the design

system

require
Such

for real-time

automated

radiographic

system.

Previous
image

for 3D defect

implementation

to the

system.

real-time

system

techniques

enhancements

inspection

in this area includes

and fast. reliable

of the hardware
the

cycle. Fig. A.7.

pose

have
systems

techniques

a significant

work is required
operating

the design

and development

1990

do not seriously
developed.
problem

to evaluate

techniques

Ph.D. A. Kehoe

shown

with

multiple

to

of an image

image

processing

the performance
images.

produced

affect the performance

Multiple
both

images

and

data

of the
does.
storage.

of the image processing

An integral
database

capture

by

part

system

of this

work

is

for the storage

of

186

Appendix
image

capture

storage

A Automated

sequences.

of defect

analysis

The operation
similar

to that

required.

and

a defect

of the IKB system


of the 2D defect

2D defect descriptions
work

operation
linking

in

database

for 3D defect

the

temporary

Additional

taken from the image capture


involves

to undertake

this

task.

arithmetic

the

Such

a single 3D description

sequence.

development

a system

functions

for

of

would

data

of the defect.

would be very
operations

are

of a defect from a series of


The majority of
a defect

consist

linking

of a series

manipulation.

operate on the multiple sets of 2D defect attributes


producing

for

inspection

system.

the 3D description

area

and

attribute

inspection

this

rules

System for 3D Defect Inspection

results.

however. to determine

further

Radiographic

This

would

held in the defect database.

including

the volume

and 3D

shape of the defect.


A small
operation
similar

amount

of the IKB system.


classification

operating

and

knowledge

base.

inspection

system

component
operate

The

These

defect

would

required

classification
system.

would,

containing

however,

attributes
addition

of

zoning

and

grouping

system

require

similar

base,

and

a 3D

grouping

be very

to be capable
therefore

a 2D

enhancements

defect

would

and would,

the

remammg

both pattern and

have

with

also

on the

system

The system would have to be provided

knowledge

and

require

3D

of the

of

defect

2D defect

to deal

with

3D

with a 2D and 3D
knowledge

base

to

correctly.

At the

present

radiographic

time

component,

to

evaluation

specify

the

The
the

1990

3D
exact

enhancement

of

of quality

on 2D defect
defect

the

assurance
attributes

inspection

quality

to the inspection

rules to accommodate

A. Kehoe

majority

are based

image.

not restricted

include

the great

inspection

radiographic

manufacturers

Ph.D.

rules.

enhancement

defect descriptions.

would

is also

The defect

with both 2D and 3D defect

modification

single

work

to that of the 2D defect inspection

confidence

for

of development

system

assurance

process.

Further

inspection

requirements
taken
would

requirements

from

enable
for

work in this area

requirements

and

defect

3D defect descriptions.

187

APPENDIX B
EXPERIMENT AL RESULTS OF
RADIOGRAPHIC INSPECTION

Ph.D.

A. Kehoe

1990

Appendix

B Experimental

of Radiographic

Inspection

EXPERIMENTAL RESULTS OF RADIOGRAPHIC INSPECTION

The

following

conventional
automated
results

section

inspection,

contains

as

inspection,

as

are presented

carried
carried

in Tables

images used for experimentation,


the type,

number

and location
inspectors,

of

tables

the

defects.

demonstration

The

complete

out
out

by
by

set

the
the

four

as described

also

of
skilled

for

both

inspectors,

and

system.

of the eight

These

component

in section 7.3. The tables include

detected

in each

along with the evaluation


show

results

demonstration

B.1 to B.8 for each


of defects

images by the skilled

B.l

Results

the

same

results

of the component
of the acceptability
produced

by

the

system.

RESULTS TABLES

In the following
4. The defects

tables the skilled inspectors

identified

by the inspectors,

are identified

and by the automated

shown as a single entry in the column corresponding


which they were located.
the notation

Multiple

defects

by numbers
system,

to the inspection

1 to
are

zone in

of a common type are indicated

by

n x Type.

Ph.D. A. Kehoe

1990

189

Appendix

Table B.1

B Experimental

Results

0/ Radiographic

Component Image No: R874H

Inspector
1
2

Zone A

Zone B

Zone C
2 x Cavity
Porosity

Porosity
Porosity
Cavity
Porosity
Porosity

2 x Cavity
Porosity
Porosity

4
Demonstration
System

Cavity
4 x Porosity
16 x Cavity
4 x Porosity
2 x Cavity

Table B.2

Accept
y
Y
Y
Y
y
Y
Y
y
Y
Y
y
Y
y
y
y

Component Image No: R875H

Inspector
1
2
3

Zone A

Zone B

Zone C

Porosity
Cavity

4
Demonstration
System

Table B.3

Inspection

Accept
y
y
Y
y
y
Y
y
Y

Porosity
3 x Cavity
2 x Porosity

Component Image No: R876H

Inspector
1

Zone A
Cavity

Zone B

Zone C

Porosity
2

Porosity

Y
Y

Porosity

N
y
y

Cavity
Porosity

Porosity

Cavity
Porosity

Ph.D. A. Kehoe 1990

y
Y

Y
Y

Demonstration
System

Accept

Porosity
9 x Cavity
3 x Porosity

N
Y

190

Appendix

Table B.4

B Experimental

Results

of

Radiographic

Component Image No: R877H

Inspector

Zone A

Zone B

Accept
y
y
y

Zone C

2
3

Y
y
Y

3 x Cavity

Demonstration
System

Table B.5

Cavity
3 x Porositv

Component Image No: R878H


Zone A

Inspector
1

Zone B
Porosity

Zone C

Accept
y

Cavity
Porosity
Piping cavity
Cavity

2
3
4
Demonstration
System

Cavity
3 x Porosity

y
Y

N
Y
Y
y
Y
y
y

14 x Cavity
3 x Porosity

Cavity

Table B.6

Inspection

Component Image No: R879H

Inspector

Zone A

Zone B
Porosity

Accept

Zone C
Porosity
Piping cavity
Piping cavity
Cavity
Porosity
Piping cavity
Piping cavity

4
Demonstration
System

N
N

N
Cavity
Piping

1990

N
Y

y
y

10 x Cavity
Porosity
30 x Cavity
9 x Porosity

Ph.D. A. Kehoe

N
y

Porosity

Y
Y

y
y

cavitv

191

You might also like