A method, device, computer equipment and storage medium for evaluating crowd congestion
By calculating the personnel attribute information in the viewing area of the shooting device and the personnel flow in the viewing area of the associated device, the value of comprehensive congestion evaluation is determined, and the problems of low evaluation accuracy and misjudgment in the prior art are solved, and the accurate assessment of the degree of personnel congestion is achieved.
Patent Information
- Application Number
- CN202111366774.2
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2021-11-18
- Publication Date
- 2025-04-08
- Estimated Expiration
- 2041-11-18
AI Technical Summary
The prior art personnel congestion assessment method has a low accuracy rate in determining the actual congestion situation, or it is prone to misjudgment, especially when the personnel are resident.
The independent congestion evaluation value is calculated by the personnel attribute information in the viewing area of the shooting device, and the relevant congestion evaluation value is calculated by the personnel attribute information in the viewing area of the associated shooting device, and the personnel flow between the shooting device and the associated device is comprehensively considered, the comprehensive congestion evaluation value is determined, and the degree of congestion in the area to be evaluated is finally evaluated.
Accurate evaluation of the degree of congestion of personnel is achieved, misjudgment is avoided, and congestion can be monitored and quantitatively evaluated in real time.
Smart Images

Figure CN114067269B_ABST
Abstract
Description
Technical Field
[0001] The embodiments of the present invention relate to image processing technology, and in particular to a method, device, computer equipment and storage medium for evaluating personnel congestion. Background Art
[0002] Subway stations, train stations and intersections are important links in urban transportation. During rush hours and holidays, there may be different types of congestion. How to accurately evaluate the congestion, analyze the causes of congestion and make decisions to alleviate the congestion is an urgent problem to be solved.
[0003] In the prior art, either the number of electronic devices carried by people is detected as an indicator for evaluating the degree of congestion, or the number of people in the camera area is counted as an indicator for evaluating the degree of congestion. The former method of evaluating the congestion situation of people has a low accuracy rate in judging the actual congestion situation because the number of electronic devices carried by people varies or is difficult to detect. The latter method of evaluating the congestion situation of people has the problem of misjudging congestion when there are people staying in the non-congested state. Summary of the invention
[0004] The embodiments of the present invention provide a method, an apparatus, a computer device and a storage medium for evaluating a crowd congestion, so as to achieve accurate evaluation of the crowd congestion degree.
[0005] In a first aspect, an embodiment of the present invention provides a method for evaluating personnel congestion, the method comprising:
[0006] Calculate the independent congestion evaluation value of the camera according to the attribute information of the personnel in the visual area of the camera, and calculate the associated congestion evaluation value between the camera and the associated camera according to the attribute information of the personnel in the visual area of the camera and the associated camera;
[0007] Determining a comprehensive congestion evaluation value of the shooting device according to the independent congestion evaluation value and the associated congestion evaluation value of the shooting device;
[0008] The congestion degree of the area to be evaluated is determined according to the comprehensive congestion evaluation values of at least two shooting devices in the area to be evaluated.
[0009] In a second aspect, an embodiment of the present invention further provides a personnel congestion evaluation device, the device comprising:
[0010] A congestion evaluation value determination module, used to calculate an independent congestion evaluation value of the camera according to the attribute information of the personnel in the visual area of the camera, and to calculate an associated congestion evaluation value between the camera and the associated camera according to the attribute information of the personnel in the visual area of the camera and the visual area of the associated camera;
[0011] A comprehensive congestion evaluation value determination module, used to determine a comprehensive congestion evaluation value of the shooting device according to the independent congestion evaluation value and the associated congestion evaluation value of the shooting device;
[0012] The congestion level determination module is used to determine the congestion level of the area to be evaluated according to the comprehensive congestion evaluation values of at least two shooting devices in the area to be evaluated.
[0013] In a third aspect, an embodiment of the present invention further provides a computer device, comprising a memory, a processor, and a computer program stored in the memory and executable on the processor, wherein when the processor executes the program, a method for evaluating personnel congestion as described in any one of the embodiments of the present invention is implemented.
[0014] In a fourth aspect, an embodiment of the present invention further provides a storage medium comprising computer executable instructions, which, when executed by a computer processor, are used to execute a method for evaluating human congestion as described in any one of the embodiments of the present invention.
[0015] The embodiment of the present invention calculates the independent congestion evaluation value of the camera device through the personnel attribute information in the visual area of the camera device, calculates the associated congestion evaluation value through the personnel attribute information in the visual area of the camera device and the visual areas of the associated camera devices, determines the comprehensive congestion evaluation value of the camera device according to the independent congestion evaluation value and the associated congestion evaluation value, and determines the congestion degree of the area to be evaluated according to the comprehensive congestion evaluation value of each camera in the area to be evaluated. The problem of low accuracy in judging the actual congestion condition or easy misjudgment of congestion in the personnel congestion evaluation method in the prior art is solved, and accurate evaluation of the degree of personnel congestion is achieved. BRIEF DESCRIPTION OF THE DRAWINGS
[0016] Figure 1 is a flow chart of a method for evaluating personnel congestion in Embodiment 1 of the present invention;
[0017] Figure 2a is a flow chart of a method for evaluating personnel congestion in Embodiment 2 of the present invention;
[0018] Figure 2b is a schematic diagram of changes in people in a viewing area of a photographing device in Embodiment 2 of the present invention;
[0019] Figure 2c is a schematic diagram of personnel flow between a photographing device and associated photographing devices in Embodiment 2 of the present invention;
[0020] Figure 3 It is a structural schematic diagram of a personnel congestion evaluation device in Embodiment 3 of the present invention;
[0021] Figure 4It is a structural diagram of a computer device in Embodiment 4 of the present invention. DETAILED DESCRIPTION
[0022] The present invention will be further described in detail below in conjunction with the accompanying drawings and embodiments. It is to be understood that the specific embodiments described herein are only used to explain the present invention, rather than to limit the present invention. It should also be noted that, for ease of description, only parts related to the present invention, rather than all structures, are shown in the accompanying drawings.
[0023] Embodiment 1
[0024] Figure 1 This is a flow chart of a method for evaluating crowd congestion provided in Example 1 of the present invention. This embodiment is applicable to situations where crowd congestion levels are evaluated in areas such as subway stations, railway stations, and intersections. The method can be executed by a crowd congestion evaluation device, which can be implemented by software and / or hardware and is generally integrated in a computer device and used in conjunction with a photographing device set in the area to be evaluated.
[0025] like Figure 1 As shown, the technical solution of the embodiment of the present invention specifically includes the following steps:
[0026] S110. Calculate an independent congestion evaluation value of the camera according to the attribute information of persons within the field of view of the camera, and calculate an associated congestion evaluation value between the camera and the associated camera according to the attribute information of persons within the field of view of the camera and the field of view of the associated camera.
[0027] The camera refers to a camera with a face recognition function deployed in the area to be evaluated, which may be a smart camera, etc. The visual area of the camera refers to the area included in the image or video frame image captured by the camera, and the personnel attribute information refers to the identification, number and other information of the personnel in the visual area of the camera. The associated camera refers to a camera adjacent to the camera. The adjacent here may refer to the geographical location or the visual area, which is not limited in this embodiment.
[0028] The independent congestion evaluation value of the camera is calculated based on the attribute information of the people in the field of view of the camera, so the independent congestion evaluation value can reflect the changes in the people in the field of view of the camera.
[0029] Specifically, the independent congestion evaluation value can be calculated by at least two of the following independent congestion evaluation value reference factors: the average number of people in the field of view of the camera device during a preset time period, the change in the number of people, the current number of people, the rate of change in the number of people, and the rate of update of the number of people. Exemplarily, the number of people in the field of view of the camera device is monitored in real time by human body recognition and target tracking. The average number of people can be calculated based on the flow of the number of people in the field of view of the camera device during a preset time period. The change in the number of people can be calculated based on the number of people before the preset time period and the current number of people. The rate of change in the number of people can be calculated based on the ratio of the value of the change in the number of people to the number of people before the preset time period. The number of new people in the field of view of the camera device at the current moment compared to before the preset time period can be calculated based on human body recognition. The rate of update of the people can be calculated based on the ratio of the number of new people to the current number of people.
[0030] At the same time, the independent congestion evaluation value is calculated according to the independent congestion evaluation value reference factors, and the sum of the numerical values of each independent congestion evaluation value reference factor and the weight product of each independent congestion evaluation value reference factor can be directly used as the independent congestion evaluation value. The numerical values of each independent congestion evaluation value reference factor can also be processed. For example, each numerical value can be quantified, or the evaluation value corresponding to each numerical value can be determined according to the interval in which each numerical value is located. The sum of the processed numerical values and the weight product of each independent congestion evaluation value reference factor is used as the independent congestion evaluation value. This embodiment does not limit the selection of independent congestion evaluation value reference factors and the method of calculating independent congestion evaluation values according to independent congestion evaluation value reference factors.
[0031] The associated congestion evaluation value is calculated based on the attribute information of personnel within the field of view of the camera and the field of view of the associated camera, taking full account of the mobility of mobile personnel within the field of view of the camera and the field of view of the associated camera during their movement. Therefore, the associated congestion evaluation value can reflect the flow of personnel in the field of view of the camera and the field of view of the associated camera.
[0032] Specifically, the associated congestion evaluation value can be calculated by at least two of the following associated congestion evaluation value reference factors: the number of mobile personnel transferred from the visual area of the shooting device to the visual area of the associated shooting device, the average time required for the transfer of each mobile personnel, the average speed of each mobile personnel, etc. Specifically, the number of mobile personnel who leave the visual area of the shooting device and transfer to the visual area of the associated shooting device within a preset time period can be obtained based on human body recognition and target tracking technology. The time from when each mobile personnel leaves the visual area of the shooting device to when they appear in the visual area of the associated shooting device can be counted, and the average time required for the transfer of each mobile personnel can be calculated. The speed of each mobile personnel is calculated based on the time from when each mobile personnel leaves the visual area of the shooting device to when they appear in the visual area of the associated shooting device, as well as the distance between the visual area of the shooting device and the visual area of the associated shooting device, so as to calculate the average speed.
[0033] Similarly, for an associated camera device, the sum of the products of the values of each associated congestion evaluation value reference factor and the weights of each associated congestion evaluation value reference factor can be directly used as the associated value corresponding to the associated camera device. The values of each associated congestion evaluation value reference factor can also be processed. For example, each value can be quantified, or the evaluation value corresponding to each value can be determined according to the interval in which each value is located. The sum of the processed values and the weight products of each associated congestion evaluation value reference factor is used as the associated value corresponding to the associated camera device. When the camera device corresponds to only one associated camera device, the associated value corresponding to the associated camera device is the associated congestion evaluation value; when the camera device corresponds to multiple associated cameras, weights can also be set for each associated camera device, and the associated congestion evaluation value is calculated according to the associated values and weights corresponding to each associated camera device. Similarly, this embodiment does not limit the selection of the associated congestion evaluation value reference factor and the method of calculating the independent congestion evaluation value according to the associated congestion evaluation value reference factor.
[0034] In the embodiment of the present invention, personnel identification is performed through a camera device to obtain the personnel attribute information within the field of view of the camera device, which solves the problem of low accuracy in judging the degree of congestion caused by factors such as the different numbers of electronic devices carried by personnel and the possibility that the electronic devices cannot be detected, in the prior art, by detecting the electronic devices carried by personnel and using the number of electronic devices as an indicator for evaluating the degree of congestion. By calculating the independent congestion evaluation value and the associated congestion evaluation value respectively, the changes in personnel within the field of view of the camera device and the flow of personnel in the field of view of the camera device and the field of view of the associated camera devices are fully considered, which solves the problem of the prior art of evaluating the degree of congestion by counting the number of people in the camera area, which is easy to cause misjudgment of congestion in non-congested states such as waiting for a bus but with a large number of people.
[0035] S120 . Determine a comprehensive congestion evaluation value of the shooting device according to the independent congestion evaluation value and the associated congestion evaluation value of the shooting device.
[0036] Since the comprehensive congestion evaluation value is calculated by the independent congestion evaluation value and the associated congestion evaluation value, the comprehensive congestion evaluation value can fully reflect the congestion situation of the shooting device.
[0037] In an embodiment of the present invention, the comprehensive congestion evaluation value of the camera device can be calculated at every preset time period. The congestion condition of the camera viewing area can be evaluated based on the longitudinal comparison of the comprehensive congestion evaluation values of the same camera device at different times. It is also possible to determine the spatial distribution of the congestion degree of the area to be evaluated based on the lateral comparison of the comprehensive congestion evaluation values of multiple cameras deployed in the area to be evaluated after all the comprehensive congestion evaluation values are calculated.
[0038] S130: Determine the congestion level of the area to be evaluated according to the comprehensive congestion evaluation values of at least two shooting devices in the area to be evaluated.
[0039] The area to be evaluated is an area where multiple shooting devices with face recognition functions are deployed, which can be a subway station, a railway station or a traffic intersection.
[0040] In the embodiment of the present invention, after the comprehensive congestion evaluation value of the camera is calculated, in addition to evaluating the congestion level of a single camera, all the cameras in the area to be evaluated may be associated to evaluate the overall congestion level of the area to be evaluated.
[0041] For example, a regional matrix matching the area to be evaluated can be generated based on the position of the camera's field of view in the area to be evaluated. The value of each matrix element is the comprehensive congestion evaluation value of the camera at different positions, indicating the traffic capacity of the area corresponding to the camera's field of view. The regional matrix can intuitively display the spatial distribution of the congestion level of the area to be evaluated.
[0042] Exemplarily, the regional congestion evaluation value of the area to be evaluated may be calculated according to the comprehensive congestion evaluation value of each shooting device. By calculating the regional congestion evaluation value of the area to be evaluated at different times, the congestion degree of the area to be evaluated may be quantitatively indicated.
[0043] The technical solution of this embodiment calculates the independent congestion evaluation value of the camera device through the personnel attribute information in the visual area of the camera device, calculates the associated congestion evaluation value through the personnel attribute information in the visual area of the camera device and the visual areas of the associated camera devices, determines the comprehensive congestion evaluation value of the camera device based on the independent congestion evaluation value and the associated congestion evaluation value, and determines the congestion degree of the area to be evaluated based on the comprehensive congestion evaluation values of each camera in the area to be evaluated. This solves the problem that the existing method for evaluating the congestion status of personnel is low in accuracy in determining the actual congestion status, or is prone to misjudgment of congestion, and achieves accurate evaluation of the degree of congestion of personnel.
[0044] Embodiment 2
[0045] Figure 2a It is a flow chart of a personnel congestion evaluation method provided in the second embodiment of the present invention. Based on the above embodiments, the embodiment of the present invention further specifies the process of calculating the independent congestion evaluation value of the shooting device, the process of calculating the associated congestion evaluation value of the shooting device, the process of determining the comprehensive congestion evaluation value of the shooting device, and the process of evaluating the congestion degree of the evaluation area.
[0046] Correspondingly, such as Figure 2aAs shown, the technical solution of the embodiment of the present invention specifically includes the following steps:
[0047] S210, obtaining the number of people in the current viewing area of the photographing device at the current moment, and the number of people in the historical viewing area before a preset time period.
[0048] In the embodiment of the present invention, it can be set to calculate the independent congestion evaluation value and the associated congestion evaluation value of the camera device at every preset time period, so as to determine the comprehensive congestion evaluation value of the camera device and the regional congestion evaluation value of the area to be evaluated, so as to realize real-time monitoring of the congestion degree of the camera device and the area to be evaluated. It can also be set to calculate the independent congestion evaluation value and the associated congestion evaluation value of the camera device at a preset time point or according to the user's congestion degree monitoring instruction, so as to determine the comprehensive congestion evaluation value of the camera device and the regional congestion evaluation value of the area to be evaluated, so as to realize the key monitoring of the congestion degree of the camera device and the area to be evaluated during peak hours and holidays. This embodiment does not limit this.
[0049] In an embodiment of the present invention, the camera has a face recognition function. For example, the number of people in the historical visual area and the identification of each person appearing in the historical visual area can be obtained based on the image captured by the camera before a preset time period or the video frame image before a preset time period. The number of people in the current visual area and the identification of each person appearing in the current visual area can be obtained based on the image captured by the camera at the current moment or the current video frame image.
[0050] S220. Calculate the change rate of the number of people in the shooting device and the update rate of the people according to the number of people in the current viewing area and the number of people in the historical viewing area.
[0051] In the embodiment of the present invention, the number of people and the identification of each person in the current viewing area, as well as the number of people and the identification of each person in the historical viewing area, are used to calculate the rate of change of the number of people and the rate of personnel update of the camera device in the preset time period, thereby reflecting the change of personnel in the camera device in the preset time period. The faster the change of personnel in the camera device, the lower the congestion level, which can more accurately reflect the congestion level compared to the method of simply evaluating the congestion level based on the current number of people in the prior art.
[0052] Accordingly, S220 may include:
[0053] S221. Obtain the number of new people in the current field of view of the camera.
[0054] Specifically, the photographing device has a face recognition function, and a person identification is assigned to each person identified. The number of new person identifications that appear in the current viewing area compared to the historical viewing area is the number of new people in the current viewing area.
[0055] Figure 2b FIG. 1 is a schematic diagram of a person changing in a viewing area of a camera device in Embodiment 2 of the present invention. Figure 2b As shown, the preset time period is s seconds. After s seconds, the number of new personnel in the dotted box in the current viewport is the number of new personnel in the current viewport. Figure 2b For example, if the personnel in the historical view area before s seconds are identified as R1, R2, R3…R 10 , after s seconds, the people in the current viewing area are identified as R5, R6…R 10 , R 11 , R 12 …R 16 , then the new R in the current viewport 11 , R 12 …R 16 That is, the number of new personnel is 6.
[0056] S222. The difference between the number of people in the current viewing area and the number of people in the historical viewing area, and the ratio of the number of people in the historical viewing area, are used as the rate of change of the number of people in the shooting device.
[0057] Specifically, the rate of change of the number of people can be calculated by the following formula:
[0058]
[0059] Among them, P represents the rate of change of the number of people in the shooting device, T1 represents the number of people in the historical field of view, and T2 represents the number of people in the current field of view.
[0060] According to the above formula, the value of P is less than 0. When P is less than 0, it means that the number of people in the current viewing area is decreasing, the traffic capacity is improving, and the congestion level is decreasing. The minimum value of P is -1, which means that the number of people in the current viewing area is clear. When the value of P is greater than 0, it means that people are gathering in the current area, the traffic capacity is weakening, and the congestion level is increasing.
[0061] S223. The ratio of the number of new personnel in the current viewing area to the number of personnel in the current viewing area, and the sum of the absolute value of the difference between the number of personnel in the current viewing area and the number of personnel in the historical viewing area and the ratio of the number of personnel in the historical viewing area are used as the personnel update rate of the shooting device.
[0062] Specifically, the personnel renewal rate can be calculated by the following formula:
[0063]
[0064] Among them, U represents the personnel update rate of the shooting device, and C represents the number of new people in the current field of view.
[0065] According to the above formula, the larger the value of U is, the faster the flow of people in the current viewing area is, the lower the congestion level is, and the stronger the traffic capacity is.
[0066] S230. Determine an independent congestion evaluation value of the shooting device according to the number of people in the current viewing area, the rate of change of the number of people, and the rate of update of the number of people.
[0067] In the embodiment of the present invention, the congestion level of the viewing area of the shooting device is comprehensively evaluated from three aspects: the number of people in the current viewing area, the rate of change of the number of people, and the rate of updating of people.
[0068] Accordingly, S230 may include:
[0069] S231. According to the intervals of the number of people in the current viewing area, the rate of change of the number of people, and the rate of update of the number of people, the scores that match the number of people in the current viewing area, the rate of change of the number of people, and the rate of update of the number of people are determined respectively.
[0070] In the embodiment of the present invention, the more people there are in the current viewing area, the higher the possibility of congestion in the current viewing area. Therefore, it can be set that the larger the number of people in the current viewing area, the lower the score matching the number of people in the current viewing area.
[0071] Specifically, the matching relationship between the number of people in different current viewing areas and the scores can be set as shown in Table 1 below:
[0072] Table 1
[0073] Current view area personnel number interval <![CDATA[t i <a1]]> <h2 style=";text-align:left;direction:ltr"><![CDATA[a1<t <h2 style=";text-align:left;direction:ltr"> i <h2 style=";text-align:left;direction:ltr"> <a2]]><h2 style=";text-align:left;direction:ltr"> … <![CDATA[a i <t i ]]> score <![CDATA[S i ]]> <![CDATA[S i -S step ]]> … 0
[0074] Among them, t i Indicates the number of people in the current viewing area, a1, a2…a i Indicates the boundary value of the number of people in the current viewing area, S i represents the score matching the interval [0, a1], S step is the gradient value of the score.
[0075] According to the formula in S222, the matching relationship between different population change rate intervals and scores can be set as shown in Table 2 below:
[0076] Table 2
[0077] Population change rate range <![CDATA[p i =-1]]> … <![CDATA[0<p i <c i-1 ]]> <![CDATA[p i =0]]> <![CDATA[0<p i <c i+1 ]]> … <![CDATA[c n <p i ]]> score <![CDATA[P i ]]> <![CDATA[P step ]]> 0 <![CDATA[-P step ]]> … <![CDATA[-P i ]]>
[0078] p i The value representing the rate of change of the number of people, c i-1 、c i+1 、c n is the boundary value of the population change rate interval, P i For p i = -1, P step The gradient value for scoring the rate of change of the population.
[0079] According to Table 2, when the population change rate is negative, the population change rate score is positive, and the smaller the population change rate, the higher the population change rate score. When the population change rate is positive, the population change rate score is negative, and the larger the population change rate, the smaller the population change rate score.
[0080] According to the formula in S223, the matching relationship between different personnel update rate intervals and scores can be set as shown in Table 3 below:
[0081] Table 3
[0082] Staff renewal rate range <![CDATA[u i <b1]]> <h2 style=";text-align:left;direction:ltr"><![CDATA[b1<u <h2 style=";text-align:left;direction:ltr"> i <h2 style=";text-align:left;direction:ltr"> <b2]]><h2 style=";text-align:left;direction:ltr"> … <![CDATA[b i <in i <!-- 6 --> ]]> score 1 <![CDATA[1+T step ]]> … <![CDATA[T i ]]>
[0083] u i The value representing the personnel renewal rate, b1, b2…b i Indicates the boundary value of the personnel renewal rate interval, T i for u i >b i The score at time, T step The gradient value for scoring the staff turnover rate.
[0084] According to Table 3, the greater the staff renewal rate, the higher the staff renewal rate score.
[0085] S232. Calculate the independent congestion evaluation value of the shooting device according to the scores of the number of people in the current viewing area, the rate of change of the number of people, and the rate of update of the number of people, as well as the weights that match the number of people in the current viewing area, the rate of change of the number of people, and the rate of update of the number of people.
[0086] After obtaining the three scores of the number of people in the current viewing area, the rate of change in the number of people, and the rate of updating of people, the independent congestion evaluation value of the shooting device can be calculated based on the above three scores.
[0087] Specifically, the independent congestion evaluation value of the camera can be calculated by the following formula:
[0088] S i =|S Ti S Ui S pi |·|k T k U k P | T
[0089] Among them, S i represents the independent congestion evaluation value of the camera, S Ti S represents the score of the number of people in the current viewing area of the camera, Ui S represents the score of the personnel update rate of the camera, S Pi A score indicating the rate of change in the number of people in the camera. kT Indicates the weight of the number of people in the current viewing area, k U represents the weight of the personnel renewal rate, k P The weight represents the rate of change of the number of people, and T is the transposition symbol.
[0090] S240, obtaining the number of mobile personnel transferred from the field of view of the photographing device to the field of view of the associated photographing device, and calculating the average speed of the mobile personnel.
[0091] In the embodiment of the present invention, in addition to obtaining the congestion level of the viewing area of a single camera, the correlation between the cameras is also considered to evaluate the overall personnel congestion in the area to be evaluated.
[0092] Figure 2c is a schematic diagram of personnel flow between a photographing device and associated photographing devices in Embodiment 2 of the present invention, such as Figure 2c As shown, Cam1 is the current camera, Cam2 and Cam3 are associated cameras adjacent to the current camera. In a preset time period, people usually flow between the viewing areas of adjacent cameras.
[0093] In the embodiment of the present invention, a tracking algorithm can be used to determine whether the person appearing in the camera and the associated camera is the same person, and this embodiment does not limit this. When a person leaves the visual area of the current camera, the departure time t1 is recorded. When it is determined that the person appearing in an associated camera is the same person, the appearance time t2 is recorded and the number of mobile people is updated. Since the distance between the visual areas of adjacent cameras is fixed, the flow speed of the person can be obtained by calculating the flow time t2-t1.
[0094] Because there may be multiple persons flowing between the photographing device and the associated photographing device within the preset time period, the speed average is calculated according to the flow speeds of the multiple flowing persons.
[0095] by Figure 2c For example, if there are people moving from Cam1 to Cam2 and Cam3 respectively, the number of moving people is 2. Get the t when person 1 leaves Cam1 11 , and the time t when it appears in Cam2 12 , and the distance L1 from Cam1 to Cam2 is obtained, then the speed of person 1 is L1 / (t 12 -t 11 ). Get the time when person 2 leaves the view area of Cam1 21 , and the time t when it appears in Cam3 22 , and the distance L2 from Cam1 to Cam3 is obtained, then the speed of person 2 is L2 / (t 22-t 21 ). Based on the speed of person 1 and the speed of person 2, calculate the average speed of the mobile personnel.
[0096] S250: Determine a congestion level score between the camera and associated cameras based on the number of mobile personnel and their average speed.
[0097] When the number of mobile personnel is larger, it means that there are more personnel flowing between the camera devices, the flow speed is faster, the traffic capacity is strong, and the congestion level is lower. When the average speed of mobile personnel is larger, it means that the flow speed between the camera devices is faster and the congestion level is lower.
[0098] Specifically, the congestion degree between the camera and the associated cameras may be calculated using the following formula:
[0099]
[0100] Among them, W ij Indicates the camera device Cam i Associated camera device Cam j The congestion level between ij Indicates that during the preset time period, the camera device Cam i Transfer to the associated camera Cam j The number of mobile personnel, V ij It represents the average speed of each mobile personnel.
[0101] In the embodiment of the present invention, W ij The larger the value, the lower the congestion.
[0102] S260: Calculate an associated congestion evaluation value between the photographing device and the associated photographing devices according to the congestion degree scores between the photographing device and the associated photographing devices and the weights of the associated photographing devices.
[0103] Specifically, the associated congestion evaluation value between the photographing device and the associated photographing devices may be calculated by the following formula:
[0104]
[0105] Among them, R i Indicates the camera device Cam i The associated congestion evaluation value, k ij Indicates the camera device Cam i Associated camera device Cam j The weight of n represents the associated camera Cam j The number of
[0106] In an embodiment of the present invention, the weight between a photographing device and an associated photographing device can be determined based on the importance of the associated photographing device and the degree of association between the photographing device and the associated photographing device, but this embodiment does not limit the manner in which the weight between the photographing device and the associated photographing device is set.
[0107] S270 , calculating a comprehensive congestion evaluation value of the photographing device according to the independent congestion evaluation value and the associated congestion evaluation value, and the weights of the independent congestion evaluation value and the associated congestion evaluation value.
[0108] Specifically, the comprehensive congestion evaluation value of the camera can be calculated according to the following formula:
[0109]
[0110] in, Indicates the camera device Cam i The comprehensive congestion evaluation value, S i Indicates the camera device Cam i The independent congestion evaluation value, R i Indicates the camera device Cam i The associated congestion evaluation value is a, b are the weights of the comprehensive congestion evaluation value and the associated congestion evaluation value, respectively.
[0111] S280: Calculate a regional congestion evaluation value of the area to be evaluated based on the comprehensive congestion evaluation values of at least two photographing devices and the weights of each photographing device, and determine a congestion degree of the area to be evaluated based on the regional congestion evaluation value.
[0112] Specifically, the regional congestion evaluation value of the area to be evaluated can be calculated according to the following formula:
[0113]
[0114] Among them, S station represents the regional congestion evaluation value of the area to be evaluated, k cami Cam for filming i The weight of .
[0115] In the embodiment of the present invention, the weight of the camera device can be determined according to the importance of the area where the camera device is located in the area to be evaluated. For example, when the area to be evaluated is a subway station, a higher weight can be set for the camera devices at the ticket gate, entry and exit security check, waiting area, etc. However, this embodiment does not limit the setting method of the camera device weight.
[0116] In the embodiment of the present invention, the regional congestion evaluation value of the area to be evaluated is calculated, so as to achieve a quantitative evaluation of the congestion degree of the area to be evaluated.
[0117] The technical solution of this embodiment is to calculate the change rate and update rate of the number of people in the visual area of the camera device by the number of people at the current time and before the preset time period, and calculate the independent congestion evaluation value of the camera device according to the number of people in the current visual area, the change rate of the number of people and the update rate of the number of people, and the update rate of the number of people. The congestion degree score between the camera device and the associated camera device is determined by the number and speed average of the mobile personnel transferred from the visual area of the camera device to the visual area of the associated camera device, thereby calculating the associated congestion evaluation value between the camera device and the associated camera device, and determining the comprehensive congestion evaluation value of the camera device according to the independent congestion evaluation value and the associated congestion evaluation value, and determining the congestion degree of the area to be evaluated according to the comprehensive congestion evaluation value of each camera in the area to be evaluated. The method solves the problem that the accuracy of judging the actual congestion condition is low or the congestion misjudgment is easy to occur in the evaluation method of the personnel congestion condition in the prior art, and fully considers the personnel changes in the visual area of the camera device and the influence of the personnel flow between the visual areas of the camera device and the associated camera devices on the congestion condition, so as to achieve accurate evaluation of the personnel congestion degree.
[0118] Embodiment 3
[0119] Figure 3 3 is a schematic diagram of a structure of a personnel congestion evaluation device provided in the third embodiment of the present invention. The device can be implemented by software and / or hardware, and is generally integrated in a computer device and used in conjunction with at least two shooting devices set in the area to be evaluated. The device includes a congestion evaluation value determination module 310, a comprehensive congestion evaluation value determination module 320, and a congestion degree determination module 330. Among them:
[0120] The congestion evaluation value determination module 310 is used to calculate the independent congestion evaluation value of the camera according to the attribute information of the personnel in the visual area of the camera, and calculate the associated congestion evaluation value between the camera and the associated camera according to the attribute information of the personnel in the visual area of the camera and the visual area of the associated camera;
[0121] A comprehensive congestion evaluation value determination module 320, configured to determine a comprehensive congestion evaluation value of the photographing device according to the independent congestion evaluation value and the associated congestion evaluation value of the photographing device;
[0122] The congestion level determination module 330 is used to determine the congestion level of the area to be evaluated according to the comprehensive congestion evaluation values of at least two shooting devices in the area to be evaluated.
[0123] The technical solution of this embodiment calculates the independent congestion evaluation value of the camera device through the personnel attribute information in the visual area of the camera device, calculates the associated congestion evaluation value through the personnel attribute information in the visual area of the camera device and the visual areas of the associated camera devices, determines the comprehensive congestion evaluation value of the camera device based on the independent congestion evaluation value and the associated congestion evaluation value, and determines the congestion degree of the area to be evaluated based on the comprehensive congestion evaluation values of each camera in the area to be evaluated. This solves the problem that the existing method for evaluating the congestion status of personnel is low in accuracy in determining the actual congestion status, or is prone to misjudgment of congestion, and achieves accurate evaluation of the degree of congestion of personnel.
[0124] Based on the above embodiment, the congestion evaluation value determination module 310 includes:
[0125] A personnel number acquisition unit, used to acquire the number of personnel in the current viewing area of the camera at the current moment, and the number of personnel in the historical viewing area before a preset time period;
[0126] A number change rate and personnel update rate calculation unit, used to calculate the number change rate and personnel update rate of the shooting device according to the number of personnel in the current viewing area and the number of personnel in the historical viewing area;
[0127] The independent congestion evaluation value unit is used to determine the independent congestion evaluation value of the shooting device according to the number of people in the current viewing area, the rate of change of the number of people and the rate of update of the people.
[0128] Based on the above embodiment, the number of people change rate and personnel update rate calculation unit is specifically used for:
[0129] Get the number of new people in the current field of view of the camera;
[0130] The difference between the number of people in the current viewing area and the number of people in the historical viewing area, and the ratio of the number of people in the historical viewing area, are used as the rate of change of the number of people in the shooting device;
[0131] The ratio of the number of new people in the current field of view to the number of people in the current field of view, and the sum of the absolute value of the difference between the number of people in the current field of view and the number of people in the historical field of view and the ratio of the number of people in the historical field of view are taken as the personnel update rate of the shooting device.
[0132] On the basis of the above embodiment, the independent congestion evaluation value unit is specifically used for:
[0133] According to the intervals of the number of personnel in the current viewing area, the rate of change of the number of personnel, and the rate of personnel update, respectively determine the scores that match the number of personnel in the current viewing area, the rate of change of the number of personnel, and the rate of personnel update;
[0134] The independent congestion evaluation value of the shooting device is calculated based on the scores of the number of people in the current viewing area, the rate of change of the number of people, and the rate of update of the number of people, as well as the weights that match the number of people in the current viewing area, the rate of change of the number of people, and the rate of update of the number of people.
[0135] Based on the above embodiment, the congestion evaluation value determination module 310 includes:
[0136] A mobile personnel data calculation unit, used to obtain the number of mobile personnel transferred from the visual area of the shooting device to the visual area of the associated shooting device, and calculate the average speed of the mobile personnel;
[0137] A congestion level determination unit, used to determine the congestion level between the camera and the associated camera according to the number of mobile personnel and the average speed score;
[0138] The associated congestion evaluation value calculation unit is used to calculate the associated congestion evaluation value between the photographing device and the associated photographing device according to the congestion degree score between the photographing device and the associated photographing device, and the weight of the associated photographing device.
[0139] Based on the above embodiment, the comprehensive congestion evaluation value determination module 320 is specifically used to:
[0140] The comprehensive congestion evaluation value of the photographing device is calculated according to the independent congestion evaluation value and the associated congestion evaluation value, and the weights of the independent congestion evaluation value and the associated congestion evaluation value.
[0141] Based on the above embodiment, the congestion level determination module 330 is specifically used to:
[0142] According to the comprehensive congestion evaluation values of at least two photographing devices and the weights of each photographing device, a regional congestion evaluation value of the area to be evaluated is calculated, and according to the regional congestion evaluation value, the congestion degree of the area to be evaluated is determined.
[0143] The personnel congestion evaluation device provided in the embodiment of the present invention can execute the personnel congestion evaluation method provided in any embodiment of the present invention, and has the corresponding functional modules and beneficial effects of the execution method.
[0144] Embodiment 4
[0145] Figure 4 A schematic diagram of the structure of a computer device provided in Embodiment 4 of the present invention is shown in FIG. Figure 4 As shown, the computer device includes a processor 70, a memory 71, an input device 72 and an output device 73; the number of processors 70 in the computer device can be one or more. Figure 4 A processor 70 is taken as an example; the processor 70, memory 71, input device 72 and output device 73 in the computer device can be connected by a bus or other means. Figure 4 The example of connecting through bus is taken in the following.
[0146] The memory 71, as a computer-readable storage medium, can be used to store software programs, computer executable programs and modules, such as the modules corresponding to the personnel congestion evaluation method in the embodiment of the present invention (for example, the congestion evaluation value determination module 310, the comprehensive congestion evaluation value determination module 320 and the congestion degree determination module 330 in the personnel congestion evaluation device). The processor 70 executes various functional applications and data processing of the computer device by running the software programs, instructions and modules stored in the memory 71, that is, implements the above-mentioned personnel congestion evaluation method. The method includes:
[0147] Calculate the independent congestion evaluation value of the camera according to the attribute information of the personnel in the visual area of the camera, and calculate the associated congestion evaluation value between the camera and the associated camera according to the attribute information of the personnel in the visual area of the camera and the associated camera;
[0148] Determining a comprehensive congestion evaluation value of the shooting device according to the independent congestion evaluation value and the associated congestion evaluation value of the shooting device;
[0149] The congestion degree of the area to be evaluated is determined according to the comprehensive congestion evaluation values of at least two shooting devices in the area to be evaluated.
[0150] The memory 71 may mainly include a program storage area and a data storage area, wherein the program storage area may store an operating system and at least one application required for a function; the data storage area may store data created according to the use of the terminal, etc. In addition, the memory 71 may include a high-speed random access memory, and may also include a non-volatile memory, such as at least one disk storage device, a flash memory device, or other non-volatile solid-state storage device. In some instances, the memory 71 may further include a memory remotely arranged relative to the processor 70, and these remote memories may be connected to the computer device via a network. Examples of the above-mentioned network include, but are not limited to, the Internet, an intranet, a local area network, a mobile communication network, and combinations thereof.
[0151] The input device 72 may be used to receive input digital or character information and generate key signal input related to user settings and function control of the computer device. The output device 73 may include a display device such as a display screen.
[0152] Embodiment 5
[0153] Embodiment 5 of the present invention further provides a storage medium including computer executable instructions, wherein the computer executable instructions are used to execute a method for evaluating congestion when executed by a computer processor, the method comprising:
[0154] Calculate the independent congestion evaluation value of the camera according to the attribute information of the personnel in the visual area of the camera, and calculate the associated congestion evaluation value between the camera and the associated camera according to the attribute information of the personnel in the visual area of the camera and the associated camera;
[0155] Determining a comprehensive congestion evaluation value of the shooting device according to the independent congestion evaluation value and the associated congestion evaluation value of the shooting device;
[0156] The congestion degree of the area to be evaluated is determined according to the comprehensive congestion evaluation values of at least two shooting devices in the area to be evaluated.
[0157] Of course, the computer executable instructions of a storage medium including computer executable instructions provided in an embodiment of the present invention are not limited to the operations of the method described above, but can also execute related operations in the personnel congestion evaluation method provided in any embodiment of the present invention.
[0158] Through the above description of the implementation methods, the technicians in the relevant field can clearly understand that the present invention can be implemented by means of software and necessary general hardware, and of course it can also be implemented by hardware, but in many cases the former is a better implementation method. Based on such an understanding, the technical solution of the present invention, in essence, or the part that contributes to the prior art, can be embodied in the form of a software product, and the computer software product can be stored in a computer-readable storage medium, such as a computer floppy disk, a read-only memory (ROM), a random access memory (RAM), a flash memory (FLASH), a hard disk or an optical disk, etc., including a number of instructions for a computer device (which can be a personal computer, a server, or a network device, etc.) to execute the methods described in each embodiment of the present invention.
[0159] It is worth noting that in the embodiment of the above-mentioned personnel congestion evaluation device, the various units and modules included are only divided according to functional logic, but are not limited to the above-mentioned division, as long as the corresponding functions can be achieved; in addition, the specific names of the functional units are only for the convenience of distinguishing each other, and are not used to limit the scope of protection of the present invention.
[0160] Note that the above are only preferred embodiments of the present invention and the technical principles used. Those skilled in the art will understand that the present invention is not limited to the specific embodiments described herein, and that various obvious changes, readjustments and substitutions can be made by those skilled in the art without departing from the scope of protection of the present invention. Therefore, although the present invention has been described in more detail through the above embodiments, the present invention is not limited to the above embodiments, and may include more other equivalent embodiments without departing from the concept of the present invention, and the scope of the present invention is determined by the scope of the appended claims.
Claims
1. A method for evaluating personnel congestion, characterized in that: include: Calculate the independent congestion evaluation value of the camera according to the attribute information of the personnel in the visual area of the camera, and calculate the associated congestion evaluation value between the camera and the associated camera according to the attribute information of the personnel in the visual area of the camera and the associated camera; The associated congestion evaluation value between the camera and the associated camera is calculated based on the attribute information of the persons in the visual area of the camera and the associated camera, including: Obtain the number of mobile personnel transferred from the viewing area of the camera to the viewing area of the associated camera, and calculate the average speed of the mobile personnel; Determine a congestion level score between the camera and associated cameras according to the number and speed average of mobile personnel; Calculate the associated congestion evaluation value between the camera and the associated camera according to the congestion degree score between the camera and the associated camera, and the weight of the associated camera; Determining a comprehensive congestion evaluation value of the shooting device according to the independent congestion evaluation value and the associated congestion evaluation value of the shooting device; The congestion degree of the area to be evaluated is determined according to the comprehensive congestion evaluation values of at least two shooting devices in the area to be evaluated.
2. The method according to claim 1, characterized in that According to the attribute information of people in the visual area of the camera, the independent congestion evaluation value of the camera is calculated, including: Obtain the number of people in the current viewing area of the camera at the current moment, and the number of people in the historical viewing area before a preset time period; According to the number of personnel in the current viewing area and the number of personnel in the historical viewing area, the change rate of the number of personnel in the shooting device and the personnel update rate are calculated respectively; An independent congestion evaluation value of the shooting device is determined based on the number of people in the current viewing area, the rate of change of the number of people, and the rate of update of the people.
3. The method according to claim 2, characterized in that According to the number of people in the current viewing area and the number of people in the historical viewing area, the change rate of the number of people in the shooting device and the update rate of the people are calculated respectively, including: Get the number of new people in the current field of view of the camera; The difference between the number of people in the current viewing area and the number of people in the historical viewing area, and the ratio of the number of people in the historical viewing area, are used as the rate of change of the number of people in the shooting device; The ratio of the number of new people in the current field of view to the number of people in the current field of view, and the sum of the absolute value of the difference between the number of people in the current field of view and the number of people in the historical field of view and the ratio of the number of people in the historical field of view are taken as the personnel update rate of the shooting device.
4. The method according to claim 2, characterized in that: According to the number of people in the current viewing area, the rate of change of the number of people, and the rate of personnel update, the independent congestion evaluation value of the shooting device is determined, including: According to the intervals of the number of personnel in the current viewing area, the rate of change of the number of personnel, and the rate of personnel update, respectively determine the scores that match the number of personnel in the current viewing area, the rate of change of the number of personnel, and the rate of personnel update; The independent congestion evaluation value of the shooting device is calculated based on the scores of the number of people in the current viewing area, the rate of change of the number of people, and the rate of update of the number of people, as well as the weights that match the number of people in the current viewing area, the rate of change of the number of people, and the rate of update of the number of people.
5. The method according to claim 1, characterized in that Determining a comprehensive congestion evaluation value of the shooting device according to the independent congestion evaluation value and the associated congestion evaluation value of the shooting device includes: The comprehensive congestion evaluation value of the photographing device is calculated according to the independent congestion evaluation value and the associated congestion evaluation value, and the weights of the independent congestion evaluation value and the associated congestion evaluation value.
6. The method according to claim 1, characterized in that Determining the congestion level of the area to be evaluated according to the comprehensive congestion evaluation values of at least two shooting devices in the area to be evaluated includes: According to the comprehensive congestion evaluation values of at least two photographing devices and the weights of each photographing device, a regional congestion evaluation value of the area to be evaluated is calculated, and according to the regional congestion evaluation value, the congestion degree of the area to be evaluated is determined.
7. A personnel congestion evaluation device, characterized in that: include: A congestion evaluation value determination module, used to calculate an independent congestion evaluation value of the camera according to the attribute information of the personnel in the visual area of the camera, and to calculate an associated congestion evaluation value between the camera and the associated camera according to the attribute information of the personnel in the visual area of the camera and the visual area of the associated camera; The congestion evaluation value determination module includes: A mobile personnel data calculation unit, used to obtain the number of mobile personnel transferred from the visual area of the shooting device to the visual area of the associated shooting device, and calculate the average speed of the mobile personnel; A congestion level determination unit, used to determine the congestion level between the camera and the associated camera according to the number of mobile personnel and the average speed score; An associated congestion evaluation value calculation unit, used to calculate an associated congestion evaluation value between a photographing device and an associated photographing device according to a congestion degree score between the photographing device and the associated photographing device and a weight of the associated photographing device; A comprehensive congestion evaluation value determination module, used to determine a comprehensive congestion evaluation value of the shooting device according to the independent congestion evaluation value and the associated congestion evaluation value of the shooting device; The congestion level determination module is used to determine the congestion level of the area to be evaluated according to the comprehensive congestion evaluation values of at least two shooting devices in the area to be evaluated.
8. A computer device comprising a memory, a processor and a computer program stored in the memory and executable on the processor, characterized in that: When the processor executes the program, the personnel congestion evaluation method as described in any one of claims 1-6 is implemented.
9. A storage medium containing computer executable instructions, characterized in that: The computer executable instructions are used to execute the personnel congestion evaluation method as described in any one of claims 1 to 6 when executed by a computer processor.
Citation Information
Patent Citations
Crowd density detection method, device and system
CN108171162A
Information processing method and device and storage medium
CN111178113A