WO2020056914A1 - 人群热力图获得方法、装置、电子设备及可读存储介质 - Google Patents

人群热力图获得方法、装置、电子设备及可读存储介质 Download PDF

Info

Publication number
WO2020056914A1
WO2020056914A1 PCT/CN2018/117285 CN2018117285W WO2020056914A1 WO 2020056914 A1 WO2020056914 A1 WO 2020056914A1 CN 2018117285 W CN2018117285 W CN 2018117285W WO 2020056914 A1 WO2020056914 A1 WO 2020056914A1
Authority
WO
WIPO (PCT)
Prior art keywords
crowd
obtaining
coordinate system
pedestrian
map
Prior art date
Application number
PCT/CN2018/117285
Other languages
English (en)
French (fr)
Inventor
刘泽许
Original Assignee
图普科技(广州)有限公司
Priority date (The priority date is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the date listed.)
Filing date
Publication date
Application filed by 图普科技(广州)有限公司 filed Critical 图普科技(广州)有限公司
Publication of WO2020056914A1 publication Critical patent/WO2020056914A1/zh

Links

Images

Classifications

    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F16/00Information retrieval; Database structures therefor; File system structures therefor
    • G06F16/20Information retrieval; Database structures therefor; File system structures therefor of structured data, e.g. relational data
    • G06F16/29Geographical information databases
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F16/00Information retrieval; Database structures therefor; File system structures therefor
    • G06F16/90Details of database functions independent of the retrieved data types
    • G06F16/95Retrieval from the web
    • G06F16/953Querying, e.g. by the use of web search engines
    • G06F16/9537Spatial or temporal dependent retrieval, e.g. spatiotemporal queries

Definitions

  • the present application relates to the field of image processing, and in particular, to a method, device, electronic device, and readable storage medium for obtaining a crowd heat map.
  • embodiments of the present application provide a method, an apparatus, an electronic device, and a readable storage medium for obtaining a crowd heat map.
  • an embodiment of the present application provides a method for obtaining a crowd heat map, the method includes: filtering a query sentence according to a grid to obtain multiple crowd heat maps within a preset time period; and obtaining the multiple crowds The coordinate values corresponding to the pedestrians on the thermal distribution map of each crowd in the thermal distribution map; each position in the preset number of grids is obtained according to the position of the coordinate values in the preset number of grids.
  • Coordinate points and number of pedestrians stayed in each grid calculate the average value of the horizontal and vertical coordinates of all pedestrians staying in each grid, and use the coordinate points determined by the average of the horizontal and vertical coordinates as the grid
  • the number of marked points is used to mark the number of people at the position corresponding to the marked points to form a crowd heat map.
  • the method before the filtering query sentence according to the grid to obtain a plurality of crowd heat distribution maps within a preset time period, the method further includes: receiving a request for obtaining a crowd distribution heat map; according to the Get the crowd distribution heat map request, and construct a grid screening query.
  • the method before receiving a request for obtaining a crowd distribution heat map, the method further includes: obtaining compressed data from a message queue; decompressing and organizing the compressed data to obtain decompressed image data; marking The key position points of the pedestrian in the image data are output; the image data marked with the key position points are stored in a database.
  • the method before obtaining the compressed data from the message queue, the method further includes: obtaining the recognition result data of the human body position; preprocessing the recognition result data; and storing the preprocessed data to all Described in the message queue.
  • the method before the acquiring human body position recognition result data, the method further includes: acquiring a video stream collected by a camera; and controlling a graphics processor to process the video stream to obtain the human body position recognition. Results data.
  • obtaining the coordinate values corresponding to the pedestrians on each of the plurality of crowd heat distribution maps includes:
  • the coordinate value of the pedestrian in the rectangular coordinate system is determined according to the size of the crowd thermal distribution map and the position of the pedestrian in the crowd thermal distribution map.
  • the creating a rectangular coordinate system according to the crowd heat distribution map includes:
  • a rectangular coordinate system is created by using a vertex of the crowd heat distribution map as an origin and a length-width direction of the crowd heat distribution map as a coordinate axis.
  • determining the coordinate value of the pedestrian in the rectangular coordinate system according to the size of the crowd heat distribution map and the position of the pedestrian in the crowd heat distribution map includes:
  • the coordinate values of the pedestrian in the rectangular coordinate system are obtained according to the distance between the pedestrian's location and the X-axis and Y-axis of the rectangular coordinate system, and according to the length and width dimensions of the thermal distribution map of the crowd.
  • the position where the coordinate value is located in a preset number of grids includes:
  • a grid in which the pedestrian is located in the rectangular coordinate system is determined.
  • an embodiment of the present application provides a device for obtaining a heat map of a crowd.
  • the device includes: a heat map module for filtering query sentences according to a grid to obtain multiple crowds of heat in a first preset time period. A distribution map; a coordinate value obtaining module for obtaining coordinate values corresponding to pedestrians on each of the crowd heat distribution maps in the plurality of crowd heat distribution maps; a data obtaining module for presetting the coordinates according to the coordinate values in a preset Position of the number of grids to obtain the coordinate points and number of people of each of the preset number of grids; the heat map forming module is used to calculate all The average value of the horizontal and vertical coordinate points of the stayed person. The coordinate points determined by the average value of the horizontal and vertical coordinates are used as the marked points of the grid. The number of people is marked at the position corresponding to the marked points to form a crowd heat map. .
  • the device further includes: a request receiving module for receiving a request for obtaining a crowd distribution heat map; a query constructing module for constructing a grid screening based on the request for obtaining a crowd distribution heat map Check for phrases.
  • the apparatus further includes: a compressed data obtaining module for obtaining compressed data from a message queue; a decompression and finishing module for decompressing and organizing the compressed data to obtain decompressed image data
  • a position marking module for marking the key position points of the pedestrian in the image data
  • a data storage module for storing the image data marked with the key position points to the database in the order of the shooting time corresponding to the image data.
  • the device further includes: a result data acquisition module for acquiring recognition result data of a human body position; a data preprocessing module for preprocessing the recognition result data; a data packaging module for And storing the preprocessed data in the message queue.
  • the device further includes: a video stream acquisition module for acquiring a video stream collected by a camera; a recognition result data module for controlling a graphics processor to process the video stream to obtain the human body Position recognition result data.
  • the coordinate value obtaining module includes:
  • the coordinate value determination sub-module is configured to determine the coordinate value of the pedestrian in the rectangular coordinate system according to the size of the crowd thermal distribution map and the position of the pedestrian in the crowd thermal distribution map.
  • the creating sub-module is specifically used for:
  • a rectangular coordinate system is created by using a vertex of the crowd heat distribution map as an origin and a length-width direction of the crowd heat distribution map as a coordinate axis.
  • the coordinate value determination sub-module is specifically configured to:
  • the coordinates of the pedestrian in the rectangular coordinate system are obtained according to the distance between the pedestrian's location and the X-axis and Y-axis of the rectangular coordinate system, and according to the length and width dimensions of the thermal distribution map of the crowd.
  • the data obtaining module is used for:
  • a grid in which the pedestrian is located in the rectangular coordinate system is determined.
  • an embodiment of the present application further provides an electronic device, including a processor, a memory, and a bus.
  • the memory stores machine-readable instructions executable by the processor.
  • the processor communicates with the memory through a bus, and when the machine-readable instructions are executed by the processor, the method for obtaining a crowd heat map according to the first aspect is performed.
  • an embodiment of the present application further provides a readable storage medium storing a computer program.
  • the computer program is executed by a processor, the method for obtaining a crowd heat map according to the first aspect is performed.
  • the method includes: filtering a query sentence according to a grid to obtain a plurality of crowd heat distributions within a first preset time period. Obtain the coordinate values corresponding to the pedestrians on each of the crowd heat distribution maps in the plurality of crowd heat distribution maps; and obtain the preliminary value according to the position of the coordinates in a preset number of grids.
  • FIG. 1 is a structural block diagram of an electronic device according to an embodiment of the present application.
  • FIG. 2 is a flowchart of a method for obtaining a crowd heat map according to an embodiment of the present application
  • FIG. 3 is a flowchart of some steps of a method for obtaining a crowd heat map according to an embodiment of the present application
  • FIG. 4 is a partial flowchart of a method for obtaining a crowd heat map according to an embodiment of the present application
  • FIG. 5 is one of the functional module diagrams of the device for obtaining a crowd heat map according to an embodiment of the present application
  • FIG. 6 is a second functional module diagram of a device for obtaining a crowd heat map according to an embodiment of the present application
  • FIG. 7 is a third functional module diagram of the device for obtaining a crowd heat map according to an embodiment of the present application.
  • FIG. 1 it is a block diagram of an electronic device 10 provided by the present disclosure.
  • the electronic device 10 in the present disclosure may be a device having a data processing function, such as a server, a personal computer, a tablet computer, a smart phone, or the like.
  • the electronic device 10 includes: a memory 11, a processor 12, a network module 13, and a crowd heat map obtaining device 300.
  • the memory 11, the processor 12, and the network module 13 are directly or indirectly electrically connected to each other to implement data transmission or interaction. For example, these components can be electrically connected to each other through one or more communication buses or signal lines.
  • the memory 11 stores a crowd heat map obtaining device 300.
  • the crowd heat map obtaining device 300 includes at least one software function module that can be stored in the memory 11 in the form of software or firmware.
  • the processor 12 passes Software programs and modules stored in the memory 11 are run, such as the crowd heat map obtaining device 300 in the present disclosure, to execute various functional applications and data processing, that is, to implement the data processing method performed by the electronic device 10 in the present disclosure.
  • the memory 11 may be, but is not limited to, Random Access Memory (RAM), Read-Only Memory (ROM), and Programmable Read-Only Memory (PROM). , Erasable Programmable Read-Only Memory (EPROM), Electrically Erasable Read-Only Memory (Electric Erasable Programmable Read-Only Memory, EEPROM), etc.
  • RAM Random Access Memory
  • ROM Read-Only Memory
  • PROM Programmable Read-Only Memory
  • EPROM Erasable Programmable Read-Only Memory
  • EEPROM Electrically Erasable Read-Only Memory
  • the electronic device 10 further includes a database 200 stored in the memory 11.
  • the database 200 is used to store image information after processing video information captured by a video capture device (such as a camera). For example, the heat distribution map of the crowd in this application.
  • the processor 12 may be an integrated circuit chip and has data processing capabilities.
  • the aforementioned processor 12 may be a general-purpose processor, including a central processing unit (CPU), a network processor (Network Processor), and the like. Various methods, steps, and logic block diagrams provided in the present disclosure may be implemented or performed.
  • a general-purpose processor may be a microprocessor or the processor may be any conventional processor or the like.
  • the network module 13 is configured to establish a communication connection between the electronic device 10 and an external communication terminal through a network, and implement a network signal and data sending and receiving operation.
  • the network signal may include a wireless signal or a wired signal.
  • the structure shown in FIG. 1 is merely schematic, and the electronic device 10 may further include more or fewer components than those shown in FIG. 1, or have a different configuration from that shown in FIG. 1.
  • Each component shown in FIG. 1 may be implemented by hardware, software, or a combination thereof.
  • the electronic device 10 may further include a graphics processor, and the electronic device 10 processes the video image information collected by the camera through the image processor to obtain an image processed image. Or recognize the video image information to get the recognition result.
  • FIG. 2 illustrates a schematic flowchart of a method for obtaining a crowd heat map according to an embodiment of the present application, which specifically includes the following steps:
  • step S110 the query sentence is filtered according to the grid to obtain a plurality of crowd heat distribution maps within a preset time period.
  • the grid filter query can be based on time to filter the searched objects (such as pedestrians in video images). For example, the camera can take a whole day, and the grid filter query can select a certain period of time, such as August. From 4 to 5 pm on the 21st, and then obtain a number of crowd heat distribution maps during the time period.
  • the method further includes: receiving a crowd distribution heat map obtaining request; and constructing a grid filtering query sentence according to the crowd distribution heat map obtaining request.
  • the crowd distribution heat map obtaining request may specifically be initiated by a user through a terminal device held by the user. After the user initiates, the electronic device receives the crowd distribution heat map obtaining request.
  • the crowd distribution heat map acquisition request may include time information of the crowd distribution heat map to be obtained, and location information corresponding to the crowd distribution.
  • An image may be composed of multiple grids, so a grid filter query can be constructed to determine a specific grid in multiple grids.
  • FIG. 3 Before receiving the crowd distribution heatmap request, please refer to FIG. 3, which also includes the following steps:
  • Step S101 Obtain compressed data from a message queue.
  • the message queue mainly saves the data of the position of the human body in the queue as a data source and provides it to the subsequent data processing process. Saving the data in the queue can make the data read in order.
  • the data saved to the message queue is compressed data. When reading data, compressed data can be obtained directly from the message queue 13.
  • step S101 the following steps may be further included:
  • step S11 the recognition result data of the human body position is acquired.
  • step S11 may be implemented by the following steps:
  • image processing is performed on the video stream by a graphics processor to identify a position of a human body in the video stream;
  • step S12 the recognition result data is pre-processed.
  • the preprocessing includes, but is not limited to, verifying the correctness of the recognition result data, arranging the data structure, and compressing the data.
  • Step S13 Store the preprocessed data in the message queue.
  • the preprocessed data can be packed and sent to a message queue for storage.
  • Step S102 Decompress and organize the compressed data to obtain decompressed image data.
  • step S103 the key position points of the person in the image data are marked.
  • the purpose is to obtain the position of the pedestrian.
  • step S104 the image data marked with the key position points are stored in the database 200 in the order of the shooting time corresponding to the image data.
  • Step S120 Acquire coordinate values corresponding to pedestrians on each of the plurality of crowd heat distribution maps.
  • the pedestrians on the thermal distribution map of the crowd can be framed.
  • the pedestrians can be separated from the background by image processing methods such as edge detection, and the detected pedestrians can be framed with the smallest box to calculate the pedestrians.
  • the middle point of the bottom of the corresponding box is used as the coordinate value corresponding to the pedestrian.
  • the length and width of each crowd heat distribution map can be normalized to between 0 and 1.
  • a crowd heat distribution map has a length of 20 cm and a width of 18 cm. (Such as the upper left corner vertex) as the origin, establish the rectangular coordinate system with the long axis as the X axis and the wide axis as the Y axis.
  • the coordinates of the midpoint of the bottom of the box are (9,8). Normalize the coordinates of the midpoint of the bottom of the box to obtain the corresponding coordinate value (9/20, 8/18), which is (0.45,0.44).
  • step S130 according to the position where the coordinate value is located in a preset number of grids, the coordinate points and the number of people of each pedestrian in each of the preset number of grids are obtained.
  • the normalized length and width can be equally divided, for example, the length and width can be equally divided into ten, that is, 0 to 0.1, 0.1 to 0.2, 0.2 to 0.3, 0.3 to 0.4, 0.4 to 0.5, 0.5 to 0.6. , 0.6 to 0.7, 0.7 to 0.8, 0.8 to 0.9, 0.9 to 1.0.
  • the length and width are divided into ten equal parts, and 100 grids can be obtained.
  • the data interval of the first grid is [(0,0.1), (0,0.1)], that is, in the horizontal direction of the normalized pedestrian coordinates. When the coordinates and ordinate are between 0-0.1, the pedestrian is on the first grid. Therefore, the coordinate values (0.45, 0.44) are in a grid with data ranging from 0.4 to 0.5 on both the horizontal and vertical axes.
  • the coordinate points and the number of people of each person who stayed in each grid can be obtained in the above manner.
  • Step S140 Calculate the average value of the horizontal and vertical coordinates of all pedestrians staying in each grid, use the coordinate point determined by the average value of the horizontal and vertical coordinates as the label point of the grid, and label the number of people in the label. Click the corresponding position to form the crowd heat map.
  • the coordinates of 5 people can be obtained Point (abscissa value and ordinate value), and then take the average of the abscissa value and the average of the ordinate value, respectively, and obtain the average value of the abscissa and the ordinate value of 5 people, and average the obtained abscissa
  • the coordinate point corresponding to the value and the average value of the ordinate is used as a label point for displaying the labeling information of the number of persons, and then labeling the labeling information of the number of persons (such as the number of persons 5) at the position of the labeling point, thereby forming a crowd heat map.
  • multiple crowd heat distribution maps within a preset time period may be obtained first, coordinate values corresponding to the pedestrians in each crowd heat distribution map may be obtained, and positions of the coordinates in a preset number of grids may be obtained.
  • the grid is used to mark the labeling points of the labeling information of the number of persons, and the labeling information of the number of persons is marked at the corresponding labeling points to form a crowd heat map, which makes the display of the data more intuitive.
  • FIG. 5 illustrates a crowd heat map obtaining device 300 provided by an embodiment of the present application.
  • the crowd heat map obtaining device 300 includes:
  • the heat distribution map module 311 is configured to filter query sentences according to a grid to obtain multiple heat distribution maps of a crowd within a preset time period.
  • the coordinate value obtaining module 312 is configured to obtain coordinate values corresponding to pedestrians on each of the plurality of crowd heat distribution maps.
  • the coordinate value obtaining module 312 includes a creating sub-module 3121 and a coordinate value determining sub-module 3122;
  • a creating sub-module 3121 is configured to create a rectangular coordinate system according to the crowd heat distribution map.
  • the creating sub-module 3121 creates a rectangular coordinate system with a vertex of the crowd heat distribution map as an origin and a length and width direction of the crowd heat distribution map as a coordinate axis.
  • the coordinate value determination sub-module 3122 is configured to determine the coordinate value of the pedestrian in the rectangular coordinate system according to the size of the crowd heat distribution map and the position of the pedestrian in the crowd heat distribution map.
  • the coordinate value determination submodule 3122 obtains a distance between the pedestrian position and the X-axis and Y-axis of the rectangular coordinate system;
  • the coordinate values of the pedestrian in the rectangular coordinate system are obtained according to the distance between the pedestrian's location and the X-axis and Y-axis of the rectangular coordinate system, and according to the length and width dimensions of the thermal distribution map of the crowd.
  • the data obtaining module 313 is configured to obtain, according to the position of the coordinate value in a preset number of grids, the coordinate points and the number of persons of each person in each of the preset number of grids. .
  • the data obtaining module 313 equally divides the length and width of the thermal distribution map of the crowd in the rectangular coordinate system, and divides the thermal distribution map of the crowd into a preset number of grids in the rectangular coordinate system;
  • the heat map forming module 314 is used to calculate the average value of the horizontal and vertical coordinates of all pedestrians who have stayed in each grid, and use the coordinate points determined by the average value of the horizontal and vertical coordinates as the label points of the grid, and the number of people
  • the annotation is formed at a position corresponding to the annotation point to form a crowd heat map.
  • the crowd heat map obtaining device 300 further includes a request receiving module 315 and a query sentence constructing module 316.
  • a request receiving module 315 configured to receive a crowd distribution heat map obtaining request
  • the query sentence construction module 316 is configured to obtain a request according to the crowd distribution heat map, and construct a grid filtering query sentence.
  • the crowd heat map obtaining device 300 further includes: a compressed data obtaining module 317, a decompression and finishing module 318, a position marking module 319, and a data storage module 320;
  • a compressed data obtaining module 317 configured to obtain compressed data from a message queue
  • a decompression and finishing module 318 configured to decompress and organize the compressed data to obtain decompressed image data
  • a position marking module 319 configured to mark a key position of a person in the image data
  • the data storage module 320 is configured to store the image data marked with the key position points to the database in the sequence of the shooting time corresponding to the image data.
  • the crowd heat map obtaining device 300 further includes a result data obtaining module 321, a data pre-processing module 322, and a data packaging module 323.
  • the data packing module 323 is configured to pack and send the preprocessed data to the message queue.
  • the crowd heat map obtaining device 300 further includes a video stream acquisition module 324 and a recognition result data module 325.
  • a video stream acquisition module 324 configured to acquire a video stream collected by a camera
  • the recognition result data module 325 is configured to process the video stream to obtain the human position recognition result data.
  • the present application further provides an electronic device including a processor, a memory, and a bus.
  • the memory stores machine-readable instructions executable by the processor.
  • the processor and the The memories communicate through a bus, and when the machine-readable instructions are executed by the processor, the method for obtaining a crowd heat map according to the embodiment of the present application is executed.
  • the present application also provides a computer-readable storage medium.
  • a computer program is stored on the computer-readable storage medium, and when the computer program is executed by a processor, the method for obtaining a crowd heat map according to the embodiment of the present application is performed.
  • the present application also provides a computer program product that, when run on a computer, causes the computer to execute the method for obtaining a crowd heat map according to the embodiments of the present application.
  • the method includes: filtering a query sentence according to a grid to obtain multiple crowd heat maps within a preset time period; Obtaining coordinate values corresponding to pedestrians on each of the crowd heat distribution maps in the plurality of crowd heat distribution maps; and obtaining the preset number according to a position of the coordinate value in a preset number of grids The coordinate points and the number of pedestrians stayed in each grid in the grid; Calculate the average coordinate points of all pedestrians stayed in each grid and take the average value as the label point of the grid.
  • the positions corresponding to the marked points form a crowd heat map.
  • multiple thermal distribution maps of the crowd in the first preset time period may be obtained first, and the coordinate values corresponding to the pedestrians in each crowd thermal distribution map may be obtained, and the specific positions in the preset number of grids according to the coordinate values To obtain the coordinate points and the number of pedestrians who stayed in each grid, and then calculate the average value of the horizontal and vertical coordinates of the pedestrians who stayed in each grid, and use the coordinate points determined by the average value of the horizontal and vertical coordinates as the The marked points on the grid mark the number of people in the corresponding position to form a crowd heat map, making the data display more intuitive.
  • each block in the flowchart or block diagram may represent a module, a program segment, or a part of code, which contains one or more components for implementing a specified logical function Executable instructions.
  • the functions marked in the blocks may also occur in a different order than those marked in the drawings.
  • each block in the block diagrams and / or flowcharts, and combinations of blocks in the block diagrams and / or flowcharts can be implemented in a dedicated hardware-based system that performs the specified function or action. , Or it can be implemented with a combination of dedicated hardware and computer instructions.
  • each module in each embodiment of the present application may be integrated together to form an independent part, or each module may exist alone, or two or more modules may be integrated to form an independent part.
  • the functions are implemented in the form of software function modules and sold or used as independent products, they can be stored in a computer-readable storage medium.
  • the technical solution of this application is essentially a part that contributes to the existing technology or a part of the technical solution can be embodied in the form of a software product.
  • the computer software product is stored in a storage medium, including Several instructions are used to cause a computer device (which may be a personal computer, a server, or a network device, etc.) to perform all or part of the steps of the method described in the embodiments of the present application.
  • the foregoing storage media include: U disk, mobile hard disk, read-only memory (ROM, Read-Only Memory), random access memory (RAM, Random Access Memory), magnetic disks or optical disks and other media that can store program codes .
  • relational terms such as first and second are used only to distinguish one entity or operation from another entity or operation, and do not necessarily require or imply that these entities or operations There is any such actual relationship or order among them.
  • the terms "including”, “comprising”, or any other variation thereof are intended to encompass non-exclusive inclusion, such that a process, method, article, or device that includes a series of elements includes not only those elements but also those that are not explicitly listed Or other elements inherent to such a process, method, article, or device. Without more restrictions, the elements defined by the sentence “including a " do not exclude the existence of other identical elements in the process, method, article, or equipment including the elements.
  • the method, device, electronic device and readable storage medium for obtaining a crowd heat map provided in the embodiments of the present application mark the number of people at positions corresponding to the marked points of each grid to form a crowd heat map, so that the data display becomes more Intuitive.

Abstract

在本申请实施例提供的人群热力图获得方法、装置、电子设备及可读存储介质中,所述方法包括:根据网格筛选查询语句,获得预设时间段内的多张人群热力分布图;获取所述多张人群热力分布图中的每张人群热力分布图上的行人所对应的坐标值;根据所述坐标值在预设数量的网格中的所处的位置,获得所述预设数量的网格中的每个网格所停留过的人的坐标点以及人数;计算每个网格内所有停留过的行人的横纵坐标的平均值,将该横纵坐标的平均值所确定的坐标点作为该网格的标注点,将人数标注在所述标注点对应的位置,形成人群热力图。本申请实施例可以根据筛选查询语句快速得到需要的人群热力图,并对人群热力图对应的热度分布给出准确显示。

Description

人群热力图获得方法、装置、电子设备及可读存储介质
本申请要求于2018年09月18日提交中国专利局的申请号为201811089701.1名称为“一种人群热力图获得方法及装置”的中国专利申请的优先权,其全部内容通过引用结合在本申请中。
技术领域
本申请涉及图像处理领域,具体而言,涉及一种人群热力图获得方法、装置、电子设备及可读存储介质。
背景技术
随着人工智能的日益发展,深度学习、神经网络等模型算法的优化与迭代,机器识别出人的准确度已经与人类的识别准确度相差无几了。同时,基于识别出人的身体位置的应用也是越来越多。在商业智能的场景下,理清物与人的时空关系尤为重要。由摄像头记录下人与物的互动情况,通过深度学习的方法去识别人的位置,就能知道某个时刻的人群位置,但如何利用好这些人群的位置数据,在大流量、大数据的场景下,依然能准确聚合出人群的热度分布尤为重要。
发明内容
有鉴于此,本申请实施例提供了一种人群热力图获得方法、装置、电子设备及可读存储介质。
第一方面,本申请实施例提供了一种人群热力图获得方法,所述方法包括:根据网格筛选查询语句,获得预设时间段内的多张人群热力分布图;获取所述多张人群热力分布图中的每张人群热力分布图上的行人所对应的坐标值;根据所述坐标值在预设数量的网格中所处的位置,获得所述预设数量的网格中的每个网格所停留过的行人的坐标点以及人数;计算每个网格内所有停留过的行人的横纵坐标的平均值,将该横纵坐标的平均值所确定的坐标点作为该网格的标注点,将人数标注在所述标注点对应的位置,形成人群热力图。
在一个可能的设计中,在所述根据网格筛选查询语句,获得预设时间段内的多张人群热力分布图之前,所述方法还包括:接收人群分布热力图的获得请求;根据所述人群分布热力图的获得请求,构造网格筛选查询语句。
在一个可能的设计中,在接收人群分布热力图的获得请求之前,所述方法还包括:从消息队列中获取压缩数据;对所述压缩数据进行解压、整 理,获得解压后的图像数据;标记出图像数据中行人的关键位置点;将标记出所述关键位置点的图像数据存储至数据库。
在一个可能的设计中,在从消息队列中获取压缩数据之前,所述方法还包括:获取人体位置的识别结果数据;对所述识别结果数据进行预处理;将预处理过的数据存储至所述消息队列中。
在一个可能的设计中,在所述获取人体位置识别结果数据之前,所述方法还包括:获取摄像头采集的视频流;控制图形处理器对所述视频流进行处理,获得所述人体位置的识别结果数据。
在一个可能的设计中,所述获取所述多张人群热力分布图中的每张人群热力分布图上的行人所对应的坐标值,包括:
根据所述人群热力分布图创建一直角坐标系;
根据人群热力分布图的尺寸及行人在所述人群热力分布图中的位置,确定所述行人在所述直角坐标系中的坐标值。
在一个可能的设计中,所述根据所述人群热力分布图创建一直角坐标系,包括:
以所述人群热力分布图的一顶点为原点、所述人群热力分布图的长宽方向为坐标轴创建直角坐标系。
在一个可能的设计中,所述根据人群热力分布图的尺寸及行人在所述人群热力分布图中的位置,确定所述行人在所述直角坐标系中的坐标值,包括:
获得所述行人所在位置距离所述直角坐标系X轴与Y轴的距离;
根据所述行人所在位置距离所述直角坐标系X轴与Y轴的距离,与根据人群热力分布图的长宽尺寸,得到所述行人在所述直角坐标系中的坐标值。
在一个可能的设计中,所述根据所述坐标值在预设数量的网格中所处的位置,包括:
将位于所述直角坐标系下的人群热力分布图的长宽进行等分,在所述直角坐标系下将所述人群热力分布图划分为预设数量个网格;
根据所述行人在所述直角坐标系中的坐标值,确定所述行人在所述直角坐标系下中所处的网格。
第二方面,本申请实施例提供了一种人群热力图获得装置,所述装置包括:热力分布图模块,用于根据网格筛选查询语句,获得第一预设时间 段内的多张人群热力分布图;坐标值获取模块,用于获取所述多张人群热力分布图中的每张人群热力分布图上的行人所对应的坐标值;数据获得模块,用于根据所述坐标值在预设数量的网格中所处的位置,获得所述预设数量的网格中的每个网格所停留过的人的坐标点以及人数;热力图形成模块,用于计算每个网格内所有停留过的人的横纵坐标点的平均值,将该横纵坐标的平均值所确定的坐标点作为该网格的标注点,将人数标注在所述标注点对应的位置,形成人群热力图。
在一个可能的设计中,所述装置还包括:请求接收模块,用于接收人群分布热力图的获得请求;查询语句构造模块,用于根据所述人群分布热力图的获得请求,构造网格筛选查询语句。
在一个可能的设计中,所述装置还包括:压缩数据获取模块,用于从消息队列中获取压缩数据;解压整理模块,用于对所述压缩数据进行解压、整理,获得解压后的图像数据;位置标记模块,用于标记出图像数据中行人的关键位置点;数据存储模块,用于将标记出所述关键位置点的图像数据以图像数据对应的拍摄时间的先后顺序存储至数据库。
在一个可能的设计中,所述装置还包括:结果数据获取模块,用于获取人体位置的识别结果数据;数据预处理模块,用于对所述识别结果数据进行预处理;数据打包模块,用于将预处理过的数据存储至所述消息队列中。
在一个可能的设计中,所述装置还包括:视频流采集模块,用于获取摄像头采集的视频流;识别结果数据模块,用于控制图形处理器对所述视频流进行处理,获得所述人体位置的识别结果数据。
在一个可能的设计中,所述坐标值获取模块包括:
创建子模块,用于根据所述人群热力分布图创建一直角坐标系;
坐标值确定子模块,用于根据人群热力分布图的尺寸及行人在所述人群热力分布图中的位置,确定所述行人在所述直角坐标系中的坐标值。
在一个可能的设计中,所述创建子模块具体用于:
以所述人群热力分布图的一顶点为原点、所述人群热力分布图的长宽方向为坐标轴创建直角坐标系。
在一个可能的设计中,所述坐标值确定子模块具体用于:
获得所述行人所在位置距离所述直角坐标系X轴与Y轴的距离;
根据所述行人所在位置距离所述直角坐标系X轴与Y轴的距离,与根 据人群热力分布图的长宽尺寸,得到所述行人在所述直角坐标系中的坐标值。
在一个可能的设计中,所述数据获得模块用于:
将位于所述直角坐标系下的人群热力分布图的长宽进行等分,在所述直角坐标系下将所述人群热力分布图划分为预设数量个网格;
根据所述行人在所述直角坐标系中的坐标值,确定所述行人在所述直角坐标系下中所处的网格。
第三方面,本申请实施例还提供一种电子设备,包括:处理器、存储器和总线,所述存储器存储有所述处理器可执行的机器可读指令,当所述电子设备运行时,所述处理器与所述存储器之间通过总线通信,所述机器可读指令被所述处理器执行时执行第一方面所述的人群热力图获得方法。
第四方面,本申请实施例还提供一种可读存储介质,该可读存储介质上存储有计算机程序,该计算机程序被处理器运行时执行第一方面所述的人群热力图获得方法。
在本申请实施例提供的人群热力图获得方法、装置、电子设备及可读存储介质中,所述方法包括:根据网格筛选查询语句,获得第一预设时间段内的多张人群热力分布图;获取所述多张人群热力分布图中的每张人群热力分布图上的行人所对应的坐标值;根据所述坐标值在预设数量的网格中所处的位置,获得所述预设数量的网格中的每个网格所停留过的人的坐标点以及人数;计算每个网格内所有停留过的行人的横纵坐标的平均值,将该横纵坐标的平均值所确定的坐标点作为该网格的标注点,将人数标注在所述标注点对应的位置,形成人群热力图。本申请实施例可以先获得第一预设时间段内的多张人群热力分布图,获取每张人群热力分布图上行人对应的坐标值,根据坐标值在预设数量的网格中所处的位置,获得每个网格停留过的人的坐标点以及人数,然后将每个网格内停留过的人的坐标点取平均值,作为该网格的标注点,将人数标注在相应的位置从而形成人群热力图,使得数据的显示变得更加直观。
为使本申请实施例所要实现的上述目的、特征和优点能更明显易懂,下文特举较佳实施例,并配合所附附图,作详细说明如下。
附图说明
为了更清楚的说明本申请实施例或现有技术中的技术方案,下面将对实施例或现有技术描述中所需要使用的附图作简单的介绍,显而易见地, 下面描述中的附图仅仅是本申请的一些实施例,对于本领域普通技术人员来讲,在不付出创造性劳动的前提下,还可以根据这些附图获得其他的附图。
图1是本申请实施例提供的电子设备的结构框图;
图2是本申请实施例提供的人群热力图获得方法的流程图;
图3是本申请实施例提供的人群热力图获得方法的部分步骤的流程图;
图4是本申请实施例提供的人群热力图获得方法的部分步骤流程图;
图5是本申请实施例提供的人群热力图获得装置的功能模块图之一;
图6是本申请实施例提供的人群热力图获得装置的功能模块图之二;
图7是本申请实施例提供的人群热力图获得装置的功能模块图之三。
具体实施方式
如图1所示,是本公开提供的电子设备10的一种方框示意图。本公开中的电子设备10可以为具有数据处理功能的设备,如服务器、个人计算机、平板电脑、智能手机等。如图1所示,电子设备10包括:存储器11、处理器12、网络模块13及人群热力图获得装置300。
所述存储器11、处理器12以及网络模块13相互之间直接或间接地电性连接,以实现数据的传输或交互。例如,这些元件相互之间可通过一条或多条通讯总线或信号线实现电性连接。存储器11中存储有人群热力图获得装置300,所述人群热力图获得装置300包括至少一个可以软件或固件(firmware)的形式存储于所述存储器11中的软件功能模块,所述处理器12通过运行存储在存储器11内的软件程序以及模块,如本公开中的人群热力图获得装置300,从而执行各种功能应用以及数据处理,即实现本公开中由电子设备10执行的数据处理方法。
其中,所述存储器11可以是,但不限于,随机存取存储器(Random Access Memory,RAM),只读存储器(Read Only Memory,ROM),可编程只读存储器(Programmable Read-Only Memory,PROM),可擦除只读存储器(Erasable Programmable Read-Only Memory,EPROM),电可擦除只读存储器(Electric Erasable Programmable Read-Only Memory,EEPROM)等。其中,存储器11用于存储程序,所述处理器12在接收到执行指令后,执行所述程序。
在本申请实例中,电子设备10还包括数据库200,所述数据库200存 储在所述存储器11内,数据库200用于存储对视频采集设备(比如摄像头)拍摄的视频信息进行处理后的图像信息,比如本申请中的人群热力分布图。
所述处理器12可能是一种集成电路芯片,具有数据的处理能力。上述的处理器12可以是通用处理器,包括中央处理器(Central Processing Unit,CPU)、网络处理器(Network Processor,NP)等。可以实现或者执行本公开中提供的各方法、步骤及逻辑框图。通用处理器可以是微处理器或者该处理器也可以是任何常规的处理器等。
网络模块13用于通过网络建立电子设备10与外部通信终端之间的通信连接,实现网络信号及数据的收发操作。上述网络信号可包括无线信号或者有线信号。
可以理解,图1所示的结构仅为示意,电子设备10还可包括比图1中所示更多或者更少的组件,或者具有与图1所示不同的配置。图1中所示的各组件可以采用硬件、软件或其组合实现。例如,电子设备10还可以包括图形处理器,电子设备10通过图像处理器对摄像头采集的的视频图像信息进行处理,获得图像处理的图像。或对视频图像信息进行识别得到识别结果。
请参见图2,图2示出了本申请实施例提供的人群热力图获得方法的流程示意图,具体包括如下步骤:
步骤S110,根据网格筛选查询语句,获得预设时间段内的多张人群热力分布图。
网格筛选查询语句可以是根据时间对被筛选对象(比如视频图像中的行人)进行筛选查询,例如,摄像头可以拍摄一整天,而网格筛选查询语句可以选择某一时间段,例如8月21号下午4点到5点,然后获得该时间段内的多张人群热力分布图。
在步骤S110之前,所述方法还包括:接收人群分布热力图获得请求;根据所述人群分布热力图获得请求,构造网格筛选查询语句。
人群分布热力图获得请求具体可以是用户通过所持有的终端设备发起,用户发起后,由电子设备接收人群分布热力图获得请求。该人群分布热力图获得请求可以包括欲获得人群分布热力图的时间信息、人群分布所对应的位置信息。
图像可能由多个网格组成,因此可以构造网格筛选查询语句来判断对多个网格中的具体某个网格进行筛选查询。
在接收到人群分布热力图获得请求之前,请参见图3,所述还包括如下步骤:
步骤S101,从消息队列中获取压缩数据。
消息队列主要可以将人体位置识别后的数据保存到队列中,作为数据源,提供给后续的数据处理流程,将数据保存到队列中可以使数据按照顺序被读取。保存到消息队列中的数据为经过压缩后的数据。在读取数据的时候,直接从消息队列13中即可获取压缩数据。
请参见图4,在步骤S101之前,还可以包括如下步骤:
步骤S11,获取人体位置的识别结果数据。
具体地,步骤S11可以通过以下步骤实现:
首先获取摄像头采集的视频流;
接着,通过图形处理器对所述视频流进行图像处理,识别出所述视频流中人体所在的位置;
最终得到,所述人体位置的识别结果数据。
步骤S12,对所述识别结果数据进行预处理。
对识别结果数据进行预处理,所述预处理包括,但不限于校验识别结果数据的正确性、整理数据结构和压缩数据。
步骤S13,将预处理过的数据存储至所述消息队列中。
进行过预处理的数据可以被打包后发送至消息队列中进行存储。
步骤S102,对所述压缩数据进行解压、整理,获得解压后的图像数据。
步骤S103,标记出图像数据中人的关键位置点。
计算出行人所处位置的关键位置点,目的是获取行人站立的位置点。
步骤S104,将标记出所述关键位置点的图像数据以图像数据对应的拍摄时间的先后顺序存储至数据库200。
步骤S120,获取所述多张人群热力分布图中的每张人群热力分布图上的行人所对应的坐标值。
具体地,可以将人群热力分布图上的行人框起来,具体地,可以通过诸如边缘检测这样的图像处理方法将行人与背景分离开,并采用最小的方框将检测的行人框起来,计算行人对应的框的底部的中点,将该底部的中点作为该行人所对应的坐标值。具体地,可以将每张人群热力分布图的长和宽均归一化到0至1之间,例如,一人群热力分布图的长为20cm,宽为18cm,以人群热力分布图的一个顶点(比如左上角顶点)作为原点,以长 方向为X轴,宽方向为Y轴建立直角坐标系,在某一行人在该图中的框的底部的中点距离X轴的距离为9cm,距离Y轴的距离为为8cm时,框的底部的中点的坐标为(9,8),对该框的底部的中点的坐标进行归一化,得到对应的坐标值为(9/20,8/18),即(0.45,0.44)。
步骤S130,根据所述坐标值在预设数量的网格中所处的位置,获得所述预设数量的网格中的每个网格所停留过的行人的坐标点以及人数。
可以将归一化的长和宽均进行等分,例如可以对长和宽均进行十等分,即0至0.1、0.1至0.2、0.2至0.3、0.3至0.4、0.4至0.5、0.5至0.6、0.6至0.7、0.7至0.8、0.8至0.9、0.9至1.0。将长和宽进行十等分,可以得到100个网格,比如第一个网格的数据区间为[(0,0.1),(0,0.1)],即在归一化行人的坐标的横坐标和纵坐标均位于0-0.1之间时,该行人位于第一个网格。因此坐标值(0.45,0.44)在横纵坐标的数据范围均为0.4至0.5的网格中。
可以通过上述方式获得每个网格所停留过的人的坐标点以及人数。
步骤S140,计算每个网格内所有停留过的行人的横纵坐标的平均值,将该横纵坐标的平均值所确定的坐标点作为该网格的标注点,将人数标注在所述标注点对应的位置,形成人群热力图。
对每个网格内停留过的人的坐标点取平均值,作为该网格的标注点,例如对于网格A,第一预设时间段内停留过5个人,则可以获得5个人的坐标点(横坐标值和纵坐标值),然后分别取横坐标值的平均数和纵坐标值的平均数,获得的5个人的横坐标平均值和纵坐标平均值,并将获得的横坐标平均值和纵坐标平均值对应的坐标点作为显示人数标注信息的标注点,然后将人数标注信息(比如人数5)标注在该标注点的位置,从而形成人群热力图。
本申请实施例可以先获得预设时间段内的多张人群热力分布图,获取每张人群热力分布图上行人对应的坐标值,根据坐标值在预设数量的网格中所处的位置,获得每个网格停留过的行人的坐标点以及人数,然后将每个网格内所有停留过的人的横纵坐标的平均值,将该横纵坐标的平均值所确定的坐标点作为该网格用于标注人数标注信息的标注点,将人数标注信息标注在相应的标注点从而形成人群热力图,使得数据的显示变得更加直观。
请参见图5,图5示出了本申请实施例提供的人群热力图获得装置300, 该人群热力图获得装置300包括:
热力分布图模块311,用于根据网格筛选查询语句,获得预设时间段内的多张人群热力分布图。
坐标值获取模块312,用于获取所述多张人群热力分布图中的每张人群热力分布图上的行人所对应的坐标值。
请参照图6,在本申请实施例中,坐标值获取模块312包括创建子模块3121和坐标值确定子模块3122;
创建子模块3121,用于根据所述人群热力分布图创建一直角坐标系。
具体地,创建子模块3121以所述人群热力分布图的一顶点为原点、所述人群热力分布图的长宽方向为坐标轴创建直角坐标系。
坐标值确定子模块3122,用于根据人群热力分布图的尺寸及行人在所述人群热力分布图中的位置,确定所述行人在所述直角坐标系中的坐标值。
具体地,坐标值确定子模块3122获得所述行人所在位置距离所述直角坐标系X轴与Y轴的距离;
根据所述行人所在位置距离所述直角坐标系X轴与Y轴的距离,与根据人群热力分布图的长宽尺寸,得到所述行人在所述直角坐标系中的坐标值。
数据获得模块313,用于根据所述坐标值在预设数量的网格中所处的位置,获得所述预设数量的网格中的每个网格所停留过的人的坐标点以及人数。
具体地,数据获得模块313将位于所述直角坐标系下的人群热力分布图的长宽进行等分,在所述直角坐标系下将所述人群热力分布图划分为预设数量个网格;
并根据所述行人在所述直角坐标系中的坐标值,确定所述行人在所述直角坐标系下中所处的网格。
热力图形成模块314,用于计算每个网格内所有停留过的行人的横纵坐标的平均值,将该横纵坐标的平均值所确定的坐标点作为该网格的标注点,将人数标注在所述标注点对应的位置,形成人群热力图。
请参照图7,所述人群热力图获得装置300还包括:请求接收模块315、查询语句构造模块316。
请求接收模块315,用于接收人群分布热力图获得请求;
查询语句构造模块316,用于根据所述人群分布热力图获得请求,构 造网格筛选查询语句。
请再次参照图7,所述人群热力图获得装置300还包括:压缩数据获取模块317、解压整理模块318、位置标记模块319、数据存储模块320;
压缩数据获取模块317,用于从消息队列中获取压缩数据;
解压整理模块318,用于对所述压缩数据进行解压、整理,获得解压后的图像数据;
位置标记模块319,用于标记出图像数据中人的关键位置点;
数据存储模块320,用于将标记出所述关键位置点的图像数据以图像数据对应的拍摄时间的先后顺序存储至数据库。
请再次参照图7,所述人群热力图获得装置300还包括:结果数据获取模块321、数据预处理模块322、数据打包模块323。
结果数据获取模块321,用于获取人体位置识别结果数据;
数据预处理模块322,用于对所述识别结果数据进行预处理;
数据打包模块323,用于将预处理过的数据打包发送至所述消息队列中。
请再次参照图7,所述人群热力图获得装置300还包括:视频流采集模块324、识别结果数据模块325。
视频流采集模块324,用于获取摄像头采集的视频流;
识别结果数据模块325,用于对所述视频流进行处理,获得所述人体位置识别结果数据。
所属领域的技术人员可以清楚地了解到,为描述的方便和简洁,上述描述的装置的具体工作过程,可以参考前述方法中的对应过程,在此不再过多赘述。
本申请还提供一种电子设备,包括:处理器、存储器和总线,所述存储器存储有所述处理器可执行的机器可读指令,当所述电子设备运行时,所述处理器与所述存储器之间通过总线通信,所述机器可读指令被所述处理器执行时执行本申请实施例所述的人群热力图获得方法。
本申请还提供一种计算机可读存储介质,该计算机可读存储介质上存储有计算机程序,该计算机程序被处理器运行时执行本申请实施例所述的人群热力图获得方法。
本申请还提供一种计算机程序产品,所述计算机程序产品在计算机上运行时,使得计算机执行本申请实施例所述的人群热力图获得方法。
在本申请实施例提供的人群热力图获得方法、装置、电子设备及可读存储介质中,所述方法包括:根据网格筛选查询语句,获得预设时间段内的多张人群热力分布图;获取所述多张人群热力分布图中的每张人群热力分布图上的行人所对应的坐标值;根据所述坐标值在预设数量的网格中所处的位置,获得所述预设数量的网格中的每个网格所停留过的行人的坐标点以及人数;计算每个网格内所有停留过的行人的坐标点取平均值,作为该网格的标注点,将人数标注在所述标注点对应的位置,形成人群热力图。本申请实施例可以先获得第一预设时间段内的多张人群热力分布图,获取每张人群热力分布图上行人对应的坐标值,根据坐标值在预设数量的网格中的具体位置,获得每个网格停留过的行人的坐标点以及人数,然后计算每个网格内停留过的行人的横纵坐标的平均值,将该横纵坐标的平均值所确定的坐标点作为该网格的标注点,将人数标注在相应的位置从而形成人群热力图,使得数据的显示变得更加直观。
所属领域的技术人员可以清楚地了解到,为描述的方便和简洁,上述描述的系统的具体工作过程,可以参考前述方法中的对应过程,在此不再过多赘述。
需要说明的是,本说明书中的各个实施例均采用递进的方式描述,每个实施例重点说明的都是与其他实施例的不同之处,各个实施例之间相同相似的部分互相参见即可。对于装置类实施例而言,由于其与方法实施例基本相似,所以描述的比较简单,相关之处参见方法实施例的部分说明即可。
本申请所提供的几个实施例中,应该理解到,所揭露的装置和方法,也可以通过其它的方式实现。以上所描述的装置实施例仅仅是示意性的,例如,附图中的流程图和框图显示了根据本申请的多个实施例的装置、方法和计算机程序产品的可能实现的体系架构、功能和操作。在这点上,流程图或框图中的每个方框可以代表一个模块、程序段或代码的一部分,所述模块、程序段或代码的一部分包含一个或多个用于实现规定的逻辑功能的可执行指令。也应当注意,在有些作为替换的实现方式中,方框中所标注的功能也可以以不同于附图中所标注的顺序发生。例如,两个连续的方框实际上可以基本并行地执行,它们有时也可以按相反的顺序执行,这依所涉及的功能而定。也要注意的是,框图和/或流程图中的每个方框、以及框图和/或流程图中的方框的组合,可以用执行规定的功能或动作的专用的 基于硬件的系统来实现,或者可以用专用硬件与计算机指令的组合来实现。
另外,在本申请各个实施例中的各功能模块可以集成在一起形成一个独立的部分,也可以是各个模块单独存在,也可以两个或两个以上模块集成形成一个独立的部分。
所述功能如果以软件功能模块的形式实现并作为独立的产品销售或使用时,可以存储在一个计算机可读取存储介质中。基于这样的理解,本申请的技术方案本质上或者说对现有技术做出贡献的部分或者该技术方案的部分可以以软件产品的形式体现出来,该计算机软件产品存储在一个存储介质中,包括若干指令用以使得一台计算机设备(可以是个人计算机,服务器,或者网络设备等)执行本申请各个实施例所述方法的全部或部分步骤。而前述的存储介质包括:U盘、移动硬盘、只读存储器(ROM,Read-Only Memory)、随机存取存储器(RAM,Random Access Memory)、磁碟或者光盘等各种可以存储程序代码的介质。需要说明的是,在本文中,诸如第一和第二等之类的关系术语仅仅用来将一个实体或者操作与另一个实体或操作区分开来,而不一定要求或者暗示这些实体或操作之间存在任何这种实际的关系或者顺序。而且,术语“包括”、“包含”或者其任何其他变体意在涵盖非排他性的包含,从而使得包括一系列要素的过程、方法、物品或者设备不仅包括那些要素,而且还包括没有明确列出的其他要素,或者是还包括为这种过程、方法、物品或者设备所固有的要素。在没有更多限制的情况下,由语句“包括一个……”限定的要素,并不排除在包括所述要素的过程、方法、物品或者设备中还存在另外的相同要素。
以上所述仅为本申请的优选实施例而已,并不用于限制本申请,对于本领域的技术人员来说,本申请可以有各种更改和变化。凡在本申请的精神和原则之内,所作的任何修改、等同替换、改进等,均应包含在本申请的保护范围之内。应注意到:相似的标号和字母在下面的附图中表示类似项,因此,一旦某一项在一个附图中被定义,则在随后的附图中不需要对其进行进一步定义和解释。
以上所述,仅为本申请的具体实施方式,但本申请的保护范围并不局限于此,任何熟悉本技术领域的技术人员在本申请揭露的技术范围内,可轻易想到变化或替换,都应涵盖在本申请的保护范围之内。因此,本申请的保护范围应所述以权利要求的保护范围为准。
工业实用性
本申请实施例提供的人群热力图获得方法、装置、电子设备及可读存储介质,将人数标注在各网格的标注点所对应的位置,以形成人群热力图,使得数据的显示变得更加直观。

Claims (20)

  1. 一种人群热力图获得方法,所述方法包括:
    根据网格筛选查询语句,获得预设时间段内的多张人群热力分布图;
    获取所述多张人群热力分布图中的每张人群热力分布图上的行人所对应的坐标值;
    根据所述坐标值在预设数量的网格中所处的位置,获得所述预设数量的网格中的每个网格所停留过的行人的坐标点以及人数;
    计算每个网格内所有停留过的行人的横纵坐标的平均值,将该横纵坐标的平均值所确定的坐标点作为该网格的标注点,将人数标注在所述标注点对应的位置,形成人群热力图。
  2. 根据权利要求1所述的方法,其中,在所述根据网格筛选查询语句,获得预设时间段内的多张人群热力分布图之前,所述方法还包括:
    接收人群分布热力图的获得请求;
    根据所述人群分布热力图的获得请求,构造网格筛选查询语句。
  3. 根据权利要求1所述的方法,其中,在接收人群分布热力图的获得请求之前,所述方法还包括:
    从消息队列中获取压缩数据;
    对所述压缩数据进行解压、整理,获得解压后的图像数据;
    标记出图像数据中行人的关键位置点;
    将标记出所述关键位置点的图像数据存储至数据库。
  4. 根据权利要求3所述的方法,其中,在从消息队列中获取压缩数据之前,所述方法还包括:
    获取人体位置的识别结果数据;
    对所述识别结果数据进行预处理;
    将预处理过的数据存储至所述消息队列中。
  5. 根据权利要求4所述的方法,其中,在所述获取人体位置的识别结果数据之前,所述方法还包括:
    获取摄像头采集的视频流;
    控制图形处理器对所述视频流进行处理,获得所述人体位置的识别结果数据。
  6. 根据权利要求1所述的方法,其中,所述获取所述多张人群热力分布图中的每张人群热力分布图上的行人所对应的坐标值,包括:
    根据所述人群热力分布图创建一直角坐标系;
    根据人群热力分布图的尺寸及行人在所述人群热力分布图中的位置,确定所述行人在所述直角坐标系中的坐标值。
  7. 根据权利要求6所述的方法,其中,所述根据所述人群热力分布图创建一直角坐标系,包括:
    以所述人群热力分布图的一顶点为原点、所述人群热力分布图的长宽方向为坐标轴创建直角坐标系。
  8. 根据权利要求7所述的方法,其中,根据人群热力分布图的尺寸及行人在所述人群热力分布图中的位置,确定所述行人在所述直角坐标系中的坐标值,包括:
    获得所述行人所在位置距离所述直角坐标系X轴与Y轴的距离;
    根据所述行人所在位置距离所述直角坐标系X轴与Y轴的距离,与根据人群热力分布图的长宽尺寸,得到所述行人在所述直角坐标系中的坐标值。
  9. 根据权利要求8所述的方法,其中,所述根据所述坐标值在预设数量的网格中所处的位置,包括:
    将位于所述直角坐标系下的人群热力分布图的长宽进行等分,在所述直角坐标系下将所述人群热力分布图划分为预设数量个网格;
    根据所述行人在所述直角坐标系中的坐标值,确定所述行人在所述直角坐标系下中所处的网格。
  10. 一种人群热力图获得装置,所述装置包括:
    热力分布图模块,配置为根据网格筛选查询语句,获得第一预设时间段内的多张人群热力分布图;
    坐标值获取模块,配置为获取所述多张人群热力分布图中的每张人群热力分布图上的行人所对应的坐标值;
    数据获得模块,配置为根据所述坐标值在预设数量的网格中所处的位置,获得所述预设数量的网格中的每个网格所停留过的行人的坐标点以及人数;
    热力图形成模块,配置为将每个网格内所有停留过的行人的横纵坐标的平均值,将该横纵坐标的平均值所确定的坐标点作为该网格的标注点,将人数标注在所述标注点对应的位置,形成人群热力图。
  11. 根据权利要求10所述的装置,其中,所述装置还包括:
    请求接收模块,配置为接收人群分布热力图的获得请求;
    查询语句构造模块,配置为根据所述人群分布热力图的获得请求,构造网格筛选查询语句。
  12. 根据权利要求10所述的装置,其中,所述装置还包括:
    压缩数据获取模块,配置为从消息队列中获取压缩数据;
    解压整理模块,配置为对所述压缩数据进行解压、整理,获得解压后的图像数据;
    位置标记模块,配置为标记出图像数据中行人的关键位置点;
    数据存储模块,配置为将标记出所述关键位置点的图像数据以图像数据对应的拍摄时间的先后顺序存储至数据库。
  13. 根据权利要求12所述的装置,其中,所述装置还包括:
    结果数据获取模块,配置为获取人体位置的识别结果数据;
    数据预处理模块,配置为对所述识别结果数据进行预处理;
    数据打包模块,配置为将预处理过的数据存储至所述消息队列中。
  14. 根据权利要求13所述的装置,其中,所述装置还包括:
    视频流采集模块,配置为获取摄像头采集的视频流;
    识别结果数据模块,配置为控制图形处理器对所述视频流进行处理,获得所述人体位置的识别结果数据。
  15. 根据权利要求10所述的装置,其中,所述坐标值获取模块包括:
    创建子模块,配置为根据所述人群热力分布图创建一直角坐标系;
    坐标值确定子模块,配置为根据人群热力分布图的尺寸及行人在所述人群热力分布图中的位置,确定所述行人在所述直角坐标系中的坐标值。
  16. 根据权利要求15所述的装置,其中,所述创建子模块具体配置为:
    以所述人群热力分布图的一顶点为原点、所述人群热力分布图的长宽方向为坐标轴创建直角坐标系。
  17. 根据权利要求16所述的装置,其中,所述坐标值确定子模块具体配置为:
    获得所述行人所在位置距离所述直角坐标系X轴与Y轴的距离;
    根据所述行人所在位置距离所述直角坐标系X轴与Y轴的距离,与根据人群热力分布图的长宽尺寸,得到所述行人在所述直角坐标系中的坐标值。
  18. 根据权利要求17所述的装置,其中,所述数据获得模块配置为:
    将位于所述直角坐标系下的人群热力分布图的长宽进行等分,在所述直角坐标系下将所述人群热力分布图划分为预设数量个网格;
    根据所述行人在所述直角坐标系中的坐标值,确定所述行人在所述直角坐标系下中所处的网格。
  19. 一种电子设备,包括:处理器、存储器和总线,所述存储器存储有所述处理器可执行的机器可读指令,当所述电子设备运行时,所述处理器与所述存储器之间通过总线通信,所述机器可读指令被所述处理器执行时执行权利要求1-9中任意一项所述的人群热力图获得方法。
  20. 一种可读存储介质,该可读存储介质上存储有计算机程序,该计算机程序被处理器运行时执行权利要求1-9中任意一项所述的人群热力图获得方法。
PCT/CN2018/117285 2018-09-18 2018-11-23 人群热力图获得方法、装置、电子设备及可读存储介质 WO2020056914A1 (zh)

Applications Claiming Priority (2)

Application Number Priority Date Filing Date Title
CN201811089701.1A CN109189878B (zh) 2018-09-18 2018-09-18 一种人群热力图获得方法及装置
CN201811089701.1 2018-09-18

Publications (1)

Publication Number Publication Date
WO2020056914A1 true WO2020056914A1 (zh) 2020-03-26

Family

ID=64908391

Family Applications (1)

Application Number Title Priority Date Filing Date
PCT/CN2018/117285 WO2020056914A1 (zh) 2018-09-18 2018-11-23 人群热力图获得方法、装置、电子设备及可读存储介质

Country Status (2)

Country Link
CN (1) CN109189878B (zh)
WO (1) WO2020056914A1 (zh)

Cited By (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US11458044B2 (en) 2008-09-29 2022-10-04 Convatec Technologies Inc. Wound dressing

Families Citing this family (5)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN111078330A (zh) * 2019-07-23 2020-04-28 南京航空航天大学 移动手机人流量数据可视化工具
CN110990503A (zh) * 2019-11-13 2020-04-10 联想(北京)有限公司 一种用于在电子装置中展示多个目标信息的系统和方法
CN111325822B (zh) 2020-02-18 2022-09-06 腾讯科技(深圳)有限公司 热点图的显示方法、装置、设备及可读存储介质
CN113468250A (zh) * 2021-06-29 2021-10-01 北京市商汤科技开发有限公司 热力图生成方法、装置、设备及存储介质
CN115100309A (zh) * 2022-06-24 2022-09-23 京东方科技集团股份有限公司 行人热力图生成方法及系统

Citations (4)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US20060218563A1 (en) * 2005-02-01 2006-09-28 University Of Massachusetts, A Massachusetts Corporation Universal visualization platform
CN106294883A (zh) * 2016-08-30 2017-01-04 杭州启冠网络技术有限公司 基于用户行为数据对用户行为图上分析的方法和系统
CN107506692A (zh) * 2017-07-21 2017-12-22 天津大学 一种基于深度学习的密集人群计数与人员分布估计方法
US20180096219A1 (en) * 2015-07-27 2018-04-05 Salesforce.Com, Inc. Neural network combined image and text evaluator and classifier

Family Cites Families (3)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN105549727A (zh) * 2015-08-29 2016-05-04 宇龙计算机通信科技(深圳)有限公司 一种人流量提醒方法及其装置
CN107782316B (zh) * 2017-11-01 2019-07-12 北京旷视科技有限公司 目标对象的轨迹确定方法、装置及系统
CN108255691B (zh) * 2018-01-29 2021-08-10 百度在线网络技术(北京)有限公司 热力图展示方法及装置

Patent Citations (4)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US20060218563A1 (en) * 2005-02-01 2006-09-28 University Of Massachusetts, A Massachusetts Corporation Universal visualization platform
US20180096219A1 (en) * 2015-07-27 2018-04-05 Salesforce.Com, Inc. Neural network combined image and text evaluator and classifier
CN106294883A (zh) * 2016-08-30 2017-01-04 杭州启冠网络技术有限公司 基于用户行为数据对用户行为图上分析的方法和系统
CN107506692A (zh) * 2017-07-21 2017-12-22 天津大学 一种基于深度学习的密集人群计数与人员分布估计方法

Non-Patent Citations (1)

* Cited by examiner, † Cited by third party
Title
FEI YING WU WT, CROWD VIDEO ANALYSIS SYSTEM INTRODUCTION-JT, 8 January 2016 (2016-01-08), pages 1 - 15 *

Cited By (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US11458044B2 (en) 2008-09-29 2022-10-04 Convatec Technologies Inc. Wound dressing

Also Published As

Publication number Publication date
CN109189878A (zh) 2019-01-11
CN109189878B (zh) 2019-08-23

Similar Documents

Publication Publication Date Title
WO2020056914A1 (zh) 人群热力图获得方法、装置、电子设备及可读存储介质
CN109508688B (zh) 基于骨架的行为检测方法、终端设备及计算机存储介质
WO2018210047A1 (zh) 数据处理方法、数据处理装置、电子设备及存储介质
US20220101644A1 (en) Pedestrian re-identification method, device, electronic device and computer-readable storage medium
Marciniak et al. Influence of low resolution of images on reliability of face detection and recognition
CN109766779B (zh) 徘徊人员识别方法及相关产品
KR20180104609A (ko) 다수의 이미지 일치성을 바탕으로 보험클레임 사기 방지를 실현하는 방법, 시스템, 기기 및 판독 가능 저장매체
WO2018014828A1 (zh) 识别二维码位置的方法及其系统
WO2020056915A1 (zh) 顾客到访分析方法、装置及存储介质
WO2018113523A1 (zh) 一种图像处理方法及装置、存储介质
US20170364738A1 (en) Method and apparatus for detecting glasses in a face image
CN112200081A (zh) 异常行为识别方法、装置、电子设备及存储介质
CN114943936B (zh) 目标行为识别方法、装置、电子设备及存储介质
CN110941978B (zh) 一种未识别身份人员的人脸聚类方法、装置及存储介质
CN110210457A (zh) 人脸检测方法、装置、设备及计算机可读存储介质
CN103929644A (zh) 一种视频指纹库建立、视频指纹识别方法及装置
JP6455832B2 (ja) バーコード検出方法、バーコード検出システムおよびそのためのプログラム
CN113283408A (zh) 基于监控视频的社交距离监测方法、装置、设备和介质
CN114550051A (zh) 一种车损检测方法、装置、计算机设备及存储介质
CN115862113A (zh) 陌生人异常识别方法、装置、设备及存储介质
CN109711287B (zh) 人脸采集方法及相关产品
CN109376689B (zh) 人群分析方法及装置
WO2018210039A1 (zh) 数据处理方法、数据处理装置及存储介质
CN110458857A (zh) 中心对称图元检测方法、装置、电子设备及可读存储介质
CN112633200A (zh) 基于人工智能的人脸图像比对方法、装置、设备及介质

Legal Events

Date Code Title Description
121 Ep: the epo has been informed by wipo that ep was designated in this application

Ref document number: 18933977

Country of ref document: EP

Kind code of ref document: A1

NENP Non-entry into the national phase

Ref country code: DE

122 Ep: pct application non-entry in european phase

Ref document number: 18933977

Country of ref document: EP

Kind code of ref document: A1