WO2018228174A1 - 获取对象密度的方法、装置、设备及存储介质 - Google Patents

获取对象密度的方法、装置、设备及存储介质 Download PDF

Info

Publication number
WO2018228174A1
WO2018228174A1 PCT/CN2018/088751 CN2018088751W WO2018228174A1 WO 2018228174 A1 WO2018228174 A1 WO 2018228174A1 CN 2018088751 W CN2018088751 W CN 2018088751W WO 2018228174 A1 WO2018228174 A1 WO 2018228174A1
Authority
WO
WIPO (PCT)
Prior art keywords
monitoring
monitoring picture
picture
distance
obtaining
Prior art date
Application number
PCT/CN2018/088751
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 WO2018228174A1 publication Critical patent/WO2018228174A1/zh

Links

Images

Classifications

    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06VIMAGE OR VIDEO RECOGNITION OR UNDERSTANDING
    • G06V20/00Scenes; Scene-specific elements
    • G06V20/50Context or environment of the image
    • G06V20/52Surveillance or monitoring of activities, e.g. for recognising suspicious objects
    • G06V20/53Recognition of crowd images, e.g. recognition of crowd congestion

Definitions

  • the embodiments of the present invention relate to the field of image analysis technologies, and in particular, to a method, an apparatus, a device, and a storage medium for acquiring an object density.
  • a method for obtaining population density based on video analysis which mainly comprises the following two steps: (1) training a population density estimation model, and (2) predicting a population density by using a trained population density estimation model. .
  • step (1) a large number of monitoring video samples are obtained, the population density data in each monitoring video sample is manually counted, and the foreground, edge, texture and other features of the image are extracted from the respective monitoring video samples, and regression is performed according to the sample data.
  • the function training generates the model parameters of the population density estimation model, and obtains the population density estimation model.
  • the model is used to calculate the population density based on the extracted features and model parameters.
  • step (2) acquiring a monitoring video of the target area collected in the target time period, extracting the same features from the monitoring video from the monitoring video, and estimating the target according to the above characteristics by using the trained population density estimation model.
  • the population density of the area during the target time period is used to calculate the population density based on the extracted features and model parameters.
  • the solution provided by the above related technology needs to construct a population density estimation model and train the model. Since the model training phase requires manual statistical population density data, the model training requires a lot of manpower and time cost, resulting in the implementation complexity of the solution. Higher. Moreover, the solution provided by the above related art also needs to obtain a large amount of sample data, and in the case where the sample data is missing, the accuracy of the estimated population density after the implementation of the scheme is low.
  • the embodiment of the present invention provides a method, a device, a device, and a storage medium for acquiring an object density, which can be used to solve the problem of high implementation complexity and high implementation requirements of the solution provided by the related art.
  • an embodiment of the present application provides a method for obtaining an object density, where the method includes:
  • n monitoring pictures of the target area collected at n different times in the target time period where n is an integer greater than 1;
  • an embodiment of the present application provides an apparatus for acquiring an object density, where the apparatus includes:
  • a picture obtaining module configured to acquire n monitoring pictures of the target area collected at n different times in the target time period, where n is an integer greater than 1;
  • An object recognition module for identifying an object included in each monitoring picture
  • An information obtaining module configured to acquire distance difference information corresponding to each of the monitoring pictures, where the distance difference information is used to indicate a degree of difference in distance between the objects included in the monitoring picture;
  • a density determining module configured to determine an object density of the target area in the target time period according to the distance difference information corresponding to each of the n pieces of monitoring pictures.
  • an embodiment of the present application provides a device for acquiring an object density, where the device includes a processor and a memory, where the memory stores at least one instruction, at least one program, a code set, or an instruction set, the at least one piece.
  • the instructions, the at least one program, the set of codes, or the set of instructions are loaded and executed by the processor to implement a method of obtaining an object density as described in the above aspects.
  • an embodiment of the present application provides a computer readable storage medium, where the storage medium stores at least one instruction, at least one program, a code set, or a set of instructions, the at least one instruction, the at least one program,
  • the set of codes or sets of instructions is loaded and executed by a processor to implement a method of obtaining an object density as described in the above aspects.
  • an embodiment of the present application provides a computer program product for performing the method for acquiring an object density according to the above aspect when the computer program product is executed.
  • the solution provided by the embodiment of the present application does not need to acquire a large amount of sample data to train the model, so there is no need to acquire a large amount of sample data, so the implementation requirement of the solution is lower.
  • FIG. 1 is a schematic diagram of an application scenario provided by an embodiment of the present application
  • FIG. 2 is a flowchart of a method for acquiring an object density according to an embodiment of the present application
  • FIG. 3 is a schematic diagram of acquiring an object spacing according to an embodiment of the present application.
  • FIG. 4 is a block diagram of an apparatus for acquiring an object density according to an embodiment of the present application.
  • FIG. 5 is a schematic structural diagram of a server according to an embodiment of the present application.
  • FIG. 1 is a schematic diagram of an application scenario provided by an embodiment of the present application.
  • the application scenario may include at least one camera 110 and a server 120.
  • the camera 110 is deployed above or obliquely above an area for collecting monitoring images (such as monitoring video or monitoring pictures) in the area.
  • the flow of the objects (such as the crowd) in the area is recorded in the surveillance image.
  • the above area may be any area that has statistical requirements for object density (such as population density).
  • object density such as population density
  • the above-mentioned area may be an aisle, a shop, an entrance, and the like with a large flow of people.
  • the camera 110 transmits the collected monitoring image to the server 120 through the above communication connection, and the monitoring image is analyzed by the server 120 to determine the object density.
  • the server 120 can be a server, a server cluster composed of multiple servers, or a cloud computing service center.
  • the same block area can deploy multiple cameras 110 at multiple angles (for example, two front and rear angles), acquire monitoring images from different shooting angles, and comprehensively analyze the monitoring images of the plurality of different angles.
  • the density of objects in the area is estimated, so that the estimation result due to the viewing angle limitation of a single shooting angle can be avoided.
  • the server 120 is mainly exemplified by the execution subject of each step.
  • the captured image can be directly analyzed by the camera 110 to determine the density of the object, which is not limited in this embodiment of the present application.
  • the technical solution provided by the embodiments of the present application can be applied to public security firefighting and the like.
  • early warning can be performed when the population density exceeds the standard, so as to avoid congestion and even crowd treading accidents. Has a high practical value.
  • FIG. 2 is a flowchart of a method for acquiring object density provided by an embodiment of the present application.
  • the execution subject of each step is exemplified as a server.
  • the technical solution provided by the embodiment of the present application is described by taking the population density as an example.
  • the method can include the following steps.
  • Step 201 Acquire n monitoring pictures of the target area collected at n different times in the target time period, where n is an integer greater than 1.
  • the camera When it is necessary to estimate the population density in the target area, the camera may be deployed above or obliquely above the target area, and the monitoring image of the target area is collected by the camera.
  • the monitoring image may be a monitoring video or a monitoring image.
  • the target area may be any area that has statistical needs for population density, such as aisles, shops, entrances and exits with a large flow of people.
  • the camera collects a surveillance video of the target area.
  • the server acquires the monitoring video of the target area collected in the target time period, and extracts one frame image from the monitoring video every preset time interval to obtain n monitoring pictures.
  • the camera captures a monitoring picture of a target area every preset time interval. Accordingly, the server acquires n monitoring pictures of the target area captured by the camera at n different times within the target time period.
  • the preset time interval is a preset experience value
  • the two adjacent preset time intervals may be the same or different.
  • each preset time interval is the same and is 10 seconds.
  • n monitoring pictures are acquired by the same camera at n different times.
  • Step 202 Identify objects included in each monitoring picture.
  • the technical solution provided by the embodiment of the present application is described by taking the population density as an example.
  • the object is an image of a human head (hereinafter referred to as "human head").
  • the server identifies the image of the human head contained in each of the monitored pictures.
  • the algorithm used to identify the human head image is not limited.
  • human head image recognition can be realized based on an analysis algorithm based on features such as texture, color, and edge of a picture.
  • the server determines the area to be identified in the monitoring picture.
  • the area to be identified refers to the movable area of the object in the monitoring picture, and the position of the area to be identified in each monitoring picture is the same.
  • a movable area is an area to which an object can be moved.
  • a movable area refers to a ground area that can be moved by an object
  • a non-ground area such as a wall, a table, a fence, an obstacle, and the like
  • a movable area refers to an area to which a person can move.
  • the monitoring image collected by the camera may include some non-movable areas in addition to the movable area, and the non-movable area refers to an area to which the object cannot be moved, such as a wall, a table, a fence, an obstacle, and the like.
  • the position of the to-be-identified area in the monitoring picture may be preset, or may be determined by analyzing the movable area of the object in the plurality of monitoring pictures.
  • the server identifies the objects contained in the area to be identified of each of the monitored pictures. By identifying an object from the area to be identified in each of the monitored pictures, it is not necessary to identify the object from the entire monitored picture, which helps to reduce the amount of calculation.
  • Step 203 Obtain distance difference information corresponding to each monitoring picture.
  • the distance difference information is used to indicate the degree of difference in the distance between objects included in the monitoring picture.
  • step 203 includes the following two sub-steps:
  • Step 203a Acquire an object spacing set corresponding to each monitoring picture, where the object spacing set refers to a set formed by monitoring distances between objects included in the picture;
  • the server acquires the distance between each two objects in the monitoring picture to obtain a set of object spacing. Assuming that a certain monitoring picture includes an m personal head image, the object spacing set corresponding to the monitoring picture includes [m ⁇ (m - 1)] / 2 distances, and m is an integer greater than 1.
  • step 203a includes the following sub-steps:
  • Step 203a1 For each monitoring picture, select any object from the monitoring picture as the first object;
  • an object is randomly selected from the monitor picture as the first object.
  • an object in the upper left corner is selected from the monitoring picture as the first object.
  • the monitoring picture 31 includes a plurality of human head images (each circle represents a human head image), and the server first determines the to-be-identified area 32 in the monitoring picture 31 (the dotted line frame in the figure) The position of the display is then recognized from the above-mentioned area to be recognized 32, and then any human head image is selected as the first human head image (the human head image A identified in the figure).
  • Step 203a2 selecting a second object from the monitoring image, and recording a distance between the first object and the second object;
  • the second object refers to an object in the unselected object in the monitoring picture that is closest to the first object.
  • the server first acquires the distance between each object that is not selected in the monitoring picture and the first object, and then records the distance minimum value, and takes the object corresponding to the minimum value as the second object.
  • the server selects any one of the multiple objects as the second object.
  • the human head image B is taken as the second human head image.
  • the length of the black line segment represents the distance between the human head image A and the human head image B.
  • Step 203a3 detecting whether there is still an object that is not selected in the monitoring picture
  • Step 203a4 If there is an unselected object in the monitoring picture, the third object is selected from the monitoring picture, and the distance between the second object and the third object is recorded, and the third object is that the monitoring picture is not selected. The object closest to the second object in the object; and so on, until there are no unselected objects in the monitor image;
  • step 203a5 if there is no unselected object in the monitoring picture, the respective distances of the integrated records are obtained as the object spacing set corresponding to the monitoring picture.
  • the object spacing corresponding to the monitoring picture includes m-1 distances, and m is an integer greater than 1.
  • the second possible implementation manner is used to obtain the object spacing set corresponding to the monitoring image, which can be better adapted to obtain the distance between each object of different distribution modes (for example, the size, shape, and the like of the object distribution area).
  • the resulting distance is more accurate and more reflective of the true intensity. For example, obtaining the distance between two objects that are the farthest distance in the distribution area of the object does not accurately reflect the intensity of the objects in the area, which affects the accuracy of subsequent analysis results, and acquires the two closest distances.
  • the distance between objects can better reflect the intensity of objects in the area.
  • the server acquires at least one distance corresponding to the object, and the object spacing set corresponding to the monitoring picture includes each object included in the monitoring picture. Corresponding at least one distance.
  • the at least one distance corresponding to the object includes at least a distance between the object and another object whose distance is closest to the object.
  • the at least one distance further includes a distance between the object and the at least one other object.
  • the server recognizes four human head images from a certain monitoring picture, and records them as a human head image A, a human head image B, a human head image C, and a human head image D, respectively. It is assumed that the head image closest to the human head image A is B, the head image closest to the head image B is A, the head image closest to the head image C is A, and the head image closest to the head image D is B. Then, the at least one distance corresponding to the human head image A acquired by the server includes: a distance between the human head images A and B, optionally including a distance between the human head images A and C and/or between the human head images A and D.
  • the distance; similarly, the at least one distance corresponding to the human head image C acquired by the server includes: a distance between the human head images C and A, optionally including a distance between the human head images C and B and/or a human head image C.
  • the distance from D After that, the server integrates the acquired distances to obtain an object spacing set corresponding to the monitoring picture.
  • the distance between two objects may be the distance between the center points of the two objects.
  • the distance between the two human head images refers to the distance between the center point of one of the human head images and the center point of another human head image.
  • the center point of the object is determined in such a manner that for each object, the minimum bounding box of the object is obtained, and the center point of the minimum bounding box is determined as the center point of the object.
  • the smallest bounding box of an object is the smallest graphic that contains the object.
  • the minimum figure described above may be a minimum rectangular area or a minimum circular area.
  • Step 203b Obtain distance difference information corresponding to each monitoring picture according to the object spacing set corresponding to each monitoring picture.
  • the server calculates a variance of each distance included in the object spacing set corresponding to the monitoring picture, and determines the variance as the distance difference information corresponding to the monitoring picture.
  • the variance of each distance included in the object spacing set reflects the degree of difference of each distance. The larger the variance, the greater the difference of each distance, and the smaller the variance, the smaller the difference of each distance.
  • the variance can be used to amplify the degree of difference in the performance of the numerical value, and it is easier to reflect the degree of difference.
  • parameters such as standard deviation or extreme difference of each distance included in the object spacing set corresponding to the monitoring picture may be calculated, and the above parameters are used as distance difference information corresponding to the monitoring picture. This is not limited.
  • Step 204 Determine, according to the distance difference information corresponding to each of the n monitoring pictures, the object density of the target area in the target time period.
  • the server obtains the fluctuation degree of the variance corresponding to each of the n monitoring pictures. If the fluctuation of the variance is large, it indicates that the variation of the object spacing is more obvious. At this time, the object moves more frequently, and the object density should be lower; if the fluctuation of the variance is more Small, it indicates that the change of the object spacing is not obvious enough. At this time, the object movement is not obvious enough, and the object density should be high.
  • the server calculates a difference between the maximum value and the minimum value of the variance, and determines, according to the difference, the target area is within the target time period.
  • Object density For example, the server may preset a correspondence between different difference value intervals and different object density levels, for example, the object density level corresponding to the difference interval 1 is low, and the object density level corresponding to the difference interval 2 is The object density level corresponding to the medium and difference interval 3 is high.
  • the difference value interval to which the difference belongs is determined, and the corresponding object density level is obtained. .
  • the warning information is sent, so that the relevant personnel promptly evacuate the object according to the foregoing warning information, thereby avoiding occurrence of long-term congestion and the like.
  • the method provided by the embodiment of the present application obtains the distance between the objects included in each monitoring picture by acquiring multiple monitoring pictures of the target area collected in the target time period, according to the difference degree of the distance.
  • the object density of the target area in the target time period is determined.
  • the process of model construction and training is omitted, and the realization of the solution is realized.
  • the complexity is reduced, and the manpower and time cost are saved.
  • the solution provided by the embodiment of the present application does not need to acquire a large amount of sample data to train the model, so there is no need to acquire a large amount of The need for sample data, so the implementation requirements of the program are lower.
  • the collected human head is likely to include only the hair, which makes it difficult to distinguish the human head from similar objects in the recognition of the human head.
  • the following methods can be used to improve the accuracy of the head recognition: (1) in the case of hardware conditions, the high-definition camera, the surveillance image captured by the high-definition camera has a large difference in the characteristics of the human head and the object; (2) the camera As far as possible, it is deployed at a position and an angle capable of capturing a part of the facial features, and the human head is determined based on the facial features.
  • the method provided in the embodiment of FIG. 2 above may be used, respectively.
  • the monitoring image acquired by a camera determines the object density of the target area in the target time period, and then comprehensively calculates the density of each object to determine the final object density.
  • two cameras are deployed at two different angles above the target area, and each camera separately captures a monitoring image of the target area, and it is determined that the target density of the target area in the target time period is determined according to the monitoring image acquired by one of the cameras.
  • the monitoring image acquired by another camera it is determined that the target region has an object density of b in the target time period, and the average value of a and b can be finally used as the target density of the target region in the target time period.
  • the technical solution provided by the embodiment of the present application can also analyze the intensity of other objects or creatures having mobile characteristics, such as vehicles in a parking lot, large Ships in ports, animals in farms, etc.
  • the technical solution provided by the embodiment of the present application is described by taking the analysis of the population density as an example.
  • the technical solutions provided by the embodiments of the present application are also applicable to the other application scenarios listed above.
  • At least one camera may be deployed above the parking area, and the vehicle density in the target area captured by a certain camera (such as a target camera) may be as follows: Get:
  • n monitoring images of the target area collected by the target camera at n different times in the target time period where n is an integer greater than one;
  • the parking lot can be divided into multiple sub-areas, one camera is deployed above each sub-area, and one sub-area is collected by one camera.
  • the monitoring video so that the vehicle density in each sub-area can be obtained, and then the vehicle density of the entire parking lot can be determined according to the vehicle density in each sub-area. For example, the average value of the vehicle density in each sub-area is taken as the vehicle density of the entire parking lot.
  • FIG. 4 is a block diagram of an apparatus for acquiring an object density provided by an embodiment of the present application.
  • the device has the function of implementing the above method examples.
  • the functions may be implemented by hardware, or may be implemented by hardware by executing corresponding software.
  • the apparatus may include a picture acquisition module 410, an object recognition module 420, an information acquisition module 430, and a density determination module 440.
  • the image obtaining module 410 is configured to acquire n monitoring images of the target area collected at n different times in the target time period, where n is an integer greater than 1.
  • the object recognition module 420 is configured to identify an object included in each monitoring picture.
  • the information obtaining module 430 is configured to obtain distance difference information corresponding to each monitoring picture, where the distance difference information is used to indicate a degree of difference in distance between the objects included in the monitoring picture.
  • the density determining module 440 is configured to determine an object density of the target area in the target time period according to the distance difference information corresponding to each of the n pieces of monitoring pictures.
  • the information acquiring module includes: a distance acquiring unit and an information acquiring unit.
  • the distance obtaining unit is configured to obtain an object spacing set corresponding to each monitoring picture, where the object spacing set refers to a set formed by the distance between the objects included in the monitoring picture.
  • the information acquiring unit is configured to obtain distance difference information corresponding to each monitoring picture according to the object spacing set corresponding to each monitoring picture.
  • the distance obtaining unit is configured to:
  • selecting a third object from the monitoring picture and recording a distance between the second object and the third object, where the third object is Refers to an object in the unselected object in the monitoring picture that is closest to the second object; and so on, until there is no unselected object in the monitoring picture.
  • the information acquiring unit is configured to calculate, for each of the monitoring pictures, a variance of each of the distances included in the object spacing set corresponding to the monitoring picture, and determine the variance as the monitoring picture corresponding to Distance difference information.
  • the apparatus further includes: an area determining module.
  • An area determining module configured to determine an area to be identified in the monitoring picture, where the area to be identified refers to a movable area of the object in the monitoring picture, and each area of the monitoring picture is to be identified The location is the same.
  • the object recognition module is configured to identify an object included in an area to be identified of each monitoring picture.
  • the picture obtaining module includes: a video acquiring unit and a picture extracting unit.
  • a video acquiring unit configured to acquire a monitoring video of the target area collected in the target time period.
  • a picture extracting unit configured to extract one frame of picture from the monitoring video every predetermined time interval to obtain the n monitoring pictures.
  • FIG. 5 is a schematic structural diagram of a server provided by an embodiment of the present application.
  • the server is used to implement the method of obtaining object density provided in the above embodiments. Specifically:
  • the server 500 includes a central processing unit (CPU) 501, a system memory 504 including a random access memory (RAM) 502 and a read only memory (ROM) 503, and a system bus 505 that connects the system memory 504 and the central processing unit 501.
  • the server 500 also includes a basic input/output system (I/O system) 506 that facilitates the transfer of information between various devices within the computer, and mass storage for storing the operating system 513, applications 514, and other program modules 515.
  • I/O system basic input/output system
  • the basic input/output system 506 includes a display 508 for displaying information and an input device 509 such as a mouse or keyboard for user input of information. Both the display 508 and the input device 509 are connected to the central processing unit 501 via an input and output controller 510 that is coupled to the system bus 505.
  • the basic input/output system 506 can also include an input and output controller 510 for receiving and processing input from a plurality of other devices, such as a keyboard, mouse, or electronic stylus. Similarly, input and output controller 510 also provides output to a display screen, printer, or other type of output device.
  • the mass storage device 507 is connected to the central processing unit 501 by a mass storage controller (not shown) connected to the system bus 505.
  • the mass storage device 507 and its associated computer readable medium provide non-volatile storage for the server 500. That is, the mass storage device 507 can include a computer readable medium (not shown) such as a hard disk or a CD-ROM drive.
  • the computer readable medium can include computer storage media and communication media.
  • Computer storage media includes volatile and nonvolatile, removable and non-removable media implemented in any method or technology for storage of information such as computer readable instructions, data structures, program modules or other data.
  • Computer storage media include RAM, ROM, EPROM, EEPROM, flash memory or other solid state storage technologies, CD-ROM, DVD or other optical storage, tape cartridges, magnetic tape, magnetic disk storage or other magnetic storage devices.
  • RAM random access memory
  • ROM read only memory
  • EPROM Erasable programmable read-only memory
  • EEPROM electrically erasable programmable read-only memory
  • the server 500 can also be operated by a remote computer connected to the network through a network such as the Internet. That is, the server 500 can be connected to the network 512 through a network interface unit 511 connected to the system bus 505, or can be connected to other types of networks or remote computer systems (not shown) using the network interface unit 511. .
  • a computer readable storage medium having stored therein at least one instruction, at least one program, a code set or a set of instructions, the at least one instruction, the at least one program
  • the code set or instruction set is loaded and executed by a processor of the server to implement the various steps in the above method embodiments.
  • the above computer readable storage medium may be a ROM, a RAM, a CD-ROM, a magnetic tape, a floppy disk, an optical data storage device, or the like.
  • a plurality as referred to herein means two or more.
  • "and/or” describing the association relationship of the associated objects, indicating that there may be three relationships, for example, A and/or B, which may indicate that there are three cases where A exists separately, A and B exist at the same time, and B exists separately.
  • the character "/" generally indicates that the contextual object is an "or" relationship.

Landscapes

  • Engineering & Computer Science (AREA)
  • Physics & Mathematics (AREA)
  • General Physics & Mathematics (AREA)
  • Multimedia (AREA)
  • Theoretical Computer Science (AREA)
  • Image Analysis (AREA)
  • Alarm Systems (AREA)

Abstract

本申请实施例公开了一种获取对象密度的方法、装置、设备及存储介质,属于图像分析技术领域。所述方法包括:获取在目标时段内的n个不同时刻采集的目标区域的n张监控图片,n为大于1的整数;识别每张监控图片中包含的对象;获取每张监控图片对应的距离差异信息,距离差异信息用于指示监控图片中包含的对象之间的距离的差异程度;根据n张监控图片各自对应的距离差异信息,确定目标区域在目标时段内的对象密度。本申请实施例提供的技术方案实现过程中无需构建和训练模型,降低了方案的实现复杂度和实施要求。

Description

获取对象密度的方法、装置、设备及存储介质
本申请要求于2017年06月16日提交中华人民共和国国家知识产权局、申请号为201710461619.6、发明名称为“获取对象密度的方法及装置”的中国专利申请的优先权,其全部内容通过引用结合在本申请中。
技术领域
本申请实施例涉及图像分析技术领域,特别涉及一种获取对象密度的方法、装置、设备及存储介质。
背景技术
随着城市人口密集度急剧增大,许多公共基础设施经常会迎来短期的人流高峰,人群的高度拥挤容易引发各种突发事件。因此对公共基础设施等场所进行人群密度测算,进而进行后续的管理、协调是十分必要的。
在平安城市建设的推动下,目前很多场所都已安装摄像头,通过对摄像头采集的监控视频进行分析,可以确定相应场所的人群密度。在相关技术中,提供了一种基于视频分析以获取人群密度的方法,其主要包括如下两个步骤:(1)训练人群密度估计模型,(2)采用训练完成的人群密度估计模型预测人群密度。在步骤(1)中,获取大量的监控视频样本,人工统计各个监控视频样本中的人群密度数据,并从各个监控视频样本中提取图像的前景、边缘、纹理等特征,根据上述样本数据采用回归函数训练生成人群密度估计模型的模型参数,得到人群密度估计模型,采用该模型根据提取的特征和模型参数计算得到人群密度。在步骤(2)中,获取在目标时段内采集的目标区域的监控视频,从该监控视频中提取与模型训练阶段相同的特征,并利用训练完成的人群密度估计模型根据上述特征,估算得到目标区域在目标时段内的人群密度。
上述相关技术提供的方案需要构建人群密度估计模型,并对该模型进行训练,由于模型训练阶段需要人工统计人群密度数据,因此模型训练需要耗费较多的人力和时间成本,导致方案的实现复杂度较高。并且,上述相关技术提供的方案还需要获取大量的样本数据,在样本数据缺失的情况下,方案实施后所 估计得到的人群密度的准确度较低。
发明内容
本申请实施例提供了一种获取对象密度的方法、装置、设备及存储介质,可用于解决相关技术提供的方案所存在的实现复杂度高、实施要求较高的问题。
一方面,本申请实施例提供一种获取对象密度的方法,所述方法包括:
获取在目标时段内的n个不同时刻采集的目标区域的n张监控图片,所述n为大于1的整数;
识别每张监控图片中包含的对象;
获取每张监控图片对应的距离差异信息,所述距离差异信息用于指示所述监控图片中包含的所述对象之间的距离的差异程度;
根据所述n张监控图片各自对应的距离差异信息,确定所述目标区域在所述目标时段内的对象密度。
另一方面,本申请实施例提供一种获取对象密度的装置,所述装置包括:
图片获取模块,用于获取在目标时段内的n个不同时刻采集的目标区域的n张监控图片,所述n为大于1的整数;
对象识别模块,用于识别每张监控图片中包含的对象;
信息获取模块,用于获取每张监控图片对应的距离差异信息,所述距离差异信息用于指示所述监控图片中包含的所述对象之间的距离的差异程度;
密度确定模块,用于根据所述n张监控图片各自对应的距离差异信息,确定所述目标区域在所述目标时段内的对象密度。
再一方面,本申请实施例提供一种获取对象密度的设备,所述设备包括处理器和存储器,所述存储器中存储有至少一条指令、至少一段程序、代码集或指令集,所述至少一条指令、所述至少一段程序、所述代码集或指令集由所述处理器加载并执行以实现如上述方面所述的获取对象密度的方法。
又一方面,本申请实施例提供一种计算机可读存储介质,所述存储介质中存储有至少一条指令、至少一段程序、代码集或指令集,所述至少一条指令、所述至少一段程序、所述代码集或指令集由处理器加载并执行以实现如上述方面所述的获取对象密度的方法。
又一方面,本申请实施例提供一种计算机程序产品,当该计算机程序产品 被执行时,其用于执行上述方面所述的获取对象密度的方法。
本申请实施例提供的技术方案可以带来以下有益效果:
通过获取在目标时段内采集的目标区域的多张监控图片,分别获取每张监控图片中包含的对象之间的距离,根据该距离的差异程度在多张监控图片中的变化情况,确定目标区域在目标时段内的对象密度,该方案实现过程中无需构建和训练模型,因此一方面,省去了模型构建和训练的过程,使得方案的实现复杂度得到降低,节约了人力和时间成本;另一方面,相较于相关技术,本申请实施例提供的方案中因无需获取大量的样本数据对模型进行训练,所以不会存在需要获取大量的样本数据的需求,因此方案的实施要求更低。
附图说明
为了更清楚地说明本申请实施例中的技术方案,下面将对实施例描述中所需要使用的附图作简单地介绍,显而易见地,下面描述中的附图仅仅是本申请的一些实施例,对于本领域普通技术人员来讲,在不付出创造性劳动的前提下,还可以根据这些附图获得其他的附图。
图1是本申请一个实施例提供的应用场景的示意图;
图2是本申请一个实施例提供的获取对象密度的方法的流程图;
图3是本申请一个实施例提供的获取对象间距的示意图;
图4是本申请一个实施例提供的获取对象密度的装置的框图;
图5是本申请一个实施例提供的服务器的结构示意图。
具体实施方式
为使本申请的目的、技术方案和优点更加清楚,下面将结合附图对本申请实施方式作进一步地详细描述。
请参考图1,其示出了本申请一个实施例提供的应用场景的示意图。该应用场景可以包括:至少一个摄像头110和服务器120。
摄像头110部署在某一区域的上方或者斜上方,用于采集该区域内的监控图像(如监控视频或者监控图片)。监控图像中记录有该区域内的对象(如人群)的流动状况。上述区域可以是任意对对象密度(如人群密度)有统计需求的区域。例如,以获取人群密度为例,上述区域可以是人流量较大的过道、店 铺、出入口等区域。
摄像头110与服务器120之间具有通信连接,该通信连接可以是有线网络连接,也可以是无线网络连接。摄像头110通过上述通信连接将采集的监控图像发送给服务器120,由服务器120对监控图像进行分析以确定出对象密度。
服务器120可以是一台服务器,也可以是由多台服务器组成的服务器集群,或者是一个云计算服务中心。
在实际应用中,同一块区域可以在多个角度(例如前后两个角度)部署多个摄像头110,从不同的拍摄角度获取监控图像,并综合对该多个不同角度的监控图像的分析结果,估计该区域内的对象密度,从而可以避免因单一拍摄角度的视角限制而造成的估计结果不准确。
另外,在下述方法实施例中,主要以各步骤的执行主体为服务器120进行举例说明。在摄像头110的处理能力允许的情况下,也可以由摄像头110直接对采集的监控图像进行分析以确定出对象密度,本申请实施例对此不作限定。
本申请实施例提供的技术方案,可应用于公安消防等领域,通过对一些特定区域内的人群密度进行分析,在人群密度超标时可以进行提前预警,以免出现拥堵、甚至人群踩踏事故的发生,具有较高的实际应用价值。
请参考图2,其示出了本申请一个实施例提供的获取对象密度的方法的流程图。在本实施例中,以各步骤的执行主体为服务器进行举例说明。在本实施例中,以获取人群密度为例对本申请实施例提供的技术方案进行介绍说明。该方法可以包括如下几个步骤。
步骤201,获取在目标时段内的n个不同时刻采集的目标区域的n张监控图片,n为大于1的整数。
当需要对目标区域内的人群密度进行估计时,可以在目标区域的上方或者斜上方部署摄像头,由摄像头采集目标区域的监控图像。其中,监控图像可以是监控视频,也可以是监控图片。目标区域可以是任意对人群密度有统计需求的区域,例如人流量较大的过道、店铺、出入口等区域。
在一种可能的实现方式中,摄像头采集目标区域的监控视频。相应地,服务器获取在目标时段内采集的目标区域的监控视频,从监控视频中每隔预设时间间隔提取一帧图片,得到n张监控图片。
在另一种可能的实现方式中,摄像头每隔预设时间间隔拍摄一张目标区域 的监控图片。相应地,服务器获取摄像头在目标时段内的n个不同时刻拍摄的目标区域的n张监控图片。
在上述两种实现方式中,预设时间间隔是预先设定的经验值,相邻两个预设时间间隔可以相同,也可以不同。例如,每一个预设时间间隔均相同,且为10秒。
另外,上述n张监控图片由同一个摄像头在n个不同时刻采集得到。
步骤202,识别每张监控图片中包含的对象。
在本实施例中,以获取人群密度为例对本申请实施例提供的技术方案进行介绍说明。相应地,对象则为人体头部(下文简称“人头”)图像。服务器识别每张监控图片中包含的人头图像。在本申请实施例中,对识别人头图像所采用的算法不作限定。例如,可以采用基于对图片的纹理、色彩、边缘等特征的分析算法,实现人头图像识别。
可选地,服务器在执行上述步骤202之前,还执行如下步骤:服务器确定监控图片中的待识别区域。待识别区域是指监控图片中对象的可移动区域,每张监控图片中的待识别区域的位置相同。可移动区域是指对象可移动至的区域。例如,可移动区域是指可供对象移动的地面区域,而监控图片中的非地面区域(如墙壁、台面、围栏、障碍物等区域)则为非可移动区域。以获取人群密度为例,可移动区域是指人可移动至的区域。摄像头所采集的监控图片中除包括可移动区域以外,还有可能包括一些非可移动区域,非可移动区域是指对象无法移动至的区域,例如墙壁、台面、围栏、障碍物等区域。待识别区域在监控图片中的位置可以预先设定,也可以通过对若干张监控图片中的对象的可移动区域进行分析后确定。之后,服务器识别每张监控图片的待识别区域中包含的对象。通过从每张监控图片中的待识别区域中识别对象,从而无需从整个监控图片中识别对象,有助于减少计算量。
步骤203,获取每张监控图片对应的距离差异信息。
距离差异信息用于指示监控图片中包含的对象之间的距离的差异程度。
可选地,步骤203包括如下两个子步骤:
步骤203a,获取每张监控图片对应的对象间距集,对象间距集是指监控图片中包含的对象之间的距离所构成的集合;
在一种可能的实现方式中,对于每一张监控图片,服务器获取监控图片中每两个对象之间的距离,得到对象间距集。假设某一监控图片中包括m个人头 图像,则该监控图片对应的对象间距集中包括[m×(m-1)]/2个距离,m为大于1的整数。
在另一种可能的实现方式中,步骤203a包括如下几个子步骤:
步骤203a1,对于每一张监控图片,从监控图片中选取任意一个对象作为第一对象;
例如,从监控图片中随机选择一个对象作为第一对象。又例如,从监控图片中选择左上角的一个对象作为第一对象。
以获取人群密度为例,如图3所示,监控图片31中包含多个人头图像(每一个圆圈代表一个人头图像),服务器首先确定监控图片31中的待识别区域32(图中虚线框所示)的位置,然后从上述待识别区域32中识别出人头图像,然后选取任意一个人头图像作为第一人头图像(如图中标识的人头图像A)。
步骤203a2,从监控图片中选取第二对象,并记录第一对象与第二对象之间的距离;
第二对象是指监控图片中未被选取的对象中距离第一对象最近的一个对象。例如,服务器首先获取监控图片中未被选取的每一个对象与第一对象之间的距离,而后记录距离最小值,并将该距离最小值对应的对象作为第二对象。
可选地,当监控图片中未被选取的对象中存在多个对象与第一对象之间的距离相同且为距离最小值时,服务器从该多个对象中选取任意一个对象作为第二对象。
如图3所示,假设人头图像B与人头图像A之间的距离最小,则将人头图像B作为第二人头图像。在图3中,黑色线段的长度表示人头图像A和人头图像B之间的距离。
步骤203a3,检测监控图片中是否还存在未被选取的对象;
步骤203a4,若监控图片中还存在未被选取的对象,则从监控图片中选取第三对象,并记录第二对象与第三对象之间的距离,第三对象是指监控图片中未被选取的对象中距离第二对象最近的一个对象;以此类推,直至监控图片中不存在未被选取的对象;
步骤203a5,若监控图片中不存在未被选取的对象,则整合记录的各个距离得到监控图片对应的对象间距集。
通过上述方式,假设某一监控图片中包括m个人头图像,则该监控图片对应的对象间距集中包括m-1个距离,m为大于1的整数。
采用上述第二种可能的实现方式获取监控图片对应的对象间距集,能够更好地适用于对不同分布形态(例如对象分布区域的大小、形状等不同)的各个对象之间的距离进行获取,使得最终获取的距离更加准确,更能够反映真实的密集程度。例如,获取对象分布区域中距离最远的两个对象之间的距离,其并不能够准确反映出区域内对象的密集程度,会影响到后续分析结果的准确性,而获取距离最近的两个对象之间的距离能够更好地反映出区域内对象的密集程度。
在又一种可能的实现方式中,对于每一张监控图片中的每一个对象,服务器获取该对象对应的至少一个距离,该监控图片对应的对象间距集包括该监控图片中包括的各个对象各自对应的至少一个距离。一个对象对应的至少一个距离中至少包括该对象与其距离最近的另一对象之间的距离,可选地,上述至少一个距离中还包括该对象与至少一个其它对象之间的距离。
例如,服务器从某一监控图片中识别出4个人头图像,分别记为人头图像A、人头图像B、人头图像C和人头图像D。假设与人头图像A距离最近的人头图像为B、与人头图像B距离最近的人头图像为A、与人头图像C距离最近的人头图像为A、与人头图像D距离最近的人头图像为B。则,服务器获取的人头图像A对应的至少一个距离中包括:人头图像A与B之间的距离,可选地还包括人头图像A与C之间的距离和/或人头图像A与D之间的距离;类似地,服务器获取的人头图像C对应的至少一个距离中包括:人头图像C与A之间的距离,可选地还包括人头图像C与B之间的距离和/或人头图像C与D之间的距离。之后,服务器将获取的各个距离进行整合,得到该监控图片对应的对象间距集。
另外,在本申请实施例中,两个对象之间的距离,可以是两个对象的中心点之间的距离。以人头图像为例,两个人头图像之间的距离是指其中一个人头图像的中心点与另一个人头图像的中心点之间的距离。
可选地,采用下述方式确定对象的中心点:对于每一个对象,获取该对象的最小边界框,将该最小边界框的中心点确定为该对象的中心点。对象的最小边界框是指将该对象包含在内的最小图形。示例性地,上述最小图形可以是最小矩形区域,也可以是最小圆形区域。
步骤203b,分别根据每张监控图片对应的对象间距集,获取每张监控图片对应的距离差异信息。
在一种可能的实现方式中,对于每一张监控图片,服务器计算监控图片对应的对象间距集中包括的各个距离的方差,并将该方差确定为监控图片对应的距离差异信息。对象间距集中包括的各个距离的方差反映了各个距离的差异程度,方差越大表明各个距离的差异程度越大,方差越小表明各个距离的差异程度越小。并且,采用方差能够将上述差异程度在数值的表现上进行放大,更易体现出差异程度。
当然,在其它可能的实现方式中,也可计算监控图片对应的对象间距集中包括的各个距离的标准差或者极差等参数,并将上述参数作为监控图片对应的距离差异信息,本实施例对此不作限定。
步骤204,根据n张监控图片各自对应的距离差异信息,确定目标区域在目标时段内的对象密度。
服务器获取n张监控图片各自对应的方差的波动程度,如果方差的波动程度较大,则表明对象间距的变化较为明显,此时对象移动较为频繁,对象密度应当较低;如果方差的波动程度较小,则表明对象间距的变化不够明显,此时对象移动不够明显,对象密度应当较高。
在一种可能的实现方式中,服务器在计算出n张监控图片各自对应的方差之后,计算方差的最大值与最小值之间的差值,并根据该差值确定目标区域在目标时段内的对象密度。例如,服务器中可以预先设定不同的差值取值区间与不同的对象密度等级之间的对应关系,如差值区间1对应的对象密度等级为低、差值区间2对应的对象密度等级为中、差值区间3对应的对象密度等级为高,在计算出方差的最大值与最小值之间的差值之后,确定该差值所属的差值取值区间,并得到相应的对象密度等级。
可选地,当确定出目标区域在目标时段内的对象密度超标时,发出预警信息,以便于相关人员及时根据上述预警信息将对象进行引导疏散,避免出现长期拥堵等情况发生。
综上所述,本申请实施例提供的方法,通过获取在目标时段内采集的目标区域的多张监控图片,分别获取每张监控图片中包含的对象之间的距离,根据该距离的差异程度在多张监控图片中的变化情况,确定目标区域在目标时段内的对象密度,该方案实现过程中无需构建和训练模型,因此一方面,省去了模型构建和训练的过程,使得方案的实现复杂度得到降低,节约了人力和时间成本;另一方面,相较于相关技术,本申请实施例提供的方案中因无需获取大量 的样本数据对模型进行训练,所以不会存在需要获取大量的样本数据的需求,因此方案的实施要求更低。
需要补充说明的一点是,考虑到摄像头是部署在目标区域的上方或者斜上方,其采集到的人头很可能仅包括头发,这导致在人头识别时较难将人头与相似物体进行区分。针对上述情况,可以采用如下方式提高人头识别精度:(1)在硬件条件允许的情况下,采用高清摄像头,高清摄像头采集的监控图像中人头特征和物体特征有较大差异;(2)将摄像头尽可能部署在能够拍摄到部分人脸特征的位置和角度,基于人脸特征确定人头。
还需要补充说明的一点是,如果在目标区域上方的多个不同角度部署多个摄像头,从不同的拍摄角度获取目标区域的监控图像,则可以采用上述图2实施例提供的方法,分别根据每一个摄像头采集的监控图像确定出目标区域在目标时段内的对象密度,而后综合计算得到的各个对象密度,确定出最终的对象密度。例如,在目标区域上方的2个不同角度部署2个摄像头,每一个摄像头分别拍摄获取目标区域的监控图像,假设根据其中一个摄像头采集的监控图像确定出目标区域在目标时段内的对象密度为a,根据另一个摄像头采集的监控图像确定出目标区域在目标时段内的对象密度为b,则可以将a和b的平均值最终作为目标区域在目标时段内的对象密度。
还需要补充说明的一点是,除了对人群密度进行分析之外,采用本申请实施例提供的技术方案还可以对其它具有移动特性的物体或生物的密集程度进行分析,如停车场的车辆、大型港口的船舶、养殖场的动物等。在图2实施例中,仅以对人群密度进行分析为例对本申请实施例提供的技术方案进行介绍说明,本申请实施例提供的技术方案对上述列举的其它应用场景同样适用。
在一个示例中,以获取停车场的车辆密度为例,可以在停车场区域的上方部署至少一个摄像头,对于某一摄像头(如目标摄像头)所拍摄的目标区域内的车辆密度,可以通过如下步骤获取得到:
1、获取目标摄像头在目标时段内的n个不同时刻采集的目标区域的n张监控图片,n为大于1的整数;
2、识别每张监控图片中包含的车辆;
3、获取每张监控图片对应的距离差异信息,该距离差异信息用于指示监控图片中包含的车辆之间的距离的差异程度;
4、根据n张监控图片各自对应的距离差异信息,确定目标区域在目标时段内的车辆密度。
上述各个步骤的具体实现过程可以参考图2实施例中的介绍说明。
在实际应用中,如停车场面积较大且需获取整个停车场的车辆密度时,则可以将停车场划分为多个子区域,每一个子区域上方部署一个摄像头,通过一个摄像头采集一个子区域内的监控视频,这样便可获取到每一个子区域内的车辆密度,之后,根据各个子区域内的车辆密度即可确定出整个停车场的车辆密度。例如,将各个子区域内的车辆密度的平均值作为整个停车场的车辆密度。
下述为本申请装置实施例,可以用于执行本申请方法实施例。对于本申请装置实施例中未披露的细节,请参照本申请方法实施例。
请参考图4,其示出了本申请一个实施例提供的获取对象密度的装置的框图。该装置具有实现上述方法示例的功能。所述功能可以由硬件实现,也可以由硬件执行相应的软件实现。该装置可以包括:图片获取模块410、对象识别模块420、信息获取模块430和密度确定模块440。
图片获取模块410,用于获取在目标时段内的n个不同时刻采集的目标区域的n张监控图片,所述n为大于1的整数。
对象识别模块420,用于识别每张监控图片中包含的对象。
信息获取模块430,用于获取每张监控图片对应的距离差异信息,所述距离差异信息用于指示所述监控图片中包含的所述对象之间的距离的差异程度。
密度确定模块440,用于根据所述n张监控图片各自对应的距离差异信息,确定所述目标区域在所述目标时段内的对象密度。
在基于图4实施例提供的另一个可选实施例中,所述信息获取模块,包括:距离获取单元和信息获取单元。
距离获取单元,用于获取每张监控图片对应的对象间距集,所述对象间距集是指所述监控图片中包含的所述对象之间的距离所构成的集合。
信息获取单元,用于分别根据每张监控图片对应的对象间距集,获取每张监控图片对应的距离差异信息。
可选地,所述距离获取单元,用于:
对于每一张监控图片,从所述监控图片中选取任意一个对象作为第一对象;
从所述监控图片中选取第二对象,并记录所述第一对象与所述第二对象之间的距离,所述第二对象是指所述监控图片中未被选取的对象中距离所述第一对象最近的一个对象;
若所述监控图片中还存在未被选取的对象,则从所述监控图片中选取第三对象,并记录所述第二对象与所述第三对象之间的距离,所述第三对象是指所述监控图片中未被选取的对象中距离所述第二对象最近的一个对象;以此类推,直至所述监控图片中不存在未被选取的对象。
可选地,所述信息获取单元,用于对于每一张监控图片,计算所述监控图片对应的对象间距集中包括的各个所述距离的方差,并将所述方差确定为所述监控图片对应的距离差异信息。
在基于图4实施例提供的另一个可选实施例中,所述装置还包括:区域确定模块。
区域确定模块,用于确定所述监控图片中的待识别区域,其中,所述待识别区域是指所述监控图片中所述对象的可移动区域,且每张监控图片中的待识别区域的位置相同。
所述对象识别模块,用于识别每张监控图片的待识别区域中包含的对象。
在基于图4实施例提供的另一个可选实施例中,所述图片获取模块,包括:视频获取单元和图片提取单元。
视频获取单元,用于获取在所述目标时段内采集的所述目标区域的监控视频。
图片提取单元,用于从所述监控视频中每隔预设时间间隔提取一帧图片,得到所述n张监控图片。
需要说明的是,上述实施例提供的装置在实现其功能时,仅以上述各功能模块的划分进行举例说明,实际应用中,可以根据需要而将上述功能分配由不同的功能模块完成,即将设备的内部结构划分成不同的功能模块,以完成以上描述的全部或者部分功能。另外,上述实施例提供的装置与方法实施例属于同一构思,其具体实现过程详见方法实施例,这里不再赘述。
请参考图5,其示出了本申请一个实施例提供的服务器的结构示意图。该服务器用于实施上述实施例中提供的获取对象密度的方法。具体来讲:
所述服务器500包括中央处理单元(CPU)501、包括随机存取存储器(RAM)502和只读存储器(ROM)503的系统存储器504,以及连接系统存储器504和中央处理单元501的系统总线505。所述服务器500还包括帮助计算机内的各个器件之间传输信息的基本输入/输出系统(I/O系统)506,和用于存储操作系统513、应用程序514和其他程序模块515的大容量存储设备507。
所述基本输入/输出系统506包括有用于显示信息的显示器508和用于用户输入信息的诸如鼠标、键盘之类的输入设备509。其中所述显示器508和输入设备509都通过连接到系统总线505的输入输出控制器510连接到中央处理单元501。所述基本输入/输出系统506还可以包括输入输出控制器510以用于接收和处理来自键盘、鼠标、或电子触控笔等多个其他设备的输入。类似地,输入输出控制器510还提供输出到显示屏、打印机或其他类型的输出设备。
所述大容量存储设备507通过连接到系统总线505的大容量存储控制器(未示出)连接到中央处理单元501。所述大容量存储设备507及其相关联的计算机可读介质为服务器500提供非易失性存储。也就是说,所述大容量存储设备507可以包括诸如硬盘或者CD-ROM驱动器之类的计算机可读介质(未示出)。
不失一般性,所述计算机可读介质可以包括计算机存储介质和通信介质。计算机存储介质包括以用于存储诸如计算机可读指令、数据结构、程序模块或其他数据等信息的任何方法或技术实现的易失性和非易失性、可移动和不可移动介质。计算机存储介质包括RAM、ROM、EPROM、EEPROM、闪存或其他固态存储其技术,CD-ROM、DVD或其他光学存储、磁带盒、磁带、磁盘存储或其他磁性存储设备。当然,本领域技术人员可知所述计算机存储介质不局限于上述几种。上述的系统存储器504和大容量存储设备507可以统称为存储器。
根据本申请的各种实施例,所述服务器500还可以通过诸如因特网等网络连接到网络上的远程计算机运行。也即服务器500可以通过连接在所述系统总线505上的网络接口单元511连接到网络512,或者说,也可以使用网络接口单元511来连接到其他类型的网络或远程计算机系统(未示出)。
所述存储器中存储有至少一条指令、至少一段程序、代码集或指令集,所述至少一条指令、所述至少一段程序、所述代码集或指令集由所述处理器加载并执行以实现上述获取对象密度的方法。
在示例性实施例中,还提供了一种计算机可读存储介质,所述存储介质中存储有至少一条指令、至少一段程序、代码集或指令集,所述至少一条指令、所述至少一段程序、所述代码集或指令集由服务器的处理器加载并执行以实现上述方法实施例中的各个步骤。可选地,上述计算机可读存储介质可以是ROM、RAM、CD-ROM、磁带、软盘和光数据存储设备等。
在示例性实施例中,还提供了一种计算机程序产品,当该计算机程序产品被执行时,其用于实现上述方法实施例中的各个步骤的功能。
应当理解的是,在本文中提及的“多个”是指两个或两个以上。“和/或”,描述关联对象的关联关系,表示可以存在三种关系,例如,A和/或B,可以表示:单独存在A,同时存在A和B,单独存在B这三种情况。字符“/”一般表示前后关联对象是一种“或”的关系。
以上所述仅为本申请的示例性实施例,并不用以限制本申请,凡在本申请的精神和原则之内,所作的任何修改、等同替换、改进等,均应包含在本申请的保护范围之内。

Claims (14)

  1. 一种获取对象密度的方法,其特征在于,所述方法包括:
    获取在目标时段内的n个不同时刻采集的目标区域的n张监控图片,所述n为大于1的整数;
    识别每张监控图片中包含的对象;
    获取每张监控图片对应的距离差异信息,所述距离差异信息用于指示所述监控图片中包含的所述对象之间的距离的差异程度;
    根据所述n张监控图片各自对应的距离差异信息,确定所述目标区域在所述目标时段内的对象密度。
  2. 根据权利要求1所述的方法,其特征在于,所述获取每张监控图片对应的距离差异信息,包括:
    获取每张监控图片对应的对象间距集,所述对象间距集是指所述监控图片中包含的所述对象之间的距离所构成的集合;
    分别根据每张监控图片对应的对象间距集,获取每张监控图片对应的距离差异信息。
  3. 根据权利要求2所述的方法,其特征在于,所述获取每张监控图片对应的对象间距集,包括:
    对于每一张监控图片,从所述监控图片中选取任意一个对象作为第一对象;
    从所述监控图片中选取第二对象,并记录所述第一对象与所述第二对象之间的距离,所述第二对象是指所述监控图片中未被选取的对象中距离所述第一对象最近的一个对象;
    若所述监控图片中还存在未被选取的对象,则从所述监控图片中选取第三对象,并记录所述第二对象与所述第三对象之间的距离,所述第三对象是指所述监控图片中未被选取的对象中距离所述第二对象最近的一个对象;以此类推,直至所述监控图片中不存在未被选取的对象时,整合记录的各个距离得到所述监控图片对应的对象间距集。
  4. 根据权利要求2所述的方法,其特征在于,所述分别根据每张监控图片对应的对象间距集,获取每张监控图片对应的距离差异信息,包括:
    对于每一张监控图片,计算所述监控图片对应的对象间距集中包括的各个所述距离的方差,并将所述方差确定为所述监控图片对应的距离差异信息。
  5. 根据权利要求1至4任一项所述的方法,其特征在于,所述识别每张监控图片中包含的对象之前,还包括:
    确定所述监控图片中的待识别区域,其中,所述待识别区域是指所述监控图片中所述对象的可移动区域,且每张监控图片中的待识别区域的位置相同;
    所述识别每张监控图片中包含的对象,包括:
    识别每张监控图片的待识别区域中包含的对象。
  6. 根据权利要求1至4任一项所述的方法,其特征在于,所述获取在目标时段内的n个不同时刻采集的目标区域的n张监控图片,包括:
    获取在所述目标时段内采集的所述目标区域的监控视频;
    从所述监控视频中每隔预设时间间隔提取一帧图片,得到所述n张监控图片。
  7. 一种获取对象密度的装置,其特征在于,所述装置包括:
    图片获取模块,用于获取在目标时段内的n个不同时刻采集的目标区域的n张监控图片,所述n为大于1的整数;
    对象识别模块,用于识别每张监控图片中包含的对象;
    信息获取模块,用于获取每张监控图片对应的距离差异信息,所述距离差异信息用于指示所述监控图片中包含的所述对象之间的距离的差异程度;
    密度确定模块,用于根据所述n张监控图片各自对应的距离差异信息,确定所述目标区域在所述目标时段内的对象密度。
  8. 根据权利要求7所述的装置,其特征在于,所述信息获取模块,包括:
    距离获取单元,用于获取每张监控图片对应的对象间距集,所述对象间距集是指所述监控图片中包含的所述对象之间的距离所构成的集合;
    信息获取单元,用于分别根据每张监控图片对应的对象间距集,获取每张监控图片对应的距离差异信息。
  9. 根据权利要求8所述的装置,其特征在于,所述距离获取单元,用于:
    对于每一张监控图片,从所述监控图片中选取任意一个对象作为第一对象;
    从所述监控图片中选取第二对象,并记录所述第一对象与所述第二对象之间的距离,所述第二对象是指所述监控图片中未被选取的对象中距离所述第一对象最近的一个对象;
    若所述监控图片中还存在未被选取的对象,则从所述监控图片中选取第三对象,并记录所述第二对象与所述第三对象之间的距离,所述第三对象是指所述监控图片中未被选取的对象中距离所述第二对象最近的一个对象;以此类推,直至所述监控图片中不存在未被选取的对象时,整合记录的各个距离得到所述监控图片对应的对象间距集。
  10. 根据权利要求8所述的装置,其特征在于,
    所述信息获取单元,用于对于每一张监控图片,计算所述监控图片对应的对象间距集中包括的各个所述距离的方差,并将所述方差确定为所述监控图片对应的距离差异信息。
  11. 根据权利要求7至10任一项所述的装置,其特征在于,所述装置还包括:
    区域确定模块,用于确定所述监控图片中的待识别区域,其中,所述待识别区域是指所述监控图片中所述对象的可移动区域,且每张监控图片中的待识别区域的位置相同;
    所述对象识别模块,用于识别每张监控图片的待识别区域中包含的对象。
  12. 根据权利要求7至10任一项所述的装置,其特征在于,所述图片获取模块,包括:
    视频获取单元,用于获取在所述目标时段内采集的所述目标区域的监控视频;
    图片提取单元,用于从所述监控视频中每隔预设时间间隔提取一帧图片,得到所述n张监控图片。
  13. 一种获取对象密度的设备,其特征在于,所述设备包括处理器和存储 器,所述存储器中存储有至少一条指令、至少一段程序、代码集或指令集,所述至少一条指令、所述至少一段程序、所述代码集或指令集由所述处理器加载并执行以实现如权利要求1至6任一项所述的获取对象密度的方法。
  14. 一种计算机可读存储介质,其特征在于,所述存储介质中存储有至少一条指令、至少一段程序、代码集或指令集,所述至少一条指令、所述至少一段程序、所述代码集或指令集由处理器加载并执行以实现如权利要求1至6任一项所述的获取对象密度的方法。
PCT/CN2018/088751 2017-06-16 2018-05-28 获取对象密度的方法、装置、设备及存储介质 WO2018228174A1 (zh)

Applications Claiming Priority (2)

Application Number Priority Date Filing Date Title
CN201710461619.6A CN108288017A (zh) 2017-06-16 2017-06-16 获取对象密度的方法及装置
CN201710461619.6 2017-06-16

Publications (1)

Publication Number Publication Date
WO2018228174A1 true WO2018228174A1 (zh) 2018-12-20

Family

ID=62831402

Family Applications (1)

Application Number Title Priority Date Filing Date
PCT/CN2018/088751 WO2018228174A1 (zh) 2017-06-16 2018-05-28 获取对象密度的方法、装置、设备及存储介质

Country Status (2)

Country Link
CN (1) CN108288017A (zh)
WO (1) WO2018228174A1 (zh)

Cited By (6)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN111260716A (zh) * 2020-02-28 2020-06-09 北京三快在线科技有限公司 商户座位间隔的确定方法、装置、服务器及存储介质
CN111724442A (zh) * 2020-05-28 2020-09-29 上海商汤智能科技有限公司 图像处理方法及装置、电子设备及存储介质
CN111931567A (zh) * 2020-07-01 2020-11-13 珠海大横琴科技发展有限公司 人体识别的方法及装置、电子设备、存储介质
CN112163471A (zh) * 2020-09-14 2021-01-01 深圳市诺龙技术股份有限公司 一种拥堵检测的方法和装置
CN113837034A (zh) * 2021-09-08 2021-12-24 云从科技集团股份有限公司 聚集人群监控方法、设备及计算机存储介质
CN111931567B (zh) * 2020-07-01 2024-05-28 珠海大横琴科技发展有限公司 人体识别的方法及装置、电子设备、存储介质

Families Citing this family (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN110490103B (zh) * 2019-08-05 2022-06-14 中国铁道科学研究院集团有限公司电子计算技术研究所 轨道交通客流密度检测方法及装置

Citations (2)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN105184274A (zh) * 2015-09-21 2015-12-23 魏运 一种基于深度图像获取客流速度和密度参数的方法
CN106485923A (zh) * 2016-12-20 2017-03-08 武汉理工大学 一种公交拥挤度实时状态采集方法与装置

Patent Citations (2)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN105184274A (zh) * 2015-09-21 2015-12-23 魏运 一种基于深度图像获取客流速度和密度参数的方法
CN106485923A (zh) * 2016-12-20 2017-03-08 武汉理工大学 一种公交拥挤度实时状态采集方法与装置

Cited By (7)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN111260716A (zh) * 2020-02-28 2020-06-09 北京三快在线科技有限公司 商户座位间隔的确定方法、装置、服务器及存储介质
CN111724442A (zh) * 2020-05-28 2020-09-29 上海商汤智能科技有限公司 图像处理方法及装置、电子设备及存储介质
CN111724442B (zh) * 2020-05-28 2022-04-22 上海商汤智能科技有限公司 图像处理方法及装置、电子设备及存储介质
CN111931567A (zh) * 2020-07-01 2020-11-13 珠海大横琴科技发展有限公司 人体识别的方法及装置、电子设备、存储介质
CN111931567B (zh) * 2020-07-01 2024-05-28 珠海大横琴科技发展有限公司 人体识别的方法及装置、电子设备、存储介质
CN112163471A (zh) * 2020-09-14 2021-01-01 深圳市诺龙技术股份有限公司 一种拥堵检测的方法和装置
CN113837034A (zh) * 2021-09-08 2021-12-24 云从科技集团股份有限公司 聚集人群监控方法、设备及计算机存储介质

Also Published As

Publication number Publication date
CN108288017A (zh) 2018-07-17

Similar Documents

Publication Publication Date Title
WO2018228174A1 (zh) 获取对象密度的方法、装置、设备及存储介质
US9560323B2 (en) Method and system for metadata extraction from master-slave cameras tracking system
CN110222640B (zh) 监控场所中嫌疑人的识别方法、装置、方法和存储介质
WO2016149938A1 (zh) 视频监控方法、视频监控系统以及计算机程序产品
US8634601B2 (en) Surveillance-based high-resolution facial recognition
WO2017122258A1 (ja) 混雑状況監視システム
WO2016172870A1 (zh) 视频监控方法、视频监控系统以及计算机程序产品
TW200903386A (en) Target detection and tracking from video streams
US10909388B2 (en) Population density determination from multi-camera sourced imagery
CN112733690A (zh) 一种高空抛物检测方法、装置及电子设备
AU2018379393A1 (en) Monitoring systems, and computer implemented methods for processing data in monitoring systems, programmed to enable identification and tracking of human targets in crowded environments
US11164007B2 (en) Method and system for detecting the owner of an abandoned object from a surveillance video
CN109146411A (zh) 一种工程项目监理、造价、招标、咨询的综合管理系统
US11157728B1 (en) Person detection and identification using overhead depth images
RU2756780C1 (ru) Система и способ формирования отчетов на основании анализа местоположения и взаимодействия сотрудников и посетителей
JP6733766B1 (ja) 解析装置、制御方法、及びプログラム
JP4985742B2 (ja) 撮影システム、方法及びプログラム
CN110287929B (zh) 群体区域中目标的数量确定方法、装置、设备及存储介质
CN114782883A (zh) 基于群体智能的异常行为检测方法、装置和设备
Hung et al. Real-time counting people in crowded areas by using local empirical templates and density ratios
JP2020136855A (ja) 監視システム、監視支援装置、監視方法、監視支援方法及びプログラム
WO2020139071A1 (en) System and method for detecting aggressive behaviour activity
KR102407202B1 (ko) 지능형 영상 분석 장치 및 방법
CN110956644A (zh) 一种运动轨迹确定方法及系统
CN114820692B (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: 18818320

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: 18818320

Country of ref document: EP

Kind code of ref document: A1