Method of recognizing a pattern in a field having a multi-valent amplitude, and device for performing such a method

Abstract: The invention relates to a method of recognizing a pattern in a field having a multi-valent amplitude, using association with a reference mask which is composed of logic high units and logic low units, and also relates to a device for performing such a method. The reference mask is sub-divided into two sub-masks, units having the same logic value belonging to the same sub-mask. The first and the second sub-mask contain relevant logic high units and logic low units, respectively. After the positioning of the sub-masks in the field, a relatively lowest and a relatively highest value of the amplitude are determined within the window of the first and the second sub-mask, respectively. When the difference formed by the relatively lowest value minus the relatively highest value is not negative, the desired pattern can in principle be recognized in the field. A device in accordance with the invention comprises at least one rank-value filter for determining the relatively highest value and the relatively lowest value. The conventional thresholding of the field, followed by comparison with a binary reference mask is replaced in accordance with the invention by the determination of the sign of the difference between the relatively lowest value and the relatively highest value of the amplitude.

Description: The invention relates to a method of recognizing a pattern in a field having a multi-valent amplitude by association with a reference mask which is composed of logic high and logic low units. The invention also relates to a device for performing such a method. A method and device of the kind set forth are known from the German Offenlegungsschrift DE-OS 32.10.814 in versions which relate to the recognition of patterns in video images composed of pixels of different grey values. The known method converts the multi-valent video image into several images with binary units, each image being converted on the basis of a different discrimination threshold. Parts of several of these images, which parts correspond to one another as regards location, are compared with a binary reference mask which represents the desired pattern. The degree of correspondence between a part of an image considered and the reference mask is then determined by the number of units in the relevant part which have the same logic value as the units of the reference mask which correspond thereto as regards location. This degree of correspondence is a discrimination threshold dependent quantity. As the most suitable discrimination threshold for the thresholding of the video image in order to detect and localize the desired pattern, the discrimination threshold is used for which the cumulative degree of correspondence between each of the relevant parts of the thresholded video image on the one hand and the reference mask on the other hand is maximum. In accordance with the known method, the transformation of the video image by thresholding must be performed with all feasible thresholds before a maximum degree of correspondence can be found wherefrom the presence or absence of the desired pattern can be deduced. When thresholding with the various thresholds is successively performed and when a customary number of thresholds is used (for example, 256 different thresholds), the overall thresholding operation is time consuming. When thresholding of the input image is simultaneously performed for all thresholds, expensive facilities will be required for the parallel thresholding of 256 video images and for keeping the transforms ready for subsequent operations. Therefore, it is one of the objects of the invention to provide a faster and less complex method of recognizing a pattern in a field of multi-valent amplitude. To achieve this, a method in accordance with the invention is characterized in that the reference mask is sub-divided into a first sub-mask with relevant logic high units and a second sub-mask with relevant logic low units, the method comprising the steps of: positioning the sub-masks in the field determining a relatively lowest value and a relatively highest value of the amplitude in a respective area of the field within a relevant window of the positioned first and second sub-masks, respectively; recognizing the pattern when a difference between the relatively lowest value and the relatively highest value is not negative. When the field of multi-valent amplitude were discriminated to a field of binary amplitude on the basis of a discrimination threshold which is lower than said relatively lowest value, at least a first area of the field, in which the amplitude is higher than the relatively lowest value, would be mapped onto the logic high value. Similarly, when discrimination were to take place on the basis of a discrimination threshold higher than said relatively highest value, at least a second area of the field, in which the amplitude is lower than the relatively highest value, would be mapped onto the logic low value. When the difference: relatively lowest value minus relatively highest value is not negative, upon discrimination with a discrimination threshold situated between these values, the first area would be mapped onto the logic high value and the second area would be mapped onto the logic low value. Instead of the actual execution of the discrimination of the field of multi-valent amplitude for the pattern detection, it suffices using a method in accordance with the invention to determine the sign of a difference between a relatively lowest value and a relatively highest value of the amplitude, measured within the window of the first sub-mask and within the window of the second sub-mask, respectively. A further version of a method in accordance with the invention is characterized in that recognition of the pattern occurs when the non-negative difference exceeds a predetermined value. As the difference is larger than a predetermined value, only patterns whose presence is more pronounced in the image are accepted for recognition. Another version of a method in accordance with the invention is characterized in that the relatively highest value and the relatively lowest value are determined as follows: sorting the values of the amplitude according to magnitude, representative for location in the field within the relevant window of the relevant sub-mask; determining a value which occupies the extreme position, except for a predetermined respective difference number, in a relevant order thus generated. Sorting produces an ordened set of values. By counting down it is simple to determine the value which is the extreme one in the relevant order except for the relevant difference number. This value is then equated with the relatively highest or the relatively lowest value, respectively. As a relevant difference number becomes higher, the difference between this relatively lowest and relatively highest value also increases. This implies inter alia that a pattern which is not recognized in the case of low difference numbers will be recognized in the case of higher difference numbers. The difference numbers thus represent a degree of tolerance for the recognition of the pattern. It is another object of the invention to provide a device for executing a method in accordance with the invention. A device in accordance with the invention is characterized in that for the sorting of the values according to magnitude there is provided at least one rank-value filter for outputting a value at a predetermined location in the order. Rank-value filters are known per se, for example the L 64220, make LSI Logic Corporation. A rank-value filter calculates a predetermined rank in an order of magnitude of the input values, for example within a predetermined window of M x K values, its output quantity being the value at the predetermined rank. Usually such rank-value filters are used for suppressing a given kind of noise. The device in accordance with the invention utilizes a rank-value filter for determining the relatively highest and relatively lowest values. An embodiment of a device in accordance with the invention is characterized in that there are provided a first rank-value filter and a second rank-value filter which are coupled to one another at the input side. Thus, at least two sub-masks can be simultaneously compared with one and the same field. A further embodiment of a device in accordance with the invention is characterized in that the rank-value filter comprises: a comparator for receiving at least two values, for comparing these at least two values, and for outputting a highest one or a lowest one of these at least two values; a coupling from an output of the comparator to one input of the comparator. This embodiment comprises a very simple rank-value filter. The value which has been found to be the highest or the lowest value during a preceding comparison is applied again to the comparator for comparison with at least one current, other value applied to the comparator. Another embodiment of a device in accordance with the invention is characterized in that the predetermined position in the order is adjustable. By making the position in the order adjustable, various recognition tolerances can be used. The invention will be described with reference to a drawing; therein Fig. 1 shows an example of a field to be examined which has a multi-valent amplitude and which in this case comprises discrete elements; Fig. 2 shows an example of a reference mask which contains a desired pattern expressed in binary units; Figs. 3 and 4 show respective sub-masks which together represent the pattern of Fig. 2; Figs. 5 and 6 show the respective sub-sets of elements which are compared with the respective sub-masks of the Figs. 3 and 4; Figs. 7 and 8 illustrate the sorting as regards magnitude of the relevant elements of the Figs. 5 and 6; Fig. 9 illustrates a coherence between the relatively lowest value and the relatively highest value for the example of the preceding Figures, and Fig. 10 shows an embodiment of a device in accordance with the invention. Fig. 1 shows, by way of example, a two-dimensional field with a multi-valent amplitude and discrete elements. The value of each element is denoted by a numeral. Within the context of, for example pattern recognition in video images, these numerals represent the grey values of the pixel. In the case of, for example remote sensing applications, the numerals represent values of a measured quantity, for example a temperature or a distance from a reference point, in which case a predetermined coherence is pursued between the measured values and their mutual orientation. It is to be noted that the use of a method or a device in accordance with the invention is not restricted to the two-dimensional fields of the example shown in Fig. 1. The use of a method in accordance with the invention with one-dimensional fields consists, for example in the search for a predetermined pattern in a (distorted) digital signal. A use of a method in accordance with the invention with three-dimensional fields consists, for example in the search for a predetermined pattern in a data field obtained by computer tomographic examination of an object. It is also to be noted that the field to be examined, having a multi-valent amplitude, need not be sub-divided into (similar) element as shown by way of example in Fig. 1. A continuous field can also be examined for a given pattern, provided that representative discrete values are assigned to parts of the field considered upon association with the sub-masks. Fig. 2 shows an example of a reference mask containing a pattern expressed in logic units. The dark units are the units having a logic high value and the light units are the units having a logic low value; the units denoted by a cross are units whose logic values are irrelevant. According to the conventional method, during the thresholding of the field, like that shown in Fig. 1, a relevant element having a given value is mapped onto a unit having the logic high value or the logic low value, if for example the given value is higher than the discrimination threshold or lower than or equal to the discrimination threshold, respectively. For example, if all relevant units of the pattern shown in Fig. 2 correspond, as regards logic value and location, to the relevant units in the thresholded image of the field of Fig. 1, the pattern has been recognized in this image. In order to detect the desired pattern in the field, the procedure in accordance with the invention is as follows. The reference mask is sub-divided into two sub-masks, a first sub-mask specifying in which locations in the pattern relevant units having the logic high value should occur (Fig. 3), a second sub-mask specifying in which locations in the pattern relevant units having the logic low value should occur (Fig. 4). Each of the sub-maks of the Figs. 3 and 4 comprises only units having one logic value and units whose logic value is irrelevant. The field of Fig. 1 is associated with the sub-maks shown in the Figs. 3 and 4. Within the window of the first sub-mask of Fig. 3 the relevant elements of the field are the elements whose location corresponds to the relevant unit of the first sub-mask. The relationship and the values of these elements are shown in Fig. 5. Similarly, Fig. 6 shows the relationship and the values of the elements which are relevant for association with the second sub-mask of Fig. 4. Subsequently, the values of the relevant elements of the Figs. 5 and 6 are sorted according to magnitude as shown in the Figs. 7 and 8, respectively. In Fig. 7, the lowest value equals "7" and the highest value equals "10". In Fig. 8 the lowest value equals "3" and the highest value equals "5". If all elements of Fig. 5 were to be mapped onto units having the logic high value upon thresholding, the discrimination threshold should be lower than the value "7". This is shown in the left-hand bar of Fig. 9. The discrimination thresholds suitable for the logic high value would then be situated in the interval between "0" and "7" which is closed to the left and open to the right. Similarly, if the elements of Fig. 6 were to be mapped onto units having the logic low value upon thresholding, the discrimination threshold should be higher than "5" or equal to "5". This is shown in the right-hand bar of Fig. 9. The discrimination threshold suitable for the logic low value would then be situated in the closed interval between "5" and "10". The central bar of Fig. 9 shows the overlap of said intervals. A discrimination threshold within this overlap would be suitable for mapping the elements shown in Fig. 5 onto units of logic high value as well as for mapping the elements shown in Fig. 6 onto units of logic low value. In the case of a discrimination threshold situated in the interval between "5" and "7" which is closed to the left and open to the right, the field shown in Fig. 1 would be mapped, upon thresholding, onto a configuration of binary units with which both sub-masks match. In the method in accordance with the invention, pattern detection does not involve thresholding and the subsequent comparison with the reference mask. Instead, extreme values of the amplitude are measured and subsequently the sign of the difference between these extreme values is determined. The determination of the extreme values could be considered as the determination of extreme levels of the discrimination threshold where the respective sub-masks are still recognized when the field is thresholded. The determination of the sign of the difference could be considered as the checking whether or not the previously mentioned intervals overlap. In addition to the condition that overlap occurs, for recognition of the pattern in the field it may also be stipulated that an overlap of the intervals mus exceed a predetermined length. The greater an overlap must be, the larger a difference will be between on the one side the relatively lowest value in the set of values of elements which would be mapped onto units having the logic high value upon thresholding and on the other side the relatively highest value in another set of elements which would be mapped onto units having the logic low value upon thresholding. This implies inter alia that, in order to be detected, the presence of a pattern in the field considered must be more pronounced. In the foregoing the recognition has been made subject, by way of example, to the condition that the difference between the lowest of all values within the relevant window of the first sub-mask and the highest of all values within the relevant window of the second sub-mask should be non-negative. A further recognition condition will be described hereinafter. It is assumed that the values of the amplitude are sorted according to magnitude within the relevant window of the respective sub-mask. For the relatively lowest value now the value is taken which occupies the lowest position, except for a first difference number, in the order relating to the window of the first sub-mask. For the relatively highest value now the value is used which occupies the highest position, except for a second difference number, in the order relating to the window of the second sub-mask. It is to be noted that the difference, being equal to the relatively lowest value minus the relatively highest value, is greater as the relevant difference numbers are higher. For the example illustrated in the Figs. 1 to 8 where, for example a first difference number is "2" and a second difference number is "1", the foregoing means that the relatively lowest value is (still) equal to "7" and the relatively highest value is equal to "4". With respect to the case described with reference to Fig. 9, the overlap, being the difference between the relatively lowest value and the relatively highest value, has increased by one unit. If the field of Fig. 1 were thresholded with a discrimination threshold situated in the overlap, the values within the window of Fig. 5 would all be mapped onto logic high units. The values "3" and "4" within the window of Fig. 6 would be mapped onto logic low units. The value "5", however, can be mapped onto a logic high unit because the discrimination threshold may then be below "5". This implies that upon thresholding of the field a deviation of the second sub-mask which amounts to at the most one unit can arise, but recognition still takes place. The determination of the relatively lowest and the relatively highest value in the relevant order by means of the respective difference numbers thus corresponds, in the case of thresholding, to the acceptance of binary fields for recognition which deviate from the relevant sub-mask by no more than a relevant difference number of units. Fig. 10 shows an embodiment of a part of a device in accordance with the invention. This Figure shows the rank-value filters 100 and 102, each of which acts on the same window of at the most M x K multi-valent elements. The output quantity of a rank-value filter is the value of the element which occupies a predetermined position (rank) in an order of magnitude of the values of the elements in the window. Such a rank-value filter, for example the L64220 by LSI Logic Corporation, is used inter alia for removing a given type of noise. The two-dimensional field of multi-valent elements is assumed to be composed of rows having a length of N elements each in the present example. In order to load the rank-value filters with element values there is provided a register 104 which successively receives the value data of elements of successive rows via data input 106. The register 104 is composed in known manner of M-1 serially coupled delay lines, each of which has a delay of N elements. For the sake of clarity only two delay lines 108 and 110 are shown. Inputs 112 of the rank-value filter 100 and inputs 114 of the rank-value filter 102 are interconnected in a two-by-two fashion. Neighbouring pairs of inputs of one and the same rank-value filter receive the same series of data, be it shifted over a distance of N elements. Via selection input 116 of the rank-value filter 100, the elements whose values are to be sorted according to magnitude are selected in the current window. These are the elements which during the current interrogation step, have a location which corresponds to a location of a relevant unit in the first sub-mask (see the Figs. 3 and 5). Similarly, via selection input 118 of the rank-value filter 102 the elements are selected which, during the current discrimination step, have a location which corresponds to a location of a relevant unit in the second sub-mask (see the Figs. 4 and 6). The data at the selection inputs 116 and 118 thus represent the first and the second sub-mask, respectively. Via the rank setting 120 of the rank-value filter 100, the value which is arranged as the highest value in the relevant order, except for any first difference number N₁, is selected as the output quantity. Via the rank setting 122 of the rank-value filter 102, the value which is the lowest, except for any second difference number N₂, in the relevant order is selected as the output quantity. The values thus selected are applied to a comparator 124 for determining a difference between the selected values. This difference is subsequently applied to a comparator 126 which compares the difference with a reference value on input 128. If said difference exceeds the reference value, the pattern has been recognized in the window; if said difference is smaller, the pattern has not been recognized.

Claims: A method of recognizing a pattern in a field having a multi-valent amplitude by association with a reference mask which is composed of logic high and logic low units, characterized in that the reference mask is sub-divided into a first sub-mask with relevant logic high units and a second sub-mask with relevant logic low units, the method comprising the steps of: positioning of the sub-masks in the field; determining a relatively lowest value and a relatively highest value of the amplitude in a respective area of the field within a relevant window of the positioned first and second sub-masks, respectively; recognizing the pattern when a difference between the relatively lowest value and the relatively highest value is not negative. A method as claimed in Claim 1, characterized in that recognition of the pattern occurs when the non-negative difference exceeds a predetermined value. A method as claimed in Claim 1 or 2, characterized in that the relatively highest value and the relatively lowest value are determined as follows: sorting according to magnitude the values of the amplitude, representative for locations in the field within the relevant window of the relevant sub-mask; determining a value which occupies the extreme position, except for a predetermined respective difference number, in a relevant order thus generated. A device for performing the method as claimed in Claim 3, characterized in that for the sorting of the values according to magnitude there is provided at least one rank-value filter for outputting a value at a predetermined location in the order. A device as claimed in Claim 4, characterized in that it comprises a first rank-value filter and a second rank-value filter which are coupled to one another at the input side. A device as claimed in Claim 4 or 5, characterized in that the rank-value filter comprises: a comparator for receiving at least two values, for comparing these at least two values, and for outputting a highest one or a lowest one of these at least two values; a coupling from an output of the comparator to one input of the comparator. A device as claimed in Claim 4 or 5, characterized in that the predetermined position in the order is adjustable. A device as claimed in Claim 4, 5, 6 or 7, characterized in that there are provided selection means for selecting the parts which are relevant for the sorting of the values according to magnitude. A device as claimed in Claim 8, characterized in that the selection means are adjustable. A device as claimed in any one of the Claims 4 to 9, characterized in that the rank-value filter comprises programmed means. A device as claimed in Claim 8 or 9, characterized in that the selection means comprise further programmed means. A method of detecting a predetermined pattern in a field of signal samples of multivalent amplitude by association with a reference mask related to said predetermined pattern and positionable with respect to said field, which mask is subdivided into a first submask defining a first window onto said field and a second submask defining a second window onto said field, said method comprising: positioning said first and second submasks with respect to said field to select first and second subsets of signal samples from said field respectively within said first and second windows; selecting a first amplitude from the signal amplitudes in said first subset based on the relative rank in amplitude of said first amplitude in said first subset; selecting a second amplitude from the signal amplitudes in said second subset based on the relative rank in amplitude of said second amplitude in said second subset; substracting said first signal amplitude from said second signal amplitude to form a difference signal; and signalling detection of said pattern in response to said difference signal being equal to or greater than a predetermined value. The methode of claim 12 wherein at least one of said selecting steps comprises selecting the amplitude having a predetermined rank order position among the signal amplitudes of the subset. The method of claim 12 wherein said first amplitude has a first predetermined rank order position relative to the highest amplitude among the signal amplitudes of the first subset and the second amplitude has a second predetermined rank order position relative to the lowest amplitude among the signal amplitudes of the second subset.

Inventors: BERNSEN JOHANNES ARNOLDUS CORN, VAN DEN BOOMGAARD REINIER, BERNSEN, JOHANNES ARNOLDUS CORNELIS, VAN DEN BOOMGAARD, REINIER
Applicants: PHILIPS NV, N.V. PHILIPS' GLOEILAMPENFABRIEKEN
Application year: 1989
Main classification: G06K9
IPC codes: G06T1, G06T7, G06K9