HCRL

Technical

Report

No

Wed

Jul

Further

developments

in

Qualitative

Graphical

Reasoning

Anthony

Willoughby

HCRL

Technical

Report

No.

September

Abstract

A

previous

report

described

a

computer

program

called

GRASP

which

performs

qualitative

graphical

reasoning

by

means

of

cartesian

coordinate

sketch

graphs

This

report

extends

the

ideas

advanced

and

gives

more

details

on

the

workings

of

the

implemented

program

An

application

program

called

QED

is

also

described

QED

interrogates

a

database

to

find

items

of

data

which

match

or

nearly

match

the

target

set

of

conditions

For

imperfectly

matching

data

items

QED

uses

GRASP

to

attempt

to

find

graphs

which

describe

the

qualitative

effects

of

the

mismatch

in

conditions

HCRL

Technical

Report

No

Wed

Jul

Please

note

that

from

October

the

author

can

be

contacted

at

Harlequin

Ltd

Barrington

Hall

Barrington

Cambridge

U

K.

HCRL

Technical

Report

No

Wed

Jul

Further

developments

in

Qualitative

Graphical

Reasoning

Anthony

Willoughby

Introduction

A

previous

report

-LSB-

-RSB-

described

a

computer

program

called

GRASP

which

performed

qualitative

reasoning

using

cartesian

coordinate

sketch

graphs

The

work

has

progressed

significantly

since

that

report

was

written

and

the

current

document

is

intended

to

bring

the

description

of

the

system

up

to

date

The

background

and

motivation

of

the

research

were

covered

in

the

previous

report

and

will

not

be

repeated

in

detail

here

The

components

of

the

system

however

have

changed

considerably

and

so

will

be

described

from

the

beginning

It

is

assumed

that

the

qualitative

relationships

between

important

variables

in

a

domain

are

understood

by

expert

practitioners

and

can

be

represented

by

sketching

curves

of

functional

variations

on

cartesian

coordinate

axes

This

is

a

common

situation

in

many

branches

of

science

and

engineering

A

typical

example

is

shown

in

Fig

which

depicts

the

relationship

between

temperature

and

fracture

toughness

for

a

ferritic

steel

and

the

effect

of

increasing

the

testpiece

thickness

The

following

features

of

sketch

graphs

are

worthy

of

note

Although

the

graph

is

commonly

considered

to

describe

Y

as

a

function

of

X

it

can

also

be

thought

of

as

defining

a

constraint

between

the

two

parameters

X

can

just

as

easily

be

read

off

for

a

given

value

of

Y.

The

graph

not

only

shows

the

relationship

between

the

Y-axis

parameter

and

the

X-axis

parameter

but

that

also

the

effect

on

the

relationship

of

varying

other

parameters

can

be

depicted

by

sketching

additional

lines

on

the

graph

These

are

termed

perturbations

-LRB-

in

a

third

parameter

Z

-RRB-

in

this

report

Thickness

in

Fig

is

an

example

of

such

a

perturbation

The

relationships

depicted

are

mainly

qualitative

but

some

quantitative

information

may

also

be

indicated

on

the

graph

This

is

generally

insufficient

to

describe

completely

the

relationships

depicted

Although

the

lines

in

Fig

show

monotonic

relationships

between

X

and

Y

other

examples

-LRB-

see

-LSB-

-RSB-

-RRB-

may

be

non-monotonic

so

that

the

program

must

be

able

to

handle

maxima

and

minima

The

effect

of

Z

perturbations

on

the

X-Y

relationship

should

however

be

monotonic

to

avoid

confusion

An

example

of

an

application

for

GRASP

namely

the

infering

of

likely

values

for

variables

on

the

basis

of

imperfectly

matching

data

stored

in

a

data

base

has

been

added

This

is

described

in

section

HCRL

Technical

Report

No

Wed

Jul

ToughnessCTOD

mmTemperature

deg

to

Fig

The

variation

of

fracture

toughness

with

temperature

for

a

ferritic

steel

showing

the

effect

of

altering

the

testpiece

dimensions

HCRL

Technical

Report

No

Wed

Jul

Overview

of

GRASP

GRASP

is

a

computer

program

which

uses

knowledge

of

sketch

graphs

to

deduce

the

probable

changes

in

one

variable

when

another

is

altered

GRASP

operates

in

one

of

two

modes

known

as

Input

Mode

and

Consultation

Mode

Their

characteristics

are

described

below

Input

Mode

The

Input

mode

is

used

to

edit

existing

graphs

and

to

define

new

ones

In

this

mode

the

user

is

assumed

to

be

an

expert

in

some

domain

of

interest

who

wishes

to

specify

relationships

between

important

parameters

in

a

graphical

manner

The

user

is

unlikely

to

be

an

expert

in

both

the

chosen

domain

and

in

programming

and

so

a

graphical

interface

has

been

designed

to

facilitate

the

definition

of

graphs

using

the

mouse

On

entering

the

input

mode

the

user

is

presented

with

a

screen

such

as

shown

in

Fig

from

which

information

can

be

added

to

pre-existing

graphs

or

new

graphs

can

be

defined

If

the

new

graph

option

is

selected

the

user

is

prompted

for

a

title

and

caption

and

the

parameter

-LRB-

or

variable

-RRB-

desired

on

each

axis

Pre-defined

parameters

can

be

used

or

new

ones

specified

The

user

then

sketches

the

form

of

the

reference

line

by

placing

points

at

suitable

positions

on

the

graph

A

line

joining

the

points

is

drawn

interactively

using

a

cubic-spline

curve-fitting

technique

In

order

to

simplify

the

task

of

obtaining

the

desired

shape

four

types

of

point

are

available

depending

on

whether

the

slope

of

the

line

at

the

point

should

be

unconstrained

or

constrained

to

be

horizontal

or

vertical

-LRB-

up

or

down

-RRB-

The

xcoordinates

of

the

points

should

increase

along

the

line

consistent

with

the

fact

that

the

line

should

represent

Y

as

a

function

of

X.

Non-functional

relationships

i.e.

multiple

values

of

Y

for

a

single

value

of

X

are

not

covered

in

this

implementation

The

program

does

not

currently

check

that

the

x-coordinates

are

monotonically

increasing

along

the

line

but

errors

and

inconsistencies

will

arise

if

this

condition

is

violated

When

the

last

point

on

the

reference

line

has

been

placed

the

user

is

asked

to

define

a

series

of

consecutive

contiguous

regions

along

it

These

regions

are

intended

to

represent

physically

meaningful

and

distinguishable

portions

of

the

line

The

lower

shelf

transition

regions

and

upper

shelf

regions

in

Fig

fall

into

this

category

Each

region

must

start

and

end

at

a

point

on

the

line

may

not

overlap

with

any

other

and

may

span

an

arbitrary

number

of

points

The

set

of

regions

must

completely

cover

the

line

from

start

to

finish

Regions

may

span

maxima

and

minima

although

more

precise

inferences

will

be

drawn

during

the

consultation

phase

if

critical

points

define

the

end

of

one

region

and

the

start

of

the

next

After

placing

the

regions

on

the

reference

line

the

user

is

invited

to

define

perturbed

lines

each

of

which

represents

the

effect

of

a

variation

-LRB-

or

perturbation

-RRB-

in

a

third

parameter

Z.

For

each

new

Z

parameter

on

a

graph

the

user

must

first

give

the

range

of

that

parameter

-LRB-

Z-min

and

Z-max

-RRB-

which

is

valid

for

the

reference

line

The

magnitude

of

the

Z

perturbation

for

the

new

line

can

then

be

represented

either

as

a

new

range

-LRB-

Z-min

and

Z-max

-RRB-

or

as

the

sign

-LRB-

or

-RRB-

and

optional

qualitative

magnitude

-LRB-

an

integer

-RRB-

of

the

perturbation

with

respect

to

the

HCRL

Technical

Report

No

Wed

Jul

reference

line

The

latter

is

only

used

to

distinguish

between

sets

of

perturbed

lines

having

the

same

Z

parameter

and

sign

of

perturbation

where

Z

ranges

have

not

been

defined

After

this

the

perturbed

HCRL

Technical

Report

No

Wed

Jul

Fig

The

appearance

of

the

screen

when

in

Input

Mode

HCRL

Technical

Report

No

Wed

Jul

Fig

The

error

bars

on

the

points

indicate

that

numerical

ranges

have

been

defined

at

these

locations

HCRL

Technical

Report

No

Wed

Jul

Fig

The

dashed

lines

and

arrows

indicate

that

X

and

Y

constraints

have

been

defined

between

the

indicated

points

HCRL

Technical

Report

No

Wed

Jul

line

is

sketched

in

the

same

manner

as

was

used

for

the

reference

line

Currently

regions

are

not

defined

for

perturbed

lines

although

to

do

so

would

increase

the

flexibility

of

the

consultation

at

the

expense

of

the

time

taken

over

the

graph

input

procedure

Finally

the

user

can

add

quantitative

data

to

the

graph

in

two

ways

Firstly

absolute

values

can

be

represented

by

annotating

points

with

values

of

the

X

and

Y

parameters

expressible

as

ranges

-LRB-

X-min

X-max

Y-min

and

Y-max

-RRB-

Some

or

all

of

these

values

can

be

defined

for

as

many

points

as

desired

If

a

value

for

a

point

is

known

exactly

the

min

and

max

values

should

be

identical

Secondly

relative

values

can

be

represented

by

defining

numerical

constraints

between

pairs

of

points

again

expressible

as

maximum

and

minimum

differences

between

the

X

or

Y

values

It

may

be

known

for

instance

that

one

point

on

the

graph

always

lies

above

another

and

this

can

be

expressed

by

defining

a

directional

constraint

from

the

lower

to

the

higher

point

with

a

relative

Y-min

of

zero

The

sketch

of

the

graph

indicates

the

cases

where

absolute

values

have

been

attached

to

points

by

drawing

an

error

bar

adjacent

to

the

point

If

an

X-min

value

is

defined

a

bar

is

drawn

to

the

left

of

the

point

if

a

Y-max

value

exists

it

is

drawn

above

etc.

-LRB-

see

Fig

-RRB-

Constraints

are

indicated

by

drawing

horizontal

or

vertical

arrows

outside

the

graph

-LRB-

for

constraints

on

X

and

Y

values

respectively

-RRB-

connected

to

the

appropriate

points

by

dashed

lines

-LRB-

see

Fig

-RRB-

Note

that

the

error

bars

and

constraints

are

not

drawn

immediately

they

are

defined

but

will

appear

if

the

Redraw

command

is

issued

Consultation

Mode

The

consultation

mode

is

used

to

answer

queries

about

specific

graphs

It

is

not

anticipated

that

this

will

be

of

great

use

in

an

application

since

in

most

cases

a

user

wishing

to

find

out

about

specific

relationships

in

some

part

of

the

graph

will

find

it

easier

to

inspect

the

graph

visually

It

has

been

provided

so

that

users

can

examine

the

workings

of

the

consultation

process

and

assess

the

accuracy

and

relevance

of

the

answers

produced

The

interface

to

the

Consultation

Mode

-LRB-

Fig

-RRB-

looks

similar

to

that

of

the

Input

Mode

except

that

the

available

commands

are

different

Graphs

can

not

be

defined

or

modified

but

the

effect

on

one

parameter

of

varying

another

can

be

examined

The

following

commands

should

be

of

greatest

interest

dY-from-dX

determines

the

qualitative

effect

on

the

Y

parameter

of

increasing

or

decreasing

the

X

parameter

using

the

reference

line

and

starting

at

a

specified

region

on

the

graph

The

result

is

expressed

as

a

list

of

variations

one

for

each

of

the

regions

encountered

starting

with

the

current

region

The

variation

is

expressed

as

a

combination

of

the

symbols

-LRB-

for

increased

-RRB-

-LRB-

for

decreased

-RRB-

and

or

for

unknown

For

instance

the

list

-LRB-

-LRB-

-RRB-

-LRB-

-RRB-

-RRB-

indicates

that

starting

with

the

current

region

and

moving

along

the

line

in

the

positive

or

negative

X-direction

-LRB-

whichever

was

specified

-RRB-

Y

increases

in

the

current

and

next

region

In

the

third

region

the

variation

is

initially

but

then

becomes

unknown

-LRB-

corresponding

to

a

change

in

the

sign

of

the

slope

of

the

line

-RRB-

and

in

the

fourth

region

the

reverse

occurs

In

the

fifth

region

the

variation

is

again

deduced

to

be

positive

The

line

drawn

in

Fig

would

give

this

type

of

result

HCRL

Technical

Report

No

Wed

Jul

Fig

The

appearance

of

the

screen

when

in

Consult

Mode

HCRL

Technical

Report

No

Wed

Jul

Fig

Starting

in

the

region

between

the

first

two

points

dY-from-dX

gives

-LRB-

-LRB-

-RRB-

-LRB-

-RRB-

-RRB-

for

increasing

X

if

the

last

point

can

be

deduced

to

be

above

the

third

ABC

Fig

Starting

in

the

first

region

dX-from-dY

for

Y

increasing

gives

-LRB-

-LRB-

-RRB-

-LRB-

-RRB-

-RRB-

since

the

portion

ABC

is

unreachable

HCRL

Technical

Report

No

Wed

Jul

dX-from-dY

This

is

the

complement

of

the

previous

command

in

that

the

variation

of

X

for

an

increase

or

decrease

in

Y

is

deduced

region

by

region

Since

X

is

not

necessarily

a

function

of

Y

there

can

be

multiple

values

of

X

for

a

given

Y

and

a

consequence

of

this

is

that

some

parts

of

the

graph

are

unreachable

from

some

other

parts

given

a

simple

increase

or

decrease

in

Y

This

is

illustrated

in

Fig

dY-from-dZ

This

determines

the

effect

on

Y

of

moving

from

one

line

to

another

line

on

the

graph

at

a

constant

value

of

X

The

relevant

lines

are

selected

by

choosing

the

desired

perturbation

In

principle

any

two

lines

on

the

graph

could

be

compared

provided

that

if

they

are

both

perturbed

lines

they

represent

different

magnitudes

of

the

same

perturbation

parameter

In

practice

however

because

regions

and

curves

-LRB-

see

later

-RRB-

are

not

currently

defined

for

perturbed

lines

it

is

necessary

that

one

of

the

two

lines

being

compared

must

be

the

reference

line

The

program

infers

the

effect

of

say

an

increase

in

Z

when

only

lines

for

decreasing

Z

are

defined

by

automatically

swapping

the

roles

of

the

reference

and

perturbed

lines

The

result

is

given

as

either

-LRB-

Y

increases

-RRB-

-LRB-

Y

decreases

-RRB-

or

a

combination

of

and

The

list

-LRB-

-RRB-

for

instance

signifies

that

for

the

region

selected

at

smaller

values

of

X

Y

is

increased

by

the

perturbation

and

at

larger

values

it

is

decreased

In

between

the

effect

is

zero

corresponding

to

an

intersection

between

the

reference

and

perturbed

lines

within

the

selected

region

This

situation

is

depicted

in

Fig

Reference

linePerturbed

line

Fig

The

Y

position

of

the

perturbed

line

relative

to

the

reference

line

is

to

the

left

of

the

intersection

at

the

intersection

and

to

the

right

dX-from-dZ

This

command

deduces

the

effect

on

X

of

changing

Z

at

constant

Y

similar

to

the

previous

command

Region

from

X

Region

from

Y

These

commands

deduce

all

the

likely

regions

which

are

compatible

with

a

given

numerical

value

of

X

or

Y

using

the

reference

line

They

use

the

numerical

annotations

attached

to

points

on

the

graph

If

no

numerical

data

have

been

defined

all

regions

are

returned

If

the

user

attempts

to

HCRL

Technical

Report

No

Wed

Jul

input

a

value

which

is

outside

the

numerical

values

of

the

extreme

points

on

the

graph

an

error

is

signalled

Representation

of

Quantities

It

is

important

to

recognise

that

there

are

two

distinct

sets

of

scales

of

values

in

a

sketch

graph

One

set

is

that

implied

by

the

x

and

y

coordinates

of

features

-LRB-

denoted

by

lower

case

letters

-RRB-

in

other

words

the

way

that

the

graph

has

been

drawn

The

other

set

is

determined

by

the

actual

numerical

values

of

the

X

and

Y

parameters

at

these

features

-LRB-

denoted

by

upper

case

letters

-RRB-

In

a

graph

which

has

been

drawn

perfectly

to

scale

there

is

a

linear

relationship

between

x

coordinates

and

X

values

and

between

y

coordinates

and

Y

values

Sketch

graphs

on

the

other

hand

are

often

drawn

with

little

regard

for

accuracy

of

scaling

and

in

some

cases

the

scales

may

be

deliberately

distorted

in

order

to

render

some

important

feature

more

obvious

In

the

interpretation

of

sketch

graphs

described

here

the

aim

is

to

infer

useful

information

about

X

or

Y

values

from

the

displacement

of

features

or

from

the

slope

or

curvature

of

lines

in

other

words

from

the

x

and

y

coordinates

of

points

on

the

graph

In

order

to

do

this

some

relationship

between

coordinates

and

numerical

values

must

be

assumed

The

following

rules

summarise

the

assumptions

made

here

X

values

along

a

line

are

monotonically

increasing

-LRB-

Since

Y

must

be

a

function

of

X

there

can

only

be

a

single

Y

value

for

any

X.

-RRB-

For

any

section

of

a

line

which

has

a

uniform

sign

of

slope

-LRB-

or

-RRB-

Y

along

the

section

increases

or

decreases

with

X

correspondingly

For

any

section

which

has

a

uniform

sign

of

curvature

-LRB-

or

-RRB-

dY/dX

increases

or

decreases

along

the

line

accordingly

A

separation

between

two

distinct

lines

on

a

graph

due

to

a

perturbation

is

taken

to

imply

a

corresponding

separation

in

the

X

and

Y

values

over

the

same

region

An

intersection

between

two

lines

implies

equality

in

X

and

Y

values

at

the

point

of

the

intersection

-LRB-

although

it

will

not

in

general

be

possible

to

say

precisely

what

those

values

are

-RRB-

These

rules

amount

to

the

assumption

that

the

graph

is

qualitatively

accurate

over

short

ranges

as

denoted

by

sections

of

uniform

qualitative

slope

or

curvature

but

can

not

be

relied

upon

over

longer

ranges

For

instance

in

Fig

using

the

second

rule

point

B

is

deduced

to

have

a

higher

Y

value

than

point

A

point

C

is

deduced

to

have

a

higher

Y

value

than

point

B

and

point

D

is

deduced

to

have

a

lower

Y

value

than

point

C

The

relationships

between

the

Y

value

of

point

D

and

those

of

points

A

and

B

is

unknown

however

even

though

the

line

has

been

drawn

so

that

the

y

coordinate

of

D

lies

between

those

of

A

and

B.

Applying

the

third

rule

to

Fig

means

that

the

Y

value

of

point

C

is

deduced

to

be

greater

than

the

value

found

by

extrapolation

from

points

A

and

B

In

Fig

the

Y

of

B

is

deduced

to

be

lower

than

the

value

obtained

by

interpolation

between

A

and

C.

Rule

also

implies

that

the

Y

of

B

is

greater

than

that

of

A.

-LSB-

A

extension

to

the

current

scheme

could

be

to

assume

an

approximate

mapping

between

coordinates

and

values

throughout

the

graph

with

an

error

e

to

account

for

HCRL

Technical

Report

No

Wed

Jul

inaccurate

drawing

Then

instead

of

the

relationship

Y

my

c

which

would

apply

for

an

exact

mapping

one

could

use

Y

my

c

e

The

value

of

e

could

be

set

by

the

expert

depending

on

how

faithfully

he

feels

the

graph

has

been

drawn

-RSB-

HCRL

Technical

Report

No

Wed

Jul

ABCDYA

YB

YC

YD

YC

But

notYA

YD

YD

YB

a

-RRB-

b

-RRB-

ABCC

YC

YC

ABCB

YA

YB

YB

c

-RRB-

Fig

Relationships

between

the

Y

values

of

points

which

can

be

inferred

in

the

absence

of

more

specific

numerical

data

HCRL

Technical

Report

No

Wed

Jul

In

qualitative

reasoning

it

is

necessary

to

assign

quantity

spaces

to

the

various

quantities

being

reasoned

about

Forbus

-LSB-

-RSB-

and

de

Kleer

-LSB-

-RSB-

use

the

symbols

and

to

denote

positive

zero

and

negative

values

of

both

magnitudes

and

rates

of

change

Kuipers

-LSB-

-RSB-

extends

this

scheme

for

magnitudes

to

include

an

ordered

sequence

of

symbols

For

instance

the

quantity

space

-LRB-

a

b

c

d

e

f

g

h

-RRB-

implies

that

a

b

c

d

e

f

g

The

approach

taken

here

is

somewhat

different

mainly

because

of

the

necessity

of

incorporating

quantitative

values

of

parameters

Three

types

of

quantity

are

considered

namely

magnitudes

first

derivatives

-LRB-

slopes

-RRB-

and

second

derivatives

-LRB-

curvatures

-RRB-

as

described

below

Magnitudes

There

is

no

explicit

representation

of

qualitative

magnitudes

Relative

magnitudes

can

be

inferred

in

some

cases

using

rules

and

from

the

previous

section

It

was

decided

to

adopt

this

course

because

the

division

of

a

quantity

space

into

absolute

positive

and

negative

parts

has

no

physical

significance

for

some

variables

-LRB-

such

as

temperature

on

the

celsius

or

fahrenheit

scales

-RRB-

Also

in

many

engineering

domains

it

is

insufficient

to

use

such

a

simple

division

The

magnitudes

of

quantities

if

they

are

known

at

all

are

likely

to

be

known

with

much

greater

precision

which

is

better

expressed

by

numerical

ranges

-LRB-

see

below

-RRB-

An

apparent

exception

is

the

magnitudes

of

Z

perturbations

which

apply

to

additional

lines

on

the

graph

These

can

be

expressed

as

a

sign

-LRB-

or

-RRB-

and

an

optional

qualitatitive

magnitude

which

is

an

integer

higher

numbers

signifying

greater

magnitudes

of

perturbation

-LRB-

The

latter

are

used

to

distinguish

between

perturbed

lines

on

a

graph

all

of

which

have

the

same

sign

of

Z

perturbation

-RRB-

In

fact

these

Z

perturbations

are

not

absolute

magnitudes

but

variations

in

the

Z

parameter

with

respect

to

the

value

of

Z

for

the

reference

line

Absolute

magnitudes

of

variables

can

be

expressed

by

attaching

ranges

of

possible

values

to

points

-LRB-

Xmin

Xmax

Ymin

Ymax

-RRB-

Not

all

points

need

be

thus

annotated

and

for

those

that

are

the

complete

set

of

ranges

need

not

be

specified

For

instance

if

a

point

is

known

to

have

a

positive

Y

value

then

Ymin

should

be

set

to

zero

If

the

X

value

of

a

point

is

known

to

be

some

value

v

exactly

then

Xmin

and

Xmax

should

both

be

set

to

v.

Relative

magnitudes

between

points

can

be

sometimes

be

inferred

by

invoking

rules

and

above

but

where

there

are

intervening

maxima

or

minima

between

points

rule

will

not

apply

In

this

case

or

where

more

quantitative

data

are

known

relative

magnitudes

can

be

expressed

by

defining

constraints

between

such

points

A

constraint

is

directional

-LRB-

i.e.

it

constrains

one

point

with

respect

to

another

-RRB-

and

has

attributes

relative-Xmin

relative-Xmax

relative-Ymin

and

relative-Ymax

Again

only

some

of

these

need

be

specified

Thus

in

Fig

to

ensure

that

point

D

is

known

to

be

above

point

A

and

below

point

B

one

should

define

two

constraints

the

first

from

A

to

D

and

the

second

from

D

to

B

each

with

a

Ymin

of

zero

-LRB-

Alternatively

one

or

both

of

these

constraints

could

be

defined

in

the

reverse

direction

-RRB-

HCRL

Technical

Report

No

Wed

Jul

Slopes

and

Curvatures

The

magnitudes

of

both

slopes

and

curvatures

are

expressed

in

absolute

qualitative

terms

as

-LRB-

or

-RRB-

It

is

assumed

that

these

values

as

inferred

from

the

graph

are

correct

for

the

first

and

second

derivatives

of

Y

with

respect

to

X.

Inside

GRASP

GRASP

is

written

in

KEETM

and

Lisp

using

an

object-oriented

style

Note

that

the

representation

language

used

incorporates

multiple

inheritance

-LRB-

an

object

can

inherit

properties

from

several

other

objects

-RRB-

methods

daemons

-LRB-

or

active

values

-RRB-

and

multiple

facets

for

slots

The

latter

means

that

more

than

one

piece

of

information

could

be

stored

in

a

given

slot

The

principle

classes

of

object

and

their

most

important

attributes

are

described

below

Graph

The

graph

object

contains

the

following

slots

Properties

a

list

of

properties

and

values

which

can

be

used

to

distinguish

between

two

or

more

graphs

which

have

the

same

X

Y

and

Z

parameters

Labels

the

various

labels

such

as

title

and

axis

labels

which

are

drawn

on

the

graph

Layout

information

on

the

shape

and

positioning

of

the

box

within

which

the

graph

is

drawn

Lines

the

reference

line

and

a

list

of

the

perturbed

lines

defined

on

a

particular

graph

Parameters

the

X

Y

and

Z

parameters

for

this

graph

Methods

are

also

defined

which

deal

with

converting

from

graph

to

window

coordinates

and

vice

versa

and

for

defining

drawing

and

deleting

graphs

Parameter

The

parameter

class

is

used

to

hold

information

about

the

parameters

or

variables

known

to

the

system

including

the

print-name

of

the

parameter

and

the

units

in

which

it

is

measured

Line

The

line

class

has

the

following

slots

Curves

a

list

of

the

curve

objects

on

the

line

Points

an

ordered

list

of

the

points

on

the

line

which

were

defined

by

the

user

The

line

class

has

two

subclasses

ref-line

and

ptb-line

Ref-line

representing

the

reference

line

on

a

graph

has

a

slot

named

regions

which

contains

a

list

of

the

regions

on

the

line

It

also

has

a

Z-parameter

slot

containing

an

association

list

of

Z

parameters

used

on

the

graph

and

the

range

-LRB-

Zmin

Zmax

-RRB-

for

each

which

applies

to

the

reference

line

The

ptb-line

class

representing

perturbed

lines

on

a

graph

contains

a

Z

parameter

slot

which

holds

information

on

the

applicable

Z

range

for

the

line

and

the

qualitative

sign

and

magnitude

of

the

Z

perturbation

with

respect

to

the

reference

line

It

also

has

an

intersections

slot

holding

a

list

of

intersections

between

it

and

the

reference

line

and

an

initial-y-difference

slot

which

contains

or

depending

on

whether

the

ptb

line

starts

of

above

on

top

or

below

its

reference

line

HCRL

Technical

Report

No

Wed

Jul

Methods

are

provided

for

defining

and

drawing

lines

for

parsing

them

-LRB-

see

below

-RRB-

and

for

finding

intersections

Points

Point

objects

are

used

to

hold

information

about

the

points

which

are

positioned

by

the

user

to

define

the

shape

of

the

line

Apart

from

slots

to

identify

the

graph

and

line

and

the

order

in

which

they

occur

on

a

line

the

point

class

also

contains

X

and

Y

slots

Each

of

these

holds

the

relevant

coordinate

and

the

minimum

and

maximum

absolute

values

where

defined

The

point

class

is

not

itself

instantiable

but

has

four

instantiable

subclasses

namely

free-point

-LRB-

for

points

where

the

slope

is

unconstrained

-RRB-

crit-point

-LRB-

for

points

where

the

line

is

horizontal

-RRB-

and

vert-uppoint

and

vert-down-point

-LRB-

for

points

where

the

slopes

are

vertically

up

or

vertically

down

respectively

-RRB-

Methods

are

also

defined

for

creating

points

drawing

them

-LRB-

different

for

each

type

of

point

-RRB-

and

for

adding

or

editing

numerical

annotations

Curves

A

curve

is

defined

as

a

section

of

line

with

a

uniform

sign

of

curvature

Thus

a

single

curve

can

span

a

maximum

or

minimum

When

a

line

is

parsed

a

number

of

curve

objects

are

created

sufficient

to

categorise

the

qualitative

curvatures

of

the

line

completely

All

curve

objects

have

slots

giving

the

relevant

graph

the

line

and

the

user-defined

points

contained

in

the

curve

The

curve

class

is

not

instantiable

but

contains

several

instantiable

subclasses

as

shown

in

Fig

Five

direct

subclasses

of

curve

namely

increasing

decreasing

accelerating

decelerating

and

straight

are

more

specific

in

terms

of

slope

and

curvature

and

can

be

mixed

to

obtain

the

instantiable

subclasses

of

peak

and

trough

-LRB-

for

maxima

and

minima

-RRB-

left-peak

right-peak

left-trough

and

right-trough

-LRB-

for

respectively

increasingdecelerating

decreasing-decelerating

decreasing-accelerating

and

increasingaccelerating

curves

-RRB-

The

subclasses

increasing-straight

decreasing-straight

and

horiz-straight

are

self

explanatory

and

are

in

any

case

not

likely

to

be

used

since

it

is

very

hard

to

sketch

absolutely

straight

lines

Each

of

the

instantiable

subclasses

contains

a

qcurve

slot

-LRB-

for

qualitative

curvature

-RRB-

holding

either

or

The

monotonic

subclasses

have

a

qslope

slot

with

the

same

type

of

information

There

are

methods

for

determining

the

qslope

of

non-monotonic

curves

-LRB-

peaks

and

troughs

-RRB-

which

rely

on

the

position

before

or

after

the

critical

point

to

determine

the

result

Intersection

Intersection

objects

hold

information

about

an

intersection

which

occurs

between

a

perturbed

line

and

the

reference

line

on

the

graph

The

intersection

class

has

slots

for

the

graph

and

lines

-LRB-

reference

line

and

perturbed

line

-RRB-

concerned

the

order

in

which

it

occurs

with

respect

to

other

intersections

between

the

same

pair

of

lines

the

previous-point

on

the

reference

line

-LRB-

to

assist

with

locating

it

-RRB-

and

the

region

in

which

it

occurs

on

the

reference

line

It

has

a

relative-slope

slot

which

contains

or

the

symbol

implying

that

at

the

intersection

the

perturbed

line

has

a

greater

slope

than

the

reference

line

and

implying

the

opposite

There

is

also

a

slot

to

hold

the

x

and

y

coordinates

of

the

intersection

point

which

are

not

used

HCRL

Technical

Report

No

Wed

Jul

Region

Regions

information

about

physically

distinct

portions

of

a

line

They

have

a

label

describing

some

feature

such

as

upper

shelf

and

starting

and

ending

points

New-member

The

new

member

class

contains

information

on

how

to

create

new

instances

of

classes

All

instantiable

classes

are

children

of

it

i.e.

they

inherit

its

properties

but

these

are

not

passed

on

to

the

instances

created

Parsing

a

line

After

a

-LRB-

reference

-RRB-

line

has

been

defined

it

is

parsed

to

determine

the

curvatures

which

comprise

it

This

is

done

using

the

x

and

y

coordinates

of

the

user-defined

points

on

the

line

It

consists

of

firstly

locating

the

points

of

inflexion

with

respect

to

the-user

defined

points

and

secondly

determining

the

qcurve

between

each

pair

of

adjacent

inflexions

The

latter

is

determined

by

refering

to

the

type

of

the

point

and

its

coordinates

Note

that

inflexions

will

not

in

general

coincide

with

userdefined

points

The

points

slot

in

the

curve

object

can

thus

be

filled

with

a

simple

list

e.g.

-LRB-

-RRB-

signifying

that

the

curve

starts

at

and

finishes

at

or

a

more

complicated

form

such

as

-LRB-

-LRB-

-RRB-

-LRB-

-RRB-

-RRB-

signifying

that

the

inflexions

at

the

beginning

and

end

of

the

curve

lie

between

and

and

between

and

respectively

Having

determined

the

qcurve

of

the

curve

it

is

a

relatively

simple

matter

to

find

whether

the

curve

has

a

positive

zero

or

negative

qslope

and

create

curve

object

of

the

correct

subclass

accordingly

Currently

only

reference

lines

are

parsed

in

this

manner

A

consequence

of

this

is

that

perturbed

lines

can

not

be

used

to

determine

values

of

dX-from-dY

or

dY

from-dX

It

would

be

a

trivial

extension

to

parse

perturbed

lines

also

but

this

would

not

help

unless

some

quantitative

data

and

regions

were

defined

for

these

lines

Characterising

perturbations

When

a

perturbed

line

is

defined

its

spatial

relationship

to

the

reference

line

must

be

determined

The

method

used

by

GRASP

is

to

determine

firstly

whether

it

starts

off

above

or

below

the

reference

line

in

terms

of

its

initial

y-coordinate

The

algorithm

used

in

function

get-initial-rel-y

takes

account

of

the

fact

that

either

the

reference

line

or

the

perturbed

line

may

start

first

in

terms

of

the

x

coordinates

of

the

first

point

on

each

line

The

result

-LRB-

or

-RRB-

is

stored

in

the

in

initial-y-diff

slot

of

the

perturbed

line

The

second

task

is

to

determine

all

the

intersections

-LRB-

if

any

-RRB-

between

the

two

lines

This

is

done

by

function

getintersections

which

compares

adjacent

pairs

of

user-defined

points

on

each

line

looking

for

intersections

between

the

points

An

intersection

object

is

created

for

each

one

to

hold

information

on

the

position

of

the

intersection

in

the

sequence

of

all

intersections

between

the

two

lines

and

the

relative

slope

at

the

intersection

If

the

intersection

coincides

with

a

user-defined

point

on

each

line

two

objects

will

be

created

which

allows

for

the

possibility

that

the

lines

may

converge

or

diverge

at

the

point

In

this

case

one

of

the

relative-slopes

will

be

or

and

the

other

one

zero

HCRL

Technical

Report

No

Wed

Jul

Note

that

these

calculations

are

all

done

by

assuming

that

the

user-defined

points

are

connected

by

straight

lines

As

the

line

segments

between

points

are

actually

curved

it

is

possible

that

the

wrong

answers

will

be

obtained

i.e.

that

intersections

will

be

created

where

are

observed

and

conversely

visible

intersections

will

be

missed

This

is

unlikely

to

be

a

problem

except

for

closely

spaced

and/or

highly

curved

lines

It

could

be

overcome

by

substituting

the

sets

of

points

calculated

by

the

cubic

spline

curve-fitting

function

in

place

of

the

userdefined

points

at

the

penalty

of

some

loss

of

efficiency

dX-from-dY

dY-from-dX

These

commands

examine

the

effect

on

X

or

Y

of

altering

the

other

parameter

using

a

single

line

on

the

graph

Currently

only

reference

lines

can

be

used

Both

commands

operate

by

determining

the

Y

relationship

between

two

regions

on

the

chosen

line

Four

separate

strategies

are

tried

in

turn

Check

for

monotonicity

If

the

section

of

the

line

between

and

including

the

two

regions

is

monotonic

the

relationship

is

easily

determined

as

being

above

or

below

Use

Y

values

attached

to

points

where

available

to

determine

the

spatial

relationship

between

the

two

regions

Possible

categories

are

above

below

outside

inside

part-above

and

part-below

-LRB-

see

Fig

-RRB-

These

are

then

translated

in

to

Y-relationships

as

shown

in

the

figure

Mix

the

two

strategies

above

This

is

intended

to

cover

the

case

where

there

is

a

point

between

the

two

regions

which

can

be

shown

for

instance

to

be

above

the

first

region

using

one

strategy

and

below

the

second

using

the

other

Use

constraints

between

points

If

two

points

have

a

numerical

constraint

in

Y

between

them

this

can

be

used

to

determine

the

relationship

between

regions

adjacent

to

those

points

These

strategies

cover

most

common

situations

but

they

are

not

completely

comprehensive

in

that

various

complex

combinations

of

monotonic

sections

Y

values

on

points

and

constraints

can

be

envisaged

which

will

defeat

them

In

this

case

the

answer

returned

will

be

or

representing

unknown

Further

development

and

refinement

of

the

strategies

would

be

worth

pursuing

To

determine

dY-from-dX

a

starting

region

and

an

x-direction

must

first

be

selected

The

program

uses

the

above

strategies

to

determine

where

possible

the

Y

relationship

between

the

starting

region

and

all

regions

in

turn

to

the

end

of

the

line

moving

in

x-direction

The

result

is

printed

as

a

list

of

relationships

one

element

for

each

region

To

determine

dX-from-dY

one

first

selects

a

starting

region

and

a

y-direction

as

above

The

same

method

for

dY-from-dX

is

then

applied

using

y-direction

in

place

of

x-direction

-LRB-

since

dY/dX

and

dX/dY

have

the

same

sign

-RRB-

The

resulting

list

of

relationships

is

then

modified

however

by

setting

each

element

or

sub-element

to

if

it

is

not

equal

to

the

first

element

The

reason

for

this

is

that

if

the

element

is

different

it

implies

that

a

maximum

or

minimum

has

been

traversed

with

the

HCRL

Technical

Report

No

Wed

Jul

result

that

that

portion

of

the

graph

is

unreachable

by

monotonically

changing

y

This

situation

was

illustrated

in

Fig

HCRL

Technical

Report

No

Wed

Jul

dY-from-dZ

dX-from-dZ

These

two

commands

work

by

comparing

lines

on

the

same

graph

It

is

assumed

that

the

unnamed

parameter

-LRB-

X

or

Y

-RRB-

is

held

constant

dY-from-dZ

works

by

selecting

a

region

on

the

reference

line

and

deducing

whether

the

relevant

perturbed

line

is

above

or

below

it

-LRB-

in

terms

of

its

y

position

-RRB-

or

intersects

with

it

within

the

region

It

does

this

setting

y-diff

to

the

value

of

the

initial-y-diff

slot

of

the

perturbed

line

and

then

looking

along

the

reference

line

region

by

region

until

the

desired

region

is

reached

Each

time

an

intersection

is

encountered

y-diff

is

reset

If

there

is

no

intersection

in

the

selected

region

the

value

of

y-diff

is

returned

otherwise

the

list

-LRB-

-RRB-

or

-LRB-

-RRB-

is

returned

for

relative-slopes

of

the

intersection

of

and

respectively

To

deduce

dX-from-dZ

dY-from-dZ

is

first

determined

as

above

The

qslope

of

the

relevant

region

is

also

found

If

this

is

the

same

result

holds

If

it

is

the

effect

is

reversed

-LRB-

i.e.

becomes

and

vice

versa

-RRB-

This

assumes

that

line

is

monotonic

within

the

selected

region

If

the

region

in

fact

spans

a

maximum

or

minimum

the

program

currently

signals

an

error

-LRB-

which

can

be

recovered

from

by

hitting

Abort

-RRB-

It

is

necessary

to

consider

the

slope

of

the

perturbed

line

to

deal

with

this

case

and

the

required

functions

have

not

been

written

Interpolation

and

extrapolation

The

interface

to

the

Consultation

Mode

does

not

contain

commands

for

exploring

interpolation

and

extrapolation

of

data

This

can

be

done

by

calling

the

appropriate

Lisp

functions

directly

or

by

using

QED

as

described

in

Section

Extrapolation

and

interpolation

are

concerned

with

estimating

the

value

of

a

parameter

under

a

given

set

of

conditions

given

two

other

data-points

where

the

parameter

and

conditions

are

all

known

It

can

only

be

carried

out

when

the

two

data-points

lie

on

the

same

curve

Different

curves

-LRB-

i.e.

different

qualitative

curvatures

-RRB-

render

the

technique

inapplicable

Some

data

structures

described

more

fully

in

the

next

section

are

required

Overview

of

QED

QED

stands

for

Qualitative

Extrapolation

of

Data

Its

purpose

is

to

demonstrate

how

GRASP

can

be

used

to

infer

values

of

an

unknown

parameter

using

data

stored

in

a

data-base

The

novel

feature

of

QED

is

that

it

can

use

data

from

the

data

base

which

do

not

match

exactly

the

target

conditions

It

does

this

by

searching

for

a

suitable

sketch

graph

which

defines

the

qualitative

relationships

between

the

relevant

parameters

If

one

is

found

it

uses

GRASP

to

deduce

whether

the

mismatch

in

the

value

of

a

parameter

is

likely

to

have

resulted

in

a

lower

or

higher

value

of

the

target

parameter

It

also

uses

extrapolation

and

interpolation

from

pairs

of

data

points

in

the

data

base

to

infer

likely

ranges

of

the

target

parameter

The

results

are

summarised

by

plotting

them

on

a

chart

making

it

relatively

simple

for

an

engineer

to

obtain

an

estimate

of

the

likely

range

of

values

of

the

target

parameter

The

following

commands

are

provided

in

the

QED

interface

Initialise

sets

up

the

window

for

interaction

HCRL

Technical

Report

No

Wed

Jul

Formulate-Query

This

command

gathers

the

desired

conditions

from

the

user

It

prompts

for

the

name

of

the

database

containing

the

relevant

data

-LRB-

actually

input

as

a

list

of

Lisp

structures

each

of

which

defines

a

data-point

-RRB-

Then

the

user

is

asked

to

select

the

target

parameter

from

amongst

those

referred

to

by

the

data

The

target

parameter

is

the

parameter

whose

value

is

to

be

determined

Finally

values

of

the

other

parameters

referred

to

by

the

data

can

be

input

Evaluate-data

The

target

set

of

conditions

is

compared

to

the

data

looking

for

suitable

matches

Firstly

exact

matches

are

sought

-LRB-

that

is

the

values

of

parameters

in

the

target

condition

and

the

values

of

the

same

parameters

in

the

datapoint

match

exactly

-RRB-

In

this

case

the

value

of

the

target

parameter

from

the

datapoint

is

retrieved

and

printed

This

corresponds

to

a

standard

database

search

Secondly

near

misses

are

sought

for

the

case

where

the

values

of

one

of

the

known

parameters

in

the

data-point

and

target

condition

differ

QED

then

tries

to

find

a

suitable

graph

and

line

-LRB-

s

-RRB-

in

GRASP

to

compare

the

two

conditions

If

these

are

found

GRASP

is

invoked

to

try

to

resolve

the

difference

and

work

out

the

qualitative

effect

of

the

mismatch

If

successful

the

value

of

the

target

parameter

in

the

data-point

and

the

direction

change

are

output

The

latter

may

be

a

list

of

changes

one

for

each

region

in

which

the

data-point

and

the

target

could

lie

if

this

can

not

be

determined

unambiguously

Finally

pairs

of

data-points

which

gave

results

for

a

near

miss

are

compared

with

the

target

to

see

if

the

result

can

be

inferred

by

interpolation

or

extrapolation

This

can

only

be

done

if

the

data-point

and

target

lie

on

the

same

line

and

the

same

curve

The

result

of

each

comparison

is

printed

as

a

list

consisting

of

-LRB-

-LRB-

lowerbound

upper-bound

-RRB-

interpolate-or-extrapolate

-RRB-

Either

lower-bound

or

upperbound

may

be

signifying

unbounded

The

results

obtained

by

these

three

methods

may

show

some

inconsistency

This

is

to

be

expected

when

real

data

are

used

since

they

may

not

conform

exactly

to

the

smooth

curves

defined

by

the

sketch

graph

but

show

scatter

in

behaviour

Show-Target-Datum

This

command

prints

the

target

datum

with

an

optionally

adjustable

print-level

of

Before

Evaluate-Data

has

been

run

the

target

datum

just

contains

the

required

conditions

Afterwards

it

also

contains

lists

of

the

results

Plot-Exact-Matches

Plot-Near-Misses

Plot-Results-of-Inter

Extrapolation

Plot-All-Data

These

commands

plot

charts

of

the

results

of

Evaluate-Data

The

target

parameter

is

plotted

up

the

Y

axis

and

the

number

of

results

along

the

X

axis

The

purpose

is

to

give

the

engineer

a

graphical

summary

of

all

the

results

so

that

a

judgement

can

be

made

as

to

the

most

appropriate

value

range

to

assume

Sample

Plots

are

shown

in

Figs

The

data

plotted

have

the

following

significance

A

simple

cross

represents

a

perfect

match

with

an

item

of

data

A

cross

with

an

arrow

signifies

that

the

value

indicated

by

the

cross

is

an

upper

bound

-LRB-

for

a

downward

pointing

arrow

-RRB-

or

a

lower

bound

-LRB-

for

an

upward

pointing

arrow

-RRB-

A

by

an

arrow

head

signifies

that

the

result

is

as

above

but

is

ambiguous

-LRB-

e.g.

the

direction

may

have

been

-LRB-

-RRB-

for

a

above

an

upward

arrow

-RRB-

HCRL

Technical

Report

No

Wed

Jul

A

vertical

bar

identifies

the

upper

and

lower

bounds

of

the

result

HCRL

Technical

Report

No

Wed

Jul

Fig

Plot

of

exactly

matching

data

points

HCRL

Technical

Report

No

Wed

Jul

Fig

Plot

of

the

inferred

results

from

imperfectly

matching

data

points

HCRL

Technical

Report

No

Wed

Jul

Fig

Plot

of

results

inferred

by

interpolation

and

extrapolation

between

pairs

of

imperfectly

matching

data

points

HCRL

Technical

Report

No

Wed

Jul

Fig

Plot

summarising

all

the

inferred

data

HCRL

Technical

Report

No

Wed

Jul

Inside

QED

Data

structures

Two

Lisp

structures

hold

the

data

needed

for

making

inferences

Data-point

represents

items

of

data

in

the

data-base

It

has

two

slots

param-vals

and

temp-vals

The

first

holds

an

association

list

-LRB-

alist

-RRB-

of

parameter

and

value

pairs

for

instance

-LRB-

-LRB-

B

-RRB-

-LRB-

T

-RRB-

-LRB-

Material

Steel-aaa

-RRB-

-RRB-

where

the

parameters

B

T

and

Material

represent

fields

in

a

database

and

the

values

represent

the

fillers

for

those

fields

Temp-vals

is

initially

empty

but

is

used

to

hold

an

alist

of

useful

information

about

the

data-point

which

is

obtained

during

the

calculation

process

and

is

stored

for

future

reference

Partially-known-datum

-LRB-

pkd

for

short

-RRB-

represents

the

target

condition

It

is

built

on

top

of

data-point

and

so

inherits

the

same

slots

In

addition

it

has

the

following

slots

target-param

the

parameter

whose

value

needs

to

be

estimated

results-for-exact-match

a

list

of

results

one

for

each

case

where

the

target

condition

exactly

matches

a

data-point

a

list

of

results

one

for

each

case

where

a

data-point

mismatches

with

the

pkd

in

terms

of

the

value

of

one

known

parameter

results-from-interp

a

list

of

results

obtained

by

performing

interpolation

or

extrapolation

between

two

sets

of

data-points

The

result

referred

to

above

is

a

list

of

the

data-point

-LRB-

s

-RRB-

used

in

the

calculation

and

the

inferred

value

The

latter

is

the

inferred

value

of

the

target

parameter

and

can

be

a

single

numerical

value

-LRB-

for

an

exact

match

-RRB-

a

value

and

direction

-LRB-

e.g.

-LRB-

-RRB-

signifies

that

the

inferred

value

is

above

-RRB-

or

a

list

of

values

-LRB-

min

max

-RRB-

one

of

which

may

be

signifying

unknown

Strategy

The

function

evaluate-data

is

passed

a

list

of

data-points

and

the

target

pkd

The

first

task

is

to

find

a

relevant

graph

from

those

stored

in

GRASP

The

test

for

relevancy

is

that

the

properties

of

the

graph

-LRB-

stored

in

its

properties

slot

-RRB-

should

match

with

those

of

the

pkd

and

that

the

X

and

Y

parameters

and

at

least

one

of

the

Z

parameters

of

the

graphs

should

be

referred

to

in

the

alist

of

param-vals

or

as

the

target

parameter

of

the

pkd

If

this

is

not

the

case

then

a

graph

is

concluded

to

be

irrelevant

The

data-points

are

then

each

compared

in

turn

with

the

pkd

Each

is

first

checked

for

relevance

-LRB-

does

it

refer

to

the

same

parameters

-RRB-

An

exact

match

is

then

sought

for

the

known

parameters

and

their

respective

values

between

the

pkd

and

of

the

data-point

If

a

match

is

found

the

value

of

the

target-parameter

is

found

for

the

data-point

and

the

result

is

added

to

the

list

of

exact

matches

stored

in

the

pkd

This

is

equivalent

to

doing

a

simple

data-base

look-up

HCRL

Technical

Report

No

Wed

Jul

If

an

exact

match

fails

the

data-point

and

pkd

are

compared

to

see

if

one

known

parameter

has

a

non-matching

value

If

so

QED

tries

to

find

a

line

or

pair

of

lines

on

the

graph

whose

value

-LRB-

s

-RRB-

of

Z

parameter

match

the

data

If

successful

the

consultation

mode

of

GRASP

is

invoked

to

estimate

the

effect

on

the

target

parameter

of

the

mismatch

in

value

and

the

result

stored

in

the

pkd

Finally

pairs

of

data-points

which

gave

an

inexact

match

-LRB-

stored

in

the

slot

of

the

pkd

-RRB-

are

tested

to

see

whether

interpolation

or

extrapolation

can

be

carried

out

If

so

the

result

is

added

to

the

results-from-interp

slot

of

the

pkd

Two

extensions

to

this

procedure

have

been

considered

but

not

implemented

The

first

would

be

to

test

all

data-points

which

did

not

provide

a

result

in

the

above

process

for

near

misses

in

two

parameter

values

and

apply

the

result

of

each

separately

If

the

two

results

are

the

same

then

this

should

also

be

the

combined

result

For

instance

if

the

target

parameter

is

Y

and

values

of

both

X

and

Z

differ

between

the

data-point

and

the

pkd

by

DX

and

DZ

respectively

then

DY

can

be

determined

separately

from

DX

at

constant

Z

and

from

DZ

at

constant

X

and

the

results

summed

according

to

the

rules

of

qualitative

addition

-LRB-

viz

and

sum

to

and

sum

to

and

anything

else

yields

-RRB-

The

second

extension

is

more

complicated

and

covers

the

case

where

a

relevant

graph

can

not

be

found

It

may

be

possible

to

use

a

combination

of

the

graphs

already

defined

to

the

construct

a

path

from

the

data

to

the

desired

result

For

instance

assume

the

data-point

has

values

assigned

to

parameters

P

Q

R

and

S

and

the

pkd

has

P

as

the

target

parameter

a

matching

value

of

R

and

non-matching

values

of

Q

and

S.

Ideally

the

relevant

graph

should

have

X

Y

and

Z

parameters

of

P

Q

and

S

-LRB-

not

necessarily

respectively

-RRB-

and

should

be

defined

for

the

same

value

of

R

If

these

conditions

are

not

met

but

graphs

of

P

against

Q

and

R

and

R

against

Q

and

S

it

may

be

possible

to

piece

together

a

solution

summing

the

individual

results

according

to

the

rules

of

qualitative

addition

Future

Work

Some

possible

improvements

to

GRASP

and

QED

have

already

been

mentioned

These

and

other

desirable

enhancements

are

summarised

below

For

GRASP

Improve

the

flexibility

of

the

Input

Mode

so

that

users

can

edit

graphs

by

moving

selected

points

under

mouse

control

Parse

perturbed

lines

and

define

curves

and

regions

on

them

so

that

reasoning

on

these

lines

can

be

carried

out

in

the

same

way

as

for

reference

lines

Restructure

the

KEE

knowledge

bases

allowing

graphs

to

be

stored

in

separate

knowledge

bases

instead

of

all

within

the

kb

For

QED

Improve

the

chart

plotting

facilities

so

that

useful

scales

are

shown

on

the

axes

HCRL

Technical

Report

No

Wed

Jul

Implement

the

facility

to

infer

trends

when

two

-LRB-

or

more

-RRB-

variables

differ

from

the

target

values

Implement

a

planning

facility

so

that

a

path

from

the

target

conditions

to

the

actual

ones

can

be

constructed

by

combining

a

number

of

graphs

HCRL

Technical

Report

No

Wed

Jul

Appendix

A

Implementation

GRASP

and

QED

are

implemented

in

KEE

version

running

on

a

Symbolics

Lisp

Machine

under

Genera

version

KEE

is

used

for

its

flexible

and

efficient

frame

language

The

other

facilities

provided

with

KEE

such

as

rules

and

worlds

which

were

used

in

an

earlier

implementation

-LSB-

-RSB-

were

replaced

by

respectively

functions

and

methods

and

by

list

data

structures

to

hold

multiple

results

This

resulted

in

a

great

increase

in

ease

of

programming

and

speed

of

operation

since

the

rule

system

in

KEE

had

been

found

to

be

hard

to

control

and

relatively

slow

-LSB-

-RSB-

KEE

does

incorporate

fairly

good

graphical

facilities

but

these

were

not

used

in

GRASP

because

it

was

considered

that

those

provided

in

Genera

were

more

flexible

and

better

documented

-LRB-

for

instance

although

a

KEEpicture

is

provided

for

drawing

cubic

spline

curves

through

a

set

of

points

it

does

not

appear

to

be

possible

to

obtain

the

list

of

intermediate

points

calculated

by

the

curve-fitting

routine

Also

the

structure

of

the

spline

objects

in

KEE

would

mean

that

there

would

be

a

lot

of

duplicated

information

in

the

knowledge

base

-RRB-

Genera

does

not

provide

such

comprehensive

graphical

facilities

as

Genera

The

functions

for

returning

lists

of

intermediate

coordinates

for

cubic

splines

are

new

to

and

were

copied

and

placed

in

the

file

Graphics-functions

lisp

Installing

GRASP

and

QED

To

install

the

software

the

Symbolics

must

have

access

to

an

environment

containing

KEE

loaded

on

top

of

Genera

The

software

can

be

loaded

into

this

environment

by

issuing

the

Load

System

Grasp

version

latest

command

-LRB-

assuming

that

the

system

has

been

loaded

onto

the

current

site

-RRB-

This

will

install

the

necessary

data

classes

and

functions

to

run

GRASP

and

QED

allowing

the

user

to

define

graphs

and

reason

about

them

-LRB-

The

files

which

define

the

GRASP

system

are

specified

in

the

file

sysdcl.lisp

-RRB-

If

it

is

desired

to

access

the

example

graphs

provided

the

knowledge

base

named

GRASP.U

should

be

loaded

from

within

KEE

During

the

loading

process

a

variety

of

warnings

may

appear

caused

mainly

by

the

fact

that

methods

acting

on

KEE

objects

may

be

referred

to

before

they

are

defined

These

warnings

should

be

ignored

Sample

data

for

demonstrating

QED

are

contained

in

the

file

QED-demo-data

lisp

New

data-points

can

be

added

via

the

interface

in

the

QED

activity

but

if

it

is

desired

to

store

them

they

should

be

re-defined

in

a

file

Running

the

Software

The

input

mode

in

GRASP

can

be

reached

by

pressing

Select

G

or

by

issuing

the

Select

Activity

GRASP

command

in

the

Lisp

listener

The

consult

mode

is

reached

by

pressing

Select

H

or

issuing

Select

Activity

Consult

The

QED

activity

is

similarly

reached

by

pressing

Select

J

or

issuing

Select

Activity

QED

Each

of

these

modes

has

a

similar

interface

illustrated

in

Figs

and

The

menus

of

commands

on

the

top

right

hand

side

should

be

self

explanatory

-LRB-

at

least

after

reading

this

report

-RRB-

They

are

activated

by

mouse

clicking

on

them

HCRL

Technical

Report

No

Wed

Jul

Poking

around

The

KEE

system

should

not

need

to

be

accessed

by

users

but

those

of

a

more

enquiring

mind

can

enter

it

by

pressing

Select

K

The

knowledge

base

named

should

be

displayed

in

the

knowledge

bases

window

and

can

be

examined

by

mouse

clicking

This

gives

access

to

all

the

objects

in

the

system

-LRB-

Warning

it

is

also

possible

to

alter

the

data-structures

so

as

to

make

them

inconsistent

-RRB-

The

files

used

to

define

the

objects

methods

and

functions

can

be

placed

in

the

editor

by

issuing

the

Edit

System

GRASP

command

in

the

Lisp

Listener

The

top

level

commands

used

in

the

Input

Consult

and

QED

activities

are

defined

in

the

file

Interfaces.lisp

From

there

all

the

functions

in

the

system

can

be

accessed

using

the

facilities

of

the

Lisp

Machine

Known

Idiosyncrasies

and

Bugs

The

purpose

of

building

the

GRASP

and

QED

programs

has

been

to

develop

and

test

the

ideas

presented

in

-LSB-

-RSB-

rather

than

to

provide

a

piece

of

commercial-quality

software

Therefore

anyone

intending

to

test

the

system

for

robustness

will

not

find

the

exercise

very

challenging

There

is

virtually

no

checking

of

inputs

and

it

is

easy

to

enter

inconsistent

data

This

particularly

applies

to

numerical

values

which

can

be

made

to

contradict

the

trends

implied

by

the

shape

of

the

graph

There

are

several

bugs

which

have

been

discovered

but

which

lack

of

time

has

prevented

from

being

fixed

The

principal

ones

are

When

defining

lines

in

Input

mode

an

error

occurs

if

the

last

point

on

the

line

is

a

free

-LRB-

unconstrained

-RRB-

point

Therefore

currently

all

lines

must

end

with

a

horizontal

or

vertical

point

There

are

some

errors

in

the

parsing

of

lines

to

generate

the

constituent

curves

Generally

the

point

of

inflexion

may

be

placed

in

the

wrong

position

on

the

line

resulting

in

the

beginning

and

end

of

some

curves

not

being

located

correctly

or

some

curves

being

missed

altogether

dY-from-dX

does

not

operate

correctly

if

the

current

region

is

the

last

region

on

the

line

and

the

x

direction

is

Certain

other

cases

where

system

is

known

to

be

incomplete

-LRB-

for

instance

when

reasoning

using

a

region

which

spans

a

maximum

or

minimum

-RRB-

will

generate

an

error

Acknowledgments

This

work

was

supported

by

BP

Research

Sunbury-on-Thames

The

author

is

indebted

to

colleagues

at

BP

and

at

The

Open

University

for

helpful

discussions

and

comments

and

especially

to

Marc

Eisenstadt

Enrico

Motta

John

Domingue

Mike

Brayshaw

and

Dave

Wolstenholme

HCRL

Technical

Report

No

Wed

Jul

References

Willoughby

A

A.

Qualitative

reasoning

with

cartesian

coordinate

sketch

graphs

HCRL

Technical

Report

No

March

Forbus

K.

Qualitative

process

theory

Artificial

Intelligence

-LRB-

-RRB-

de

Kleer

J

and

Brown

J

S

A

qualitative

physics

based

on

confluences

Artificial

Intelligence

-LRB-

-RRB-

Kuipers

B

J.

Commonsense

reasoning

about

causality

deriving

behaviour

from

structure

Artificial

Intelligence

-LRB-

-RRB-

graphs
kee
perturbations
qualitative reasoning
qualitative relationships


Recognition of Chinese Characters by Moment Feature Extraction Qin Lu and K.H. Lee Department of Computer Science and Engineering The Chinese University of Hong Kong Shatin , Hong Kong email : clu@cs.cuhk.hk, khlee@cs.cuhk.hk Abstract To extract a set of suitable features from all Chinese characters for the purpose of classification is essential in the design of an Optical Character Recognition -LRB- OCR -RRB- system for printed Chinese characters . Moment descriptors have been developed as features in pattern recognition since the moment method was first introduced . The moment method is different from other feature extraction methods used in Chinese character recognition , in that , moments can be carefully selected such that the extracted features are invariant under translation , scale change , and rotation . The moment method captures global properties of characters rather than local ones . In this paper , new moment features for Chinese character recognition are proposed which provide significant improvements in terms of Chinese character recognition , especially for those characters that are very close in shapes . 1 Introduction Optical character recognition -LRB- OCR -RRB- systems for printed Chinese characters have been designed to automate the process of inputing Chinese documents with reasonably good performance . However , existing systems often fail to recognize Chinese characters that are very close in shapes . The main problems with OCR for Printed Chinese Characters -LRB- OCRPCC -RRB- are three folds -LSB- 17 -RSB- . The first problem is due to the large set of characters that an OCRPCC must recognize . The smallest set of Chinese characters was defined in China 's national standard GB2312 with 6,763 characters , which is two magnitude larger than any OCR system for Western languages . Any practical system must be able to recognize Chinese characters in both the simplified form and the traditional form , making the recognition candidates even larger . Therefore , Chinese character recognition usually uses classification method to first partition characters into different groups so as to reduce the number of candidates for recognition -LSB- 12 -RSB- -LSB- 16 -RSB- . The second problem comes from the complicated structures of Chinese characters . Chinese characters do carry a lot of information because the structures and components of each character often convey meanings . Many feature extraction methods for Chinese characters make use of these Chinese character specific information . However , many Chinese characters that are different in meanings are very similar in shapes thus making classification very difficult . The third problem is how to deal with noise because of different printing qualities and the variety of fonts for Chinese characters . The correction rate of an OCR system largely depends on the extracted features used to distinguish one character from another . Ideally , the more extracted features a system maintains , the higher the correction rate of the system will be . However , because the set of Chinese characters to be recognized is so large , only a very small number of features can be used in any OCRPCC system in order to obtain results in a reasonably short time . Consequently , the selection of feature extraction methods becomes the single most important factor in achieving high recognition performance . Feature extraction methods used in existing OCRPCC systems such as the stroke feature method and the feature point method , etc -LSB- 3 -RSB- -LSB- 12 -RSB- -LSB- 19 -RSB- make the most use of the features specific to Chinese characters . But , these methods mostly take local features of the characters into account only , making the recognition of Chinese characters that are very close in shapes very difficult . Moment descriptors of various forms have been developed following Hu -LSB- 7 -RSB- -LSB- 8 -RSB- as the extracted features of an image in pattern recognition -LSB- 15 -RSB- . Describing an image with moments instead of other traditional methods of image processing means that global properties of the image are used rather than local ones . The moment method is different from other feature extraction methods used in Chinese character recognition in that , carefully selected features can make the extracted features invariant under translation , scale change , and rotation . More importantly , moments , when selected up to certain order , can represent each character uniquely regardless of how close the characters are in terms of local features . This uniqueness nature of moments makes the method of moments an appropriate candidate in Chinese character recognition . In this paper , we describe three moment functions and the selected features from these moment functions for Chinese character recognition . We used the 6,763 Chinese characters defined in the Chinese standard GB2312 as the test characters . Results show that our selected features not only perform very well in terms of classifying all the characters in GB codeset , they perform particularly good in recognizing characters that are very close in shapes . The rest of the paper is organized as follows . Section 2 defines various types of moments used in our feature extractions and their properties are summarized . Section 3 describes the selected moment features used in Chinese character recognition . Section 4 discusses the experiment results . Section 5 is the conclusion . 2 Moments From probability theory , the -LRB- m ; n -RRB- th moment of the joint probability density p -LRB- x ; y -RRB- is defined as M -LRB- m ; n -RRB- = Z +1 ? 1 Z +1 ? 1 xmynp -LRB- x ; y -RRB- dxdy : -LRB- 1 -RRB- The central moment is given by U -LRB- m ; n -RRB- = Z +1 ? 1 Z +1 ? 1 -LSB- x ? ? x -RSB- m -LSB- y ? ? y -RSB- np -LRB- x ; y -RRB- dxdy ; -LRB- 2 -RRB- where ? x and ? y are the means of p -LRB- x ; y -RRB- . These classical relationships of probability theory have been applied to pattern recognition and image processing by Hu -LSB- 8 -RSB- and Alt -LSB- 1 -RSB- . The joint probability density p -LRB- x ; y -RRB- of -LRB- 1 -RRB- and -LRB- 2 -RRB- is replaced by a real valued continuous function f -LRB- x ; y -RRB- , used to represent an image . 2.1 Gerometric Moments The two-dimensional geometric moments of order -LRB- p ; q -RRB- of an image function f -LRB- x ; y -RRB- , which is assumed piecewise continuous , are defined as Mpq = Z a2 a1 Z b2 b1 xpyqf -LRB- x ; y -RRB- dxdy ; -LRB- 3 -RRB- where p ; q = ; 1 ; 2 ; : : : ; 1 . The monomial product xpyq is the basis function for this moment definition . A set of n geometric moments consists of all Mpqs for p + q < = n , i.e. , the set contains 12 -LRB- n + 1 -RRB- -LRB- n + 2 -RRB- elements . Hu -LSB- 8 -RSB- first applied the probability theory to pattern recognition . He showed that if an image function f -LRB- x ; y -RRB- is piecewise continuos and has nonzero values only in a finite region of the -LRB- x ; y -RRB- plane , then the moment sequence fMpqg is uniquely determined by f -LRB- x ; y -RRB- , and conversely , f -LRB- x ; y -RRB- is uniquely determined by fMpqg . Considering the fact that an image segment has finite area , or in the worst case is piecewise , moments of all orders exist and a complete moment set can be computed and used uniquely to describe the information contained in the image . The uniqueness nature of moments makes this method a proper candidate in Chinese character recognition . For a digital image , the double integrations of Mpq in -LRB- 3 -RRB- are usually approximated by double summations -LSB- 10 -RSB- Mpq = M X i = 1 NX j = 1 hMpq -LRB- xi ; yj -RRB- f -LRB- xi ; yj -RRB- ; -LRB- 4 -RRB- where hMpq -LRB- xi ; yj -RRB- = Z xi + ? x2 xi ?? x2 Z yj + ? y2 yj ?? y2 xpyqdxdy -LRB- 5 -RRB- represents the double integration of xpyq over the pixel -LSB- xi ?? x2 ; xi + ? x2 -RSB- ? -LSB- yj ?? y2 ; yj + ? y2 -RSB- . ? x = xi ? xi ? 1 and ? y = yj ? yj ? 1 are the sampling intervals in the x and y directions , respectively . 2.2 Central Moments The geometric moments defined in -LRB- 3 -RRB- are not invariants with respect to image translation , rotation , nor size changes . However , central moments -LSB- 8 -RSB- , defined as ? pq = Z a2 a1 Z b2 b1 -LRB- x ? ? x -RRB- p -LRB- y ? ? y -RRB- qf -LRB- x ; y -RRB- dxdy ; -LRB- 6 -RRB- where ? x = M10 M00 ; ? y = M01 M00 ; are invariants under the translation of coordinates . Also , the central moments ? pq can be expressed in terms of the moments Mpq defined in -LRB- 3 -RRB- -LSB- 8 -RSB- . Similar to -LRB- 4 -RRB- , the double integrations of ? pq in -LRB- 6 -RRB- can be written as ? pq = M X i = 1 N X j = 1 h?pq -LRB- xi ; yj -RRB- f -LRB- xi ; yj -RRB- ; -LRB- 7 -RRB- where h?pq -LRB- xi ; yj -RRB- = Z xi + ? x2 xi ?? x2 Z yj + ? y2 yj ?? y2 -LRB- x ? ? x -RRB- p -LRB- y ? ? y -RRB- qdxdy ; -LRB- 8 -RRB- ? x = M10 M00 ; ? y = M01 M00 : The summation limits M and N in -LRB- 7 -RRB- are the dimensions of the digitized image f -LRB- xi ; yj -RRB- , in which i and j are the discrete locations of the image pixels . The method of moment invariants is derived from algebraic invariants applied to the moment generating function under a rotation transformation . The set of absolute moment invariants consists of a set of nonlinear combinations of central moments that remain invariant under rotation . Hu defined the following seven functions , which are computed from central moments through order three and are invariant with respect to rotation and reflection : OE1 = ? 20 + ? 02 -LRB- 9 -RRB- OE2 = -LRB- ? 20 ? ? 02 -RRB- 2 + 4 ? 211 -LRB- 10 -RRB- OE3 = -LRB- ? 30 ? 3 ? 12 -RRB- 2 + -LRB- 3 ? 21 ? ? 03 -RRB- 2 -LRB- 11 -RRB- OE4 = -LRB- ? 30 ? ? 12 -RRB- 2 + -LRB- ? 21 ? ? 03 -RRB- 2 -LRB- 12 -RRB- OE5 = -LRB- ? 30 ? 3 ? 12 -RRB- -LRB- ? 30 + ? 12 -RRB- -LSB- -LRB- ? 30 + ? 12 -RRB- 2 ? 3 -LRB- ? 21 + ? 03 -RRB- 2 -RSB- + -LRB- 3 ? 21 ? ? 03 -RRB- -LRB- ? 21 + ? 03 -RRB- -LSB- 3 -LRB- ? 30 + ? 12 -RRB- 2 ? -LRB- ? 21 + ? 03 -RRB- 2 -RSB- -LRB- 13 -RRB- OE6 = -LRB- ? 20 ? ? 02 -RRB- -LSB- -LRB- ? 30 + ? 12 -RRB- 2 ? -LRB- ? 21 + ? 03 -RRB- 2 -RSB- +4 ? 11 -LRB- ? 30 + ? 12 -RRB- -LRB- ? 21 + ? 03 -RRB- -LRB- 14 -RRB- OE7 = -LRB- 3 ? 21 ? ? 03 -RRB- -LRB- ? 30 + ? 12 -RRB- -LSB- -LRB- ? 30 + ? 12 -RRB- 2 ? 3 -LRB- ? 21 + ? 03 -RRB- 2 -RSB- ? -LRB- ? 30 ? 3 ? 12 -RRB- -LRB- ? 21 + ? 03 -RRB- -LSB- 3 -LRB- ? 30 + ? 12 -RRB- 2 ? -LRB- ? 21 + ? 03 -RRB- 2 -RSB- : -LRB- 15 -RRB- Both geometric and central moments are projections of the image function f -LRB- x ; y -RRB- onto the monomial xpyq . However , with the Weierstrass approximation theorem -LSB- 2 -RSB- , the basis set fxpyqg , while complete , is not orthogonal . 2.3 Legendre Moments The nth order Legendre polynomial is defined as Pn -LRB- x -RRB- = nX j = 0 anjxj = 1 2nn ! dn dxn -LRB- x2 ? 1 -RRB- n : -LRB- 16 -RRB- The Legendre polynomials fPm -LRB- x -RRB- g -LSB- 2 -RSB- are a complete orthogonal basis set on the interval -LSB- -1 , 1 -RSB- : Z +1 ? 1 Pm -LRB- x -RRB- Pn -LRB- x -RRB- dx = 2 2m + 1 ffimn : -LRB- 17 -RRB- The Legendre moment of f -LRB- x ; y -RRB- with order -LRB- m ; n -RRB- is defined by > = mn = -LRB- 2m + 1 -RRB- -LRB- 2n + 1 -RRB- 4 Z +1 ? 1 Z +1 ? 1 Pm -LRB- x -RRB- Pn -LRB- y -RRB- f -LRB- x ; y -RRB- dxdy ; -LRB- 18 -RRB- where m ; n = ; 1 ; 2 ; : : : ; 1 . If an image function f -LRB- x ; y -RRB- is digitized into its discrete version f -LRB- xi ; yj -RRB- with an M?N array of pixels , the double integration of -LRB- 18 -RRB- can be approximated by double summation : > = mn = -LRB- 2m + 1 -RRB- -LRB- 2n + 1 -RRB- 4 m X i = 1 nX j = 1 h > = mn -LRB- xi ; yj -RRB- f -LRB- xi ; yj -RRB- ; -LRB- 19 -RRB- where h > = mn -LRB- xi ; yj -RRB- = Z xi + ? x2 xi ?? x2 Z yj + ? y2 yj ?? y2 Pm -LRB- x -RRB- Pn -LRB- y -RRB- dxdy : -LRB- 20 -RRB- With the Legendre moments , the characters can be reconstructed from the extracted features -LSB- 10 -RSB- . This property ensures that complete information about the character shape is presented in the extracted features , and hopefully , these features have high power in terms of classification . 3 Character Recognition via Moments The lower order geometric moments represent some well known fundamental properties of the underlying image function . The definition of the zeroth order geometric moment , M00 , of the function f -LRB- x ; y -RRB- M00 = Z a2 a1 Z b2 b1 f -LRB- x ; y -RRB- dxdy -LRB- 21 -RRB- represents the total mass of the given image function f -LRB- x ; y -RRB- . When computed for a binary image , i.e. , an image with only two graylevels , and 1 , the zeroth moment -LRB- 21 -RRB- gives the total area of the image . The two first order geometric moments , M10 = Z a2 a1 Z b2 b1 xf -LRB- x ; y -RRB- dxdy -LRB- 22 -RRB- and M01 = Z a2 a1 Z b2 b1 yf -LRB- x ; y -RRB- dxdy -LRB- 23 -RRB- represent the centre of mass of the image function f -LRB- x ; y -RRB- . The centre of mass is the point where all the mass of the image could be concentrated without changing the first moment of the image about any axis . In terms of moment values , the coordinates of the centre of mass are ? x = M10 M00 ; ? y = M01 M00 : -LRB- 24 -RRB- The centre of mass can be chosen to represent the position of an image in the field of view . The equations in -LRB- 24 -RRB- define a unique location of the image f -LRB- x ; y -RRB- that can be used as a reference point to describe the position of the image . The second order moments , fM02 ; M11 ; M20g , known as the moments of intertia , may be used to determine the orientation of image f -LRB- x ; y -RRB- , an important image feature . In general , the orientation of an image describes how the image lies in the field of view , or the directions of the principal axes . For example , M02 and M20 are the moments of inertia of f -LRB- x ; y -RRB- around the x and y axes , respectively . An alternative means of describing image properties represented by moments is to consider the relationship between the moments of an image and those of the projections of that image . The moments in the sets fMp0g and fM0pg are equivalent to the moments of the image projection onto the x axis and y axis , respectively . Describing an image with moments means that global properties of the image are used rather than local ones . Hu -LSB- 7 -RSB- first demonstrated the utility of moment features through a simple pattern recognition experiment . The first two moment invariants , -LRB- 10 -RRB- and -LRB- 11 -RRB- were used to represent several known digitized patterns in a two-dimensional feature space . The experiment was performed by using a set of 26 capital English letters as input patterns . In the two-dimensional feature space , all the points representing each of the characters were fairly distinct except those of M and W. Compared with the set of English letters , the Chinese character set is much larger , and in terms of character recognition , is more difficult to classify . In addition , many Chinese characters that are different in meanings are very similar in shapes . Thus makes Chinese character recognition a very difficult task . However , two characters that have very similar local structures are not necessarily close in terms of global structures . Referencing the moment invariants and the properties of lower order moments , a character recognition model using a set of four nonliner combinations of lower order geometric moments is proposed here f1 = M20 + M02 -LRB- 25 -RRB- f2 = q -LRB- M20 ? M02 -RRB- 2 + 4M211 -LRB- 26 -RRB- f3 = q -LRB- M30 ? 3M12 -RRB- 2 + -LRB- 3M21 ? M03 -RRB- 2 -LRB- 27 -RRB- f4 = M30 + M03 -LRB- 28 -RRB- to represent all Chinese characters in the image plane -LRB- x ; y -RRB- as the recognition features . A point -LRB- f1 ; f2 ; f3 ; f4 -RRB- in this four dimensional space represents one Chinese character . In our experiments , we also applied the above model to central and Legendre moments to obtain three sets of data for comparative study . 4 Experimental Results To measure the distance between any pair of Chinese characters in our four dimensional space , we adopt the square root of the mean-square distance : dij = q -LRB- f1i ? f1j -RRB- 2 + -LRB- f2i ? f2j -RRB- 2 + -LRB- f3i ? f3j -RRB- 2 + -LRB- f4i ? f4j -RRB- 2 ; -LRB- 29 -RRB- where i and j represent any two Chinese characters . We apply our character recognition model , -LRB- 25 -RRB- to -LRB- 28 -RRB- , with three different types of moments discussed in Section 2 , to the set of 6,763 Chinese characters defined in China 's national standard GB2312 , with the font of song , as the testing images . All characters are binary images and are composed of 24 ? 24 pixels . For each image , all pixels representing the Chinese character have the value and those of background have the value 1 . The only reason to use the binary format of the Chinese characters is that it is closer to the problems in practice . Since there is no limitation for using the moment methods on multi-gray-level images , all results from the binary format can be extended to images with multi-gray-level images . In the experiments , we first calculated the distances between all pairs of characters , which is 22,872,466 -LRB- 6 ; 763 ? 6 ; 764 = 2 -RRB- in total . We summarized the result in Table 1 1 for all the characters within the distance of 0.01 for the moment functions geometric , central , and Legendre in the respective columns . Note that 338,895 pairs of characters by the geometric moment functions fall into the range of 0.01 whereas there are only 167 1The font used in the experiments is not the same as the font used to print out the Chinese characters in this document due to the limitation of LATEXfont managment of Chinese characters . pairs by the Legendre moment functions fall into the same range . Therefore , in terms of Chinese character recognition , the Legendre moments have much higher recognition power . Note also that in terms of recognition power , the geometric moments and the central moments are basically the same . dij < = Geometric Central Legendre 0.01 338,895 318,639 167 0.009 232,614 218,644 115 0.008 151,721 142,684 77 0.007 92,496 86,846 49 0.006 52,036 48,555 30 0.005 26,065 24,046 10 0.004 10,966 10.038 2 0.003 3,620 3,288 0.002 719 656 0.001 33 34 Table 1 : Statistics on the character pairs within distance 0.01 for geometric , central , and Legendre moments . Table 2 , Table 3 , and Table 4 show the closest ten pairs of Chinese characters for geometric , central , and Legendre moment methods , respectively . Note that there is no overlap for the three sets of the closest ten pairs of Chinese characters . In other words , a pair of Chinese characters which are difficult to recognize from each other with one method will not be so with another . Also note that all the pairs that are close in terms of the moment distance are not similar at all in terms of Chinese character specific features such as components and number of strokes . ? x ?? 7 ? V ? ?? Geometric 0.00046 0.00067 0.00068 0.00069 0.00070 ? - ? O $ ? ?? ? * Geometric 0.00070 0.00071 0.00072 0.00073 0.00073 Table 2 : The ten pairs of characters having the closest distances with the geometric moment features . ; 4 ? > ? ! ?? Central 0.00026 0.00047 0.00060 0.00060 0.00063 ?? ? 6 ? q ?? ?? Central 0.00064 0.00068 0.00069 0.00071 0.00072 Table 3 : The ten pairs of characters having the closest distances using the central moment features . ?? -RSB- D b ? ? V ffl ? Legendre 0.00327 0.00348 0.00413 0.00430 0.00434 ?? ?? ?? ?? ? H Legendre 0.00454 0.00465 0.00485 0.00488 0.00491 Table 4 : The ten pairs of characters having the closest distances with the Legendre moment features . One of the most difficult problems for Chinese character recognition systems is due to the complicated structures of Chinese characters . Chinese characters do carry a lot of information because the structures and components of each character often convey meanings . However , many Chinese characters that are different in meanings have very similar shapes thus making classification very difficult . In our experiments , we picked a set of Chinese character pairs that often have difficulty in recognition -LSB- 18 -RSB- in existing Chinese OCR systems . Table 5 lists the set of similar Chinese characters and the distances in terms of the three moment functions . The results show that moment methods perform well for all these pairs . The features extracted from the Legendre moments performs particularly well in terms of recognition distance as the distance of the closest pair is 0.03079 for the two characters ?? , which is well off the range of character pairs within distance of 0.01 in Table 1 . The pair of characters that are closest in terms of distance is ?? with value of 0.00632 in the geometric moments . However , according to Table 1 , this distance is further than at least another 52,036 pairs of characters . | ? ?? ?? ?? ? ffi H , L ? Geometric 0.00680 0.01307 0.00632 0.01128 0.01219 0.01407 0.01079 Central 0.00747 0.00815 0.00631 0.01161 0.01131 0.01299 0.01340 Legendre 0.16837 0.24733 0.06818 0.17662 0.18135 0.15541 0.24751 ?? ? F V ? ?? ? w ? \ ? Geometric 0.00632 0.01251 0.00733 0.02173 0.01670 0.01077 0.02951 Central 0.00701 0.00843 0.01584 0.01899 0.01600 0.01000 0.04698 Legendre 0.06605 0.20988 0.10702 0.03079 0.17441 0.07543 0.16324 ?? * AE ?? ?? > = ss ss ? YX Geometric 0.02511 0.01644 0.01656 0.02090 0.01059 0.00743 0.02029 Central 0.03124 0.01558 0.01854 0.02859 0.00906 0.01205 0.01851 Legendre 0.26712 0.06856 0.22637 0.20375 0.05095 0.12894 0.04325 Table 5 : Some Chinese characters which are very close in shapes and are difficult to recognize for some existing Chinese OCR systems . 5 Conclusions A new Chinese character recognition model with moment methods is described in this paper . We used the set of 6,763 Chinese characters as the testing images . The size of every Chinese character is 24 ? 24 and all pixels representing a Chinese character have the value and those of background have the value 1 . Four features were extracted from all characters and used in the experiment . The results show that those features extracted from each Chinese character can represent all Chinese characters reasonably well . The moment method can easily recognize the Chinese characters that are very close in shapes such as | ? , ?? , ?? , ?? , ? ffi , and H , . Especially , the Legendre moments perform very well in terms of Chinese character recognition . Moments are global features without regards to Chinese character specific features . All Chinese character pairs which have the closest distances among all Chinese characters are not in the close shapes . This makes the moment methods good complement for other Chinese character recognition techniques basing on the local structure features of Chinese characters . Therefore , it can be used in conjunction with other feature extraction methods to improve the recognition rate of OCR systems for printed Chinese characters . Acknowledgments Special thanks to Dr. Simon Liao , Department of Business Computing , The University of Winnipeg , Canada , for his collaboration with us during the summer of 1996 . His work in using moments for Chinese character reconstruction enlightened us in initiating this work . Our collaboration with Dr. Liao is made possible by UGC grant under the project CUHK264/94E . References -LSB- 1 -RSB- F.L. Alt , Digital pattern recognition by moments , J. Assoc. Computing Machinery , Vol . 9 , pp. 240-258 , 1962 . -LSB- 2 -RSB- R. Courant and D. Hilbert , Methods of Mathematical Physics , Vol . I. New York : Interscience , 1953 . -LSB- 3 -RSB- K.W. Gan and K.T. Lua , A new approach to stroke and feature point extraction in Chinese character recognition , Pattern Recognition Letter , Vol . 12 , pp. 381-387 , 1991 . -LSB- 4 -RSB- V.K. Govindan and A.P. Shivaprasad , Character recognition -LCB- a review , Patt . Recogn. , Vol . 23 , no. 7 , pp. 671-683 , 1990 . -LSB- 5 -RSB- F. Hausdorff , Summationsmethoden und Momentfolgen . I , Mathematische Zeitschrift , vol . 9 -LRB- 1921 -RRB- , pp. 75-109 . -LSB- 6 -RSB- T.H. Hildebrandt and L.J. Schoenberg , On linear functional operations and the moment problem for a finite interval in one or several dimensions , Annals of Mathematics , ser 2 , vol . 34 -LRB- 1933 -RRB- , pp . 317-328 . -LSB- 7 -RSB- M.K. Hu , Pattern recognition by moment invariants , proc . IRE 49 , 1961 , 1428 . -LSB- 8 -RSB- M.K. Hu , Visual problem recognition by moment invariant , IRE Trans . Inform . Theory , Vol . IT-8 , pp. 179-187 , Feb. 1962 . -LSB- 9 -RSB- Yajun Li , Reforming the theory of invariant moments for pattern recognition , Pattern Recognition , Vol . 25 , 723-730 , July , 1992 . -LSB- 10 -RSB- S. X. Liao and M. Pawlak , On image analysis by moments , IEEE Trans . PAMI , Vol . 18 , No. 3 , pp. 254-266 , March , 1996 . -LSB- 11 -RSB- S. X. Liao and M. Pawlak , Chinese character recognition via orthogonal moments , Proceedings of the 1995 Canadian Workshop on Information Theory , May 28-31 , 1995 , Manoir du Lac Delage , Lac Delage , Quebec , Canada . -LSB- 12 -RSB- Liu Jian and Ma Shaoping , An overview of printed Chinese character recognition techniques , Proceedings of the International Conference on Chinese Computing ' 96 , pp. 325-333 , Singapore , June 4-7 , 1996 . -LSB- 13 -RSB- Chin Lu , A survey on Chinese computing research , Hong Kong Computer Journal , Vol . 9 , No. 12 , December 1993 . -LSB- 14 -RSB- William K. Pratt , Digital Image Processing , 2nd Ed , John Wiley & Sons , Inc. , New York , 1991 . -LSB- 15 -RSB- R.J. Prokop and A.P. Reeves , A survey of moment-based techniques for unoccluded object representation and recognition , Graphical Models And Image Processing , Vol . 54 , No. 5 , September , pp. 438-460 , 1992 . -LSB- 16 -RSB- O. D. Trier , A. K. Jian , and T. Taxt , Feature extraction methods for character recognition -LCB- a survey , Pattern Recognition , Vol . 29 , No. 4 , pp. 641-662 , 1996 . -LSB- 17 -RSB- Youshou Wu and Xiaoqing Ding , Principle of Chinese Character Recognition and Its Realization , Higher Education Press -LRB- 1st Edition -RRB- , Beijing , 1992 . -LSB- 18 -RSB- Zhang Youghui and Liu Changping , The analysis and suggestion to the evaluation of Chinese character recognition systems , Proc . 1992 International Conference on Chinese Information Processing , pp . 407-412 , Beijing , China , October 26-28 , 1992 . -LSB- 19 -RSB- Zhang Xinzhong , Yan Changde , and Liu Xiuying , Feature point method of Chinese character recognition and its application , Journal of Computer Science & Technology , Vol . 5 , No. 4 , 1990 .

O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O B I O O O O O O O O O O O O O O O O O O O O B I I O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O B I I O O O O O O O O O B I I O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O B I I O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O B I O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O B I I O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O B I I O O O O O O O O B I O O O O O O B I O B I I O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O B I I O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O B I O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O B I O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O B I I O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O B I O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O B I I O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O B I O O O O O O O O O O O O O O O O O O O O B I O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O B I O O O O O O O O O O O B I I O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O B I I O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O B I O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O B I I O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O B I I O O O B I O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O B I I O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O B I O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O B I I O B I O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O B I O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O B I O B I O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O B I I O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O B I I O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O B I O O O O O O O O O O O O O O O O O O O O O O O O B I I O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O B I I O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O B I I O O O O O O O O O O O O O O O O O O O O

chinese character recognition
global features
moment functions
pattern recognition