GB2230886A - Recognition of shapes - Google Patents

Recognition of shapes Download PDF

Info

Publication number
GB2230886A
GB2230886A GB8909929A GB8909929A GB2230886A GB 2230886 A GB2230886 A GB 2230886A GB 8909929 A GB8909929 A GB 8909929A GB 8909929 A GB8909929 A GB 8909929A GB 2230886 A GB2230886 A GB 2230886A
Authority
GB
United Kingdom
Prior art keywords
boundary
clockwise
array
sequence
code
Prior art date
Legal status (The legal status is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the status listed.)
Withdrawn
Application number
GB8909929A
Other versions
GB8909929D0 (en
Inventor
Keith Herbert Hosking
Current Assignee (The listed assignees may be inaccurate. Google has not performed a legal analysis and makes no representation or warranty as to the accuracy of the list.)
BAE Systems Electronics Ltd
Original Assignee
GEC Marconi Ltd
Marconi Co Ltd
Priority date (The priority date is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the date listed.)
Filing date
Publication date
Application filed by GEC Marconi Ltd, Marconi Co Ltd filed Critical GEC Marconi Ltd
Priority to GB8909929A priority Critical patent/GB2230886A/en
Publication of GB8909929D0 publication Critical patent/GB8909929D0/en
Publication of GB2230886A publication Critical patent/GB2230886A/en
Withdrawn legal-status Critical Current

Links

Classifications

    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06VIMAGE OR VIDEO RECOGNITION OR UNDERSTANDING
    • G06V10/00Arrangements for image or video recognition or understanding
    • G06V10/40Extraction of image or video features
    • G06V10/46Descriptors for shape, contour or point-related descriptors, e.g. scale invariant feature transform [SIFT] or bags of words [BoW]; Salient regional features

Abstract

The boundary of a shape imaged on an array is coded to simplify it and remove minor deviations in its outline by the use of a rectangular mask which is centred on one position on the boundary, e.g. P, and the position Q at which the boundary strikes the edge of the mask is noted. The portion of the boundary from P to Q is then approximated to the nearest of eight compass directions, in this case a three element displacement in an easterly direction. The mask is then centred on point Q and the procedure repeated. A coded version of the outline is produced which reduces processing when comparing with codes for reference shapes. <IMAGE>

Description

RECOGNITION OF STAPES This invention relates to an apparatus for and a method of recognition of shapes.
The invention provides apparatus for recognition of shapes comprising means for representing an image of the shape on an array, means for encoding the boundary of the image by a sequence of displacements, at least some of the displacements being in one of a discrete number of predetermined directions and between positions separated by a given number of rows or columns of the array and means for comparing the sequence with that for a known shape.
The invention also provides a method of recognition of shapes, comprising representing an image of the shape on an array, encoding the boundary of the image by a sequence of displacements, at least some of the displacements being in one of a discrete number of predetermined directions and between positions separated by a given number of rows or columns of the array, and comparing the sequence with that for a known shape.
Because the boundary is coded by predetermined directions between spaced row or column positions in the array, minor defects in the image are not present in the code. In addition, the boundary code is invariant to the angular position of the image on the array.
Advantageously, each of the displacements, except for the last, are in the predetermined directions and between positions spaced by a given number of rows or columns of the array: the final displacement, that is, towards the starting position may well extend over a smaller number of rows and columns.
Advantageously the encoding means is such that each of the displacements in the predetermined directions is selected as the nearest at a discrete number of predetermined directions to the actual direction from one position on the boundary to the next position a given number of rows and columns away in the array. The array is conveniently a two-dimensional array of pixels (picture elements). Thus, each boundary position from which a predetermined direction forming part of the sequence is defined is separated from the previous boundary direction by a predetermined number of elements of the array in either co-ordinate direction.A notional mask centred on a position on the boundary and extending for a given number of array elements in each co-ordinate direction may be used to determine the next position in order to approximate the directions to one of the discrete directions, for example, to one of the eight compass directions.
The encoding means may be arranged to produce a reduced code of alternating clockwise and anti-clockwise displacements by combining the successive displacement in the clockwise and anti-cockwise sense. In some situations, for example, character recognition,.
comparison between the reduced code for an unknown character and the reduced code for a series of known characters may be used to speedily eliminate some of the known characters which do not correspond to the unknown character.
The encoding means may be arranged to add markers to the sequence to indicate when the cumulative deviation from a defined- position changes sense. Such markers can be used to identify key features in shapes that it is desired to match against known shapes.
Apparatus for and a method of shape recognition in accordance with the invention will now be described, by way of example, with reference to the accompanying drawings, in which: Figure 1 is a schematic view of the image of a shape on an array; Figure 2 is a schematic view of a mask for defining the next boundary position and the discrete predetermined directions; Figure 3 illustrates the use of the mask in conjunction with the array; Figure 4 shows an encoded sequence of directions corresponding to the image shown in Figure 1 represented graphically and as corresponding angular directions and array co-ordinates; Figure 5 shows the encoded sequence and a reduced code for the character E; Figure 6 shows the encoded sequence and a reduced code, together with a graphical representation of a further encoded shape;; Figure 7 shows the encoded sequence and a graphical representation of a shape, to which markers indicating the overall change in the sense of direction have been added; and Figure 8 shows a graphical representation of an encoded sequence before and after processing.
Referring to Figure 1, an array 1 of pixels 10 by 14 has imaged onto it the image 2 of an unknown object.
Image processing has been used to convert all elements greater than a certain intensity to binary "1", and the remaining elements of the array have been converted to binary "0". This serves to define an outline for the boundary of the image.
It would be possible, starting from point P, to define the boundary in terms of successive compass directions i.e. EENESENNENEES etc. this could be continued around the profile of the image, and the resulting series of compass directions would define the boundary of the image. However, it would also define every minor bump and indentation on the boundary and, in many cases in which the invention can be used, such minor details would not be part of the shape which was being imaged, but could be noise or other spurious information.
In accordance with the invention, the boundary is encoded, but using a mask as shown in Figure 2 which serves to smooth out the various bumps and indentations, and hence produce an encoded sequence for the boundary which may be compared with similarly smoothed codes for known objects, making recognition of the image a feasible processing operation.
The mask 3 is a 6 by 6 array centred on the point 4. The mask need not exist as a physical entity, but is used notionally to produce a code which represents a smoothed outline. Referring to Figure 3, the mask is centred on a given position P i.e. the starting position of the boundary, and the position where, proceeding in one direction along the boundary, the boundary first intersects one of the edges of the mask, in this case, Q, is noted.
The section of the boundary between P and Q could be approximated by a line joining P and Q. However, in order to simplify the encoded shape still further, the direction of line P Q is approximated to one of eight possible directions from point P i.e. N, S, E, W, NE, SE, SW, NW. Thus, if Q were to lie at mask co-ordinates 2, 3 or 3, 2, circled as NE exit position then the direction is approximated to direction NE i.e a north east direction. If, as in this case, Q lies on any of the mask co-ordinates 3, 1, 3, 0, or 3, -1, then these directions are approximated to a due east direction.
Referring to Figure 3, it will be seen that the direction between P and Q is approximated to a displacement of 3 units in an easterly direction (see Figure 4). The notional mask is then centred on point Q, and the boundary strikes the edge of the mask at point R, at mask co-ordinate 3, 2, and this displacement is approximated to a diagonal line in a north easterly direction (see Figure 4). The mask is then centred on position R, and the next direction is a displacement of three squares in the easterly direction. This process is continued until the entire outline has been traced.
The process may however as in this case, differ for the last displacement Thus, for the penultimate displacement, the mask is centred on array co-ordinate 4, 4 and the boundary strikes the edge of the mask at array co-ordinate 1, 4 and mask co-ordinate -3, 0. This gives a three unit westerly displacement. The mask is now centred on array co-ordinate 1, 4. This time, however, the mask contains the starting point P. Thus, instead of considering the position at which the boundary strikes the edge of the mask, this time the direction to the starting point P is considered. This lies in a northerly direction with a two element displacement, and so this forms the final displacement of the sequence.Had the starting point lain on a mask co-ordinate other than on a N, S, E or W axis, then the direction of the final displacement of the sequence would be approximated to one of the eight compass directions as before. Of course it could happen that the starting point lies on the boundary edge when the final displacement is being calculated, in which case the final displacement will traverse three element widths as usual.
The use of the notional mask has had the effect of smoothing the outline af the image from that shown in Figure 1 to that shown in Figure 4.
The outline may be represented in terms of successive clockwise (C) and anti-clockwise (A) deviations, together with the array co-ordinates of the positions on the boundary on which the mask was centred.
These are also shown in Figure 4. Referring to the clockwise/anti-clockwise sequence, it will be seen that, starting from point P, the first angular displacement of the boundary relative to its preceding section is a 900 clockwise displacement, the next displacement (section marked NE) is an anti-clockwise displacement at 450 this is followed by a clockwise rotation of 450 and a further clockwise rotation of 450.
The sequence of clockwise and anti-clockwise.
rotations is a code representing the outline of the shape imaged in Figure 1, and the code may be compared with codes processed in a similar way for known shapes to find matches or otherwise. A particular advantage of the code is that it is invariant to the angular position of the image on the array, as well as being independent of the size of the image. It is possible that the use of the code, "the initial boundary code", may be sufficient to identify a shape, but the array co-ordinates of the positions from which the approximated directions were measured i.e. the x and y co-ordinates are also recorded to enable more detailed discrimination to be carried out if necessary.
The apparatus used to analyse the initial boundary code may be such, referring to Figure 5, as to combine successive clockwise and anti-clockwise deviations to produce a code containing only successive clockwise and anti-clockwise deviations, but with correspondingly accumulated angles. Thus, the initial boundary code of the letter E comprises, starting from the top left hand corner of the letter, first of all a 900 clockwise deviation, where the outer upright of the letter E changes to the upper horizontal. The right hand end of the upper limb produces a clockwise deviation of 1800, and the junction between the upper limb and the downward stroke is an anti-clockwise deviation of 900. The remainder of the letter may be traversed to produce the upper of the two codes shown in Figure 5.The lower code is produced by adding adjacent clockwise and anti-clockwise deviations. In the case of the initial clockwise deviation, this is produced by adding the clockwise deviations at the beginning of the code to those at the end of the code. In the case of recognition of the character "E", the mere fact that the code consists of CACA immediately eliminates many of the possible letters the character could correspond to.
Thus, to take a simple example, the letter 0 would be represented by a single clockwise deviation of 3600, i.e. a code of C, and the letter L by a clockwise deviation of 4500 followed by an anti-clockwise deviation of 900 i.e. a code of CA. However, there will be some characters other than "E" which have a CA reduced code and, to distinguish from them, the cumulative angles can be used to enable the letter in question to be identified.
While this first method of analysis of the initial boundary code is useful on characters such as letters which tend to be sharp spiky shapes, it is less useful on more smoothly varying shapes, such as that shown in Figure 6, which is a graphical representation of the initial boundary code of an image. The initial boundary code is a3so given, starting from point P, and it will be seen that it consists of a clockwise rotation through 900 followed by an anti-clockwise rotation through 450, a clockwise rotation through 450 an anti-clockwise rotation through 450 a clockwise rotation through 450, a clockwise rotation through 900, and so on.This initial boundary code reduces to the reduced code consisting of a clockwise rotation through 3600 an anti-clockwise rotation through 450 a clockwise rotation through 450 etc. However, it will he apparent that, if the part of the outline of the graphical representation from point P to the steep well 12 had an extra "step" in it i.e.
three steps instead of two, both the initial boundary code and the reduced code would contain an extra "CA".
Even though the additional "step" may be small, nevertheless both the initial boundary code and the reduced code would differ from those of the graphical representation shown in Figure 6. This would make shape recognition more difficult.
It is to overcome this that the apparatus may be arranged to associate markers with the initial boundary code as shown in Figure 7.
The initial boundary code and its graphical representation are shown in Figure 7. Starting from point P, the first marker M1 is associated with an anti-clockwise deviation, since this indicates the beginning of a raised section or "hill" relative to the direction of the initial displacement from P. The apex of the raised portion, that is, the position at which the cumulative deviation (relative to the direction of the initial displacement from P) changes from being anti-clockwise to being clockwise is indicated by the marker M2, and this is shown for the circled areas 5 and 6 in Figure 7. This does not fully define the extent of the raised portions, and so additional markers M3 and M4 are associated with the respective positions on the initial boundary code when traversing the boundary in the opposite direction.Thus, M3 represents the position at which the horizontal lower section of the code changes to an upward section and M4 represents the position at which the cumulative displacement becomes downward in direction. Markers M1 and M3 can then be used to indicate the extent of the raised portions.
Thus, when the initial boundary code of Figure 7 is compared with that for a given image, it suffices at first to simply check whether the markers define the same number of raised portions or not. As a secondary stage of discrimination, the whole boundary code may be compared between the markers representing the overall extent of the raised portion to ascertain the similarity or otherwise to the reference code. Beyond that, relative lengths of the various parts of the outline of the graphical representation of the initial boundary code may be compared, since the array co-ordinates defining the starts of the direction changes, are also recorded.
The method referred to above could of course be extended to mark depressions in the graphical representation of the boundary code as well as raised sections. Also, instead of starting at position F, the starting point could be chosen as a function of the largest total anti-clockwise rotation in the code, corresponding to the lower horizontal line. The starting point would then be invariant to the rotation of the graphical representation within the imaged array.
Referring to Figure 8 the graphical representation of the initial boundary code may have detailed features such as 7, 8, 9 10 and 11, which, while corresponding to actual features of the shape to be identified, nevertheless may initially hamper the recognition process. The apparatus may be arranged to process the initial boundary code by removal of portions which represent less than a defined proportion of the total boundary outline. In the case of the "spike" 8 this would be converted to a spike of zero width. The processor would then recognise that an up deviation followed by a down deviation of a lesser amount was equivalent to a sideways deviation at the appropriate position.
Of course, variations may be made from the apparatus and method described above without departing from the scope of the invention. Thus, the notional mask need not be rectangular but could be circular equally it could have a different number of elements and a larger or smaller number of compass positions could be approximated to to produce the predetermined directions.
Or if, in the case of Figure 2, there are twenty-four predetermined directions, there is no need to make any approximation of directions for the displacements in the initial boundary code sequence. Similarly, there need not be any approximations with a mask of different size.

Claims (11)

1. Apparatus for the recognition of shapes comprising means for representing an image of the shape on an array, means for encoding the boundary of the image by a sequence of displacements, at least some of the displacements being in one of a discrete number of predetermined directions and between positions separated by a given number of rows or columns of the array, and means for comparing the sequence with that for a known shape.
2. Apparatus as claimed in Claim 1, in which each of the displacements in the predetermined directions is selected as the nearest of a discrete number of predetermined directions to the actual direction from one position on the boundary to the next position a given number of rows or columns in the array away.
3. Apparatus as claimed in Claim 1 or Claim 2, in which the encoding means is arranged to produce a reduced code of alternating clockwise and anti-clockwise deviations by combining successive deviations in the clockwise and anti-clockwise sense.
4. Apparatus as claimed in any one of claims 1 to 3, in which the encoding means is arranged to add markers to the sequence to indicate when the cumulative deviation from a defined position changes sense.
5. Apparatus as claimed in Claim 4, wherein the encoding means is arranged to add markers when the cumulative deviation changes sense when moving around the boundary in both directions.
6. A method for recognition of shapes, comprising representing an image of the shape on an array, encoding the boundary of the image by a sequence of displacements, at least some of the displacements being in one of a discrete number of predetermined directions and between positions separated by a given number of rows or columns of the array, and comparing the sequence with that for a known shape.
7. A method as claimed in Claim 6 in which each of the displacements in the predetermined directions is selected as the nearest of a discrete number of predetermined directions to the actual direction from one position on the boundary to the next position a given number of rows or columns in the array away.
8. A method as claimed in Claim 6 or Claim 7, in which successive clockwise and anti-clockwise deviations are combined to produce a reduced code.
9. A method as claimed in any one of Claims 6 to 8, in which markers are added to the sequence to indicate when the cumulative deviation from a defined position changes sense.
10. Apparatus for the recognition of objects substantially as hereinbefore described with reference to the accompanying drawings.
11. A method of recognition of shapes substantially as hereinbefore described with reference to the accompanying drawings.
GB8909929A 1989-04-29 1989-04-29 Recognition of shapes Withdrawn GB2230886A (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
GB8909929A GB2230886A (en) 1989-04-29 1989-04-29 Recognition of shapes

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
GB8909929A GB2230886A (en) 1989-04-29 1989-04-29 Recognition of shapes

Publications (2)

Publication Number Publication Date
GB8909929D0 GB8909929D0 (en) 1989-09-20
GB2230886A true GB2230886A (en) 1990-10-31

Family

ID=10656013

Family Applications (1)

Application Number Title Priority Date Filing Date
GB8909929A Withdrawn GB2230886A (en) 1989-04-29 1989-04-29 Recognition of shapes

Country Status (1)

Country Link
GB (1) GB2230886A (en)

Cited By (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
GB2328308A (en) * 1997-08-12 1999-02-17 Motorola Inc Recognition of hand-printed characters represented as an electronic ink stream

Citations (4)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
GB1171627A (en) * 1966-10-07 1969-11-26 Post Office Improvements in or relating to Character Recognition Machines
GB1401008A (en) * 1971-08-17 1975-07-16 Mullared Ltd Character recognition apparatus
GB2144251A (en) * 1983-07-14 1985-02-27 Scan Optics Inc Apparatus for identifying patterns
EP0253397A2 (en) * 1986-07-17 1988-01-20 Matsushita Electric Industrial Co., Ltd. Shape recognition method

Patent Citations (4)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
GB1171627A (en) * 1966-10-07 1969-11-26 Post Office Improvements in or relating to Character Recognition Machines
GB1401008A (en) * 1971-08-17 1975-07-16 Mullared Ltd Character recognition apparatus
GB2144251A (en) * 1983-07-14 1985-02-27 Scan Optics Inc Apparatus for identifying patterns
EP0253397A2 (en) * 1986-07-17 1988-01-20 Matsushita Electric Industrial Co., Ltd. Shape recognition method

Cited By (2)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
GB2328308A (en) * 1997-08-12 1999-02-17 Motorola Inc Recognition of hand-printed characters represented as an electronic ink stream
GB2328308B (en) * 1997-08-12 1999-12-01 Motorola Inc Method and apparatus for recognition of hand-printed characters represented as an electronic ink stream

Also Published As

Publication number Publication date
GB8909929D0 (en) 1989-09-20

Similar Documents

Publication Publication Date Title
US6548768B1 (en) Determination of a position code
US4310827A (en) Device for extracting a density as one of pattern features for each feature point of a streaked pattern
JP3170299B2 (en) Image reading processing device
KR960016421B1 (en) Method and apparatus for segmenting a character &amp; method and apparatus for extracting a character string
Hori et al. Raster-to-vector conversion by line fitting based on contours and skeletons
CA2097492A1 (en) Method for determining orientation of contour line segment in local area and for determining straight line and corner
JPH0772905B2 (en) How to recognize a symbol string
JPH05242292A (en) Separating method
CN108573511B (en) Point-distributed cooperative coding mark and identification and positioning method thereof
GB2230886A (en) Recognition of shapes
CN113538483B (en) Coding and decoding method and measuring method of high-precision close-range photogrammetry mark
US7433509B1 (en) Method for automatic de-skewing of multiple layer wafer for improved pattern recognition
JP3096481B2 (en) How to determine the type of form
JPH01271884A (en) Detecting system for center of fingerprint
JP3714459B2 (en) Position detection method for moving objects
JPH06168331A (en) Patter matching method
JP2988697B2 (en) Figure recognition method
RU2054197C1 (en) Method for encoding papillary pattern in finger- prints
JP2926069B2 (en) Fingerprint matching method
JP2993533B2 (en) Information processing device and character recognition device
JPH09147105A (en) Extracting method for drawing closed area
JPH04268989A (en) Method and device for recognizing character
JPS5814709B2 (en) Shape recognition method for closed shapes
JP2959054B2 (en) Line type discrimination method in pattern recognition device
WO2004063975A1 (en) Method of binarizing images containing linear structures

Legal Events

Date Code Title Description
732E Amendments to the register in respect of changes of name or changes affecting rights (sect. 32/1977)
WAP Application withdrawn, taken to be withdrawn or refused ** after publication under section 16(1)