SHAPE DETECTION

Abstract: A method whereby a digital image may be partitioned into sets of points called shape-primitives each of which comprises a part of the boundary of a shape. The parameters associated with the forms of the shape-primitives and also those parameters associated with different orientations of the shape-primitives within the image space may be determined. The method requires that the edge-image data be parametrically transformed and maxima indicative of shape-primitives in the edge-image space are detected using convolution filters particular to the forms of the distributions associated with the maxima. The parameters associated with straight line segments may be deduced at this first stage of the process but a second parametric transformation of the data obtained using the convolution filters particular to the distributions of maxima associated with curved shape-primitives is required in order to deduce the parameters associated with those shape-primitives.

Description: S ape Detection This invention relates to a method of and apparatus for shape detection of digital data. US patent specification Bo 3069654 describes a method of finding the parameters αf straight lines in an image. Bach point is mapped into a gradient-intercept (m,c) parametric transform space to produce lines representing all possible gradients and intercepts of lines passing through that point. Thus, a point (x±,yι ) in the image space is mapped into a line satisfying the equation c = y± - xt. in the parametric transform space. A maximum, or intersection, in the transform space is detected and determined to represent a line in the image space, since an intersection at ( m ι,cr> of a plurality of lines in the transform space denotes a corresponding plurality of colinear points in the image space all lying on the line having the equation y = mix -r a. However, when the image space contains a plurality αf lines, additional spurious maxima or intersections are produced in the transform space and are erroneously determined to represent lines in the image space. Furthermore, using the method described above, it is not possible to determine whether or not a maximum in the transform space represents a single straight segment or a plurality of disconnected colinear points in the image space. A further problem with the method described above is that the m and c parameters are unbounded and therefore some groups of points in the image space cannot be represented in a bounded transform space. In view of the last-mentioned disadvantage of the method described above, another known method maps points in the image space into an angle-radius (θ,r) normal parametrisation transform space or "sinogram", rather than an Cat,c) transform space. Each point in the image space is mapped into a sine curve in the sinαgram representing r and 8 for all possible lines in the image space passing through the point, where r is the algebraic distance from the origin to the line along normal to the line and θ is the angle to the normal to the x-axis. Typically, the limits of θ are -π ( 8 ( π. The transform plane has the topology of a Xobius strip when the range covers an interval of ~ . In the case of a bounded square image space of size L x L, the limits of r sure -V*!. i τ i 2 1 ' 2 L. For the purposes of the. present invention it is convenient to define shape Cin two dimensions) to be the relative spatial arrangement of a 'closed set αf connex points in the (x,y) plane, the principal boundary of the set dividing the plane into two domains, one open, one closed. Both domains share as common boundary, the same simple, closed curve 32. See Fig.l. Secondary boundaries 34 may exist which exclude closed connex sets of points from the domain of the shape, see Fig.2. Where a shape is composed of a multiplicity of boundaries then the sets of points of such, boundaries are disjoint one from another. The boundary points αf the domain of the shape may be partitioned into closed sets called shape-primitives. One aspect of the present invention is concerned with the automatic partitioning of the boundary points αf the edge image αf an object into its constituent shape-primitives thus enabling a symbolic description of the abject to be deduced and stored in a computer's memory for the purposes of automatic recognition and location αf objects. A smooth, continuous distribution of data points in the image space will produce a smooth, continuous distribution of maxima in the transform space, the limiting cases of this phenomenon are given by the point and the straight - 2- line. The point gives rise to no maximum values and the straight line produces only one maximum value. Figs 3 to 10 show the transforms of binary images of curved shape-primitives. Any arc of a conic section may also be used as a shape-primitive. It is convenient to use conic sections or arcs of conic sections as shape-primitives but cither formulations are possible. The curve which is the locus of the maxima corresponding to a curved shape-primitive in image space will have the general equation: r = (xo s + yo 2 ) " cσ&<8 - a - taa' 1 <yo/x 0 )) + 1/2 (a-b) cos (28 - α) + 1/2 (a+b) cos α (1) where a and b are parameters describing the dilations which are required to produce a particular shape-primitive from a unit circle; Xo,yo are the parameters describing the translation αf an abject centered ca-ordinate system with respect to the viewer-centered coordinate system; and α is the angle through which the former co-ordinate system has been rotated. Figure 11 shows how the different shape primitives are related; a transformation matrix is used to dilate the image space in which a unit circle is defined. The values taken by the elements 1/a and 1/b of the matrix determine the form of the shape primitive which results from the application of the transformation denoted by A. For example, values of a = b will result in a circle of radius a, whereas values of a not equal to b will yield the ellipse with major and minor axes a and b. The hyperbola, parabola, and straight line may also result using the limiting cases αf particular families αf ellipses. The following criteria are satisfied with respect to the curves representing the shape-primitives: 1. The equation of the curve may be expressed in the form f(x,y) = 0; 2. The first partial derivatives, with, respect to x and y of f(x,y) must exist and be finite. This ensures that the tangents to the curve are continuously turning; 3. The shape-primitive must be of finite length, not intersect itself, and have no branc points; and 4. An endpoint of a shape-primitive may be common to only one other shape-primitive.. Where a point is common to two shape-primitives that point is an endpoint αf both shape-primitives. Thus the only intersection of the curves is the plural membership of the endpoints of the curves. This ensures the closure of the curve which forms the boundary of the domain of an object and allows composite shape-boundaries to be formed by the conjunction of a finite number of shape-primitives. Ηeferring to Fig.12 and Fig.13, the position, <ro,θo), of each maximum value in the transform space CFig.13) yields the equation of the tangent 36 to the curve 38 in image space at the point on the curve where the tangent and the curve have the same normal 40. The prior art recognises the existence αf the maxima in the transform space and their significance with respect to the image space, but it fails to realize or to exploit the fact that the maxima have associated with them particular distributions of data around them. Previous methods assume that thresholding, coupled with a search for local maximum values (and perhaps some prior smoothing αf the data paints in transform space), will yield the positions of the maxima. The prior art may be classified as providing a method αf shape detection in digital image data comprising the steps α : transforming the image data into a parametric transform space; and extracting shape characterising parameters from the transform space indicative of a particular shape in the image space; by either: using a transformation particular to a given shape-primitive and thereafter searching that transform space for the position of maxima indicative of the particular shape-primitive in image space; (in the instances αf curved shape-primitives it is necessary to have a parameter space whose dimensionality corresponds to the number of parameters under detection); or locating the maxima in a sinogram and thereafter performing shape- primitive specific transformations on the distributions of maxima in the transform space and applying an "inverse" transform on the resulting image, as shown for example in Fig.14 to Fig.17. Specifically referring to Figures 14 to 17, the circle 42 produces a distribution 44 ' of maxima in transform space (Fig.15) with the equation r = p + ■ ( xo s + yo ~ ) ι ~ cos (8 - tan' 1 (y /xo ) ) Therefore, if the r coordinate of each maximum value in the sinogram has subtracted from it a value of p, the radius of the circle, then a sinusoid which is symmetric about the 8 axis will result (Fig.16). If each point on this sinusoid is then used to deduce the equation αf a straight line in image space, a second tranform space (Fig.17) may be set up in which each of the straight lines 48 deduced may be plotted. An accumulation point 50 will be seen at ( xo.yo ) , the position of the center of the circle. The transformation of the first transform space, -/», will be known and hence this method yields the radius and the center co-ordinates of the circle. The method may be similarly used to deduce the parameters associated with other conic sections. Where the image is composed of shape-primitves of different scales, then each shape primitive must be separately searched. If the image contains a multiplicity of shape primitives, each must be detected separately using a similar process. The prior art suffers from a failure to recognise that simple smoothing, thresholding and "search for local maxima" techniques are not sufficient to optimise the location of the maxima associated with the shape-primitives in image space. Where only the normal parametrisation is used, prior knowledge αf the shape-primitive under detection, good estimates of the associated parameters and iterative applications of the shape-priaitive specific transformations are all required for the method to work efficiently. The major weakness of the prior art relating to shape-coding strategies with a view to the extraction αf a symbolic representation of the shape under detection is that a particular shape-primitive may only be efficiently detected if the transformation from a canonical form of the shape-primitive, to an instance of that shape-primitive is known. If the transformation is not known then all plausible transformations must be applied. Various aspects αf the present invention seek to overcome the problems of: the detection αf spurious maxima and disconnected cαlinearities associated with the prior art when the shape-primitive under detection is a straight line segment; the optimal detection of the maxima associated with curved shape primitives; and the automatic decomposition of the boundary of the shape under detection into its constituent shape— rimitives, allowing symbolic descriptions of shape to be deduced automatically. The method provided by one aspect of the present invention is characterised in that the extraction step includes the step of detecting at least one particular shape-primitive indicative distribution of data in the transform space. For example, in the present invention, detection may be made of the spatial distributions of data immediately surrounding a maximum, or to either side of a continuous locus of maxima. In accordance with another aspect of the invention, once the maxima associated with a curved shape-primitive have been detected in the transform space, preferably by the method defined above, a second transformation of the maxima into a second transform space is performed. Preferably the second transform space is a sinogram. Xaxima will occur in the second transform space, the positions of which are indicative αf the straight line segments of maxima in the first transform space. From the positions of these latter maxima, a search can.be made by tracking for all αf the maxima in the first transform space indicative of the particular shape- primitive, and thus the parameters of the shape-primitive in the image space can be determined. In other words, the positions of the maxima in the second transform space and the criteria associated with "proper" shape-primitives may be used either: tα locate, track and numerically fit the data points comprising a continuous curve in the first, filtered transform plane; or tα locate and track the points on a continuous sinusoid in the first, filtered transform plane and to use these points to locate and fit numerically the constituent points of a shape-primitive in the image space. Thus any curve which may be approximated by the conjunction of arcs αf conic sections may be similarly treated. Although it Η» g been convenient to use the arcs of conic sections as the shape-primitives in the present formulation of the method other types of shape-primitives may also be deduced; for example a polynomial of order s, where a is chosen to give the required degree of accuracy in the modelling process. Due to the problems associated with the prior art, it was virtually impossible to provide automatic shape detection from the image data even when the data represented very simple shapes. Prior knowledge αf the shape was needed together with human interface to select those of the shape characterising parameters associated with a "proper" shape. However, the present invention provides a more reliable method which can be performed fully automatically for more complex shapes than has been possible using the prior art methods. Preferred features of the various aspects of the invention are set out in the claims. There follows a description by way of specific embodiments of the present invention, reference being made tα the accompanying drawings, in which: Fig.l is an illustration of the principle boundary of a shape. Fig.2 is an illustration of the principle boundary of a shape with examples of secondary boundaries. Fig.3 is a digital, binary image of a circle. Fig.4 is an intensity map of the the transformed image αf the circle shown in Fig.3. Fig.5 is a digital, binary image αf an ellipse. Fig.6 is a digital image αf an intensity map αf the transformed image of the ellipse shown in Fig.5. Fig.7 is a digital, binary image αf an hyperbola. _ . .___ . _ _ - 9- Fig.8 is a digital image of an intensity map of the transformed image of the hyperbola shown in Fig.7. Fi .9 is a digital, binary image of a parabola. Fig.10 is a digital image of an intensity map of the transformed image of the parabola shown in Fig.9. Fig.11 is a schematic representation αf the method by which various shape-primitives may be created by the application of linear transformations to the space αf a unit circle. Fig.12 is a diagram showing the position of the tangent to a curve at the point where the curve and the tangent have a common normal. Fig.13 is a diagram showing the position of the maximum value in the transform space whose position in that space may be used to deduce the equation of the tangent shown in Fig.12. Fig.14 is a diagram of a circle in image space. Fig.15 is a diagram of the transformed image of Fig.14 showing the curve which is the locus of the maximum values in that transform space. Fig.16 is a diagram of the result of subtracting a value equal to the radius αf the circle in Fig.14 from each of the points along the curve shown in Fig.15. Fig.17 is a diagram of the transform plane which results from plotting the straight lines whose equations may be deduced using the positions of the points along the curve shown in Fig.16. Fig.18 is a schematic diagram αf the apparatus αf one embodiment of the invention; Fig.19 is a perspective view of an object, the processing αf an image of which is described below; -to- Figures 20 to 22 are representative of the object after various processing operations; Fig.23 and Fig.24 illustrate the mapping αf a single point and three colinear points, respectively, from an image space to a sinogram; Fig.25 and Fig.26 are graphical representations αf distributions αf curves £n the sinogram; Fig-27 is a matrix of mask values used in detecting distributions of data in the sinogram indicative of a straight line segment in the image space; Figs 28 and 29 are digital representations corresponding to Figures 25 and 26, respectively; Figures 30 and 31 illustrate the mapping of a curved shape-primitive (in this case a circle) from an image space to a sinogram; Rig.32 is a graphical representation of data intensity across a belt produced in the sinogram at the location indicated by the lines XV - 17 in Fig.31; FIg.33 is a digital representation αf the data shown in Fig.32; Figures 34 and 36 are mask values for use in detecting data in the sinogram representative of a curved shape-primitive; Figures 35 and 37 show the data αf Fig.33 after convolution using the masks of Figures 34 and 36, respectively; Figures 38 and 39 show the data of Figures 35 and 75, respectively after further processing; Fig.40 is the digital, binary image of a hand-drawn curve Fig.41 is the digital image of the first transform of the binary image of the curve; Fig.42 is the digital, binary image of the transform plane after the application of the convolution filter detailed in Fig.27; Fig.43 is the digital image αf the first transform plane after the application αf the convolution filters detailed in Figures 34 and 36, where both convolved images have been added and the result binarized. Fig.44 is a digital image of the second transformation, i.e. the transformation of the binary image of Fig.43; and Fig 45 is a digital image of the reconstruction of the curve of Fig.40 as the envelope of its tangents. Seferring tα Fig.18 αf the drawings, a camera 10 outputs a . digitised video signal representing the object illustrated in Fig.19, which is stored in a frame store 12. Typically, the frame size is 256 pixels by 256 pixels, and each pixel has eight bits and so can store values in the range 0 to 255. A parallel processor 16, such as a linear array processor as described in UK patent specification no. 2129545b, then performs an edge detection operation on the stored frame using a Sobel type operator in a known manner to produce an image as represented in Fig.20 which is stored as a frame in the frame store 12. The image is then subjected, to a thresholding operation by parallel processor 16 to produce a binarized image in which each pixel either has a predetermined low value, for example 0, or a predetermined high value, for example 255. The binarized image, which is represented in Fig.21, is stored in the frame store 12. The edges of the image are then thinned, and isolated points are removed by the processor 16, the resulting binarized image, as represented in Fig.22, is stored in the framestore 12. Once the binarized image has been formed, the edge points are mapped from the image space into a sinogram or angle, radius normal parametrisation space (θ,r) by a host computer 20, and the sinogram is stored as a frame in the framestore 12. Referring to Fig.23, each edge point at co-ordinates (x±,y± ) in the image space is transformed to a sine curve d representing the angle and radii <8,r) of the normals tα all possible lines passsing through the point Cxt,y t ) in the image space. Thus, the sine curve Ci satisfies the equation: r - <Xι~ + yi. 3 ) 1 " * coβ<8 + tan- 1 (y±/x±». By way of example, lines lτ , Is are shown in the image space of Fig.23 which produce paints at (θτ,rτ ) and fiθ__,r__. ) in the sinogram. Fi ,24 shows how three points Pi , Ps, Pa in the image space are transformed into three sine curves C. , Gz, Ca in the sinogram. Since the three points Pi , Ps, Ps are colinear, the sine curves C, , C_>, Cs intersect at a single point I in the sinogram. The co-ordinates ( 8 , ~ L.) αf the intersection L in the sinogram give the angle and length of the normal in the image space which defines the line L on which the three points P., Ps, Pa lie. The line satisfies the equation: y = cot -& .)x + rt_cosecβ. All αf the points in the image space are transformed into the sinogram in the manner described above, and the sinogram is stored digitally as a frame in the frame store 12. In the case αf the three points shown in Fig.24, the pixel in the sinogram corresponding to the intersection I would have a value of 3. Obviously, in practice, many more points can be processed, producing many curves in the sinogram and higher pixel values than occur In the simple example described above. In the prior art, mere maxima in the sinogram are detected. However, in accordance with this embodiment of the invention more specific distributions of the data in the sinogram are sought. It has been noted that curves in the sinogram representing a continuous line in the image space resemble, at and around the intersection of the maximum In the sinogram, a butterfly shape with the wings of the butterfly extending in c e 8 direction, as represented JL s- graphically in Fig.25 and digitally in Fig.28, whereas a -continuous line, Λ 88/021 - 13- although producing a maximum in the sinogram, has a less dense packing of the curves which form the wings of a butterfly, as represented graphically in Fig.26 and digitally in Fig.29. Thus, by applying an appropriate mask to groups of pixel data in the sinogram, it is possible to discriminate between a maximum having a butterfly shaped distribution surrounding it and other maxima, and therefore it is possible to detect points which, in a binarized image, represent a continuous straight line. Fig.27 shows a 3 pixel by 3 pixel mask for detecting butterfly shaped distributions in the sinogram. The sinogram in the frame store 12 is convolved with the mask using the parallel processor 16 and the results of the convolution operation are stored as a frame in the framestore 12. More specifically, considering the upper three rows of pixels in a frame Io.o to Io ' ssε, .o to Ii .see and Is.o to IS.SBS, the mask is applyed to each 3 x 3 group αf pixels, that is Io.i-i , Io.±, Io.ι * ι I» ._.-., I?,ι, !?.._- * .; I-,ι- ι , I-.i and I-.i-r i , where 1 f 1 f 254, and the pixel values are multiplied by the corresponding mask values; the products are summed. Preferably the sum is then divided by (1+ the value of the middle pixel of the group), and the result is used as a pixel value J " .._ at a corresponding location in a further framestore 12. Thus, for the mask shown in Fig.27 the pixel value J ,_ = ((Io.t x -2) + ( . - i x 1) + ( .i x 2) + (Ii * > x 1 ) + (Ia.i x -2))/ ( .ι + 1 ) . The mask is then applied to 254 3 x 3 groups of pixels in the first three rows of the frame selection 18 to produce 254 results. The operation is then repeated for the second to the fourth rows αf the frame section, for the third tα fifth rows, and so on, finishing with the 254th to 256th rows. Referring to the example of pixel data shown in Fig.28 and 29, the Figure 28 group gives a result after the convolution of <(1 x 0) + ( O x -2) + (1 x 0) + (7 l ) + (7 x 2) + (7 x l) + (0 x 0? + (O x -2) + (2 X 0)} / (7 + 1) = 88 02158 - 14 - 3. whereas the Figure* 2S group gives a result of <(3 x 0 ) + (1 x -2 ) + ( 3 x 0 ) + <4 x IX + (T x 2J + (3 x 1) + (4 x 0) + (2 x -2) + (3 x 0)) / (7 + 1 ) = 1. It will be noted that a 3 x 3 group of pixels each having the same value wfll produce a result αf 0 after convolution. The two dfaeπsiαnal convolution operation decribed above may be more efficiently computed using two one dimensional convolution operations and summing the result. A column vector of the form (-2, 2, -2) is applied to each column of the image data, begining at the second column and terminating at the penultimate column. The results are summed and stored as the centre pixel value of a new frame of data i.e. in each column the centre pixel O is multiplied by the value 2 and the pixels on either side of the centre pixel, pixels Jn→ and Jn+i . are multiplied by the value -2. The results of these operations are summed and stored in a separate frame at the location of the pixel Jm. The values to either side αf the pixel J n in the original frame are then added to the previously calculated value stored in the separate frame at the position .7 " ,-,. Whereas the previous method, using a two dimensional convolution method, required 9 multiplication and 8 addition operations to complete the process, the method described here requires only 3 multiplications and 4 additions. After the convolution operation, the host computer selects those αf the convolution results above a predetermined threshold value, say 2, and representative of a continuous line and, from the location αf the pixel in the frame section 18, determines the parameters of the line represented by that pixel. The convolution result of 3 for the group αf pixel data shown in Fig.28 produces " an indication of a continuous line, as compared with the result of 1 for the group of Fig.29, which is not treated as indicating a continuous line, despite the centre pixel of that group being a maximum. Starting with the detected line having the highest convolution result, the computer 20 compares the detected line with the original image stored in framestore 12 and determines the location of the endpoints of the detected line. Thus, the (r,θ) or (m,c) and the endpoint parameters αf all the continuous lines in the image are determined. Whilst the above description has been confined to the parametrisation of straight lines, it is also possible to determine the parameters of other shape- primitives in the image. Referring to Fig.30, the points on a circle, C in the image space are mapped in the same way as described above and produce in the sinogram shown in Fig.31 a belt 26 of sine curves. For an even distribution of points lying on the circle in the image space, the distribution of sine curves across the belt in the sinogram is not even, but rather the curves have maximum intensities at the edges 28, 30 αf the belt and the intensity exhibits an inverse square root dependence near the edges. Fig.32 is a plot, by way of example, of the intensity I across the belt 26, and Fig.33 is a digital representation of the intensity. The parameters of the circle in the image space can be determined from the size and phase of the belt in the sinogram. Specifically, the radius p of the circle is equal to one half of the width of the belt in the r direction and the coordinates (xo,yo) of the centre of the circle are equal tα the value of r at the centre of the belt at 8 = π/2 and 8 = 0, respectively. In Figures 30 and 31, the scale of the r axis is one half of that for the x or y axes and so 2p in Figure 31 appears to be the same distance as p in Figure 30. In the case αf an arc αf a circle in the image space, the centre ( xo,yo ) and radius p of curvature may be determined from the values of r and 8 at three locations on the edges of the belt by forming three simultaneous equations from the following two equations: r = Xocosθ + yosinβ + ■ p (2) r = xocosβ + • yosinθ - p (3) where equations 2 and 3 are used for values of r and 8 on the upper and lower edges, respectively, of the belts. Two 1 masks are used to detect the edges of belts, the mask of Fig.34 having values (2, -1, -1) being used to detect lower edges, and the mask of Fig.36 having values (-1, -1, 2) being used to detect upper edges. In the convolution process the upper and lower edge masks are traversed in the -r direction of the sinogram along each column of pixels with a step of one pixel, and at each stage the group of three pixel values in the respective column αf the sinogram are multiplied by the corresponding mask values and summed and placed In a location corresponding to the middle pixel of the group in a further frame. The part-column of pixel values shown in Fig.33 after convolution using the lower edge mask are changed tα the values shown in Fig.35, and after convolution using the upper edge mask take the values shown in Fig.37. By way of further explanation, refering to Figures 33, 36 and 37, the first three pixels' values (0, 0, 0) on the left in Fi .33 are multiplied by the corresponding values (-1, -1, 2) of the mask and summed to produce a result αf (0 x -1) + (O x -1) + (0 x 2) - 0 which is stored as the value of second pixel, as shown in Fig.37. The process is repeated for the second tα fourth pixel values of Fig.33 and the result of zero is stored as the value of the third pixel, as shown in Fig.37. Far the third to fifth pixel values (0, 0, 16) in Fi .33, the result is (0 x -1) + (0 x -1) + (16 x 2) = 32, which is stored as the fourth pixel value as shown in Fig.37. The process is repeated all the way down the pixel column, and similar processes are carried out by the parallel processsσr 16 simultaneously for all the pixel columns. It will be noted that negative results of the convolution process, such as obtained when the fifth to seventh pixel values αf Fig.33 are operated on by the upper edge mask αf Fig.36 are stored as zero. Detection αf curves in the sinogram that are the locus of the maxima indicative of a curved shape-primitive in the image space may be carried out by simply adding the convolved images after the application αf the two masks of figures 34 and 36. The image so obtained may then be binarized and the result transformed into a second transform space similarly to the transformation from the image space (Fig.30) to the first sinogram (Fig.31). The second transform space may then be filtered using the butterfly detecting mask of Fig.27 and the positions of the maxima corresponding to quasi- straight line segments in the first, filtered transform plane determined. See Fig. 5. The complete sequence of processes is shown in Figures 40 to 45. Fig.40 is the binary image of a hand-drawn "arbitrary" curve and Fig.41 is the first transform of the binary image of that curve, Fig,42 is the binary image of the transform plane αf Fig.41 after the application of the convolution filter detailed in Fig.27. Fig.43 is of the first transform plane of Fig.41 after the convolution filters detailed in Figures 34 and 36 are applied separately tα images of that transform plane and both convolved images added and the result binarized. Fig.44 is the result of the transformation of the data shown in Fig.43.Fig 45 is of the reconstruction of the curve of Fig.40 as the envelope of its tangents. The positions of the maxima 52 in the second transform space (fig.46, v and vi) are used to seed a tracking process which uses the known properties of the sinusoids 54 detected In the first transform space ( Fig.46 iii and iv ) . For example it is known that a continuous distribution 56 of paints ( such as the circle) in the image space <Fig.46 i and ii ) will produce a continuous distribution of maxima in the first transform space. This, coupled with a knowledge αf the general equation of the distribution of maxima associated with curved shape-primitives, may_ be used to guide the partitioning of the image 56 into sets of points comprising the constituent shape-primitives of the boundary of the object, which in the case illustrated is a single circular shape-primitive. The search may be -aided by the fact that the first transform space has the topology of a Hobius strip. The plane may therefore be twisted and the edges joined to form a continuous strip. A variety of methods may be used to extract the- parameters associated with the curved shape-primitives of the edges in image space from the information contained in the corresponding sets of maxima generated in the first transform space, the latter having been located and partitioned into sets of points with the aid αf a second transformation. The most general methods would be either to fit the constituent points on the sinusoids numerically using the general equation of the curve (equation (1)) or alternatively to use the points on the sinusoids as pointers to the actual shape-primitives in image space. Bach pair of adjacent points on the sinusoid will be indicative of two tangents to the curved shape primitive it. image space. The intersection of these tangents will form a part of the envelope to the curve (see Fig.45). In this manner a search for the constituent points αf a curved shape-primitve may be initiated and the edge Image partitioned in this way. Bach set of points so found may then be numerically fitted using the general equation of an ellipse where the parameters a and b take the values suggested in Fig.ll. The end points of the shape-primitives may also be found in this manner. The most general methods may be more computationally intensive than is necessary where prior knowledge of the image exists. For example; if it is known that only circles or arcs of circles are present in the edge image then the partitioned sets of the constituent points αf the sinusoids may be each separately Fourier transformed and the Fourier coefficients used to deduce the radius and the location of the centre co-ordinates of the circles or circular arcs. Using the methods described above it is possible to partition an edge image into sets of points each αf which constitutes a shape-primitive of the boundary αf an object. The forms of the shape primitives and their relative spatial relationships will be invariant under the transformations of translation or rotation and may therefore be used to construct a symbolic representation of the shape of an object. The method does not suffer from the problems of consistent-labelling techniques associated with the prior art because the shape-primitives which form the principal boundary (32 in Figures 1 and 2) of the object will always form a closed loop by virtue of the property of closure of the principal boundary curves. Secondary, disjoint boundaries (34 in Fi .2) may be labelled according to their relative spatial arrangements with respect tα the origin of an object centered co-ordinate system; such a co-ordinate system may be defined by the centroid of the principal boundary. The method allows an hierarchical search strategy to be employed when attempting to recognise a particular instance of a shape. This is computationally very efficient. Once the parameters in the image space have been determined, they can be stored away in a library using much less memory than would be required to store a whole frame αf image data. Thus the method described above can be used to read, encode and store automatically and efficiently two dimensional images such as technical drawings or architectural drawings or electrical circuit diagrams. The method can also be used for example in interferometry to detect and provide the parameters of interference fringes. In robotics, the two dimensional spatial relationships between lines and curves can be determined by the computer and then compared with stored two dimensional data. The method here described refers to a two dimensional representation of shape. In a development of the method described above, two cameras are situated tα provide a pair of stereoscopic images which are both processed as described above in parallel with each other. The two sets of Image data are then matched by the computer to obtain three dimensional information. The same technique may then be be applied using a three dimensional transformation and shape primitives composed of surfaces rather than curves. A three dimensional representation is determined and may be used to identify and locate an object, thus providing automatic robotic vision.

Claims: Cla_L_*s 1. A method of para etrisation of shapes in images represented by image data, comprising the steps of: transforming the image data into a parametric transform space; and extracting shape characterising parameters from the transform space indicative of a shape in the image represented by the image data; characterised in that: the extraction step includes the step of detecting at least one particular shape-primitive indicative distribution αf data in the transform space. 2. A method as claimed in claim 1, wherein the transformation step produces bounded parameters in the transform space. 3. A method as claimed in claim 1 or 2, wherein the transform space into which the image data is transformed is a sinogram. 4. A method as claimed in any preceding claim, wherein the extraction step includes the step αf convolving the transform space with at least one mask. 5. A method as claimed in any preceding claim, wherein the or one of the particular distributions of data which is detected is a distribution of data around a point in the transform space indicative of a line segment in the image represented by the image data. 6. A method as claimed In claim 5, when appendant directly or indirectly to claim 3, wherein the line indicative distribution of data which is detected is a distribution resembling a butterfly shape substantially of the type described in the description. 7. A method as claimed in claim 6, when appendant directly αr indirectly to claim 4, wherein the mask; operates tα add to the value αf the data at each point in the sinogram at least a portion of the values of the data to either side αf that point in the angle direction of the sinogram and to-subtract from that value at least a portion αf the values of the data to either side of that point in the radius direction αf the sinogram. 8. A method as claimed in claim 7, further comprising the step of dividing the value of the data at each point after operation of the mask with a value related to the value of the data at that point before operation αf the mask. 9. A method as claimed in any of claims 6 to 8, wherein the extracting step includes the step of extracting the position in the sinogram αf the centre of the butterfly shape. 10. A method as claimed in claim 9, wherein the extracting step further includes the step of determining parameters of a line segment from the extracted position in the sinogram. 11. A method as claimed in any preceding claim, wherein the or one of the particular distributions of data which is detected is a distribution of data extending across the transform space indicative of a curve in the image represented by the image data. 12. A method as claimed in claim 11, when appendant directly or indirectly to claim 3 wherein the curve indicative distribution of data which is detected is a distribution resembling a ridge at an edge αf a belt. 13. A method as claimed in claim 12, wherein the curve indicative distribution of data which is detected is a distribution resembling a pair of ridges at opposite edges αf a belt. 14. A method as claimed in claim 13, when appendant directly or indirectly to claim 4, wherein different such masks are used for detecting the two edges of the belt. 15. A method as claimed in claim 14, wherein one αf the masks operates to subtract from the value of the data at each point in the sinogram at least a portion of the value αf data tα one side αf that point in the radius direction αf the sinogram and the other mask operates tα subtract from the value αf the data at each point In the sinogram at least a portion of the value of the data to the other side αf that point in the radius direction of the sinogram. 8/02158 - 24 - 16. A method as claimed in claim 15, further comprising the step of dividing the value αf the data at each point in the sinogram after operation of the masks with a value related to the value of the data at that point before operation of the masks. 17. A method as claimed in claim 15 or 16, and further comprising the steps of comparing with each other the results obtained by operation of the two masks. 18. A method as claimed in any of the claims 12 to 17, wherein the extracting step includes the step of extracting the positions in the sinogram αf at least three points on the edge or edges of the belt. 19. A method as claimed in claim 18, wherein the extracting step further includes the step of determining parameters of a circle or arc of a circle from the extracted positions in the sinogram. 20. A method as claimed in claim 18 or 19, further comprising the step of determining whether the width of the belt in the radius direction of the sinogram is substantially constant. 21. A method as claimed in any of the claims 12 to 17, wherein the extracting step includes the step of extracting the positions in the sinogram of at least five points on the edge or edges of the belt. 22. A method as claimed in claim 21, wherein the extracting step includes the step of determining parameters of a conic section or part-conic section from the extracted positions in the sinogram. 23. A method as claimed in claim 22, further comprising the step of determining the radius parameters αf the centres of the belt in the sinogram at angles of ax and (n + l/2)π (where a is an integer), the maximum and minimum widths αf the belt in the radius direction of the sinogram, and the phase αf variations αf the width of the belt. 24. A method as claimed in any of claims 7 to 10 and any of claims 14 to 17, wherein butterfly-shaped distributions are not detectable by operation of the masks for detecting edges or belts. 25. A method as claimed in any preceding claim, and further comprising the step αf comparing data representing the shape characterised by the extracted parameters with the image data to determine further parameters of the shape. 26. A method as claimed in any preceding claim, wherein the method is performed on two stereoscopically related sets of image data, and further comprising the step αf matching the shape indicative parameters extracted from each set of image data. 27. A method as claimed in any preceding claim, and further comprising the step or steps αf performing the edge detection operation and/or a M -_™ o 88/02158 ' -26- binarizing operation and/αr a thinning operation on the image data prior to the transformation step. 28. A method as claimed in any preceding claim, wherein the image data is provided by a digital image signal. 29. An apparatus specially adapted to perform the method of any preceding claim. 30. An apparatus for parametrisation of shapes in Images represented by image data, comprising: means tα receive image data; means tα transform the image data to parametric data; means to detect at least one particular shape-primitive indicative distribution of data in the parametric data; and means tα output parameters related to such a detected distribution. 31. An apparatus as claimed in claim 30, and including means tα store the parametric data in the form of a sinogram. 32. An apparatus as claimed in claim 31, wherein the detection means includes means defining at least one mask and means tα convolve the sinogram with the mask. 33. An apparatus as claimed in claim 32, wherein the mask is operable to add tα the value of data at each point in the sinogram at least a portion of the values of the data to either side αf that point in the angle direction of the sinogram and to subtract from that value at least a portion αf the values αf the data to either side of that point in the radius direction of the sinogram. 34. An apparatus as claimed in claim 33, wherein the detection means is operable to divide the value αf the data at each point after operation of the mask with a value related tα the value of the data at that point before operation αf the mask. 35. An apparatus as claimed in any of claims .32 t 34. wherein one such mask is operable to subtract from the value of the data at each point in the sinogram at least a portion of the value of the data to one side of that point in the radius direction αf the sinogram and another such mask is operable to subtract from the value of the data at each point in the sinogram at least a portion of the value αf the data to the other side of that point in the radius direction of the sinogram. 36. An apparatus as claimed in claim 35, wherein the detecting means is operable to divide the value of the data at each point in the sinogram after operation of the masks with a value related to the value of the data at that point before operation αf the masks. 37. An apparatus as claimed in claims 35 tα 36, and wherein the detecting means is operable to compare with each other the results obtained by operation αf the two masks. 38. An apparatus as claimed in any of claims 30 to 37, and further comprising means to store the image data, the detecting means being operable to compare data representing a shape characterised by the parameters related tα the detected distribution with the stored image data to determine further parameters αf the shape. 39. An apparatus as claimed in any of claims 30 to 38, comprising a further such data receiving means, transforming means, detection means and output means sα that the apparatus can parametrise two stereoscopically related sets of image data, and further comprising means for matching the • output parameters for each set of image data. 40. An apparatus as claimed in claim 39, further comprising a pair of stereoscopically arranged cameras for feeding image data to the data receiving means. 41. A method of parametrisatiαn of shapes in images represented by image data, comprising the steps of: transforming the image data into a first parametric transform space; detecting data associated with a curved shape-primitive in the first transform space; performing a further parametric transform to transform the detected data into a second transform space. 42. A method as claimed in claim 34, further comprising the step of detecting maxima in the second transform space. 43. A method as claimed in claim 42, wherein the detection step utilises the method defined in any one of the subsidiary claims 5 to 10. 44. A method as claimed in claim 42 or 43, further comprising the step of using the detected maxima in the second transform space to commence a tracking and fitting procedure for the maxima in the first transform space. 45. A method as claimed in any of claims 42 to 44 further comprising the step of using the detected maxima in the second transform space to commence a tracking procedure of the maxima in the first transform space to further commence a tracking procedure which follows the envelope of the. shape- primitive in the image space and a fitting procedure for the shape-primitive in the image space. 46. A method as claimed in any of claims 41 tα 45, wherein the detection step for the first transform space utilises the method defined in any one of the subsidiary claims 11 to 16. 47. A method as claimed in any of claims 41 to 46, wherein the detection step is simultaneously performed for a plurality of shape primitives in the image space. 48. An apparatus specially adapted to perform the method of any of claims tα 46.

Inventors: LEAVERS VIOLET FRANCES, LEAVERS, VIOLET, FRANCES
Applicants: LEAVERS VIOLET FRANCES, LEAVERS, VIOLET, FRANCES
Application year: 1987
Main classification: G06K9
IPC codes: G06K9