APPARATUS AND A METHOD FOR CLASSIFYING MOVEMENT OF OBJECTS ALONG A PASSAGE

Abstract: A method and apparatus for analysing movement of objects along a passage is disclosed and claimed. A plurality of sensors (24.1 to 24.4) spaced along a length of the passage are utilised to gather data relating to a historic two-dimensional representation of presence or absence of objects on spaced lines extending transversely a longitudinal axis of the passage. One dimension is time and the other dimension sensor index. A computer (38) is utilised to classify segments of the historic representation by means of computerised pattern recognition techniques, such as an artificial neural network. In one application, the results of the analysing step may be utilised as inputs to an object counter for counting the number of objects moving in a selected direction along the passage in a defined period of time.

Description: TITLE: Apparatus and a method for classifying movement of objects along a passage. INTRODUCTION AND BACKGROUND THIS invention relates to apparatus for and a method of analysing movement of objects along a passage. Apparatus comprising at least one infra-red sensor for detecting people passing through a doorway are known in the art. Normally the apparatus is connected to an alarm to indicate that a person entered or left through the doorway. It will be appreciated that such an apparatus, if connected to a counter, may be utilised to count people passing through the . doorway. However, such an arrangement is not adapted to distinguish between people passing in one direction through the doorway and people passing in an opposite direction through the doorway. Furthermore, the known apparatus can also not sense when more than one person pass through the doorway simultaneously or accurately differentiate between people during high flow volumes, so that accurate counting is difficult if not impossible. Neither can such apparatus discriminate between people moving through the doorway and shopping carts, for example, they may happen to be pushing. -1 - OBJECT OF THE INVENTION Accordingly it is an object of the present invention to provide apparatus and a method with which the applicants believe the aforementioned disadvantages of the known systems may at least be alleviated. SUMMARY OF THE INVENTION According to the invention a method of classifying movement of objects along a passage comprises the steps of: providing object sensor means comprising a plurality of sensors for covering at least a plurality of spaced regions along a length of the passage, each sensor being associated with a sensor index; intermittently gathering data regarding presence or absence of objects in said regions by means of the sensor means; electronically storing data relating to a historic multi-dimensional representation of presence or absence of objects in the regions, in which representation one dimension is time and another dimension is sensor indices; segmenting the historic representation into classifiable representations of events; and classifying a segmented representation of an event by means of a computerised pattern recognition technique. In one preferred application, events are classified in one of the following classes: (i) one object moving in one direction along the passage; (ii) one object moving in another direction along the passage; (iii) two objects moving together in said one direction; (iv) two objects moving together in said other direction; (v) one object moving in said one direction and another simultaneously in said other direction etc. Thus, it will be appreciated that the method according to the invention of analysing movement of objects along a passage may be used in a method of counting objects moving in any selected direction along the passage. The objects may be people, so that the number of people moving in a selected direction along the passage may be counted. -3 - Each sensόr may have- a ~ 1 imi ted, non-overlapping field of sensitivity and they may be spaced along the length of the passage to cover said plurality of spaced " regions. The step of intermittently gathering data regarding presence or absence of objects in said spaced regions may comprise the step of periodically sampling outputs of said sensors, the output of each sensor having a first or "on" and a second or "off" status indicating the presence and absence respectively of an object in the field of sensitivity of the sensor. The step of segmenting the historic representation may comprise a step of simple segmentation wherein the historic representation is segmented in regions where the outputs of the sensors do not change for longer than a suitably selected limit time period. Alternatively or in addition the step of segmenting the historic representation may comprise geometrical segmentation wherein geometrical masks with suitable selected shapes are fitted on the historic representation and wherein the representation is segmented in regions where the masks substantially overlap with regions in the representation -4 representative of absence of objects in said spaced regions along the length of the passage. The computerised pattern recognition technique is preferably an artificial neural network. Before a segmented representation is classified by means of the artificial neural network, a feature vector which preferably comprises as elements a combination of moments of inertia of the representation, the eccentricity of the representation and the angle of eccentricity and which describes the representation is extracted from the representation and fed as input to the artificial neural network. The gathered data may be run length encoded before it is stored electronically and is decoded again before the geometrical segmentation step. According to another aspect of the invention apparatus for classifying movement of objects along a passage comprises: object sensor means comprising a plurality of sensors which, in use, are sensitive to the presence or absence of objects in spaced -5 - regions along a length of the passage, each sensor being associated with a sensor index; means connectable to the sensor means for generating electronically a historic multi-dimensional representation of presence or absence of objects in said spaced regions along the passage, in which representation one dimension is time and another dimension is sensor indices; and computerised pattern recognition means for classifying segments of the representation and for providing an output representative of the cl assi fication. The object sensor means may comprise a first elongate carrier for the sensors, the sensors being spaced in a longitudinal direction along said first carrier to face transversely said first carrier. The first carrier may be mounted to extend substantially parallel with a floor in the passage or at an acute angle relative thereto. In a preferred embodiment four sensors are provided on said first carrier and the spacing between adjacent sensors increases from one end of said first •6 - carrier to an opposite end thereof. In this preferred embodiment the sensors are barrier sensors each comprising a combined source of modulated infra-red light and an infra-red detector mounted on said first carrier and a separate associated reflector mounted on a second elongate carrier, the first and second carriers, in use, being mounted on opposite sides of the passage, so that each combination faces its associated reflector. In another embodiment the object sensor means may comprise a video camera and the sensors may be a selection of elements in the array of light sensitive elements of the camera. The means for generating a historic mul ti -dimensional representation comprises a sampler connected to the outputs of the sensors, run length encoder means and computing means comprising a processor, an associated memory arrangement and a clock. The computerised pattern recognition means preferably comprises an artificial neural network trained to provide at an output thereof an indication of the -7 classification performed thereby. The output of the neural network may be provided to a counter for counting the number of objects that passed in a selected direction along the passage during a defined period of time. BRIEF DESCRIPTION OF THE ACCOMPANYING DIAGRAMS The invention will now further be described, by way of example only, with reference to the accompanying diagrams wherein: figure 1 is a diagrammatic perspective view of sensor means forming part of the apparatus according to the invention; figure 2 is a view down a passage wherein the sensor means is mounted; figure 3a, figure 3b and figure 3c are two dimensional historic representations of sensor output status plotted as a function of sensor index against time; figure 4 is a block diagram of the apparatus according to the invention; figure 5 is a flow diagram of the main processing steps performed by a computer while carrying out the method according to the invention; and figure 6 is a diagrammatic representation of an artificial neural network implemented in a computer forming part of the apparatus. DESCRIPTION OF A PREFERRED EMBODIMENT OF THE INVENTION One application for the apparatus 10 (shown in figure 4) according to the invention is to analyse the movement of objects such as people 11 (shown in figures 1 and 2) along a passage 12. The apparatus is trained to distinguish between people that move past the apparatus in different directions, during a defined period of time, even where more than one person move past the apparatus at the same time. The apparatus may thus form part of a counter for people. The passage 12 is defined between two opposed walls 14 and 16 and a floor 17. The apparatus comprises object sensor means 18 comprising two separate elongate carriers 20 and 22 for carrying four so-called barrier sensors 24.1 to 24.4. •9 - Each barrier sensor 24.1 to 24.4 comprises a combined source for modulated infra-red light and an associated detector 26.1 to 26.4. Each combination 26.1 to 26.4 has an electronic output 28.1 to 28.4 and is mounted on carrier 20 to face in a direction transverse the longitudinal axis of the carrier. Each barrier sensor 24.1 to 24.4 further comprises a separate associated reflector 30.1 to 30.4 mounted on second carrier 22. As best shown in figure 1 , the spacing between adjacent sensors increases in direction A,. In a preferred embodiment the spacing between sensors is given by the formula: wherei n andAd n are subsequent spacings between sensors; Adg is the spacing between the two sensors closest to ^ one another; and k is a constant 71 • It is believed that this spacing aids the apparatus in distinguishing multiple objects moving in different directions. ■ 10- As best shown in figure 2, the carriers 20 and 22 are mounted against opposed walls 14 and 16 to extend substantially horizontally at a height h_ of between 10 and 40 cm above floor 17, so that each combination 26.1 to 26.4 faces its associated reflector 30.1 to 30.4. With this arrangement the sensors are mounted at substantially knee height in the passage and each sensor is sensitive to the presence or absence of an object within its limited and non-overlapping field of view which is on a line extending transversely the passage. As shown in figure 4, the outputs 28.1 to 28.4 of sensors 24.1 to 24.4 are connected to a sampler 32. Sampler 32 is controlled by a clock 34 ntermittently to sample the outputs of the sensors. The output of sampler 32 is connected to a run length encoder 36 the output of which is connected via a suitable serial communications link 37 (RS-232 or RS-485) to a computer 38. Computer 38 comprises a buffer memory 40 for storing encoded data received from the sensor outputs. The computer 38 further comprises a microprocessor 42, a real time clock 44 and working memory 46 both -11- connected to the microprocessor. Also connected to the microprocessor are a result storage memory 48, program uploading means 50, result downloading means 52 and diagnostics input/output (I/O) means 54. A power supply management arrangement 56 is also provided. As a mere example, as the person 11 in figure 1 walks through the sensor means 13 in direction A_, it may happen that his front leg first interrupts the infra-red beam of sensor 24.1 , thereafter the beam of sensor 24.2 and thereafter the beam of sensor 24.3, before his rear leg interrupts the first sensor 24.1. When a beam is uninterrupted, as is the case with sensor 24.4, the detector of the sensor 24.4 receives infra-red light reflected from its associated reflector 30.4 and a logical "off" signal is provided at the sensor output 30.4. However, when a beam is interrupted by a leg of the person 11 , as is the case with sensor 24.1 , no infra-red light is received by the detector and a logical "on" signal is provided at the sensor output 28.1. The logical "on" and "off" signals are referred to herein as the sensor output status. -12- Referring n, w to figures 4 and 5, in use, the sensor outputs 28.1 ~ nd 28.4 are sampled by sampler 32 (shown in figure 4) and run length encoded at 58 (shown in figure 5). As shown at 60, the data is then t r ansmitted to temporary buffer 40 in computer 38 and strred as historic two dimensional representations of sensor output status, wherein one dimension is time and the other is sensor index. Examples of three such historic representations are shown in figures 3(a), 3(b) and 3(c) respectively. A representation of the event described hereinbefore where person 11 moves in direction _A past the sensor means 18, is shown at 300 in figure 3(a). Interrup ion of the beams by a leg moving past the sensors is indicated by the dark rectangles in figures 3(a), 3(b) and 3(c). Strictly speaking each rectangle comprises a train of "on" pixels or picture elements corresponding to the sampling times when the beam s interrupted. The regions between the black rectangles each comprises a train of "off" pixels corresponding to sampling times when the beam was not interrupted. -13- If a system error is detected, the microprocessor 42 performs diagnostic tests on the system and utilises the diagnostic I/O arrangement 54 to indicate the current status of the apparatus and to record the results of such tests as indicated at 62.1 , 62.2 and 62.3. As shown at 54 and 66, simple segmentation is applied to the data historic representations and the resulting segments are allocated time stamps with reference to the real time clock 44 shown in figure 4. Simple segmentation comprises searching the historic representation for periods where the sensor outputs remain unchanged for longer than a predetermined period of time and segmenting the representation at such a period. At 302 in figure 3(c) there is shown such a period and where event representation 304 may be segmented from event representation 306. The segmented representation with time stamps are then stored for subsequent processing as shown at 68 in figure 5. When required, the encoded data is retrieved by the microprocessor 42 from the buffer 40 and decoded, as -14- shown at 70 in figure 5. As shown at 72 in figure 5, these segmented representations are then stored in a processing buffer forming part of working memory 46 (shown in figure 4). If at 74 a segmented representation is found to be complex in that it comprises more than one classifiable event, the next step is the further segmentation of that representation into representations of individual classifiable events. This further segmentation procedure is referred to as geometrical mask segmentation. A plurality of geometrical masks 308, 310 and 312 (shown in figure 3(a)) and 314 (shown in figure 3(b)) having shapes determined by the sensor spacing and the nature of the objects expected in passage 12, are overlaid on the previously segmented representations. Thus, in the present application the shapes of the masks are mathematical representations of the expected shapes of regions in the representation where none of the beams are interrupted and which are most likely to occur with one or two people moving to and/or in the passage, either individually or together. -15- Each geometrical mask is fitted at successive positions on the previously segmented representations and a weighted match value is calculated. This value is weighted according to the position of overlap between mask and "on" pixels, so that "on" pixels overlapped by the edges of the mask 310.1 are less important than "on" pixels in the middle of the mask 310.2. The best matches for each mask type are recorded with the position at which they occur. The best matches are continually compared to a threshold level which in turn is a function of the number of "on" pixels detected since the start of the current geometrical masking procedure. Once a match is found with a value lower than the threshold level , the data is segmented at that position as shown at 300 and 316 with mask 308. Once the historic representation has been segmented into representations of classifiable events, such as representations 300, 316 and 318 in figure 3(a); 320, 322 and 324 in figure 3(b) and 304 and 306 in figure 3(c), the next step (shown at 78 in figure 5) is the extraction of features from the segmented representations for use in a computerised pattern recognition classification step. -16- A selection of the following features are contained in a feature vector which numerically describes the representation of the event to be classified: the moments of inertia of the representation of the event calculated according to the formula herebelow where it is assumed that the origin (x=y=0) is chosen to be at the centre of the representation of the event: M =ΪT^ χ iyJf( χ ,y) *,. wherein: n is the total number of on' pixels in the representation; x is the time offset into the representation ; y is the sensor index; f(x,y) is equal to 1 if the pixel at (x,y) is "on" and zero if it is "off"; and i and j are the moment indices; the eccentricity of the representation of the event, given by the formula: the angle of eccentricity, given by the formula -17- The aforementioned calculated feature vector is compared with classes of pre-recorded data. These classes include: class 0 - one person moving in direction A_; class 1 - two people moving together in direction A^ class 2 - one person moving in direction B ^ ; class 3 - two people moving together in direction B_; class 4 - one person moving in direction A and another simultaneously in direction class 5 - none of the above. The presently preferred method used to compactly store the pre-recorded data and for comparison of such data with data in the aforementioned calculated feature vector, is to input the feature vector to an artificial neural network with multi-layer perceptron architecture, as shown at 80 in figure 5. The neural network is schematically illustrated at 84 in figure 6. However, it will be appreciated by those skilled in the art, before the neural network 84 can classify a -18- representation of an event according to the above classes, it mt»st first, be trained to do so. This is done by feeding the neural network, by way of the feature vector, data relating to various variations on the events anticipated in use (also referred to as training events) and by train. ng the neural net to indicate the class of each training event in such a way as to minimise the number of false classifications over the whole set of classes. The presently preferred method to train the neural net is based on a method known as back propagation using conjugate-gradient optim ation. The result of the training procedure is two interconnecting matrices N-j and 2 for the neural network and which are shown in figure 6. In use, the aforementioned feature vector of a representation of an event to be classified (also referred to as input neurons), is multiplied with the aforementioned first matrix i resulting in an intermediate vector (hidden neurons). Each element in the intermediate vector is replaced by its sigmoid and then multiplied by the second matrix 2 to give a resultant vector C or output neurons. The index (0 to 5) of the element in the resultant vector C having -19- the largest value indicates the index of the class of the event. The relative sizes of the elements in the resultant vector c may also suggest the confidence interval of the classification. The neural network is thus trained to classify representation 300 as one person moving in direction ^; representation 306 as one person moving in direction B_; representation 320 as two people moving together in direction A,; representation 322 as two people moving together in direction B_; and representation 324 as one person moving in direction ι\ and another simultaneously in direction B_. The result of the classification together with time stamps may be stored ^ in any suitable memory arrangement as shown at 82 in figure 5. Such memory arrangements may be any one or more of random access memory, fixed disks or removable disks. It will be appreciated that the apparatus according to the invention may be implemented in any one of a number of possible configurations. In a first configuration there is provided a centralised (not shown) computer connected to a number of distributed ■20- sensor means 18 each with its own sampler 32, encoder and communication interface. Unprocessed data is passed to the central computer for processing. In another configuration, distributed apparatus comprising sensor means 13 and a computer 33 with neural network 84 are connected to a host computer (not shown). In this case, each apparatus processes its own data and downloads the data on request to the host computer where management information is extracted and presented. It will further be appreciated that the apparatus and method according to the invention is particularly useful for use in a counter or a method of counting objects, especially people, moving in single file or together in either one, the other or both directions along a passage. It will still further be appreciated that there are many variations in detail on the apparatus and method according to the invention without departing from the scope and spirit of the appended claims. -21

Claims: CLAIMS 1. A method of classifying movement of objects along a passage comprising the steps of: providing object sensor means comprising a plurality of sensors for covering at least a plurality of spaced regions along a length of the passage, each sensor being associated with a sensor index; intermittently gathering data regarding presence of absence of objects in the regions by means of the sensor means; electronically storing data relating to a historic multi-dimensional representation of presence or absence of objects in the regions, in which representation one dimension is time and another dimension is sensor indices; segmenting the historic representation into classifiable representations of events; and classifying a segmented representation of an event by means of a computerised pattern recognition technique. 2. A method as claimed in claim 1 wherein the sensors are spaced along the length of the passage to cover said plurality of spaced regions. -22- 3. A method as claimed in claim 1 or claim 2 wherein the step of intermittently gathering data regarding presence or absence of objects comprises the step of periodically sampling outputs of said sensors. 4. A method as claimed in claim 1 wherein the historic multi-dimensional representation is a two-dimensional representation in which said one dimension is time and the other dimension is sensor indices . 5. A method as claimed in any one of claims 3 and 4 wherein the step of segmenting the historic representation comprises a step of simple segmentation wherein the historic representation is segmented in regions where the outputs of the sensors do not change for longer than a suitably selected 1 imit time period. 6. A method as claimed in claim 1 wherein the step of segmenting the historic representation comprises geometrical segmentation wherein geometrical masks with suitable selected shapes are fitted on the historic representation and wherein the representation is segmented in regions where the -23- masks substantially overlap with regions in the representation representati e of absence of objects in said spaced regions along the length of the passage . 7. A method as claimed in claim 1 wherein the computerised pattern recognition technique comprises an artificial neural network. 8. A method as claimed in claim 7 wherein before the segmented representation is classified by means of the artificial neural network, a feature vector comprising as elements a combination of moments of inertia of the representation, eccentricity of the representation and angle of eccentricity of the representation and which describes the representation, is fed as input to the artificial neural network. 9. A method as claimed in claim 1 wherein the gathered data is run length encoded before the step of electronically storing such data. 10. Apparatus for classifying movement of objects along a passage comprising: •24- object sensor means comprising a plurality of sensors which, in use, are sensitive to the presence or absence of objects in spaced regions along a length of the passage, each sensor being associated with a sensor index; means connectable to the sensor means for generating electronically a historic multi-dimensional representation of presence or absence of objects in said spaced regions along the passage, in which representation one dimension is time and another dimension is sensor indices; and computerised pattern recognition means for classifying segments of the representation and for providing an output representative of the cl assification. 11. Apparatus as claimed in claim 10 wherein the object sensor means comprises a first elongate carrier for the sensors, the sensors being spaced in a longitudinal direction along said first carrier to face transversely said first carrier. 12. Apparatus as claimed in claim 11 wherein four sensors are provided on said first carrier and -25- wherein the spacing between adjacent sensors increases from one end of said first carrier to an opposite end thereof. 13. Apparatus as claimed in claim 11 wherein the sensors are barrier sensors, each sensor comprising a combined source for infra-red light and an infra-red detector mounted on said first elongate carrier and a separate associated reflector mounted .on a second elongate carrier; said first and second carriers in use, being mounted on opposite sides of the passage, so that each combination faces its associated refl ector. 14. Apparatus as claimed in claim 10 wherein the means for generating a historic multi-dimensional representation comprises a sampler connected to outputs of said sensors, run length encoder means and computing means comprising a processor, an associated memory arrangement and a clock. 15. Apparatus as claimed in claim 10 wherein the computerised pattern recognition means comprises an artificial neural network trained to provide at an output thereof an indication of the classification •26- SUBSTIT T performed thereby. 16. Apparatus as claimed in claim 15 wherein the output of the artificial neural network is provided to a counter for counting the number of objects that passed in a selected direction along the passage during a defined period of time. -27-

Inventors: PUTTER PAUL-BOER, VERMEULEN PIETER JOHANNES ERAS, ZAAIMAN BEN THOMAS, PUTTER, PAUL-BOER, VERMEULEN, PIETER, JOHANNES, ERASMUS, ZAAIMAN, BEN, THOMAS
Applicants: KISCH OCTROOIBUREAU, PUTTER PAUL BOER, VERMEULEN PIETER JOHANNES ERAS, ZAAIMAN BEN THOMAS, OCTROOIBUREAU KISCH N.V., PUTTER, PAUL-BOER, VERMEULEN, PIETER, JOHANNES, ERASMUS, ZAAIMAN, BEN, THOMAS
Application year: 1993
Main classification: G01V9
IPC codes: G01V8, G06K9, G07C9, G08B13