CN111666821A - Personnel gathering detection method, device and equipment - Google Patents

Personnel gathering detection method, device and equipment Download PDF

Info

Publication number
CN111666821A
CN111666821A CN202010397678.3A CN202010397678A CN111666821A CN 111666821 A CN111666821 A CN 111666821A CN 202010397678 A CN202010397678 A CN 202010397678A CN 111666821 A CN111666821 A CN 111666821A
Authority
CN
China
Prior art keywords
search
area
pedestrian
pedestrians
center
Prior art date
Legal status (The legal status 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 status listed.)
Granted
Application number
CN202010397678.3A
Other languages
Chinese (zh)
Other versions
CN111666821B (en
Inventor
邵新庆
吕长宝
郭闯世
Current Assignee (The listed assignees may be inaccurate. Google has not performed a legal analysis and makes no representation or warranty as to the accuracy of the list.)
Shenzhen ZNV Technology Co Ltd
Nanjing ZNV Software Co Ltd
Original Assignee
Shenzhen ZNV Technology Co Ltd
Nanjing ZNV Software Co Ltd
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 Shenzhen ZNV Technology Co Ltd, Nanjing ZNV Software Co Ltd filed Critical Shenzhen ZNV Technology Co Ltd
Priority to CN202010397678.3A priority Critical patent/CN111666821B/en
Publication of CN111666821A publication Critical patent/CN111666821A/en
Application granted granted Critical
Publication of CN111666821B publication Critical patent/CN111666821B/en
Active legal-status Critical Current
Anticipated expiration legal-status Critical

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
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06VIMAGE OR VIDEO RECOGNITION OR UNDERSTANDING
    • G06V10/00Arrangements for image or video recognition or understanding
    • G06V10/20Image preprocessing
    • G06V10/25Determination of region of interest [ROI] or a volume of interest [VOI]
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06VIMAGE OR VIDEO RECOGNITION OR UNDERSTANDING
    • G06V40/00Recognition of biometric, human-related or animal-related patterns in image or video data
    • G06V40/10Human or animal bodies, e.g. vehicle occupants or pedestrians; Body parts, e.g. hands

Abstract

The embodiment of the invention provides a method, a device and equipment for detecting personnel aggregation. The method comprises the following steps: acquiring an image of a target area through a camera, and detecting pedestrians in the image to obtain position information of each pedestrian; searching in a search area with a preset size along the pedestrian density increasing direction by taking any pedestrian as a search center; and if the number of the pedestrians in the search area is larger than a preset number threshold, determining that people gather in the area, wherein the preset number threshold is positively correlated with the size of the search area. The method of the embodiment of the invention integrates the position information and the number of the pedestrians, searches along the direction of increasing the density of the pedestrians, can quickly and accurately determine the region with the people gathering in the target region, and solves the problem of low accuracy of small-scale people gathering detection.

Description

Personnel gathering detection method, device and equipment
Technical Field
The invention relates to the technical field of image processing, in particular to a method, a device and equipment for detecting personnel gathering.
Background
With the rapid development of computer science technology and image processing technology, the popularization trend of video monitoring systems is more and more obvious, and the high-definition and intelligentization are gradually advanced. The intelligent monitoring system can be used in a plurality of fields, such as intelligent transportation, intelligent parks, safe cities and the like. With the rapid development of intelligent monitoring systems, the detection of people gathering in monitored areas has become a hot problem. The detection of the people gathering refers to detecting whether a scene of people gathering exists in a picture captured by a camera, and has important application value, for example, for some sensitive monitoring areas, when people gathering occurs, the management risk and the control difficulty of the monitoring area may be increased; in the epidemic situation prevention and control period, people gathering in the street community needs to be warned in time.
At present, for the detection of people gathering, a mainstream method is to train a convolutional neural network based on a deep learning method to fit the people density in an image, and the method is suitable for the large-scale people gathering condition of more than 500 people. There is no effective detection method for small-scale people gathering such as 4-5 people in a local area in a street community. Although the number of people can be detected from the picture captured by the camera by methods such as pedestrian detection, face recognition and the like, people cannot be accurately judged by simply detecting the gathering of people through the number of people, and false detection or missing detection is easily caused. For example, if the number of people who are determined whether people gather is 5, when 10 people are detected from the screen, people gather is determined, and when the 10 people are uniformly dispersed in the screen, people gather does not actually occur, which results in false detection.
Disclosure of Invention
The embodiment of the invention provides a method, a device and equipment for detecting personnel aggregation, which are used for solving the problem of low accuracy of the existing method for detecting the small-scale personnel aggregation.
In a first aspect, an embodiment of the present invention provides a method for detecting people gathering, including:
acquiring an image of a target area through a camera, and detecting pedestrians in the image to obtain position information of each pedestrian;
searching in a search area with a preset size along the pedestrian density increasing direction by taking any pedestrian as a search center;
and if the number of the pedestrians in the search area is larger than a preset number threshold, determining that people gather in the area, wherein the preset number threshold is positively correlated with the size of the search area.
In one embodiment, the searching with a preset size of a search area along the direction of increasing pedestrian density with any pedestrian as a search center comprises:
determining the central points of all pedestrians in a search area according to the position information of each pedestrian by taking any pedestrian as a search center;
and taking the central point as a new search center, and continuing searching until convergence.
In one embodiment, with any pedestrian as a search center, determining the center points of all pedestrians in a search area according to the position information of each pedestrian comprises:
determining offset vectors of all pedestrians and the search center in the search area according to the following formula:
Figure BDA0002488189520000021
wherein L is0Coordinates representing the search center, S0Is represented by L0Search area as center, k denotes S0Number of pedestrians, LjDenotes S0The coordinates of the jth pedestrian in (c),
Figure BDA0002488189520000022
representing an offset vector;
determining the central points of all pedestrians in the search area according to the following formula:
Figure BDA0002488189520000023
wherein L is1Representing the center point of all pedestrians in the search area.
In one embodiment, taking the center point as a new search center, and continuing the search until convergence comprises:
with L1As a new search center, the search is continued until the following formula is satisfied:
||Ln-Ln+1||2<;
wherein is a constant, LnSearch center, L, representing the n +1 searchn+1Representing the search center for the n +2 th search.
In one embodiment, the size of the search area is inversely related to the distance between the camera and the target area.
In one embodiment, the method further comprises: and fusing all search areas with people gathering in the image to obtain a gathering area of the target area.
In one embodiment, after determining that there is a people group in the area, the method further comprises: and outputting alarm information in real time.
In a second aspect, an embodiment of the present invention provides a device for detecting people gathering, including:
the acquisition module is used for acquiring an image of a target area through the camera, and detecting pedestrians in the image to acquire position information of each pedestrian;
the search module is used for searching in a search area with a preset size along the pedestrian density increasing direction by taking any pedestrian as a search center;
the detection module is used for determining that people gather in the area if the number of pedestrians in the search area is larger than a preset number threshold, and the preset number threshold is positively correlated with the size of the search area.
In a third aspect, an embodiment of the present invention provides a device for detecting people gathering, including:
at least one processor and memory;
the memory stores computer-executable instructions;
the at least one processor executes the memory-stored computer-executable instructions to cause the at least one processor to perform the method of detecting people gathering as defined in any one of the first aspects.
In a fourth aspect, an embodiment of the present invention provides a computer-readable storage medium, where computer-executable instructions are stored, and when executed by a processor, the computer-executable instructions are configured to implement the method for detecting people aggregation according to any one of the first aspect.
According to the method, the device and the equipment for detecting the people gathering, provided by the embodiment of the invention, the image of the target area is obtained through the camera, and the pedestrian detection is carried out on the image to obtain the position information of each pedestrian; searching in a search area with a preset size along the pedestrian density increasing direction by taking any pedestrian as a search center; and if the number of the pedestrians in the search area is larger than a preset number threshold, determining that the people gather in the area. By comprehensively considering the position information and the number of the pedestrians instead of simply depending on the number of the pedestrians for detection, false detection and missing detection can be avoided, and the accuracy of gathering detection of the pedestrians is improved; further, by searching in the direction in which the pedestrian density increases, the region in which the person gathers in the target region can be quickly determined, and the detection speed of the person gathers is improved.
Drawings
Fig. 1 is a flowchart of a method for detecting people gathering according to an embodiment of the present invention;
FIG. 2 is a schematic diagram of a detection process for people gathering according to an embodiment of the present invention;
FIG. 3 is a schematic diagram of a detection process for people gathering according to another embodiment of the present invention;
FIG. 4 is a flow chart of a method for detecting people gathering according to another embodiment of the present invention;
FIG. 5 is a schematic structural diagram of an embodiment of a device for detecting people gathering according to the present invention;
fig. 6 is a schematic structural diagram of an embodiment of a detection apparatus for people gathering provided by the present invention.
Detailed Description
The present invention will be described in further detail with reference to the following detailed description and accompanying drawings. Wherein like elements in different embodiments are numbered with like associated elements. In the following description, numerous details are set forth in order to provide a better understanding of the present application. However, those skilled in the art will readily recognize that some of the features may be omitted or replaced with other elements, materials, methods in different instances. In some instances, certain operations related to the present application have not been shown or described in detail in order to avoid obscuring the core of the present application from excessive description, and it is not necessary for those skilled in the art to describe these operations in detail, so that they may be fully understood from the description in the specification and the general knowledge in the art.
Furthermore, the features, operations, or characteristics described in the specification may be combined in any suitable manner to form various embodiments. Also, the various steps or actions in the method descriptions may be transposed or transposed in order, as will be apparent to one of ordinary skill in the art. Thus, the various sequences in the specification and drawings are for the purpose of describing certain embodiments only and are not intended to imply a required sequence unless otherwise indicated where such sequence must be followed.
The numbering of the components as such, e.g., "first", "second", etc., is used herein only to distinguish the objects as described, and does not have any sequential or technical meaning. The term "connected" and "coupled" when used in this application, unless otherwise indicated, includes both direct and indirect connections (couplings).
The detection method for small-scale personnel gathering has important application value in scenes such as epidemic prevention and control, abnormal behavior detection and the like. Taking epidemic situation prevention and control as an example, in order to avoid cross infection caused by people gathering, whether people gathering occurs or not and an area where people gathering occurs need to be judged quickly and accurately. This application is in order to solve present simply through personnel's quantity measurement personnel gathering, and unable accurate judgement gathering degree easily causes the false retrieval or neglected examination, and the problem that the rate of accuracy is low carries out accurate judgement to the gathering degree through the quantity and the positional information of the pedestrian in the comprehensive consideration target area to detect along the direction of pedestrian density increase, can improve detection speed. The method provided by the present application is described in detail below by way of examples.
Fig. 1 is a flowchart of a method for detecting people gathering according to an embodiment of the present invention. As shown in fig. 1, the method for detecting people gathering provided by this embodiment may include:
s101, acquiring an image of a target area through a camera, and detecting pedestrians in the image to obtain position information of each pedestrian.
The camera in this embodiment may be a camera installed at a fixed position, such as a monitoring camera set in a community or in a street; the camera that moves along with unmanned aerial vehicle's flight is installed on unmanned aerial vehicle also can, like epidemic situation prevention and control phase, carry on the camera through unmanned aerial vehicle and carry out video monitoring.
The target area in this embodiment is an area to be detected, and may be, for example, a public area such as a hall and a road in a community. After the image of the target area is acquired, the position information of each pedestrian is obtained by performing pedestrian detection on the image. In this embodiment, the pedestrian detection method that may be present or may appear in the future may be adopted to detect the pedestrian of the image, which is not limited by this embodiment.
In an alternative embodiment, the position information for each pedestrian may be represented by a rectangle. Specifically, the upper left coordinate and the lower right coordinate of the rectangle may be used for representation, or the upper left coordinate, the width of the rectangle, and the height of the rectangle may be used for representation. For example, the position information of each pedestrian may be represented as [ x ]j,yj,wj,hj]Wherein x isj,yjCoordinate value of upper left corner of rectangle for representing jth pedestrian in image to surround human body, wjAnd hjRespectively representing the width and height of a rectangle surrounding the human body in the image for the jth pedestrian.
And S102, searching in a search area with a preset size along the pedestrian density increasing direction by taking any pedestrian as a search center.
In the present embodiment, after the position information of each pedestrian is obtained, any one of the pedestrians may be selected with the pedestrian as a search center. If the position information is represented by a rectangle, the center of the rectangle may be used as the search center. For example, if the position information of the pedestrian is represented as [ x ]j,yj,wj,hj]Then the search center can be expressed as:
Figure BDA0002488189520000051
wherein, CHTo search for the abscissa of the center, CVIs the ordinate of the search center.
In order to quickly determine the region in the target region where people gather, the search is performed in the direction in which the pedestrian density increases in the present embodiment. It is understood that the higher the pedestrian density, the higher the probability of the presence of a people gather in the area. Therefore, searching in the direction in which the pedestrian density increases can improve the detection speed.
In this embodiment, the shape of the search area may be, for example, a rectangle, a square, a circle, or the like, the size of the search area may be set as needed, and taking an image acquired by a 1080P camera as an example, the search area may be a square area with a side length of 100 pixels.
In order to further improve the accuracy of the detection of the gathering of people, in an alternative embodiment the size of the search area is inversely related to the distance between the camera and the target area. It is known that the larger the distance between the camera and the target area, the larger the field of view, the larger the actual area of the target area corresponding to one pixel in the image. For example, in one application scenario, it is determined that people are gathering if a specified number of people is greater than or equal to 5 within 3 square meters. When the distance between the camera and the target area is different, a target area of 3 square meters corresponds to a different number of pixels in the image. When the distance between the camera and the target area is longer, the search area can be set smaller; when the distance between the camera and the target area is short, the search area can be set larger.
In an alternative embodiment, with any pedestrian as a search center, searching in a search area of a preset size along a direction of increasing pedestrian density may include: determining the central points of all pedestrians in a search area according to the position information of each pedestrian by taking any pedestrian as a search center; and taking the central point as a new search center, and continuing searching until convergence.
Referring to fig. 2, fig. 2 is a schematic diagram of the 1 st search, the 2 nd search, … … th search and the nth search sequentially from left to right. The black solid origin in the figure is used to indicate the position of each pedestrian in the image, and the square indicated by the broken line in the figure is used to indicate the search region. As shown in the first diagram in fig. 2, when the 1 st search is performed, the pedestrian at the lower left corner is selected as the search center, and at this time, there are 5 pedestrians in the search area. From their position information, the center points of the 5 pedestrians can be determined, which are indicated by the grey diamonds in the figure. As shown in the second diagram of fig. 2, when the 2 nd search is performed, the search is continued with the position of the gray diamond as a new search center.
S103, if the number of pedestrians in the search area is larger than a preset number threshold, determining that people gather in the area, wherein the preset number threshold is positively correlated with the size of the search area.
In the embodiment, after the position of the search center and the size of the search area are determined, the number of pedestrians in the search area can be determined according to the position information of the pedestrians. And when the number of the pedestrians in the search area is larger than a preset number threshold, determining that the people gather in the area. The preset number of people threshold is positively correlated with the size of the search area, and the larger the search area is, the larger the corresponding preset number of people threshold is.
According to the detection method for the people gathering, the image of the target area is obtained through the camera, the pedestrian detection is carried out on the image, and the position information of each pedestrian is obtained; searching in a search area with a preset size along the pedestrian density increasing direction by taking any pedestrian as a search center; and if the number of the pedestrians in the search area is larger than a preset number threshold, determining that the people gather in the area. By comprehensively considering the position information and the number of the pedestrians instead of simply depending on the number of the pedestrians for detection, false detection and missing detection can be avoided, and the accuracy of gathering detection of the pedestrians is improved; further, by searching in the direction in which the pedestrian density increases, the region in which the person gathers in the target region can be quickly determined, and the detection speed of the person gathers is improved.
On the basis of the above embodiments, the detection process of people gathering provided by the present application is further explained below by a specific example. Referring to fig. 3, the outermost larger solid rectangle in the figure is used to represent the image of the target area obtained by the camera. The 12 solid origins in the figure are used to indicate the positions of the pedestrians detected from the image, and may be, for example, the midpoint position of a rectangular frame of a pedestrian obtained by using the general object detection method YOLOV3, and may be written as { (x)j,yj),j=1,2,3,…,12}。
In fig. 3, the gradation value of the position where the pedestrian is located is set to 0, and the gradation values of the other positions are set to 255. Our aim is to find areas in the target area where there is a gathering of people, based on these zero points in the image. For example, a search parameter radius may be set to indicate an effectively clustered search area, which represents a radius for a circular search area and a side length for a square search area. In a 1080P camera screen, radius is not assumed to be 100 pixels. If the number of pedestrians in the search area is greater than or equal to the threshold, it indicates that people are gathered in the area, and thresh is not set to 4.
All the location points to be analyzed can be noted { (x)j,yj) J is 1,2,3, …, n is Q, and n is 12 in fig. 3. Randomly selecting a location point in Q, e.g. selecting L0=(x0,y0) And with L0Determining a search area S for the center0The sides are radius as described above, as indicated by the solid squares in FIG. 3. Determining offset vectors of all pedestrians and the search center in the search area according to the following formula:
Figure BDA0002488189520000071
wherein L is0Coordinates representing the search center, S0Is represented by L0Search area as center, k denotes S0Number of pedestrians, LjDenotes S0The coordinates of the jth pedestrian in (c),
Figure BDA0002488189520000072
representing the offset vector as shown by the straight line with the arrow in figure 3.
Determining the central point of all the pedestrians in the search area, namely the central point of the next search area according to the following formula:
Figure BDA0002488189520000073
wherein L is1Representing the center point of all pedestrians in the search area.
With L1As a new search center, a search area S is determined1The search continues, as indicated by the dashed square in fig. 3, until the following formula is satisfied:
||Ln-Ln+1||2<;
wherein is a constant, LnSearch center, L, representing the n +1 searchn+1Representing the search center for the n +2 th search. Not set to radius/10. When searching for the region SMWhen the number of people is more than or equal to thresh, SMIt is a person gathering area.
And (3) excluding the searched position points in Q, then randomly selecting one position point in Q, and repeating the steps until all the position points are analyzed, so that the area where all the people gather in the target area can be quickly searched.
On the basis of any of the foregoing embodiments, in order to more clearly and intuitively display the area where people gather exists to the staff, the method for detecting people gather provided by this embodiment may further include: and fusing all search areas with people gathering in the image to obtain a gathering area of the target area. It can be understood that, in the process of detecting people gathering, there may be a plurality of search areas where people gathering exists, and there may be overlap between these areas, and if they are displayed to the staff respectively, it is inconvenient for the staff to subsequently perform corresponding work. Taking FIG. 3 as an example, assume S0And S1There is a gathering of people in it, which can be for S0And S1For fusion, for example, S can be obtained0And S1As an aggregation area of the target area; can also select S0And S1And a minimum circumscribed rectangle or a minimum circumscribed circle as the gathering area of the target area.
On the basis of any of the foregoing embodiments, in order to alarm in time, the method for detecting people gathering provided in this embodiment, after determining that people gathering exists in the area, may further include: and outputting alarm information in real time. In this embodiment, the alarm information may be output in real time by at least one of sound, light, and electricity. Use unmanned aerial vehicle to carry on the camera and carry out personnel's gathering and detect for the scene of epidemic situation prevention and control is taken as an example, after confirming that there is personnel gathering in certain region, can play corresponding warning pronunciation through the speaker that unmanned aerial vehicle carried on, can also carry out the highlight in the region that has personnel gathering to and remind the staff to intervene the processing in time.
Fig. 4 is a flowchart of a method for detecting people gathering according to another embodiment of the present invention. As shown in fig. 4, the method for detecting people gathering provided by this embodiment may include:
s401, acquiring an image of a target area through a camera, and detecting pedestrians in the image to obtain position information of each pedestrian.
S402, with any pedestrian as a search center, searching is conducted in a search area with a preset size along the pedestrian density increasing direction.
And S403, if the number of pedestrians in the search area is larger than a preset number threshold, determining that the people gather in the area.
And S404, outputting alarm information in real time.
S405, fusing all search areas with people gathering in the image to obtain a gathering area of the target area.
On the basis of the embodiment, the method for detecting the personnel congregation further fuses all search areas with the personnel congregation in the image by outputting alarm information in real time, can give an alarm in time, can more clearly and intuitively display the areas with the personnel congregation to the workers, and improves the working efficiency and the user experience of the workers.
Fig. 5 is a schematic structural diagram of an embodiment of the detection apparatus for people gathering provided by the present invention. As shown in fig. 5, the detection apparatus 50 for people gathering provided by the present embodiment may include: an acquisition module 501, a search module 502 and a detection module 503.
An obtaining module 501, configured to obtain an image of a target area through a camera, and perform pedestrian detection on the image to obtain position information of each pedestrian;
a searching module 502, configured to search, with any pedestrian as a search center, in a search area of a preset size along a direction in which a density of pedestrians increases;
the detection module 503 is configured to determine that a person group exists in the search area if the number of pedestrians in the search area is greater than a preset number-of-people threshold, where the preset number-of-people threshold is positively correlated with the size of the search area.
The detection apparatus for people group provided in this embodiment may be used to execute the technical solution of the method embodiment corresponding to fig. 1, and the implementation principle and the technical effect are similar, which are not described herein again.
Optionally, the searching module 502 is configured to search, with any pedestrian as a search center, in a search area with a preset size along a direction in which the density of the pedestrian increases, specifically, the searching may include:
determining the central points of all pedestrians in a search area according to the position information of each pedestrian by taking any pedestrian as a search center;
and taking the central point as a new search center, and continuing searching until convergence.
Optionally, the searching module 502 is configured to determine, by using any pedestrian as a search center, center points of all pedestrians in a search area according to the position information of each pedestrian specifically includes:
determining offset vectors of all pedestrians and the search center in the search area according to the following formula:
Figure BDA0002488189520000091
wherein L is0Coordinates representing the search center, S0Is represented by L0Search area as center, k denotes S0Number of pedestrians, LjDenotes S0The coordinates of the jth pedestrian in (c),
Figure BDA0002488189520000092
representing an offset vector;
determining the central points of all pedestrians in the search area according to the following formula:
Figure BDA0002488189520000093
wherein L is1Representing the center point of all pedestrians in the search area.
Optionally, the searching module 502 is configured to use the central point as a new searching center, and the continuing to search until convergence specifically includes:
with L1As a new search center, the search is continued until the following formula is satisfied:
||Ln-Ln+1||2<;
wherein is a constant, LnSearch center representing n +1 search,Ln+1Representing the search center for the n +2 th search.
Optionally, the size of the search area is inversely related to the distance between the camera and the target area.
Optionally, the apparatus 50 for detecting people gathering may further include a fusion module (not shown in the figure) for fusing all search areas in which people gather in the image to obtain a gathering area of the target area.
Optionally, the apparatus 50 for detecting people gathering may further include an alarm module (not shown in the figure) for outputting alarm information in real time after determining that people gathering exists in the area.
Fig. 6 shows a detection device for people gathering, which is only illustrated in fig. 6, and the embodiment of the present invention is not limited thereto. Fig. 6 is a schematic structural diagram of an embodiment of a detection apparatus for people gathering provided by the present invention. As shown in fig. 6, the detection apparatus 60 for people gathering provided by the present embodiment may include: memory 601, processor 602, and bus 603. The bus 603 is used to realize the connection between the elements.
The memory 601 stores a computer program, and when the computer program is executed by the processor 602, the technical solution of the method for detecting people group provided by any of the above method embodiments can be implemented.
Wherein, the memory 601 and the processor 602 are electrically connected directly or indirectly to realize data transmission or interaction. For example, these elements may be electrically connected to each other via one or more communication buses or signal lines, such as bus 603. The memory 601 stores a computer program for implementing the method for detecting people gathering, which includes at least one software functional module that can be stored in the memory 601 in the form of software or firmware, and the processor 602 executes various functional applications and data processing by running the software program and the module stored in the memory 601.
The Memory 601 may be, but is not limited to, a Random Access Memory (RAM), a Read Only Memory (ROM), a Programmable Read-Only Memory (PROM), an Erasable Read-Only Memory (EPROM), an electrically Erasable Read-Only Memory (EEPROM), and the like. The memory 601 is used for storing programs, and the processor 602 executes the programs after receiving the execution instructions. Further, the software programs and modules within the memory 601 may also include an operating system, which may include various software components and/or drivers for managing system tasks (e.g., memory management, storage device control, power management, etc.), and may communicate with various hardware or software components to provide an operating environment for other software components.
The processor 602 may be an integrated circuit chip having signal processing capabilities. The Processor 602 may be a general-purpose Processor, and includes a Central Processing Unit (CPU), a Network Processor (NP), and so on. The various methods, steps and logic blocks disclosed in the embodiments of the present invention may be implemented or performed. A general purpose processor may be a microprocessor or the processor may be any conventional processor or the like. It will be appreciated that the configuration of fig. 6 is merely illustrative and may include more or fewer components than shown in fig. 6 or have a different configuration than shown in fig. 6. The components shown in fig. 6 may be implemented in hardware and/or software.
It should be noted that the detection apparatus for people gathering provided in this embodiment may be integrated with an image acquisition device such as a camera, for example, a monitoring camera having a people gathering detection function; or may be a device independent of the image capture device, including but not limited to: user side equipment and network side equipment. User-side devices include, but are not limited to, computers, smart phones, tablets, digital broadcast terminals, messaging devices, game consoles, personal digital assistants, and the like. The network-side device includes, but is not limited to, a single network server, a server group consisting of a plurality of network servers, or a cloud consisting of a large number of computers or network servers based on cloud computing, wherein the cloud computing is one of distributed computing and is a super virtual computer consisting of a group of loosely coupled computers.
Reference is made herein to various exemplary embodiments. However, those skilled in the art will recognize that changes and modifications may be made to the exemplary embodiments without departing from the scope hereof. For example, the various operational steps, as well as the components used to perform the operational steps, may be implemented in differing ways depending upon the particular application or consideration of any number of cost functions associated with operation of the system (e.g., one or more steps may be deleted, modified or incorporated into other steps).
Additionally, as will be appreciated by one skilled in the art, the principles herein may be reflected in a computer program product on a computer readable storage medium, which is pre-loaded with computer readable program code. Any tangible, non-transitory computer-readable storage medium may be used, including magnetic storage devices (hard disks, floppy disks, etc.), optical storage devices (CD-ROMs, DVDs, Blu Ray disks, etc.), flash memory, and/or the like. These computer program instructions may be loaded onto a general purpose computer, special purpose computer, or other programmable data processing apparatus to produce a machine, such that the instructions which execute on the computer or other programmable data processing apparatus create means for implementing the functions specified. These computer program instructions may also be stored in a computer-readable memory that can direct a computer or other programmable data processing apparatus to function in a particular manner, such that the instructions stored in the computer-readable memory produce an article of manufacture including means for implementing the function specified. The computer program instructions may also be loaded onto a computer or other programmable data processing apparatus to cause a series of operational steps to be performed on the computer or other programmable apparatus to produce a computer implemented process such that the instructions which execute on the computer or other programmable apparatus provide steps for implementing the functions specified.
The present invention has been described in terms of specific examples, which are provided to aid understanding of the invention and are not intended to be limiting. For a person skilled in the art to which the invention pertains, several simple deductions, modifications or substitutions may be made according to the idea of the invention.

Claims (10)

1. A method of detecting people gathering, comprising:
acquiring an image of a target area through a camera, and detecting pedestrians in the image to acquire position information of each pedestrian;
searching in a search area with a preset size along the pedestrian density increasing direction by taking any pedestrian as a search center;
and if the number of the pedestrians in the search area is larger than a preset number threshold, determining that people gather in the area, wherein the preset number threshold is positively correlated with the size of the search area.
2. The method according to claim 1, wherein the searching with a search area of a preset size along a direction of increasing pedestrian density with any pedestrian as a search center comprises:
determining the central points of all pedestrians in a search area according to the position information of each pedestrian by taking any pedestrian as a search center;
and taking the central point as a new search center, and continuing searching until convergence.
3. The method of claim 2, wherein the step of determining the central points of all pedestrians in the search area according to the position information of each pedestrian by taking any pedestrian as the search center comprises the following steps:
determining offset vectors of all pedestrians in the search area from the search center according to the following formula:
Figure FDA0002488189510000011
wherein L is0Coordinates representing the search center, S0Is represented by L0Search area as center, k denotes S0Number of pedestrians, LjDenotes S0The coordinates of the jth pedestrian in (c),
Figure FDA0002488189510000012
representing the offset vector;
determining the central points of all pedestrians in the search area according to the following formula:
Figure FDA0002488189510000013
wherein L is1Representing the center point of all pedestrians in the search area.
4. The method of claim 3, wherein continuing the search until convergence with the center point as a new search center comprises:
with L1As a new search center, the search is continued until the following formula is satisfied:
||Ln-Ln+1||2<;
wherein is a constant, LnSearch center, L, representing the n +1 searchn+1Representing the search center for the n +2 th search.
5. The method of claim 1, wherein a size of the search area is inversely related to a distance between the camera and the target area.
6. The method of any one of claims 1-5, further comprising: and fusing all search areas with people gathering in the image to obtain a gathering area of the target area.
7. The method of any one of claims 1-5, wherein after determining that a people gather exists within the area, the method further comprises: and outputting alarm information in real time.
8. A people gathering detection apparatus, comprising:
the acquisition module is used for acquiring an image of a target area through a camera, and detecting pedestrians in the image to acquire position information of each pedestrian;
the search module is used for searching in a search area with a preset size along the pedestrian density increasing direction by taking any pedestrian as a search center;
the detection module is used for determining that people gather in the area if the number of pedestrians in the search area is larger than a preset number threshold, and the preset number threshold is positively correlated with the size of the search area.
9. A people gathering detection apparatus, comprising: at least one processor and memory;
the memory stores computer-executable instructions;
the at least one processor executing the memory-stored computer-executable instructions cause the at least one processor to perform the method of detecting people gathering of any of claims 1-7.
10. A computer-readable storage medium having stored thereon computer-executable instructions for implementing the method of detecting people gathering as claimed in any one of claims 1-7 when executed by a processor.
CN202010397678.3A 2020-05-12 2020-05-12 Method, device and equipment for detecting personnel aggregation Active CN111666821B (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN202010397678.3A CN111666821B (en) 2020-05-12 2020-05-12 Method, device and equipment for detecting personnel aggregation

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN202010397678.3A CN111666821B (en) 2020-05-12 2020-05-12 Method, device and equipment for detecting personnel aggregation

Publications (2)

Publication Number Publication Date
CN111666821A true CN111666821A (en) 2020-09-15
CN111666821B CN111666821B (en) 2023-07-28

Family

ID=72383394

Family Applications (1)

Application Number Title Priority Date Filing Date
CN202010397678.3A Active CN111666821B (en) 2020-05-12 2020-05-12 Method, device and equipment for detecting personnel aggregation

Country Status (1)

Country Link
CN (1) CN111666821B (en)

Cited By (4)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN113033293A (en) * 2021-02-03 2021-06-25 北京睿家科技有限公司 Access & exit management equipment, system and method
CN113536932A (en) * 2021-06-16 2021-10-22 中科曙光国际信息产业有限公司 Crowd gathering prediction method and device, computer equipment and storage medium
CN113822151A (en) * 2021-08-09 2021-12-21 中标慧安信息技术股份有限公司 Method and system for monitoring population density within a market
CN114494350A (en) * 2022-01-28 2022-05-13 北京中电兴发科技有限公司 Personnel gathering detection method and device

Citations (6)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US20160133025A1 (en) * 2014-11-12 2016-05-12 Ricoh Company, Ltd. Method for detecting crowd density, and method and apparatus for detecting interest degree of crowd in target position
CN106203357A (en) * 2016-07-11 2016-12-07 浙江宇视科技有限公司 The detection method of a kind of gathering of people and device
CN108206935A (en) * 2016-12-16 2018-06-26 北京迪科达科技有限公司 A kind of personnel amount statistical monitoring analysis system
CN110390226A (en) * 2018-04-16 2019-10-29 杭州海康威视数字技术股份有限公司 Crowd's event recognition method, device, electronic equipment and system
CN110650530A (en) * 2019-09-24 2020-01-03 北京佰才邦技术有限公司 Unmanned aerial vehicle searching and positioning method and device and unmanned aerial vehicle
CN110879982A (en) * 2019-11-15 2020-03-13 苏州大学 Crowd counting system and method

Patent Citations (6)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US20160133025A1 (en) * 2014-11-12 2016-05-12 Ricoh Company, Ltd. Method for detecting crowd density, and method and apparatus for detecting interest degree of crowd in target position
CN106203357A (en) * 2016-07-11 2016-12-07 浙江宇视科技有限公司 The detection method of a kind of gathering of people and device
CN108206935A (en) * 2016-12-16 2018-06-26 北京迪科达科技有限公司 A kind of personnel amount statistical monitoring analysis system
CN110390226A (en) * 2018-04-16 2019-10-29 杭州海康威视数字技术股份有限公司 Crowd's event recognition method, device, electronic equipment and system
CN110650530A (en) * 2019-09-24 2020-01-03 北京佰才邦技术有限公司 Unmanned aerial vehicle searching and positioning method and device and unmanned aerial vehicle
CN110879982A (en) * 2019-11-15 2020-03-13 苏州大学 Crowd counting system and method

Cited By (4)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN113033293A (en) * 2021-02-03 2021-06-25 北京睿家科技有限公司 Access & exit management equipment, system and method
CN113536932A (en) * 2021-06-16 2021-10-22 中科曙光国际信息产业有限公司 Crowd gathering prediction method and device, computer equipment and storage medium
CN113822151A (en) * 2021-08-09 2021-12-21 中标慧安信息技术股份有限公司 Method and system for monitoring population density within a market
CN114494350A (en) * 2022-01-28 2022-05-13 北京中电兴发科技有限公司 Personnel gathering detection method and device

Also Published As

Publication number Publication date
CN111666821B (en) 2023-07-28

Similar Documents

Publication Publication Date Title
CN111666821B (en) Method, device and equipment for detecting personnel aggregation
US10930151B2 (en) Roadside parking management method, device, and system based on multiple cameras
WO2021135879A1 (en) Vehicle data monitoring method and apparatus, computer device, and storage medium
CN110659391A (en) Video detection method and device
WO2013053159A1 (en) Method and device for tracking vehicle
CN103700261A (en) Video-based road traffic flow feature parameter monitoring and traffic comprehensive information service system
CN110738150B (en) Camera linkage snapshot method and device and computer storage medium
CN108932273B (en) Picture screening method and device
CN110929584A (en) Network training method, monitoring method, system, storage medium and computer equipment
US20220044558A1 (en) Method and device for generating a digital representation of traffic on a road
CN112017323A (en) Patrol alarm method and device, readable storage medium and terminal equipment
CN110544312A (en) Video display method and device in virtual scene, electronic equipment and storage device
CN113205037A (en) Event detection method and device, electronic equipment and readable storage medium
EP4049446A1 (en) Systems and methods for adjusting a monitoring device
CN111079621A (en) Method and device for detecting object, electronic equipment and storage medium
CN114926791A (en) Method and device for detecting abnormal lane change of vehicles at intersection, storage medium and electronic equipment
CN110390226B (en) Crowd event identification method and device, electronic equipment and system
Subedi et al. Development of a multiple‐camera 3D vehicle tracking system for traffic data collection at intersections
EP3940666A1 (en) Digital reconstruction method, apparatus, and system for traffic road
CN116363583A (en) Human body identification method, device, equipment and medium for top view angle
CN116030412A (en) Escalator monitoring video anomaly detection method and system
Zhou et al. Extraction of pedestrian position and attribute information based on the integration of LiDAR and smartphone sensors
CN112135122A (en) Method and device for monitoring imaging equipment, electronic equipment and road side equipment
CN110581979B (en) Image acquisition system, method and device
CN116681955B (en) Method and computing device for identifying traffic guardrail anomalies

Legal Events

Date Code Title Description
PB01 Publication
PB01 Publication
SE01 Entry into force of request for substantive examination
SE01 Entry into force of request for substantive examination
GR01 Patent grant
GR01 Patent grant