Pattern analysis for point-of-sale automation

Pattern analysis for point-of-sale automation

Pattern Recognition Letters 6 (1987) 139-143 North-Holland July 1987 Pattern analysis for point-of-sale automation L. N O R T O N - W A Y N E School...

330KB Sizes 0 Downloads 12 Views

Pattern Recognition Letters 6 (1987) 139-143 North-Holland

July 1987

Pattern analysis for point-of-sale automation L. N O R T O N - W A Y N E School o f Electronics, Leicester Polytechnic, P.O. Box 143, Leicester LE1 9BH, United Kingdom Received 13 October 1985

Abstract: The paper provides a progress report on a project aimed at automating the checkout operation at a supermarket, without corrupting package labels by adding barcodes. Significant parameters of the checkout operation such as throughput and error rates are first discussed. Next, the requirements for a pattern recognition methodology for identifying packaged merchandise are analysed and an approach is suggested. Finally, the results of an investigation of simple image processing methods for recognising labels are presented, and an approach based on grey level histogram data is shown to be promising. Key word: Point of sale automation.

1. Introduction A substantial fraction of the economy is devoted to retail sales at (for example) supermarkets whose main merchandise is food. At the checkout of a supermarket it is necessary to identify the articles purchased so that a bill may be prepared. This is usually done by a h u m a n operative who identifies the items visually, and reads the price f r o m a tag which has been affixed at the supermarket. To improve the efficiency of the checkout, m a n y items now carry a standardised barcode so they can be identified automatically, by scanning the item using a hand-held wand or by passing it over a laser scanner. The prices corresponding to the barcodes are held in a computer which tots up the bill, and can also assist in maintaining stock control and provide statistical information regarding throughput and so on. Use of barcodes does not reduce the number of operatives but does provide increased throughput. In the U.K. at least, barcode installations are spreading rather slowly (only about 1% of outlets so far) because of the high capital cost involved. Adding a barcode to a label is an unecessary and undesirable adulteration; for reasons of copyright

all packages must be visually distinguishable, and they are generally dissimilar. O k a w a [1] pointed out that because of this, it should be possible to identify packages easily using machine vision. His paper describes a method which is claimed to work well, but seems to us to be rather cumbersome. It must be emphasised that the packages differ so much in gross properties such as weight, shape, electrical conductivity, size and so on that using machine vision to identify labels is in some respects a 'last resort'; much more information may be obtained f r o m the gross properties which are generally easy to sense. However, pattern recognition must be applied to whatever measurements are used, and an approach is required which is 'trainable by showing', which is very fast, which has an error rate less than 0.015°70, and which can cope with a base of upwards of 15 000 pattern classes. Prices are updated (by keying in by hand) normally every week; about 5 new items are added each week, and the system must then be trained to distinguish these, without re-scanning the items already stored. This paper reports on work carried out at Leicester Polytechnic which commenced in 1981 aimed at producing a practicable methodology for identifying packages automatically at a point-of-

0167-8655/87/$3.50 © 1987, Elsevier Science Publishers B.V. (North-Holland)

139

Volume 6, Number 2

PATTERN RECOGNITION LETTERS

sale. Detailed work has chiefly been performed as a series of student projects at B.Sc. and M.Sc. level, and is still progressing. The p r o g r a m m e has comprised a number of stages including: defining the problem (in terms o f throughout and error rates acceptable, for example) [2]; developing a rig for investigating machine vision and pattern recognition algorithms [3]; investigating some methods for automatic identification of packages which are completely identical in all respects save for the pattern printed on them [3,4].

2. Problem specification The nature of the checkout operation in a supermarket is too well known to need detailed description. The average customer has in his basket some 40-50 items with a value of £15-£16. A manual checkout operation can handle some 30 items per minute, increasable to 36 by using barcodes. Barcode installations cost upwards of £8 000 per lane (a non-electronic lane costs only one-tenth of this), and are usually viable only where there are at least 15 lanes. A b o u t 90% o f food packaged at source is currently barcoded; most supermarkets also sell non-food items for which bar coding is rarer, thus the proportion of items barcoded in a typical supermarket is about 65 %. This contrasts with only 30°7o of the items sold at a non-food store selling small items, such as W . H . Smith's. C o m p u t e r installations for applications such as stock control are now c o m m o n in larger supermarkets, thus familiarity with information technology is spreading, and existing central computer installations can be used as nodal processors with barcode readers (and the more sophisticated instrumentation we are proposing) regarded as intelligent peripherals. The use of automated checkouts saves money for the supermarket since individual pricing of items (requiring a label to be stuck on each) is replaced by shelf edge labelling; this reduces the cost of shelf filling by 10-15%, and reduces errors due to mislabelling.

July 1987

formation for distinguishing articles is obtained f r o m simple measurements such as weight, shape, metallic or non-metallic, m a x i m u m height and so on. Measurement of these properties (into 'cells' of, for example, less that 50 gin, 50 to 250 gm, 250 to 500 gm etc.) provides features which can be used in a standard classifier. I n f o r m a t i o n f r o m machine vision merely provides additional feature information, for use when the simple measurements do not suffice. The pattern recognition involved in merchandise identification is essentially deterministic in that the properties of the various classes used as features normally exhibit almost no 'within class' variation. In m a n y cases, the features are merely binary (e.g. is the item metallic?), and the error rate in measuring an average feature is likely to be small, say less than 0.01. In these circumstances, we propose the following approach. Consider the task of distinguishing 8 typical items which might appear at a supermarket checkout. Items (1), (2) and (3) are tin cans; item (1), a can of sardines, is low and flat. Item (2) is a standard tall cylindrical can containing perhaps baked beans, and item (3) is a rectangular can with rounded corners of the shape used to contain corned beef. Item (4) is a bottle (of mineral water, say). Item (5) is a rectangular package, e.g. a washing powder carton, item (6) a flat package typical of butter, item (7) is an inverted frustum of a cone, made of plastic and containing yogurt, whilst (8) is a rectangular pack with soft corners, typified by a bag of sugar. Ideally, three tests having a binary (yes or no) outsome should suffice to distinguish the items, by providing an orthogonal partition, i.e., divide the items into two equal groups each in a different way. In practice, it is unlikely we should find such tests; instead, we would make tests as follows: A B C D E

-

is is is is is

the the the the the

item metallic? weight greater than 500 grams? height greater than 10 centimetres? item transparent? item soft?

3. Pattern recognition Again, we emphasise that the most useful in140

The result of applying these tests to items (1) to (8) is shown in Table 1.

V o l u m e 6, N u m b e r

2

PATTERN

RECOGNITION

Table 1 P r a c t i c a l b i n a r y tests f o r d i s t i n g u i s h i n g e i g h t i t e m s Test Item

A

B

C

D

E

(1)

y

n

n

n

n

(2)

y

y

y

n

n

(3)

y

y

n

n

n

(4)

n

n

n

y

n

(5)

n

y

y

n

y

(6)

n

n

n

n

n

(7)

n

y

y

n

y

(8)

n

y

n

n

y

y = 'yes', n = 'no'.

An unknown item is identified by comparing its feature vector with all those stored until a fit is found. It is just possible to distinguish the items using these tests since the 'row vector' of outcomes is different for each item. The partition is inefficient in using five tests instead of three, but has a more serious weakness in being almost intolerant of error in measuring features. In m a n y cases, inversion of a ' y ' to an " n ' or vice-versa will change the vector to that characteristic of some other item. References (5) and [6) show how the approach may be made to tolerate errors in measuring features by including redundant feature information; the extension to features having more than two possible values is trivial. The references also show how a suitable set of features may be selected efficiently f r o m a large set of candidate features, and [6) gives rejection and substitution rates as a function of the probability of measuring features incorrectly, for two alternative matching procedures. Care must be exercised in selecting possible feature measures for practicability - test E above might cause damage; unless very carefully designed, it is not non-destructive.

4. Image processsing O k a w a ' s method [1] for identifying labels used colour information, and involved dividing the image into regions each of characteristic colour. Although fading and change in ambient lighting may cause the colours to vary somewhat, their

LETTERS

J u l y 1987

areas will stay the same; this is a strength of the method. No attempt was made to read printed characters. We believe a simpler approach using only grey scale information should work. In selecting a methodology, the following criteria were used: (a) The cost per installation must be much less than £8 000. (b) The items must be scanned whilst moving along a belt. (c) Constraint in either position or orientation during scanning must be minimal. (d) The amount of data which must be stored to describe each package must be reasonable. The approach we have been evaluating is as follows. The items are placed on a black moving belt, illuminated from above using diffuse white light, and scanned using a 256 element CCD linescan camera. Each pixel from the camera output is considered to arise f r o m the item if above a threshold; otherwise, it is from the background and is ignored by the processing. Sophisticated tasks such as reading printed characters have been carefully avoided - the range of fonts and sizes found on supermarket merchandise is very wide. Instead, the simplest function of the pixels which suffices to distinguish packages should be used; an investigation was mounted to evaluate systematically all possibilities, in decreasing order of simplicity, until a measure was encountered which worked. In the experimental investigation [4,5], the individual packets from variety packs of Kellogg's breakfast cereals have been used, since these are absolutely identical in all respects except the pattern that is printed on them. Figure 1 shows typical histograms of grey levels obtained from five types of packages. It is seen that there are regions where the amplitudes of the grey levels are sufficiently different to distinguish (say) pairs of patterns, though no single grey level suffices to distinguish all five. For a feature to be viable, its 'within class' variation must be much less than the variation 'between classes' [7]. This is established by auxiliary experiments, i.e., by repeated examination of a single package (to determine the extent of machine noise), and by examination of many samples of a particular design, to determine the extent of 'within class' variation. Some examples of tests for 141

Volume 6, N u m b e r 2

PATTERN RECOGNITION LETTERS Table 2

K-Special

iI

July 1987

Feature K-Special Cornflakes K.puffa Cocopops R.Krispies

[I

li t iii~i! ii High :.

ii

illiiii IHH~

,

...... ii[![i[ I~!

,,, . . [ , . . I . , . . . . . . . .

,.t]

19 40 65 87

~i.ii

231 14 233 16

256 25 11 29

64 32 61 12

82 16 87 12

21 18 23 30

,i!l,l,lhh,I L,,I,liliii

P u f f a - p u f f a Rice

Table 3 Feature K-Special Cornflakes K.puffa Cocopops R.Krispies

1i

o

II,,,h,l,l,, ill ,lll ,hil,,ll,,,,hl,,,l,,,,,,

Rice Krispies t ili l

~o x

ii!

"8

i

ii!i

lli i ~I!H H

.Q

E 7

i i i il~Ti*,,*,"'Il " i" ll;1,1 ',llt,ld.,,h' ~!

ill,l! lib_ i!.,,~,II

]

,,,J,lLihl

I !hi,,,

Cornflakes

i t

i~!i[ , HIii L hi,il i

Ill i~ iddi il

Iiilihlh~ ]HiHI ': i

|.

II

'

"

_,, ~dlIii IIIEIii,~!H!!

....... IG,

1-30 251 31-60 23 61-90 197 91-120 107

256 64 142 113

223 156 132 37

255 149 143 42

201 138 117 70

this see [5]. Level 87 is clearly a rather poor feature, whereas level 65 is potentially very useful. Features which are highly stable m a y be obtained from the grey level histograms by summing the entries of bars 1 to 30, 31 to 60, 61 to 90 and 91 to 120, for example. The effect is to integrate out noise; samples moving from a particular bar to the adjacent one through for example a change in ambient lighting will in 97°7o of cases remain within the same sum. Some examples are shown in Table 3 (adapted f r o m ref. [4]), normalised as for Table 2. The distinction between K . P u f f a and C o c o p o p packages is clearly not so good as for the other pairs, and it would be worth trying sums over smaller numbers of bars.

C o c o Pops

FP

5. Conclusions

l i

hi!iii'.

.I i! 1

'

Ill

Pixel Amplitude

100

Figure 1. Grey-level histograms of five types of packages.

'within class' variation are given in [3]. Some data for grey levels 19, 40, 65 and 87 is given in Table 2. The entries are the number of pixels at the given level, scaled so that the largest value in the table equals 256. This ensures that each feature will fit in one byte; for the significance of 142

A thorough study has been completed regarding the needs and characteristics of the retail checkout operation; our investigation of this aspect is virtually complete. Useful results have been obtained on the identification of labels using simple image processing; features comprising blocks of the grey level histogram should give low error rate identification. Coding pattern recognition should provide for economical handling of the large data bases required together with tolerance of errors in measuring features, but this remains to be confirmed. Current attention is being concentrated on evaluation of the non-image features which should provide the bulk of the feature information.

Volume 6, Number 2

PATTERN RECOGNITION LETTERS

References [1] Okawa, O. (1980). Identification of packaged-in-a-box goods for designing a part of an intelligent cash register. Proc. 5th 1CPR Miami, Vol. 1, pp. 150-152. [2] Salah, H. (1985). Automating the retail checkout operation. B.Sc. Final Year Report. School of Mechanical and Production Engineering, Leicester Polytechnic. [3] Morgan, M. (1983). Automated identification of packaged merchandise. B.Sc. Project Report. School of Electronic Engineering, Leicester Polytechnic. [4] Akhrib, A. (1985). Automated identification of packaged

July 1987

merchandise by computer vision. M.Sc. Project Report. School of Maths, Computing and Statistics, Leicester Polytechnic. [5] Norton-Wayne, L. (1982). A coding approach to pattern recognition. In: Kittler, Fu and Pau, Eds., Pattern Recognition - Theory and Applications. Reidel, Dordrecht, pp. 93-102. [6] Obray, C.D. and L. Norton-Wayne (1985). Pattern recognition using a channel coding approach. Presented at the Third lnternat. Conf. on Pattern Recognition of the BPRA, St. Andrews. [7] Browne, A. and L. Norton-Wayne (1986). Vision and Inf o r m a t i o n Processing f o r Automation. Press, New York.

143