Patent Publication Number: US-2007098253-A1

Title: Electro-optical device for counting persons, or other, based on stereoscopic vision, and relative method

Description:
FIELD OF THE INVENTION  
      The present invention concerns an integrated electro-optical device for counting persons who pass through a gate, or stay in a delimited zone. The counting device according to the invention is suitable to reconstruct the three-dimensional profile of an area subjected to visual control by means of stereoscopic vision techniques. The counting of persons, or other moving forms, for example animals or objects, is obtained by separating objects from the background, discriminating the three-dimensional shape of the persons from the profiles generated by objects or structures, and by reconstructing the trajectory of the movement of the persons inside the detection zone. The invention is preferably applied in the field of public transport (buses, trains, subway) or the control of areas or buildings open to the public where it is necessary to count the number of persons present.  
      The invention also concerns the counting method carried out by the device.  
     BACKGROUND OF THE INVENTION  
      Devices are known, for counting persons passing through a gate, which are normally made with photocells, pyroelectric sensors, ultrasounds, or combinations thereof. However, these devices have a considerable disadvantage: given the point nature of the detection, they do not allow to determine the shape of the object detected, and therefore to discriminate one object from another. Consequently, the performance and reliability of such systems are compromised in situations of crowding, where two or more persons in close contact enter and/or leave through a gate, or by the presence of bulky objects such as suitcases, rucksacks, trolleys, umbrellas, etc.  
      Moreover, systems consisting of multiple point sensors have considerable problems of gauging and pointing that determine a high cost of installation and maintenance.  
      Surveillance systems based on one or more TV cameras are also known. Systems based on the detection of movement alone suffer from errors caused by shadows or moving reflections, or by sudden changes in the light situation. Moreover, such systems are not able to detect the presence of static objects.  
      Recognition systems based on a 2D analysis of the images alone are not yet able to discriminate a given object from the background in typical real situations. This is because the variation in the possible two-dimensional forms resulting from different perspectives or positions of the object, particularly in the presence of several moving objects, makes it extremely complex to analyze the scene.  
      U.S. Pat. No. 5,581,625 discloses a vision system based on stereoscopic analysis which is not able, however, to follow the movement of possible objects in the zone of interest.  
      US-A1-2004/0017929 discloses a stereoscopic vision system which is limited, however, to the detection of situations with fraudulent access to persons through a gate, such as tailgating or piggybacking. This system consists of various separate components of considerable size (one component to acquire images, an image acquisition card, an industrial PC, etc.) which must be connected to each other, which entails a considerable increase in bulk and complexity which greatly limits the applicability of the system in restricted spaces. Moreover, this system requires a minimum illumination for correct functioning and employs CCD optical sensors which can be dazzled by strong illumination.  
      WO-A2-2004/023782 discloses a stereoscopic system limited to controlling a door and based on a hardware architecture that is not integrated, but consists of different components, such as TV cameras, PC, Frame Grabbers, etc.  
      The article of Liang Zhao et al “ Stereo -  and Neural Network - Based Pedestrian Detection”  discloses a real-time pedestrian detection system that uses a pair of moving cameras to detect both stationary and moving pedestrians in crowded environments, but it does not mention the possibility to count persons or objects with this system.  
      The articles of Beymer D. “ Person counting using stereo”  and of Terada K et al: “ A method of counting the passing people by using the stereo images ” do not mention the possibility of using neural networks in order to process the images detected by the stereo cameras.  
      Purpose of the present invention is to achieve an electro-optical device for counting persons, or other moving forms, which overcomes the limits and problems of devices currently available.  
      To be more exact, purpose of the invention is to achieve a counting device able to offer a high level of reliability and accuracy, which has limited size, is easy to install and configure, which does not require additional illumination or screening for outside lights, and which can be connected to external control systems by means of digital protocols.  
      The Applicant has devised, tested and embodied the present invention to obtain these and other purposes and advantages.  
     SUMMARY OF THE INVENTION  
      The present invention is set forth and characterized in the respective main claims, while the dependent claims describe other innovative characteristics of the invention.  
      In accordance with these purposes, the electro-optical device counting device according to the present invention comprises at least the following components:  
      a unit for acquiring synchronized stereoscopic images,  
      a processing unit dedicated to processing the temporal flow of stereoscopic images,  
      a unit to enable communication between the device and the outside, and  
      an illumination unit.  
      These main components are suitably connected to each other and each has specific characteristics and functions.  
      According to a first characteristic of the invention, the image acquisition unit comprises at least an optical sensor, consisting of a matrix of photosensitive elements (pixels), able to convert the light radiation of the image detected into an electric signal. The image acquisition unit also comprises an optical system able to project onto two or more sensors, or onto different parts of the same sensor, the image of the same zone of space seen from at least two different perspectives, so as to be able to extract from the images the information on the three-dimensional profile of the objects present.  
      According to another characteristic of the invention, the processing unit is configured to perform the following operations: i) to rectify the stereoscopic images detected by the image acquisition unit, ii) to calculate distance maps starting from the pair of stereoscopic images, iii) to discriminate and count the persons present in the field of vision of the sensors, and possibly to verify their passage through determinate thresholds.  
      According to another characteristic of the invention, the illumination unit is configured so as to ensure a minimum illumination in the area of detection, so as to guarantee the correct functioning of the device in any condition whatsoever of external illumination.  
      According to another characteristic, in order to guarantee a correct functioning of the device even in the proximity of strong light sources, for example direct or reflected sunlight or powerful halogen lights, the image acquisition unit comprises one or more high-dynamic CMOS optical sensors with logarithmic response to incident light, which provide to convert the light radiation into an electric signal, preventing “blooming” effects.  
      According to the present invention, the device comprises a neural network, implemented in software mode or in hardware mode, able to classify the three-dimensional profiles obtained from the processing of the stereoscopic images. The use of the neural network allows to learn, from examples, the three-dimensional profiles corresponding to persons filmed from a determinate perspective and to discriminate these profiles from those of objects or other structures. The ability to recognize and classify three-dimensional forms allows to reduce errors in counting due to the simultaneous presence of persons and extraneous objects in the control zone.  
      In a first form of embodiment, the device according to the invention is implemented by means of the combination of discrete components, that is, the sensors, the processing unit and the unit connecting with the outside are independent parts mounted on cards and made to communicate with each other by means of suitable electric connections.  
      In an alternative form of embodiment, the different units that make up the system are integrated on a single silicon chip, that is, a System on Chip, by means of VLSI technology. This extreme integration technology allows to considerably reduce size, costs and consumption.  
      In order to further reduce costs and size, instead of two or more optical sensors equipped with lens, it is possible to acquire the stereoscopic images by means of an optical system configured to project different perspectives onto different portions of a single optical sensor of the CMOS type.  
      Even though so far the present invention has been described as a unit in itself, it is clear that various devices according to the invention can be interconnected through a line of digital communication so as to produce a network of sensors that cover several gates. In this way, the present invention can be employed to control the flow of persons through areas or buildings with different access gates.  
      In the same way, according to another evolution, the device according to the invention can be coupled with control devices of biometric security, such as devices that recognize faces, voices, fingerprints, and/or the iris.  
      Even though the present invention has been devised specifically for counting persons, it comes within the scope of the invention to provide the presence of a trainable recognition system which allows to configure the device to count different classes of objects. 
    
    
     BRIEF DESCRIPTION OF THE DRAWINGS  
      These and other characteristics of the present invention will become apparent from the following description of two preferential forms of embodiment, given as a non-restrictive example with reference to the attached drawings wherein:  
       FIGS. 1   a - 1   b  show, respectively in a front view and from above, a device according to the invention in an assembly position;  
       FIG. 2  shows a block diagram of the device according to the present invention in a first form of preferential embodiment;  
       FIG. 3  shows the flow chart describing the processing of the temporal sequence of the images for counting persons. 
    
    
     DETAILED DESCRIPTION OF SOME PREFERENTIAL EMBODIMENTS OF THE INVENTION  
      In  FIG. 1 , the device  10  is shown mounted above a gate, indicated in its entirety with the reference number  20 , so that the entry and exit movement of a person  21  passing through it is ideally perpendicular to the line joining the two optics and that the viewing plane is parallel to the floor. Preferably, the distance of the device  10  from the floor must be at least 240 cm in order to guarantee the accuracy of the counting.  
      In the configuration step for counting persons, the neural network of the device  10  is trained to recognize the three-dimensional form of a person seen from above.  
      With reference to  FIG. 2 , the device  10  according to the present invention comprises, as essential parts, an image acquisition unit  11 , a parallel calculation unit  12  dedicated to the rectification of the images and to the calculation of the distance maps, a processing/calculation unit  13  to recognize the three-dimensional forms based on neural networks and to calculate the trajectory of the movement of the persons, an illumination unit  14 , and a communication interface  15 .  
      The image acquisition unit  11  is formed, in this case, by two CMOS high-dynamic optical sensors  16  inside the same frame, for example equal to 120 dB. Each optical sensor  16  consists of a matrix of 640×480 active logarithmic-response pixels which can be read individually in arbitrary sequence. The images are digitalized inside the optical sensor  16  by means of an analog-digital converter, advantageously of the 10 bit type. The adjustment parameters of the optical sensor  16  are controlled by a control mechanism that allows to optimize the quality of the images as the conditions of outside illumination vary.  
      The parallel calculation unit  12  is dedicated to the correction of the optical distortion, the rectification of the pair of stereoscopic images, the adjustment of the parameters of the optical sensor  16 , and the calculation of the distance maps corresponding to the two stereoscopic images.  
      To be more exact, the correction of the optical distortion allows to obtain accurate results even in the presence of non-perfect optics, that is, subject to deformation.  
      The rectification of the pair of stereoscopic images allows to simplify the calculation of the distance and to improve the accuracy thereof, while the adjustment of the parameters of the optical sensors  16  stabilizes in real time the response of the optical sensor  16  to the variations in outside luminosity.  
      The calculation of the map of disparity from the stereoscopic images is actuated by means of an algorithm based on the correlation between the pair of stereoscopic images corrected, rectified and transformed by means of a filter that makes the calculation more robust with respect to illumination slopes.  
      In the preferential embodiment of the invention, the parallel calculation unit is of the FPGA type (Field Programmable Gate Array), and is equipped with a FLASH type memory in which are memorized the parameters necessary for the correction of the distortion and rectification. Using the FPGA allows to obtain calculation capacities much higher than those available using standard processors or DSP.  
      The processing unit  13  comprises a processor with a RAM or CPU type memory. The processing unit  13  is used for the high level, or cognitive, processing of the images and comprises: recognition of three-dimensional forms, identification of the trajectory of the movement thereof, counting, temporary memorization of the results and communication with the outside.  
      Using neural networks to identify the shape of a person in order to discriminate it from other objects is a characteristic of the invention. In fact, the great variability of possible poses of a human body with respect to the TV camera makes the recognition process very difficult to describe in mathematical and/or geometric terms. On the contrary, using neural techniques, it is enough to train the network with a sufficient number of typical examples, without having to have recourse to any specific algorithm.  
      The illumination unit  14  preferentially consists of a set of high luminosity LEDs with a wavelength in the portion of the visible spectrum or near infrared (from 400 nm to 1100 nm), which provides a uniform illumination of the gate and ensures a correct and stable functioning of the device even in conditions of poor or zero illumination.  
      The communication unit  15  preferably consists of an Ethernet channel with 100 Mbit/sec, a USB 2.0 channel, an RS232 serial and 4 opto-insulated ports for communication with industrial devices.  
      With reference to  FIG. 3 , the device  10  according to the present invention comprises, as an integrating part, a program to achieve on the previously described electronic architecture the function of person counter. The flow chart of the program provides the following steps in the method:  
      acquisition of the stereoscopic pair, that is, the left and right image, in synchrony mode;  
      calculation of the average intensity of the images and adjustment of the parameters of the optical sensors  16  so as to obtain images with constant quality;  
      software correction of the distortion of the optics of the lenses;  
      rectification of the right and left images so that a pixel of one line of the right image can be found inside the same line on the left image;  
      calculation of the map of differences and level of similarity from the corrected and rectified images;  
      identification of the presence of shapes of persons by means of neural processing techniques;  
      determination of the trajectories of the persons present in the zone of the gate, that is, the temporal evolution of the person&#39;s movement;  
      counting the persons that pass through the gate;  
      temporary memorization and communication of the results of the counting to the outside;  
      reading of messages arriving from outside.  
      In an alternative preferential embodiment, the hardware architecture of the device  10  is integrated into a System on Chip, of the VISOC type (VIsion System on Chip, for example as described in EP-A-1.353.498 in the name of the Applicant). This microelectronic device consists of various blocks integrated on silicon, suitably connected with each other and each with a specific function. To be more exact, the device comprises:  
      an optical sensor  16  with high-dynamics vision consisting of a matrix of photosensitive elements with active pixels, which provide to convert the luminous radiation into an electric signal, and of elements to select the desired photosensitive element in an arbitrary order;  
      an analog-digital converter;  
      a sequential microprocessor of the Von Neumann type;  
      a parallel processor of the neural type;  
      a volatile memory able to memorize data and programs in execution (RAM);  
      a non-volatile memory able to memorize programs, adjustment and gauging parameters (FLASH);  
      an interface to enable communication of the device with other external devices.  
      The CMOS optical sensor  16  of the electronic device is coupled with an optical system that projects, onto two complementary halves of the optical sensor  16 , two images taken from different perspectives. The optical device can consist of prisms and/or mirrors and/or fiber optics. As an alternative to this optical system, a second CMOS optical sensor  16  is connected by means of a digital channel to the VISOC device.  
      The VISOC device is programmable using high-level languages, for example C/C++, Basic. In this case, the VISOC device is programmed following the flow of operations required to count the persons.  
      The VISOC device is coupled with a set of high-luminosity LEDs with wavelength in the portion of the visible spectrum or near infrared (from 400 nm to 1100 nm) which ensures a correct and stable functioning of the device even in conditions of poor or zero illumination.  
      Modifications and variants may be made to the device and method for counting persons based on stereoscopic vision as described heretofore, without departing from the scope of the present invention, as defined by the attached claims.