Pedestrian Heat Map Generation Method and System

By acquiring and processing image data, dividing grids and counting the number of pedestrians, the problem of difficulty in effectively displaying the population density distribution in the existing technology is solved, and intuitive pedestrian heat map generation is realized, which is suitable for smart retail and other scenarios.

CN115100309BActive Publication Date: 2025-06-27BOE TECHNOLOGY GROUP CO LTD
View PDF 2 Cites 0 Cited by

Patent Information

Application Number
CN202210727009.7
Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
Filing Date
2022-06-24
Publication Date
2025-06-27
Estimated Expiration
2042-06-24

AI Technical Summary

Technical Problem

In smart retail, smart finance and other scenarios, it is difficult for the existing technology to effectively display and manage population density distribution, especially in the generation of heat maps in pedestrian-intensive areas.

Method used

By obtaining image data containing pedestrians, determining the coordinates of pedestrians, dividing them into multiple grids, counting the number of pedestrians in each grid, and then generating a pedestrian heat map. The method includes steps such as image acquisition, coordinate correction, grid division and thermal diagram drawing.

Benefits of technology

It realizes an intuitive sense of the density of pedestrians in the area, provides effective management and display of population density distribution, and is suitable for pedestrian heat map generation in various scenarios.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN115100309B_ABST
    Figure CN115100309B_ABST
Patent Text Reader

Abstract

The present disclosure provides a method and system for generating a pedestrian heat map. The method includes: obtaining the coordinates of pedestrians in a scene; based on the coordinates of the pedestrians, respectively counting the pedestrians in the corresponding grids obtained by dividing the scene into a plurality of grids; and counting the number of pedestrians in each of the plurality of grids to draw the heat map of the pedestrians in the scene.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present disclosure relates to the field of computer technologies, and particularly to a method and system for generating a pedestrian heat map. Background Art

[0002] Computer vision refers to using cameras and computers to replace the human eye to identify, track, and measure targets, etc., and further perform graphic processing to make the images processed by the computer more suitable for human eye observation or transmission to instruments for detection.

[0003] In scenarios such as smart retail and smart finance, the distribution of crowd density can be displayed using computer vision. Summary of the Invention

[0004] According to one aspect of the present disclosure, there is provided a method for generating a pedestrian heat map, including: acquiring image data including pedestrians and determining the coordinates of at least one pedestrian in a scene; based on the coordinates of the at least one pedestrian, respectively counting the at least one pedestrian in the corresponding grid in a plurality of grids obtained by dividing the scene; and counting the number of pedestrians in each grid of the plurality of grids to draw the pedestrian heat map in the scene.

[0005] In some embodiments, based on the coordinates of the at least one pedestrian, respectively counting the at least one pedestrian in the corresponding grid in a plurality of grids obtained by dividing the scene includes: dividing the scene into the plurality of grids based on a predetermined fine granularity; and based on the coordinates of the at least one pedestrian and the plurality of grids, respectively counting the at least one pedestrian in the corresponding grid.

[0006] In some embodiments, based on the coordinates of the at least one pedestrian and the plurality of grids, respectively counting the at least one pedestrian in the corresponding grid includes: assigning an index value to each grid in the plurality of grids in the coordinate system of the scene; using the length value and width value of each grid in the plurality of grids, respectively taking the quotient of the coordinates in the length direction and width direction of each pedestrian in the at least one pedestrian along the length direction and width direction of the plurality of grids to obtain a first coordinate quotient value and a second coordinate quotient value corresponding to the coordinate value of each pedestrian; and comparing the first coordinate quotient value and the second coordinate quotient value with the index value of each grid to count each pedestrian in the corresponding grid.

[0007] In some embodiments, obtaining image data including pedestrians and determining the coordinates of at least one pedestrian in a scene includes: acquiring image data of the pedestrians in the scene at a plurality of image data acquisition times at intervals of a first predetermined time; and counting the number of pedestrians in each of the plurality of grids includes: counting the pedestrians in each of the grids for the image data acquired at each image data acquisition time, so as to count the pedestrians in each grid for each image data acquisition time.

[0008] In some embodiments, counting the number of pedestrians in each of the plurality of grids further includes: marking and tracking the pedestrians in the scene; and determining whether the coordinates obtained at two adjacent image data acquisition times of the image data of the tracked pedestrians are within the same grid. If they are within the same grid, the pedestrian is not counted at the subsequent image data acquisition time; if they are not within the same grid, the pedestrian is counted at the subsequent image data acquisition time.

[0009] In some embodiments, counting the number of pedestrians in each of the plurality of grids to draw a heat map of the pedestrians in the scene includes: counting the pedestrians in each grid for the plurality of image data acquisition times respectively; marking the grids differently according to the differences in the sum of the number of pedestrians in each of the grids at each image data acquisition time; and determining the different markings of each grid for the plurality of image data acquisition times to obtain a heat map of the pedestrians in the scene that changes over time.

[0010] In some embodiments, marking the grids differently includes: drawing different display colors for the grids according to the differences in the sum of the number of pedestrians in each of the grids.

[0011] In some embodiments, obtaining image data including pedestrians and determining the coordinates of at least one pedestrian in a scene further includes: extracting a first coordinate of the pedestrian based on the coordinate system of the image acquisition device of the image data from the image data; and converting the first coordinate into a second coordinate based on the coordinate system of the scene, and using the second coordinate as the coordinate of the pedestrian in the scene.

[0012] In some embodiments, extracting a first coordinate of the pedestrian based on the coordinate system of the image acquisition device of the image data from the image data includes: obtaining the original coordinate of the pedestrian based on the coordinate system of the image acquisition device of the image data; obtaining a correction value of the original coordinate based on the following formula:

[0013]

[0014] Wherein, H represents the height of the image acquisition device for the image data, x2 represents the central coordinate of the image acquisition device for the image data in the scene, x1 represents the original coordinate obtained by the image acquisition device, h represents the height of the pedestrian, x represents the correction value of the original coordinate; and based on the quadrant of the original coordinate in the coordinate system of the image acquisition device, the original coordinate is corrected using the correction value of the original coordinate to obtain the first coordinate.

[0015] In some embodiments, the height of the pedestrian is the mode of the heights of the pedestrians.

[0016] In some embodiments, the original coordinate, the first coordinate, and the second coordinate include the head coordinates of the pedestrian.

[0017] In some embodiments, acquiring the image data of the pedestrian in the scene at multiple image data acquisition times every first predetermined time includes setting the image acquisition device at a position higher than the height of the pedestrian to acquire the head image data of the pedestrian.

[0018] In some embodiments, setting the image acquisition device at a position higher than the height of the pedestrian to acquire the head image data of the pedestrian includes acquiring the head image data of the pedestrian through an image acquisition device located at the center of the scene.

[0019] In some embodiments, setting the image acquisition device at a position higher than the height of the pedestrian to acquire the head image data of the pedestrian includes acquiring the head image data of the pedestrian through multiple image acquisition devices whose acquisition areas cover the entire scene.

[0020] In some embodiments, there is also an acquisition overlapping area of the at least two image acquisition devices in the scene, and acquiring the head image data of the pedestrian through multiple image acquisition devices whose acquisition areas cover the entire scene includes selecting the head image data acquired by one of the at least two image acquisition devices corresponding to the acquisition overlapping area.

[0021] In some embodiments, there is also a noise area in the scene, and acquiring the head image data of the pedestrian through multiple image acquisition devices whose acquisition areas cover the entire scene includes not acquiring the head image data of the pedestrians in the noise area.

[0022] In some embodiments, converting the first coordinate to a second coordinate based on the coordinate system of the scene includes: through coordinate rotation, transforming the first coordinate in the coordinate system of the image acquisition device based on the image data to the second coordinate in the coordinate system of the scene.

[0023] According to another aspect of the present disclosure, a pedestrian heat map generation system is provided, including: at least one image acquisition device; a processor; and a memory. The at least one image acquisition device is configured to acquire image data of pedestrians in a scene and send it to the processor and / or the memory, and the memory stores instructions executable by the processor. When the instructions are executed by the processor, the processor is enabled to execute the method described above.

[0024] In some embodiments, the at least one image acquisition device includes one image acquisition device, the height of the one image acquisition device is greater than the height of a pedestrian, and it is located at the center of the scene.

[0025] In some embodiments, the at least one image acquisition device includes at least two image acquisition devices, the height of the at least two image acquisition devices is greater than the height of a pedestrian, and the image acquisition areas of the at least two image acquisition devices cover the entire scene. Description of the Drawings

[0026] The drawings are used to provide a further understanding of the present disclosure, and constitute a part of the specification. Together with the following specific embodiments, they are used to explain the present disclosure, but do not constitute a limitation to the present disclosure. In the drawings:

[0027] Figure 1 FIG. is a flowchart of a method for generating a pedestrian heat map according to an embodiment of the present disclosure;

[0028] Figure 2 FIG. is a schematic diagram of coordinate correction according to an embodiment of the present disclosure;

[0029] Figure 3 FIG. is a schematic diagram of coordinate fusion according to an embodiment of the present disclosure;

[0030] Figure 4 FIG. is a pedestrian heat map according to an embodiment of the present disclosure;

[0031] Figure 5 FIG. is a schematic diagram of a pedestrian heat map generation system according to an embodiment of the present disclosure; and

[0032] Figure 6 FIG. is a schematic diagram of a pedestrian heat map generation system according to an embodiment of the present disclosure. Detailed Description of the Embodiments

[0033] The following provides a detailed description of the specific embodiments of the present disclosure with reference to the drawings. It should be understood that the specific embodiments described herein are only used to illustrate and explain the present disclosure, and are not used to limit the present disclosure.

[0034] To make the objectives, technical solutions, and advantages of the embodiments of the present disclosure clearer, the technical solutions of the embodiments of the present disclosure will be clearly and completely described below with reference to the accompanying drawings of the embodiments of the present disclosure. Apparently, the described embodiments are only a part of the embodiments of the present disclosure, rather than all of the embodiments. All other embodiments obtained by those of ordinary skill in the art based on the described embodiments of the present disclosure without creative efforts shall fall within the scope of protection of the present disclosure.

[0035] Unless otherwise defined, the technical terms or scientific terms used herein shall have the ordinary meanings understood by those of ordinary skill in the art to which the present disclosure pertains. The "first", "second", and similar terms used in the present disclosure do not denote any order, quantity, or importance, but are only used to distinguish different components. Similarly, words such as "including" or "comprising" mean that the elements or objects appearing before the word cover the elements or objects listed after the word and their equivalents, without excluding other elements or objects. The terms "connected" or "coupled" and the like are not limited to physical or mechanical connections, but may include electrical connections, whether direct or indirect.

[0036] According to one aspect of the present disclosure, a method for generating a pedestrian heat map is provided, which can enable an observer to intuitively feel the density of pedestrians in a region. Figure 1 The following is a flowchart of a method for generating a pedestrian heat map according to an embodiment of the present disclosure. The present disclosure will be described in detail below with reference to Figure 1 to.

[0037] In step S100, image data including pedestrians is acquired and the coordinates of at least one pedestrian in the scene are determined.

[0038] Specifically, first, image data of pedestrians in the scene is collected. A video stream can be obtained by an image acquisition device, such as a camera. The video stream is saved as image data for processing. When acquiring the image data of pedestrians in the scene, the image data of pedestrians in the scene at corresponding moments can be collected every first predetermined time. Further, the image data of the pedestrians in the scene is collected at multiple image data acquisition moments every first predetermined time.

[0039] Then, the original coordinates of the pedestrians based on the coordinate system of the image acquisition device of the image data are obtained from the image data. The coordinate system of the image data of the pedestrians collected by the image acquisition device is a coordinate system based on the corresponding image acquisition device. The original coordinates of the pedestrians in this coordinate system are obtained for subsequent processing.

[0040] In addition, due to the coordinate error caused by the perspective effect of the image acquisition device, the obtained original coordinates have errors. Therefore, the original coordinates need to be corrected.

[0041] Figure 2 Schematic diagram of coordinate correction according to an embodiment of the present disclosure. As Figure 2 shown, taking the example of obtaining the head coordinates of a pedestrian through a single camera, using mathematical formulas, the measured original coordinates are corrected to obtain the first corrected coordinates of the pedestrian based on the coordinate system of the image acquisition device.

[0042] As Figure 2 shown, H represents the camera installation height, x2 is the central coordinate of the camera in the scene, x1 is the original coordinate of the head of the pedestrian in the coordinate system of the image acquisition device, h is the height of the pedestrian (the mode of the height can be taken, for example, 1.6 m), and x is the correction value of the length of the original coordinate. The correction value is obtained by the following formula:

[0043]

[0044] The corrected coordinates (the first coordinates) are x1 - x or x1 + x, determined according to the quadrant where the coordinate point is located. Thus, the first coordinates after correcting the original coordinates are obtained based on the correction value and the original coordinates. For example, for Figure 2 the example shown, if x1 is on the side of the positive direction of the extension of x2 along the coordinate axis X, then the first coordinates after correcting the original coordinates are x1 - x; if x1 is on the side of the negative direction of the extension of x2 along the coordinate axis X, then the first coordinates after correcting the original coordinates are x1 + x. However, the present disclosure is not limited thereto.

[0045] Next, the first coordinates of the pedestrian are converted into the second coordinates based on the coordinate system of the scene. Since the first coordinates of the pedestrian are based on the coordinate system of the image acquisition device, while the second coordinates are based on the coordinate system of the scene, such as the ground (i.e., the scene plane). The coordinate system of the image acquisition device is realized by setting configuration parameters, and the coordinate system of the scene may be set artificially based on the actual environment. Therefore, the two coordinate systems may be different. So, it may be necessary to convert the first coordinates of the pedestrian in the coordinate system of the image acquisition device into the second coordinates based on the coordinate system of the scene, and use the second coordinates as the coordinates of the pedestrian in the scene.

[0046] In the present disclosure, the first coordinates obtained through the image acquisition device are described by taking the head coordinates of the pedestrian as an example.

[0047] Figure 2 Illustrated by taking the example of collecting the head image data of a pedestrian through an image acquisition device located at the center of the scene, but the present disclosure is not limited thereto. When the scene range is large, multiple (for example, at least two) image acquisition devices can be used to collect the head image data of the pedestrian, as long as the entire acquisition area of the multiple image acquisition devices covers the entire scene.

[0048] Furthermore, for the head image data of pedestrians collected by multiple image acquisition devices, since the head image data collected by each image acquisition device is based on its own coordinate system, and the coordinate systems of the image acquisition devices may not be aligned, it is necessary to perform coordinate fusion from the independent coordinates in the coordinate systems of the image acquisition devices to the coordinates in the scene coordinate system according to the installation positions and installation angles of the cameras.

[0049] Suppose three USB cameras are used to achieve full coverage of the scene. Each camera has a set of independent detection programs. For actual needs, the present disclosure performs coordinate fusion based on the scene plane. For the first coordinates output by each camera, it is necessary to perform coordinate fusion from the first coordinates to the scene coordinates according to the installation positions and installation angles of the cameras.

[0050] Figure 3 FIG. is a schematic diagram of coordinate fusion according to an embodiment of the present disclosure. As Figure 3 shown, four coordinate systems are shown. For example, the coordinate system with the origin o at the outermost position in the upper right corner is the scene coordinate system, and the remaining three coordinate systems represent the coordinate systems of the three USB cameras. The following will describe Figure 3 the coordinate fusion process.

[0051] First, determine the central coordinates (Xi, Yi) of each camera in the scene coordinate system through on-site measurement, that is, Figure 3 the coordinates of the origin o of the three USB cameras in the scene coordinate system. After obtaining the detection data of each camera, the head coordinates of the pedestrians obtained through the corresponding camera are rotated (if necessary) to obtain the rotated coordinates. The transformation process uses trigonometric functions, as shown in the following formula (2), (x, y) is the original coordinate, (s, t) is the transformed coordinate, β is the rotation angle, α is the angle between the vector from the origin to (x, y) and the coordinate axis X, and γ is the modulus of the vector from the origin to (x, y), with counterclockwise being positive.

[0052] s = rcos(α + β) = rcosαcosβ + rsinαsinβ = xcosβ - ysinβ

[0053] t = rsin(α + β) = rsinαcosβ + rcosαsinβ = ycosβ + xsinβ (2)

[0054] Then, according to the central coordinates (Xi, Yi), convert them to the scene coordinate system, so as to obtain the scene coordinates after coordinate fusion.

[0055] When acquiring the head image data of pedestrians in a scene through at least two image acquisition devices, there are areas covered by both cameras in coordinate fusion; or there are also some noise areas outside the scene area but detected by the cameras. These areas are defined as ignored areas. Thus, the ignored areas can mainly include two parts. The first part is the overlapping area of the acquisition areas of the two cameras. In this case, calculations are only based on one camera, and the head image data of pedestrians acquired by the other camera will be ignored. The second part is the area determined not to require pedestrian statistics according to the scene, and this area can be set manually. The head image data of pedestrians appearing in the area of the second part is regarded as noise data and is not processed.

[0056] In step S120, based on the coordinates of at least one pedestrian, at least one pedestrian is respectively counted in the corresponding grid among the multiple grids obtained by dividing the scene.

[0057] First, based on a predetermined fine granularity, the scene plane is divided into multiple grids. Parameters can be input through a program, and the parameters represent the number of segmentation blocks in the X-axis and Y-axis directions. For example, if the X-axis direction is divided into 4 blocks and the Y-axis direction is divided into 5 blocks, then this area will be divided into 20 grids. Through parameter settings, different fine granularities of grid segmentation can be set.

[0058] Next, based on the second coordinates of the pedestrians in the scene coordinate system obtained in step S100 and the multiple grids, the pedestrians are counted in the corresponding grids. During the grid division process, all distance parameters are reflected in pixel value form, that is, the actual coordinate positions are converted into coordinate data in pixel value scale according to the installation positions of the cameras. For example, for the pedestrian coordinates (x, y) of the distance parameter, it may be located within the (m, n) of the grid parameters. (m, n) can represent, for example, the grid block at the intersection position of the m-th row grid block along the X-axis direction and the n-th column grid block along the Y-axis direction. Then, (m, n) can be used as the index of this grid.

[0059] In the process of separately counting pedestrians in corresponding grids, first, in the coordinate system of the scene, an index value is assigned to each of multiple grids, such as the above (m, n). Then, using the length value and width value of each grid among the multiple grids, quotient values are respectively taken for the coordinate values in the length direction and width direction of each pedestrian along the length direction and width direction of the multiple grids. In the present disclosure, taking the length direction of the grid as the X-axis direction and the width direction of the grid as the Y-axis direction as an example for illustration, but the present disclosure is not limited thereto. The quotient value includes a first coordinate quotient value and a second coordinate quotient value, that is, the quotient values corresponding to the distances from the coordinate origin in the length direction and width direction respectively. Finally, the first coordinate quotient value and the second coordinate quotient value are compared with the index value assigned to each grid above. If they match, the pedestrian is placed in the corresponding grid based on this. That is, the first coordinate quotient value and the second coordinate quotient value of the coordinates of pedestrians in the same grid are respectively the same, while each grid has a different index (that is, pedestrians with different first coordinate quotient values and / or second coordinate quotient values are in different grids).

[0060] In step S140, the number of pedestrians in each of the multiple grids is counted to draw a pedestrian heat map in the scene.

[0061] In this step, according to preset parameters, the statistics of pedestrian heat are performed every once in a while. That is, at a certain moment, the coordinate data of pedestrians in the scene at this time is obtained. According to the magnitude of the coordinate values, these coordinates are divided into each grid and the number of pedestrians inside each grid is summed based on each grid. Finally, according to the index of the grid, the summation data within a period of time is stored in an array and output, thereby drawing the pedestrian heat map in this scene.

[0062] Specifically, counting the number of pedestrians in each of the multiple grids includes: counting the pedestrians in each grid for the image data collected at each image data acquisition moment, so as to count the pedestrians in each grid for this image data acquisition moment. That is, the pedestrians in each grid are counted, and the data images of pedestrians collected each time are processed to count the number of pedestrians in each grid obtained by each collection, so that the number of pedestrians in each grid at each collection moment can be counted.

[0063] Further, in some embodiments of the present disclosure, counting the number of pedestrians in each grid of multiple grids further includes marking and tracking the pedestrians in the scene, and then determining whether the coordinates of the tracked pedestrians at two adjacent image data acquisition times are located in the same grid. If they are located in the same grid, the pedestrian is not counted at the later image data acquisition time; if they are located in different grids, the change of the pedestrian is counted at the later image data acquisition time. In this way, if a pedestrian is in the same grid at two adjacent image data acquisition times, the pedestrian can be prevented from being double-counted, thus ensuring the correctness of the pedestrian number statistics result.

[0064] In some embodiments of the present disclosure, counting the number of pedestrians in each grid of multiple grids to draw a heat map of pedestrians in the scene includes: counting the number of pedestrians in each grid for multiple image data acquisition times respectively; marking each grid differently according to the difference in the sum of the number of pedestrians in each grid at each image data acquisition time; and drawing different marks of each grid for multiple image data acquisition times to obtain the heat map of pedestrians in the scene that changes over time. In a specific example, grids with different sums of the number of pedestrians counted are drawn with different display colors, so that observers can intuitively feel the density of pedestrians. Figure 4 A heat map of pedestrians according to an embodiment of the present disclosure, wherein black dots represent pedestrians, and grids with different numbers of pedestrians have different colors.

[0065] According to another aspect of the present disclosure, a system for generating a heat map of pedestrians is provided. Figure 5 The following is a schematic diagram of a system for generating a heat map of pedestrians according to an embodiment of the present disclosure, and the present disclosure will be described in detail with reference to Figure 5 the following.

[0066] As Figure 5 shown, the system for generating a heat map of pedestrians includes at least one image acquisition device 40, at least one detection module 42, a coordinate correction and fusion module 44, a heat map processing module 46, and a heat map generation module 48.

[0067] In some embodiments of the present disclosure, at least one image acquisition device 40 may include at least one camera. The camera captures a video stream in the scene and further obtains image data of pedestrians. In the present disclosure, image data of pedestrians in the scene can be captured at multiple image data acquisition times separated by a first predetermined time respectively.

[0068] In some embodiments of the present disclosure, at least one detection module 42 is connected to at least one image acquisition device 40 in a one-to-one correspondence, and is configured to obtain the coordinates of a pedestrian in a scene. The detection module 42 processes the video stream acquired by the camera to obtain the head coordinates of the pedestrian. The yolov5 algorithm can be used, which is an efficient detection algorithm. The yolov5 algorithm can be used to establish a head detection model, and the head detection model is trained and tested using the pre-stored head image data, so as to obtain a head detection model with better effects. Then, using this head detection model, based on the head image data, the head coordinates of the pedestrians in the scene are obtained. In practical applications, according to the different platforms on which the algorithm is deployed, the algorithm can be migrated, compressed and deployed accordingly, so as to improve the running efficiency of the model on the premise of ensuring the accuracy of the model.

[0069] In some embodiments of the present disclosure, the coordinate correction and fusion module 44 is connected to at least one detection module 42, and is configured to correct and fuse the head coordinates obtained through at least one detection module 42 based on the scene coordinate system. Due to the coordinate error caused by the perspective effect of the image acquisition device, the obtained coordinates have errors. Therefore, it is necessary to correct the original coordinates based on the image acquisition device coordinate system. The coordinate correction and fusion module 44 can correct the original coordinates based on the above formula (1) to obtain the first coordinates.

[0070] In the case where at least one image acquisition device 40 includes a plurality of image acquisition devices 40, it is necessary to rotate the first coordinates of the pedestrians obtained from the head image data acquired by at least two image acquisition devices, for example, through formula (2), so as to transform the first coordinates in the respective coordinate systems of the pedestrians acquired by different image acquisition devices into the second coordinates in the scene coordinate system, so as to fuse the respective first coordinates obtained through each image acquisition device 40 into the scene coordinate system.

[0071] In some embodiments of the present disclosure, the heat map processing module 46 is connected to the coordinate correction and fusion module 44, and is configured to count the pedestrians in the corresponding grids of the multiple grids obtained by dividing the scene based on the coordinates of the pedestrians.

[0072] The heat map processing module 46 can be configured to perform the following processing: dividing the scene into multiple grids based on a predetermined fine granularity; and counting at least one pedestrian within the corresponding grid based on the coordinates of at least one pedestrian and the multiple grids. The heat map processing module 46 is further configured to: assign an index value to each of the multiple grids in the coordinate system of the scene, and use the length value and width value of each grid in the multiple grids to divide the coordinate values in the length direction and width direction of each of at least one pedestrian in the length direction and width direction of the multiple grids respectively to obtain a first coordinate quotient value and a second coordinate quotient value corresponding to the coordinate value of each pedestrian; and compare the first coordinate quotient value and the second coordinate quotient value with the index value of each grid to count each pedestrian within the corresponding grid.

[0073] In some embodiments of the present disclosure, the heat map generation module 48 is connected to the heat map processing module and is used to count the number of pedestrians in each of the multiple grids to draw a heat map of the pedestrians within the scene.

[0074] The heat map generation module 48 is configured to: count the pedestrians in each grid for the image data collected at each image data acquisition moment, so as to count the pedestrians in each grid for the image data acquisition moment.

[0075] The heat map generation module 48 is further configured to: mark and track the pedestrians within the scene; determine whether the coordinates obtained by the tracked pedestrians at two adjacent image data acquisition moments are located within the same grid. If they are located within the same grid, the pedestrian is not counted at the subsequent image data acquisition moment. If they are not located within the same grid, the pedestrian is counted at the subsequent image data acquisition moment; and mark each grid differently according to the different sums of the number of pedestrians in each grid. In a specific example, grids with different sums of the number of pedestrians can be drawn with different display colors.

[0076] According to another aspect of the present disclosure, a pedestrian heat map generation system is provided. Figure 6 It is a schematic diagram of a pedestrian heat map generation system according to an embodiment of the present disclosure. As Figure 6 shown, the pedestrian heat map generation system includes: at least one image acquisition device 50; a processor 52; and a memory 54.

[0077] At least one image acquisition device 50 is configured to acquire image data of pedestrians within the scene and send it to the processor and / or be connected to the memory 54. And, the memory 54 stores instructions executable by the processor 52, and these instructions are executed by the processor 54 so that the processor 52 can execute the above-mentioned pedestrian heat map generation method.

[0078] In some embodiments, at least one image acquisition device 50 includes one image acquisition device 50. The height of this one image acquisition device 50 is greater than the height of a pedestrian, and it is located at the center of the scene.

[0079] In some embodiments, at least one image acquisition device 50 includes at least two image acquisition devices 50. The height of the at least two image acquisition devices 50 is greater than the height of a pedestrian, and the image acquisition areas of the at least two image acquisition devices 50 cover the entire scene.

[0080] In the present disclosure, by setting the image acquisition device at a position higher than the height of a pedestrian to acquire head image data of the pedestrian, the problem of head occlusion can be solved, and the missed detection of the head can be avoided.

[0081] Furthermore, the implementation algorithm of the pedestrian heat map generation method of the present disclosure can be implemented on an intelligent device at the edge of the scene. After conversion and compression, the operating efficiency of the system can be greatly improved.

[0082] It can be understood that the above embodiments are merely exemplary embodiments adopted to illustrate the principle of the present disclosure. However, the present disclosure is not limited thereto. For those of ordinary skill in the art, various modifications and improvements can be made without departing from the spirit and essence of the present disclosure, and these modifications and improvements are also regarded as the protection scope of the present disclosure.

Claims

1. A method for generating a pedestrian heat map, comprising: Obtaining image data including pedestrians and determining the coordinates of at least one pedestrian in the scene; Based on the coordinates of the at least one pedestrian, respectively counting the at least one pedestrian in the corresponding grid among a plurality of grids obtained by dividing the scene; And Counting the number of pedestrians in each of the plurality of grids to draw the pedestrian heat map in the scene, wherein obtaining image data including pedestrians and determining the coordinates of at least one pedestrian in the scene includes: respectively collecting the image data of the pedestrians in the scene at a plurality of image data acquisition moments at every first predetermined time; and Counting the number of pedestrians in each of the plurality of grids includes: counting the pedestrians in each of the grids for the image data collected at each image data acquisition moment, so as to count the pedestrians in each grid for each image data acquisition moment; wherein obtaining image data including pedestrians and determining the coordinates of at least one pedestrian in the scene further includes: Extracting a first coordinate of the pedestrian based on the coordinate system of the image acquisition device of the image data from the image data; and Converting the first coordinate into a second coordinate based on the coordinate system of the scene and using the second coordinate as the coordinate of the pedestrian in the scene; and wherein extracting a first coordinate of the pedestrian based on the coordinate system of the image acquisition device of the image data from the image data includes: Obtaining the original coordinate of the pedestrian based on the coordinate system of the image acquisition device of the image data; Obtaining a correction value of the original coordinate based on the following formula: where H represents the height of the image acquisition device of the image data, x2 represents the central coordinate of the image acquisition device of the image data in the scene, x1 represents the original coordinate obtained by the image acquisition device, h represents the height of the pedestrian, and x represents the correction value of the original coordinate; and Based on the quadrant of the original coordinate in the coordinate system of the image acquisition device, correcting the original coordinate by using the correction value of the original coordinate to obtain the first coordinate.

2. The method according to claim 1, wherein, Based on the coordinates of the at least one pedestrian, respectively counting the at least one pedestrian in the corresponding grid among a plurality of grids obtained by dividing the scene includes: Dividing the scene into the plurality of grids based on a predetermined fine granularity; and Based on the coordinates of the at least one pedestrian and the plurality of grids, respectively counting the at least one pedestrian in the corresponding grid.

3. The method according to claim 2, wherein Based on the coordinates of the at least one pedestrian and the plurality of grids, respectively counting the at least one pedestrian in the corresponding grid includes: Assigning an index value to each of the plurality of grids in the coordinate system of the scene; Using the length value and width value of each of the plurality of grids, respectively taking the quotient of the coordinates in the length direction and width direction of each of the at least one pedestrian along the length direction and width direction of the plurality of grids to obtain a first coordinate quotient value and a second coordinate quotient value corresponding to the coordinate value of each pedestrian; and Compare the first coordinate quotient value and the second coordinate quotient value with the index value of each grid to place each pedestrian count within the corresponding grid.

4. The method according to claim 1, wherein, Counting the number of pedestrians in each of the multiple grids further includes: Marking and tracking the pedestrians in the scene; and Determining whether the coordinates obtained by the tracked pedestrians at two adjacent image data acquisition times of the image data are located within the same grid; If located within the same grid, do not count the pedestrian at the subsequent image data acquisition time; If not located within the same grid, count the pedestrian at the subsequent image data acquisition time.

5. The method according to claim 1 or 4, wherein Counting the number of pedestrians in each of the multiple grids to draw the pedestrian heat map in the scene includes: Counting the pedestrians in each grid for each of the multiple image data acquisition times; Marking the grids differently according to the difference in the sum of the number of pedestrians in each grid at each image data acquisition time; and Determining the different markings of each grid for the multiple image data acquisition times to obtain the pedestrian heat map in the scene that changes over time.

6. The method according to claim 5, wherein Marking the grids differently includes: Drawing different display colors for the grids according to the difference in the sum of the number of pedestrians in each grid.

7. The method according to claim 1, wherein The pedestrian height is the mode of the heights of the pedestrians.

8. The method according to claim 7, wherein, The original coordinates, the first coordinates, and the second coordinates include the head coordinates of the pedestrians.

9. The method according to claim 8, wherein, Collecting the image data of the pedestrians in the scene at multiple image data acquisition times every first predetermined time includes setting the image acquisition device at a position higher than the height of the pedestrians to collect the head image data of the pedestrians.

10. The method according to claim 9, wherein, Setting the image acquisition device at a position higher than the height of the pedestrians to collect the head image data of the pedestrians includes collecting the head image data of the pedestrians through an image acquisition device located at the center of the scene.

11. The method according to claim 9, wherein, Setting the image acquisition device at a position higher than the height of the pedestrians to collect the head image data of the pedestrians includes collecting the head image data of the pedestrians through multiple image acquisition devices whose acquisition areas cover the entire scene.

12. The method according to claim 11, wherein, There is also an acquisition overlapping area of the at least two image acquisition devices in the scene, and Collecting the head image data of the pedestrians through multiple image acquisition devices whose acquisition areas cover the entire scene includes selecting the head image data collected by one of the at least two image acquisition devices corresponding to the acquisition overlapping area.

13. The method according to claim 12, wherein, There is also a noise area in the scene, and Collecting the head image data of the pedestrians through multiple image acquisition devices whose acquisition areas cover the entire scene includes not collecting the head image data of the pedestrians in the noise area.

14. The method according to claim 1, wherein, Converting the first coordinates to second coordinates based on the coordinate system of the scene includes: Through coordinate rotation, transforming the first coordinates in the coordinate system of the image acquisition device based on the image data to the second coordinates in the coordinate system of the scene.

15. A pedestrian heat map generation system, comprising: At least one image acquisition device; A processor; And A memory, Wherein, the at least one image acquisition device is configured to acquire image data of a pedestrian in a scene and send it to the processor and / or the memory, and the memory stores instructions executable by the processor, and the instructions are executed by the processor to enable the processor to execute the method according to any one of claims 1-14.

16. The system according to claim 15, wherein, The at least one image acquisition device includes one image acquisition device. The height of the one image acquisition device is greater than the height of the pedestrian and is located at the center of the scene.

17. The system according to claim 15, wherein the at least one image acquisition device includes at least two image acquisition devices. The height of the at least two image acquisition devices is greater than the height of the pedestrian, and the image acquisition areas of the at least two image acquisition devices cover the entire scene.

Citation Information

Patent Citations

  • Crowd analysis method and device

    CN109376689A

  • A human body thermodynamic diagram display method and related products

    CN109816745A