Person counting system, person counting method and person counting program
The person counting system uses positional and aspect ratio analysis to accurately count individuals by correcting misidentifications across multiple camera views, ensuring accurate person counts.
Patent Information
- Application Number
- JP2023120935
- Authority / Receiving Office
- JP · JP
- Patent Type
- Applications
- Current Assignee / Owner
- Filing Date
- 2023-07-25
- Publication Date
- 2025-02-06
- Estimated Expiration
- 2043-07-25
AI Technical Summary
Existing systems inaccurately count individuals due to misidentification across overlapping camera views and undercounting when individuals are not captured by all cameras, leading to incorrect person counts.
A person counting system that utilizes multiple cameras to detect individuals, determines identity based on positional information and aspect ratios of bounding boxes, and counts individuals accurately by comparing distances and aspect ratios within a given threshold to prevent misidentification.
Accurately counts individuals in a given space by preventing both overcounting and undercounting through precise identification and grouping of individuals across multiple camera views.
Smart Images

Figure 2025017740000001_ABST
Abstract
Description
[Technical field]
[0001] The present invention relates to a people counting system, a people counting method, and a people counting program. [Background technology]
[0002] There is a known system for determining the number of workers in a given space such as a construction site. For example, Patent Document 1 describes a system for detecting people from camera images of a monitoring area captured by multiple cameras. In this system, the monitoring area is captured by multiple cameras, each having a viewing area, and people detected from overlapping viewing areas of the cameras that are close to each other are determined to be the same person. [Prior art documents] [Patent documents]
[0003] [Patent Document 1] JP 2016-162306 A Summary of the Invention [Problem to be solved by the invention]
[0004] In the system described in Patent Document 1, when a person is extracted from the viewing area of one camera, the person closest to the person extracted from the viewing area of the other camera is determined to be the same person, so different people may be determined to be the same person. Also, if a person extracted from the viewing area of a camera image of one camera is not shown in the camera image of the other camera due to occlusion between people, etc., other people who are not the same person are determined to be the same person, resulting in an undercount of the number of people.
[0005] Therefore, an object of the present invention is to count the number of people present in a given space with high accuracy. [Means for solving the problem]
[0006] In order to solve the above problem, a person counting system according to a first aspect of the present disclosure is a person counting system that counts people present in a specified space, and includes an image acquisition unit that acquires multiple images captured by each of multiple cameras installed to capture the space, a person detection unit that detects a person from each of the images, a position information acquisition unit that acquires position information indicating the position of the detected person in the space, a determination unit that determines the identity of a first person that is a person detected from a first image captured by a first camera of the multiple cameras, and a second person that is a person detected from a second image captured by a second camera different from the first camera of the multiple cameras at the same time as the first image is captured, the determination unit determining that the first person and the second person are the same when a distance between the position information of the first person and the position information of the second person is equal to or less than a given threshold, a counting unit that counts the number of people detected from the images, and counts people that are determined to be the same as one person, and an output unit that outputs the number of people counted by the counting unit.
[0007] A person counting method according to one aspect of the present disclosure is a person counting method in a person counting system that counts people present in a predetermined space, the person counting system including an image acquisition unit, a person detection unit, a position information acquisition unit, a counting unit, and an output unit, and the person counting method includes an image acquisition step in which the image acquisition unit acquires a plurality of images captured by each of a plurality of cameras installed to capture an image of a space, a person detection step in which the person detection unit detects a person from the image, a position information acquisition step in which the position information acquisition unit acquires position information indicating a position in the space of the detected person, and a determination step in which the determination unit determines the position of the detected person based on the image captured by a first camera of the plurality of cameras. The method includes a determination step of determining the identity of a first person detected from an image and a second person detected from an image captured by a second camera different from the first camera among the multiple cameras, the determination step determining that the first person and the second person are the same when a distance between position information of the first person and position information of the second person is equal to or less than a given threshold value; a counting step section in which a counting unit counts the number of people detected from the image, counting each person determined to be the same as one person; and an output step section in which an output unit outputs the number of people counted in the counting step.
[0008] A person counting program according to one aspect of the present disclosure is a person counting program for causing a computer to function as a person counting system that counts people present in a specified space, and realizing in the computer an image acquisition function that acquires multiple images captured by each of multiple cameras installed to capture the space, a person detection function that detects a person from the image, a position information acquisition function that acquires position information indicating the position of the detected person in the space, a determination function that determines the identity of a first person detected from an image captured by a first camera of the multiple cameras, and a second person detected from an image captured by a second camera different from the first camera of the multiple cameras, the determination function determining that the first person and the second person are the same if the distance between the position information of the first person and the position information of the second person is equal to or less than a given threshold, a counting function that counts the number of people detected from the image, counting people determined to be the same as one person, and an output function that outputs the number of people counted by the counting function.
[0009] According to the above aspect, when the distance between the position information of the first person and the position information of the second person is close, the second person is likely to be the same as the first person, and therefore it is determined that the first person and the second person are the same when the distance between the position information of the first person and the position information of the second person is equal to or less than a given threshold. In this way, by determining the identity of the person, it is possible to prevent the person from being counted twice. Furthermore, even if the second person has position information with the smallest distance from the position information of the first person among the second people represented in the second image, if the distance is not equal to or less than a certain degree, it is likely that the second person is not the same as the first person and the first person is not represented in the second image. In view of such a possibility, when the distance between the position information of the first person and the position information of the second person exceeds a given threshold, it is not determined that the first person and the second person are the same, and therefore it is possible to prevent the person from being undercounted.
[0010] In the person counting system of the second aspect, the person counting system of the first aspect may further include a counting area receiving unit that receives a counting area designation that specifies an area in space in which people are counted, and the counting unit may count the number of people detected within the counting area.
[0011] According to the above aspect, a counting area is accepted and people within the counting area are counted, so that people present in a desired area in a predetermined space can be counted.
[0012] In a person counting system relating to a third aspect, in the person counting system relating to the first or second aspect, the person detection unit detects a bounding box, which is a rectangular area in which a person is represented in an image, and the person counting system further includes an aspect ratio acquisition unit that acquires an aspect ratio of the bounding box, and the determination unit may determine that the first person and the second person are the same when the distance between the position information of the first person and the position information of the second person is not more than a given threshold value and the difference between the first aspect ratio, which is the aspect ratio of the bounding box in which the first person is represented, and the second aspect ratio, which is the aspect ratio of the bounding box in which the second person is represented, is not more than a predetermined level.
[0013] According to the above aspect, a bounding box is set in an area in an image where a person is depicted, and the aspect ratio of the bounding box corresponding to the person is obtained in addition to detecting the person from the image. In determining the identity between the first person and the second person, in addition to the distance between the position information, the degree of similarity of the aspect ratios of the bounding boxes is taken into account. Therefore, the accuracy of determining the identity of the people is improved. Effect of the Invention
[0014] According to one aspect of the present disclosure, it is possible to count the number of people present in a specified space with high accuracy. [Brief description of the drawings]
[0015] [Figure 1] 1 is a block diagram showing a functional configuration of a person counting system according to an embodiment of the present invention. [Diagram 2] FIG. 2 is a diagram illustrating a hardware configuration of the person counting device. [Diagram 3] 1A and 1B are diagrams showing an example of an image captured by a camera of a construction site, which is an example of a predetermined space, and an example of the designation of a counting area. [Figure 4] FIG. 13 is a diagram illustrating an example of detection of a person from an image. [Diagram 5] 11 is a diagram showing an example of obtaining the aspect ratio of a bounding box indicating an area in which a person is depicted. FIG. [Figure 6] 4 is a diagram showing an example of position information of a person detected from a first image captured by a first camera and a second image captured by a second camera. FIG. [Figure 7] FIG. 11 illustrates an example of a determination process. [Figure 8] FIG. 11 illustrates an example of a determination process. [Figure 9] 4 is a flowchart showing the process of a people counting method implemented in the people counting system. DETAILED DESCRIPTION OF THE PREFERRED EMBODIMENTS
[0016] Hereinafter, an embodiment of the present invention will be described in detail with reference to the accompanying drawings. In the description of the drawings, the same or equivalent elements are designated by the same reference numerals, and duplicated description will be omitted.
[0017] 1 is a block diagram showing a functional configuration of a people counting system according to the present embodiment. The people counting system 1 is a system that counts the number of people present in a given space. The people counting system 1 includes a people counting device 10, as an example.
[0018] The people counting device 10, which serves as a people counting system 1, has a function of counting the number of people present in a predetermined space. As shown in Fig. 1, the people counting device 10 is configured by a computer including a processor 101. The people counting device 10 of this embodiment functionally includes an image acquisition unit 11, a counting area reception unit 12, a person detection unit 13, a position information acquisition unit 14, an aspect ratio acquisition unit 15, a determination unit 16, a counting unit 17, and an output unit 18. The counting region receiving unit 12 and the aspect ratio acquiring unit 15 are not essential components of the people counting device 10, and may not be provided. These functional units will be described in detail later.
[0019] Furthermore, the image acquisition unit 11 of the people counting device 10 is configured to be able to access a storage means such as an image storage unit 20. The image storage unit 20 may be provided in the people counting device 10 as shown in Fig. 1, or may be configured as an external storage means provided so as to be accessible from the people counting device 10.
[0020] Fig. 2 is a hardware configuration diagram of the people counting device 10. As shown in Fig. 2, the people counting device 10 is physically configured as a computer system including a processor 101, a main storage device 102 configured with memories such as RAM and ROM, an auxiliary storage device 103 configured with a hard disk or the like, a communication control device 104, etc. The people counting device 10 may further include an input device 105 such as a keyboard, touch panel, mouse, etc., which are input devices, and an output device 106 such as a display.
[0021] The processor 101 is a computing device that executes an operating system and application programs. Examples of processors include a central processing unit (CPU) and a graphics processing unit (GPU), but the type of the processor 101 is not limited to these. For example, the processor 101 may be a combination of dedicated circuits. The dedicated circuits may be programmable circuits such as field-programmable gate arrays (FPGAs), or other types of circuits.
[0022] The main memory device 102 is a device that stores a program for implementing the people counting device 10, calculation results output from the processor 101, etc. The main memory device 102 is configured, for example, with at least one of a ROM (Read Only Memory) and a RAM (Random Access Memory).
[0023] The auxiliary storage device 103 is generally a device capable of storing a larger amount of data than the main storage device 102. The auxiliary storage device 103 is configured with a non-volatile storage medium such as a hard disk or a flash memory. The auxiliary storage device 103 stores a program P1 (a person counting program) for causing a computer to function as the people counting device 10, and various data. In addition, when the image storage unit 20 is included in the people counting device 10, the image storage unit 20 may be configured in any of the main storage device 102, the auxiliary storage device 103, or another storage element.
[0024] The communication control device 104 is a device that executes data communication with other computers and devices via a communication network. The communication control device 104 is configured by, for example, a network card or a wireless communication module.
[0025] Each functional unit shown in Fig. 1 is realized by loading a program P1 onto hardware such as the processor 101 and the main storage device 102 shown in Fig. 2 and having the processor 101 execute the program P1. The program P1 includes code for realizing each functional element of the people counting device 10. The processor 101 operates the communication control device 104 and the like in accordance with the program P1, and executes reading and writing of data in the main storage device 102 and the auxiliary storage device 103. Data and databases required for processing are stored in the main storage device 102 and the auxiliary storage device 103. Note that, although each functional unit 11-18 is configured in the people counting device 10 in this embodiment, they may be configured in a distributed manner in multiple computers.
[0026] The program P1 may be provided in a form fixedly recorded on a tangible recording medium such as a CD-ROM, a DVD-ROM, a semiconductor memory, etc. Alternatively, the program P1 may be provided via a communication network as a data signal superimposed on a carrier wave.
[0027] 3, the functional units of the people counting device 10 will be described. The image acquisition unit 11 acquires a plurality of images captured by a plurality of cameras installed to capture an image of a predetermined space in which people are to be counted.
[0028] The image acquisition unit 11 may acquire, for example, an image stored in the image storage unit 20. The image storage unit 20 in this embodiment is a storage means that stores an image of a predetermined space captured by a camera. The image acquisition unit 11 may acquire an image from the image storage unit 20 or from a camera, and the source of the image is not limited.
[0029] The person counting system 1 of this embodiment is applied, for example, to grasp the number of workers at a construction site, etc. The image storage unit 20 stores images captured by a camera installed at the construction site.
[0030] Fig. 3 is a diagram showing an example of an image acquired by the image acquisition unit 11. Image g1 shown in Fig. 3 shows an example of one of images captured by each of a plurality of cameras installed at different positions so as to capture an image of a predetermined space at a construction site or the like. That is, the image acquisition unit 11 acquires a plurality of images each capturing an image of the predetermined space from a different position and direction. As shown in Fig. 3, image g1 represents a predetermined space in which people are to be counted at the construction site, and includes people p1 to p4 working at the construction site and other people.
[0031] The counting area receiving unit 12 receives a counting area designation that designates an area in which people are counted in a predetermined space. Specifically, the counting area receiving unit 12 receives the designation of the counting area via a predetermined input interface. For example, the counting area receiving unit 12 may receive the designation of the counting area based on a designation input of a position with respect to an image of a predetermined space displayed on a predetermined display. In the example of the image g1 shown in FIG. 3, the counting area receiving unit 12 receives the designation of the counting area r.
[0032] The counting area receiving unit 12 may also receive a designation based on a designation input of coordinates (e.g., pixel coordinates) indicating a position in an image in a predetermined space. The counting area receiving unit 12 may also receive a designation of a counting area based on a designation input of spatial coordinates indicating a position in a predetermined space.
[0033] For example, when the counting area is specified on a rectangular plane, the counting area may be specified based on inputting the positions of the four corners of the rectangle. The shape of the counting area and the method of specifying it are not limited. For example, when the counting area is circular, the counting area may be specified based on inputting the center and radius of the circle. The counting area may also be specified as an area surrounded by a closed curve.
[0034] The correspondence between the position coordinates (pixel coordinates) in the image and the spatial coordinates in the specified space is realized by existing technology. As an example, based on the association between the spatial coordinates representing the positions of any multiple points in the specified space and the spatial coordinates of the positions in the image where the points are represented, a matrix that converts the position coordinates in the image into the spatial coordinates in the specified space is calculated, thereby realizing the correspondence between the position information and the spatial coordinates. Note that the spatial coordinates in the specified space may be obtained, for example, from design drawings that represent the current state of a construction site.
[0035] The person detection unit 13 detects a person from each of the images acquired by the image acquisition unit 11. The method of detecting a person from an image is not limited, but the person detection unit 13 may detect a person from an image by an existing method. Specifically, the person detection unit 13 may detect a person from an image by a detection algorithm using AI and neural network technology. As an example, the person detection unit 13 may detect a person from an image by an object detection algorithm called YOLO (You Look Only Once). YOLO is an algorithm that uses a CNN (Convolutional Neural Network), and an area in an image in which a detection target is represented is indicated by a bounding box.
[0036] The person detection unit 13 can detect an area in which a person is represented as a bounding box by applying YOLO and other algorithms. FIG. 4 is a diagram showing an example of detection of a person from an image in which a predetermined space is represented. As shown in FIG. 4, the person detection unit 13 detects the areas in which people p1 to p4 located in the counting area r are represented as bounding boxes b1 to b4. In the example shown in FIG. 4, the person detection unit 13 detects only the person located in the counting area r, but it may detect people from all areas in the image g1 at once. That is, when the counting area reception unit 12 receives the designation of the counting area r, the person detection unit 13 may detect the person located in the counting area r.
[0037] The position information acquisition unit 14 acquires position information indicating the position in a predetermined space of the person detected by the person detection unit 13. Specifically, the position information acquisition unit 14 acquires pixel coordinates of an arbitrary point of the detected person in the image. When an area in which a person is represented is detected from the image as a bounding box, the position information acquisition unit 14 may acquire, for example, pixel coordinates of the midpoint of the bottom side of the bounding box. Note that the point that is the position of the person is not limited to the midpoint of the bottom side of the bounding box, and the position information acquisition unit 14 may acquire pixel coordinates of any of the four vertices of the bounding box.
[0038] The position information acquisition unit 14 converts the acquired pixel coordinates into spatial coordinates in a predetermined space. As described above, since it is possible to associate position information with spatial coordinates by, for example, calculating a matrix that converts position coordinates in an image into spatial coordinates in a predetermined space, the position information acquisition unit 14 may acquire spatial coordinates indicating the position of the detected person by applying, to the acquired pixel coordinates, a matrix that converts position coordinates in an image into spatial coordinates in a predetermined space.
[0039] Prior to or in addition to converting pixel coordinates into spatial coordinates, the position information acquisition unit 14 may correct distortion caused by an image of a specific space being captured by an optical camera using a known method.
[0040] The aspect ratio acquisition unit 15 acquires the aspect ratio of a bounding box that the detected person is depicted in. Fig. 5 is a diagram showing an example of acquiring the aspect ratio of a bounding box that indicates an area in which a person is depicted.
[0041] As shown in FIG. 5, the aspect ratio acquisition unit 15 acquires the horizontal side length a and the vertical side length b of the bounding box B acquired by the person detection unit 13, and calculates the aspect ratio α (=b / a).
[0042] The determination unit 16 determines the identity of a first person detected from a first image captured by a first camera among the multiple cameras and a second person detected from a second image captured at the same time as the first image is captured by a second camera different from the first camera among the multiple cameras. Specifically, the determination unit 16 determines that the first person and the second person are the same person when the distance between the position information of the first person and the position information of the second person is equal to or less than a given threshold.
[0043] An example of the identity determination process by the determination unit 16 will be described with reference to Fig. 6. Fig. 6 is a diagram showing a schematic diagram of position coordinates of people detected from each image captured by each of a plurality of cameras. Specifically, in the example shown in Fig. 6, position information P0 to P3 of people detected from a first image captured by a first camera, and position information P4 to P6 of people detected from a second image captured by a second camera are shown.
[0044] The determination unit 16 determines the position information P i Get the. Acquired by the first camera (A): {P0 = (x a0 ,y a0 ), P1=(x a1 ,y a1 ), P2=(x a2 ,y a2 ), P3=(x a3 ,y a3 )} Acquired by the second camera (B): {P4 = (x b0 ,y b0 ), P5=(x b1 ,y b1 ), P6=(x b2 ,y b2 )}
[0045] The determination unit 16 determines the position information P i A position coordinate data list is generated based on the position information P i is expressed as follows: P i ={cam_i,flg,(x,y)) cam_i: Identifier (serial number) of the camera that detected the image flg: Detection flag. -1: Undetermined, 0: Duplicate confirmed, 1: Non-duplicate confirmed (initial state is -1) Coordinates (x, y): XY plane coordinates in a specified space (each coordinate value is subscripted with the camera identifier and the serial number of the detected person (location information) for each camera).
[0046] The determination unit 16 generates a position information data list as follows. P0={0,-1,(x a0 ,y a0 )} P1={0,-1,(x a1 ,y a1 )} P2 = {0, -1, (x a2 ,y a2 )} P3 = {0, -1, (x a3 ,y a3 )} P4 = {1, -1, (x b0 ,y b0 )} P5={1,-1,(x b1 ,y b1 )} P6 = {1, -1, (x b2 ,y b2 )}
[0047] As an example, the determination unit 16 first performs a determination process on the top position information in the list of undetermined (detection flag: -1) position information. FIG. 7 is a diagram showing an example of the determination process. As shown in FIG. 7, the determination unit 16 calculates the distance L between the coordinates of the position information P0 (cam_i: 0, detection flag: -1) and the coordinates of the undetermined position information P4, P5, and P6 (cam_i: 1, detection flag: -1) acquired from an image acquired by a second camera (B) different from the first camera (A) as follows. The subscripts of the distance L correspond to the identifiers of the two points of position information. L 0,4 =sqrt((x b0 -x a0 ) 2 +(y b0-y a0 ) 2 ) L 0,5 =sqrt((x b1 -x a0 ) 2 +(y b1 -y a0 ) 2 ) L 0,6 =sqrt((x b2 -x a0 ) 2 +(y b2 -y a0 ) 2 )
[0048] The determination unit 16 determines the calculated distance L 0,4 ,L 0,5 ,L 0,6 The minimum value of the distance judgment threshold L th Compared with the following formula: L th >=min(L 0,4 ,L 0,5 ,L 0,6 ) As shown above, the minimum distance between two points is the distance judgment threshold L th If it is less than or equal to P0, the position information and min(L 0,4 ,L 0,5 ,L 0,6 ) and the corresponding position information P (either P4, P5, or P6) is determined to overlap, and the minimum value of the distance between the two points is determined to be the distance determination threshold L th If it is not less than or equal to the position information P0 and min(L 0,4 ,L 0,5 ,L 0,6 If it is determined that the position information P0 does not overlap with the position information P (any of P4, P5, or P6) corresponding to the position information P0, the determination unit 16 updates the detection flag of the position information P0 to “1” as follows. P0={0,1,(x a0 ,y a0 )}
[0049] Next, an example of a process for determining whether or not the location information is duplicated following the above determination process will be described with reference to Fig. 8. Here, it is assumed that the determination (non-duplicate confirmation) has been completed for the location information P0 and P1 as shown in the following location information data list. P0={0,1,(x a0 ,y a0 )} P1={0,1,(x a1 ,y a1 )} P2 = {0, -1, (x a2 ,y a2 )} P3 = {0, -1, (x a3 ,y a3 )} P4 = {1, -1, (x b0 ,y b0 )} P5={1,-1,(x b1 ,y b1 )} P6 = {1, -1, (x b2 ,y b2 )}
[0050] 8, the determination unit 16 performs a determination process on the position information P2. Specifically, the determination unit 16 calculates the distance L between the coordinates of the position information P2 (cam_i: 0, detection flag: -1) and the coordinates of the undetermined position information P4, P5, and P6 (cam_i: 1, detection flag: -1) acquired from an image acquired by a second camera (B) different from the first camera (A) as follows: L 2,4 =sqrt((x b0 -x a2 ) 2 +(y b0 -y a2 ) 2 ) L 2,5 =sqrt((x b1 -x a2 ) 2 +(y b1 -y a2 ) 2 ) L 2,6 =sqrt((x b2-x a2 ) 2 +(y b2 -y a2 ) 2 )
[0051] The determination unit 16 determines the calculated distance L 2,4 ,L 2,5 ,L 2,6 The minimum value min(L 2,4 ,L 2,5 ,L 2,6 ) as the distance judgment threshold L th Here, we compare with min(L 2,4 ,L 2,5 ,L 2,6 )=L 2,5 Let us assume that. The determination unit 16 calculates the distance L between the position information P2 and P5 as follows: 2,5 is the distance judgment threshold L th If: L th >=L 2,5 It is determined that the position information P2 and the position information P5 overlap, and the distance L 2,5 is the distance judgment threshold L th If it is determined that the position information P2 and the position information P5 overlap, the determination unit 16 updates the detection flag of the position information P2 to “1” as follows. P2 = {0, 1, (x a2 ,y a2 )} Then, the determination unit 16 updates the detection flag of the position information P5 that is determined to overlap with the position information P2 to "0." P5={0,0,(x b1 ,y b1 )} That is, the determination unit 16 determines that the person depicted in the first image corresponding to the position information P2 and the person depicted in the second image corresponding to the position information P5 are the same person.
[0052] 1 again, the counting unit 17 counts the number of people detected from the image. Specifically, the counting unit 17 counts the people determined to be the same as one person. Note that, when the counting area receiving unit 12 receives the designation of the counting area r, the counting unit 17 may count the number of people detected within the counting area r.
[0053] An example of the counting process will be specifically described. When the determination process by the determination unit 16 as described above is completed, that is, when the determination process is repeated until there is no comparison target location information in which the camera identifier is different and the detection flag is "-1" in each piece of location information, the counting unit 17 counts the number of people detected from the image. An example of the location information data list when the determination process is completed following the above example of the determination process is as follows. P0={0,1,(x a0 ,y a0 )} P1={0,1,(x a1 ,y a1 )} P2 = {0, 1, (x a2 ,y a2 )} P3={0,1,(x a3 ,y a3 )} P4 = {1, -1, (x b0 ,y b0 )} P5={1,0,(x b1 ,y b1 )} P6={1,0,(x b2 ,y b2 )} The above example of the location information data list means that the location information P5 and P6 overlap with any of the other location information.
[0054] The counting unit 17 counts the number of pieces of location information whose detection flag is “1” or “−1” from the location information data list when the determination process is completed. According to the above example, the counting unit 17 obtains the number of people “5”.
[0055] Next, an example will be described in which the person counting device 10 includes the aspect ratio acquisition unit 15, and the aspect ratio of a bounding box indicating an area in which a person is depicted in an image is used in the determination process by the determination unit 16. Here, an example will be described in which identity determination (overlap determination) is performed between position information P0 acquired from an image captured by the first camera (A) and position information P4, P5, and P6 acquired from images captured by the second camera (B).
[0056] The aspect ratio acquisition unit 15 acquires the aspect ratio α (to which the camera identifier and the serial number of the detected person (position information) for each camera are added as subscripts) of the bounding box corresponding to each of the position information P0 to P6.
[0057] The determination unit 16 generates a position information data list including the aspect ratio α as follows. P0={0,-1,(x a0 ,y a0 ),α a0} P1={0,-1,(x a1 ,y a1 ),α a1} P2 = {0, -1, (x a2 ,y a2 ),α a2} P3 = {0, -1, (x a3 ,y a3 ),α a3} P4 = {1, -1, (x b0 ,y b0 ),α b0} P5={1,-1,(x b1 ,y b1 ),α b1} P6 = {1, -1, (x b2 ,y b2 ),α b2}
[0058] As shown in FIG. 7, the judgment unit 16 calculates the distance L between the coordinates of the position information P0 (cam_i: 0, detection flag: -1) obtained from an image acquired by the first camera (A) and the coordinates of the unjudged position information P4, P5, P6 (cam_i: 1, detection flag: -1) obtained from an image acquired by the second camera (B) as follows: L 0,4 =sqrt((x b0 -x a0 ) 2 +(y b0 -y a0 ) 2 ) L 0,5 =sqrt((x b1 -x a0 ) 2 +(y b1 -y a0 ) 2 ) L 0,6 =sqrt((x b2 -x a0 ) 2 +(y b2 -y a0 ) 2 )
[0059] The determination unit 16 determines the calculated distance L 0,4 ,L 0,5 ,L 0,6 The minimum value (min(L 0,4 ,L 0,5 ,L 0,6 )) as the distance judgment threshold L th Compare with. Here, as an example, min(L 0,4 ,L 0,5 ,L 0,6 )=L 0,5 Let us assume that.
[0060] Furthermore, the determination unit 16 determines the distance L 0,4 ,L 0,5 ,L 0,6 The minimum value of L 0,5 The aspect ratio α of the position information P5 corresponding to b1 and the aspect ratio α of the position information P0 a0It is determined whether the difference between the values is equal to or smaller than a predetermined level.
[0061] Here, as an example, the determination unit 16 determines whether the aspect ratio α b1 and the aspect ratio α of the position information P0 a0 Ratio β 0,5 Calculate the ratio β 0,5 is expressed as follows: β 0,5 = α b1 / α a0 Then, the determination unit 16 determines whether the ratio β is equal to or lower than the lower limit threshold β th_min and the upper threshold β th_max It is determined whether the value is within the range, that is, whether the following formula is satisfied. β th_min <=β 0,5 <=β th_max That is, the determining unit 16 determines that the difference in aspect ratio is equal to or smaller than a predetermined level when the ratio β is close to "1." th_min and the upper threshold β th_max can be arbitrarily set in terms of design.
[0062] The determination unit 16 determines the distance L 0,5 is the distance judgment threshold L th is less than or equal to (L th >=L 0,5 ),and, Aspect ratio α b1 and aspect ratio α a0 The difference between is less than a certain level (β th_min <=β 0,5 <=β th_max ), it is determined that the position information P0 and the position information P5 overlap. That is, the determination unit 16 determines that the person shown in the first image corresponding to the position information P0 and the person shown in the second image corresponding to the position information P5 are the same person.
[0063] On the other hand, the formula (L th >=L 0,5 ) and formula (β th_min <=β 0,5 <=β th_max) is not true, the determination unit 16 determines that the location information P0 and the location information P5 do not overlap. In this case, the determination unit 16 updates the detection flag of the location information P0 to "1" as follows. P0={0,1,(x a0 ,y a0 ),α a0}
[0064] 1 again, output unit 18 outputs the number of people counted by counting unit 17. The manner of output is not limited, and output unit 18 may output information representing the counted number of people by a manner such as display on a predetermined display, transmission to another device, storage in a predetermined storage means, or the like.
[0065] Next, the operation of the people counting system 1 of this embodiment will be described with reference to Fig. 9. Fig. 9 is a flowchart showing the process of a people counting method performed in the people counting system 1.
[0066] In step S1, the image acquisition unit 11 acquires a plurality of images captured by each of a plurality of cameras installed so as to capture an image of a predetermined space in which people are to be counted.
[0067] In step S2, the counting area receiving unit 12 receives a designation of a counting area that designates an area in which people are counted in a predetermined space. Note that the reception process in step S2 is not essential, and for example, the counting area may be set in advance.
[0068] In step S3, the person detection unit 13 detects people from each of the images acquired by the image acquisition unit 11. The person detection unit 13 may detect people in the images as bounding boxes.
[0069] In step S4, the position information acquisition unit 14 acquires position information indicating the position in a predetermined space of the person detected by the person detection unit 13. Specifically, the position information acquisition unit 14 acquires pixel coordinates in an image of the detected person, and converts the pixel coordinates into spatial coordinates in the predetermined space.
[0070] In step S5, the determination unit 16 determines the identity of the person detected from the images captured by each camera based on the position information of the person and a given threshold value related to the position information. Note that the determination unit 16 may use whether or not the difference in aspect ratio of the bounding box in which each person is represented, acquired by the aspect ratio acquisition unit 15, is equal to or smaller than a predetermined level, in determining the identity of the person.
[0071] In step S6, counting unit 17 counts the number of people detected from the image, counting each person determined to be the same as 1. In step S7, output unit 18 outputs the number of people counted by counting unit 17.
[0072] According to the person counting system 1, the person counting device 10, the person counting method, and the person counting program P1 of the present embodiment described above, when the distance between the position information of the first person and the position information of the second person is close, the second person is likely to be the same as the first person. In this way, by determining the identity of the persons, it is possible to prevent the person from being counted in duplicate. Furthermore, even if the second person has position information with the smallest distance from the position information of the first person among the second people represented in the second image, if the distance is not equal to or less than a certain degree, it is likely that the second person is not the same as the first person and the first person is not represented in the second image. In light of such a possibility, if the distance between the location information of a first person and the location information of a second person exceeds a given threshold, the first person and the second person are not determined to be the same person, thereby preventing undercounting of people.
[0073] The present invention has been described in detail above based on the embodiments. However, the present invention is not limited to the above embodiments. The present invention can be modified in various ways without departing from the spirit and scope of the present invention. [Explanation of symbols]
[0074] 1...person counting system, 10...person counting device, 11...image acquisition unit, 12...counting area reception unit, 13...person detection unit, 14...position information acquisition unit, 15...aspect ratio acquisition unit, 16...judgment unit, 17...counting unit, 18...output unit, 20...image memory unit, P1...person counting program, r...counting area.
Claims
1. A person counting system for counting people present in a predetermined space, comprising: an image acquisition unit that acquires a plurality of images captured by a plurality of cameras installed to capture the space; a person detection unit that detects a person from each of the images; a position information acquisition unit that acquires position information indicating a position of the detected person in the space; a determination unit that determines the identity of a first person detected from a first image captured by a first camera of the plurality of cameras and a second person detected from a second image captured at the same time as the first image is captured by a second camera different from the first camera of the plurality of cameras, and that determines that the first person and the second person are the same person when a distance between position information of the first person and position information of the second person is equal to or less than a given threshold; a counting unit that counts the number of people detected from the image, and counts people that are determined to be the same as one person; an output unit that outputs the number of people counted by the counting unit; A person counting system comprising:
2. a counting area receiving unit configured to receive a designation of a counting area for designating an area in which people are counted in the space, The counting unit counts the number of people detected within the counting area. The system of claim 1 .
3. The person detection unit detects a bounding box, which is a rectangular area in which the person is represented in the image, The person counting system includes: an aspect ratio acquisition unit that acquires an aspect ratio of the bounding box; Further comprising: the determination unit determines that the first person and the second person are the same when a distance between position information of the first person and position information of the second person is equal to or less than a given threshold value and a difference between a first aspect ratio that is an aspect ratio of a bounding box in which the first person is represented and a second aspect ratio that is an aspect ratio of a bounding box in which the second person is represented is equal to or less than a predetermined level; The person counting system according to claim 1 or 2.
4. A person counting method in a person counting system that counts people present in a predetermined space, comprising: The person counting system includes an image acquisition unit, a person detection unit, a position information acquisition unit, a counting unit, and an output unit, The person counting method includes: an image acquisition step in which the image acquisition unit acquires a plurality of images captured by a plurality of cameras installed to capture an image of the space; a person detection step in which the person detection unit detects a person from the image; a position information acquiring step in which the position information acquiring unit acquires position information indicating a position in the space of the detected person; a determination step in which the determination unit determines the identity of a first person detected from an image captured by a first camera of the plurality of cameras, and a second person detected from an image captured by a second camera different from the first camera of the plurality of cameras, and determines that the first person and the second person are the same when a distance between position information of the first person and position information of the second person is equal to or less than a given threshold; a counting step in which the counting unit counts the number of people detected from the image, and counts people that are determined to be the same as one person; an output step unit that outputs the number of people counted in the counting step; A method for counting people having the following features.
5. A person counting program for causing a computer to function as a person counting system for counting people present in a predetermined space, comprising: The computer includes: an image acquisition function for acquiring a plurality of images captured by a plurality of cameras installed to capture the space; A person detection function for detecting a person from the image; a position information acquisition function for acquiring position information indicating a position of the detected person in the space; a determination function for determining the identity of a first person detected from an image captured by a first camera of the plurality of cameras and a second person detected from an image captured by a second camera different from the first camera of the plurality of cameras, the determination function determining that the first person and the second person are the same person when a distance between position information of the first person and position information of the second person is equal to or less than a given threshold; A counting function that counts the number of people detected from the image, and counts people that are determined to be the same as one person; an output function for outputting the number of people counted by the counting function; A people counting program that makes this possible.
Citation Information
Patent Citations
Objects number detector
JP1989121978A
Device for counting number of passing person and system for managing number of visiting and leaning person using the device
JP1998049718A
Device, method and program for tracking person using plural cameras
JP2017068375A
Program, information processing device, and information processing method
JP2019200456A
Coordinate transformation matrix estimation method and computer program
JP2020086879A
Cited By
Method for calculating number of plate-shaped objects
CN121095510A