System and method for counting number of people in region
By using surveillance cameras and a big data analytics system, the problem of errors in the number of people counted by surveillance cameras has been solved, enabling accurate management of people in the area and real-time display of the number of people.
Patent Information
- Application Number
- CN202511488786.0
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2025-10-17
- Publication Date
- 2026-02-17
AI Technical Summary
In existing technologies, when counting people in an area using surveillance cameras, errors accumulate, making it impossible to accurately obtain the number of people and to obtain the original number of people remaining before the flow statistics are performed.
The system, which uses surveillance camera ports, server ports, and management department ports, analyzes the number of people entering and exiting by capturing images from the surveillance cameras. Combined with big data analysis and processing modules, it fits a statistical error function for personnel to calculate the number of people remaining in real time, and eliminates errors to achieve accurate personnel entry and exit management.
It enables precise management and real-time statistical display of personnel entering and exiting the area, reduces the error of image recognition algorithms of surveillance cameras, and determines the status of personnel staying.
Smart Images

Figure CN121545110A_ABST
Abstract
Description
TECHNICAL FIELD
[0001] The present application relates to the technical field of computer statistics, and particularly relates to a people counting system and a counting method in a region. BACKGROUND
[0002] People counting in a region can provide accurate and effective data support for scientific operation management and personnel service in the fields of retail industry, industrial park, scenic spot and the like. In the prior art, based on the data obtained by a monitoring camera, the in-out behavior of a relevant person in a monitored region is determined according to the action of the person, so as to realize real-time passenger flow counting. This is a passenger flow counting method with high accuracy at present. Since there is an error in the recognition algorithm of the image captured by the monitoring camera, the counting method cannot obtain accurate data of the number of people in the region. The counting method is only suitable for scenes with low accuracy requirement for people counting.
[0003] Moreover, the error will continuously increase with the increase of time, and when multiple monitoring cameras are used to jointly count the number of people in a set region, there will be additional error accumulation.
[0004] In addition, the real-time entrance and exit passenger flow data obtained by the monitoring camera cannot directly obtain the original number of people before passenger flow counting. SUMMARY
[0005] In order to overcome the above defects, the present application provides a people counting system and a counting method in a region, which realizes accurate control of the in-out of people in a region, can count and display the number of people in the region in real time, and determine the personnel retention situation.
[0006] The technical scheme that the present application adopts to solve the technical problems is: a regional population statistics system, comprising a monitoring camera port, a server port and a management department port, the monitoring camera port can shoot the people entering and leaving all entrances and exits of a set region, and the number of people entering and leaving each entrance and exit is analyzed and extracted from the shot image, the server port comprises a data transmission module, a data acquisition and storage module, a big data analysis and processing module and a population calculation module, the data transmission module can realize information intercommunication between the monitoring camera port and the server port, and between the server port and the management department port, the data acquisition and storage module can acquire and store the people entering and leaving data of each entrance and exit obtained by the monitoring camera port, the big data analysis and processing module can analyze the people entering and leaving data collected by the data acquisition and storage module, and fit a population statistical error function E, and the population calculation module can calculate the real-time remaining population RT in the set region in combination with the original remaining population R0 in the set region, the people entering and leaving data and the population statistical error function, the management department port comprises a data extraction module and a data reporting module, the data extraction module can extract the real-time remaining population data in the set region calculated by the population calculation module in real time, and the data reporting module can report the real-time remaining population data in the set region extracted by the data extraction module to the superior department in real time to display the on-site population data in the set region.
[0007] As a further improvement of the present application, the monitoring camera port comprises a monitoring camera terminal, a monitoring data acquisition module and a monitoring data acquisition module, the monitoring data acquisition module can acquire the required data information from the server port, the monitoring camera terminal is fixedly installed at all entrances and exits of the set region, each monitoring camera terminal can shoot the people entering and leaving each entrance and exit, and the monitoring data acquisition module can identify the people entering and leaving in the photos shot by each monitoring camera terminal, and respectively count the number of the identified people entering and leaving.
[0008] As a further improvement of the present application, the population calculation module comprises a regional original remaining population calculation unit and a statistical error elimination module, the regional original remaining population calculation unit can statistically calculate the original remaining population in the set region, the statistical error elimination module can cumulatively calculate all the entrance and exit personnel data collected by the data acquisition and storage module, and eliminate the personnel statistical error cumulative data Et calculated by the personnel statistical error function E of the data analysis and processing module to finally obtain the remaining population cumulative change data in the region.
[0009] A regional population statistics method, comprising the following steps:
[0010] (1). The data acquisition and storage module collects all the access personnel quantity data extracted from the access camera port:
[0011] The access personnel quantity data of each access
[0012] P T a t
[0013] t 1,i 1,o 2,i 2,o 3,i 3,o n,i n,o
[0014] Wherein: p t is the set of the number of entering and leaving personnel in each access in the tth unit time period, C n,i is the number of entering personnel of the nth access, C n,0 is the number of leaving personnel of the nth access, and T is the total time;
[0015] (2). The big data analysis and processing module fits the error in the access personnel quantity of each access to obtain a personnel statistical error function E;
[0016] (3). Calculate the remaining number of people in the preset area of the previous time and the statistical error Et that should be removed at the current time, take the remaining number of people in the preset area as the original remaining number of people R0, and the statistical time period is from the previous time to the end of the current time. In this statistical time period, the statistical error that should be removed at the current time is removed from the cumulative change value of the access personnel quantity of all accesses in the set area, and the cumulative change accurate value SQ t of the remaining number of people in the domain is obtained. t Add the original remaining number of people R0 in the area to the cumulative change accurate value SQ t of the remaining number of people in the area to obtain the remaining number of people R t in the area at the current time. t R t = R0+ SQ t ;
[0017] (4). The remaining number of people R t in the area at the current time is transmitted to the data reporting module, and the data reporting module reports to the superior department.
[0018] As a further improvement of the present invention, the big data analysis and processing module uses the following method to fit a function to the error in the number of people entering and exiting all entrances and exits of a set area:
[0019] (2.1). Calculate the difference qt between the personnel entry and exit data obtained by the surveillance camera ports of the designated area per unit time for all entrances and exits, where qt is a sequence function of the total time T. t =∑C n,i -∑C n,o , t∈T;
[0020] Among them, C n,i Let C be the number of people entering through the nth entrance / exit. n,o Let T be the number of people exiting through the nth entrance / exit, and T be the total time.
[0021] (2.2). Calculate the cumulative change Q of the number of people remaining in the region within t unit time periods. t Q t Let Q be a sequence function of total time T. t =∑ t q t , t∈T;
[0022] (2.3). Regarding Q t Take the centered moving average and decompose Q. t Trend function TQ t Let f be the frequency of the time series, that is, the number of units of time within 24 hours, and l be the length of the time series.
[0023] When f is odd, the formula for calculating the trend function is:
[0024]
[0025] When f is even, the trend function is calculated using a binomial moving average:
[0026]
[0027] (2.4).Q t The trend of change should be "0", then the TQ obtained in step (2.3) is... t To account for the statistical error accumulated over time, observe TQ. t and for TQ t The fitting function is the personnel statistical error function E.
[0028] As a further improvement of the present invention, the method for calculating the number of people remaining in the preceding time setting area is as follows:
[0029] (3.1). Calculate the difference value q of all access data of the people in and out obtained by the monitoring camera port of the set area in unit time t , q t is a sequence function about total time T, q t =∑C n,i -∑C n,o , t∈T;
[0030] Wherein, C n,i is the number of people entering the nth access, C n,o is the number of people leaving the nth access, and T is the total time;
[0031] (3.2). Calculate the cumulative change value Q of the number of people remaining in the area in t unit time period t , Q t is a sequence function about total time T, Q t =∑ t q t , t∈T;
[0032] (3.3). Take the central moving average of Q t , and decompose the trend function TQ t of Q t , as above;
[0033] (3.4). Remove the statistical error TQ t accumulated over time from the cumulative change value Q t of the number of people remaining in the area to obtain the accurate value SQ t of the cumulative change of the number of people remaining in the area, SQ t =Q t -TQ t ;
[0034] The formula for calculating the number of people remaining in the area in the preceding time is:
[0035]
[0036] The beneficial effects of the present application are: the monitoring camera terminal arranged at each entrance and exit of the set area is used to take pictures of each entrance and exit, and the number of personnel entering and leaving the set area in a period of time is extracted by analyzing the pictures, then the original number of personnel remaining in the set area and the statistical error that should be removed at the current time are calculated by means of big data analysis, the cumulative change value of the number of personnel remaining in the area is calculated according to the data provided by the monitoring camera terminal, the statistical error that should be removed at the current time is removed to obtain the accurate cumulative change value of the number of personnel remaining in the area, finally the accurate cumulative change value of the number of personnel remaining in the area is added to the original number of personnel remaining in the set area to obtain the accurate number of personnel remaining in the area in real time, the present application effectively reduces the statistical error of personnel caused by the image recognition algorithm error of the monitoring camera terminal, so as to realize the accurate management and control of the personnel entering and leaving the set area, the number of personnel in the area can be counted and displayed in real time, and the personnel retention in the set area can be determined. BRIEF DESCRIPTION OF DRAWINGS
[0037] Figure 1 The system schematic diagram of the present application is shown in the figure;
[0038] Figure 2 The statistical flowchart of the present application is shown in the figure. DETAILED DESCRIPTION
[0039] In order to more clearly understand the above-mentioned purposes, features and advantages of the present application, the present application is further described in detail below in combination with the accompanying drawings and specific embodiments.
[0040] The embodiment is a people counting system in a region, which comprises a monitoring camera port, a server port and a management department port. The monitoring camera port can take pictures of people entering and leaving all entrances and exits of a set region, and analyze and extract the number of people entering and leaving each entrance and exit from the pictures. The server port comprises a data transmission module, a data collection and storage module, a big data analysis and processing module and a people counting module. The data transmission module can realize information intercommunication between the monitoring camera port and the server port, and between the server port and the management department port. The data collection and storage module can collect and store the data of people entering and leaving each entrance and exit obtained by the monitoring camera port. The big data analysis and processing module can analyze the data of people entering and leaving collected by the data collection and storage module, and fit a people counting error function E. The people counting module can calculate the real-time remaining number of people RT in the set region in combination with the original remaining number of people R0 in the set region, the data of people entering and leaving and the people counting error function. The management department port comprises a data extraction module and a data reporting module. The data extraction module can extract the real-time remaining number of people data in the set region calculated by the people counting module in real time. The data reporting module can report the real-time remaining number of people data in the set region extracted by the data extraction module to the superior department in real time to display the number of people present in the set region.
[0041] The monitoring camera port continuously takes pictures of all entrances and exits of the set region, and the number of people entering and leaving the set region can be counted after judging the behavior of people entering and leaving in the pictures. The data collection and storage module continuously collects and stores the number of people entering and leaving extracted by the monitoring camera port through the data transmission module, and the big data analysis and processing module analyzes and processes the number of people entering and leaving the set region collected by the data collection and storage module. According to the principle of balance of the number of people entering and leaving the set region in a certain period, the number of people entering and leaving the set region is fitted to a people counting error function, and the people counting error function is provided to the people counting module. The people counting module finally obtains the real-time remaining number of people data in the set region by weighted calculation of the original remaining number of people in the set region, the number of people entering and leaving and the cumulative number of counting errors.
[0042] The monitoring camera port comprises a monitoring camera terminal, a monitoring data acquisition module and a monitoring data acquisition module, the monitoring data acquisition module can acquire the required data information from the server port, the monitoring camera terminal is fixedly installed at all entrances and exits of the set area, each monitoring camera terminal can shoot the entering and exiting personnel of each entrance and exit, the monitoring data acquisition module can identify the entering and exiting personnel in the photos shot by each monitoring camera terminal, and the number of the identified entering and exiting personnel is counted respectively.
[0043] The monitoring data acquisition module of the monitoring camera port acquires the required data information from the server (such as the defined unit time t and the start and stop of the monitoring camera terminal), the monitoring camera terminal continuously shoots all entrances and exits of the set area to obtain a plurality of photos of the entrances and exits of the set area, the monitoring data acquisition module identifies the personnel actions in the photos by image recognition technology, and then judges the entering and exiting behaviors of each personnel at the entrance and exit positions in the photos, the monitoring data acquisition module counts the number of the personnel determined to enter and the personnel determined to exit respectively in combination with the data information acquired by the monitoring data acquisition module, and obtains the personnel entering and exiting data in the set area within the unit time.
[0044] The number of people calculation module comprises a region original remaining number calculation unit and a statistical error elimination module, the region original remaining number calculation unit can statistically calculate the original remaining number in the set area, the statistical error elimination module can cumulatively calculate all the entrance and exit personnel data collected by the data acquisition and storage module, and eliminate the personnel statistical error cumulative data Et calculated by the personnel statistical error function E of the data analysis and processing module, and finally obtain the cumulative change data of the remaining number in the region. The original remaining number in the region can be the number of internal personnel before the set area is opened (which is a known number), or the remaining number in the region after a period of time, i.e. the remaining number in the region before the start of statistics.
[0045] A method for counting the number of people in a region, comprising the following steps:
[0046] (1). The data acquisition and storage module collects the number of entering and exiting personnel data of all entrances and exits extracted by the monitoring camera port:
[0047] The number of entering and exiting personnel data of each entrance and exit
[0048] P T ={p1,p2,p3,…p t},
[0049] p t ={(C 1,i ,C 1,o ),(C2,i C 2,o ), (C 3,i C 3,o ), …(C n,i C n,o )}, and transmit the data to the server;
[0050] Where: p t Let C be the set of the number of people entering and exiting each entrance / exit within the t-th time unit. n,i Let C be the number of people entering through the nth entrance / exit. n,o Let T be the number of people exiting through the nth entrance / exit, and T be the total time.
[0051] (2). The big data analysis and processing module fits the error in the number of people entering and exiting each entrance and exit to obtain the personnel statistical error function E. The specific method is as follows:
[0052] (2.1). Calculate the difference q between the personnel entry and exit data obtained by the surveillance camera ports of the designated area at all entrances and exits per unit time. t q t Let q be a sequence function of total time T. t =∑C n,i -∑C n,o , t∈T;
[0053] Among them, C n,i Let C be the number of people entering through the nth entrance / exit. n,o Let T be the number of people exiting through the nth entrance / exit, and T be the total time.
[0054] q t It can also be viewed as the change in the number of people remaining in the area calculated through the surveillance camera port within the t-th unit time period;
[0055] (2.2). Calculate the cumulative change Q of the number of people remaining in the region within t unit time periods. t Q t Let Q be a sequence function of total time T. t =∑ t q t , t∈T;
[0056] Generally, if the number of people entering and leaving a region is balanced within a certain period, then the cumulative change in the number of people remaining in the region exhibits a "zeroing-out phenomenon," Q. t It should be a stationary time series function, i.e., Q. t The trend of change should be 0;
[0057] (2.3). Regarding Q t Take the centered moving average and decompose Q. tTrend function TQ t Let f be the frequency of the time series, that is, the number of units of time within 24 hours, and 1 be the length of the time series;
[0058] When f is odd, the formula for calculating the trend function is:
[0059]
[0060] When f is even, the trend function is calculated using a binomial moving average:
[0061]
[0062] (2.4).Q t The trend of change should be "0", then the TQ obtained in step (2.3) is... t To account for the statistical error accumulated over time, observe TQ. t and for TQ t The fitting function is the personnel statistical error function E;
[0063] (3) Calculate the number of people remaining in the designated area at the previous time and the statistical error Et to be removed at the current time. Take the number of people remaining in the designated area at the previous time as the original number of people remaining in the area R0. The statistical time period is from the beginning of the previous time to the end of the current time. During this statistical time period, remove the statistical error to be removed at the current time from the cumulative change value of the number of people entering and leaving all entrances and exits of the designated area, and obtain the accurate value of the cumulative change of the number of people remaining in the area SQ. t The exact value of the cumulative change between the original number of residents R0 and the number of residents in the region SQ. t Add them together to get the number of people R remaining in the current time zone. t Expressed as a formula: R t =R0+SQ t ;
[0064] The calculation method for the number of people remaining in the specified area before the preceding time is as follows:
[0065] (3.1). Calculate the difference q between the personnel entry and exit data obtained by the surveillance camera ports of the designated area at all entrances and exits per unit time. t q t Let q be a sequence function of total time T. t =∑C n,i -∑C n,o , t∈T;
[0066] Among them, C n,i Let C be the number of people entering through the nth entrance / exit. n,o Let T be the number of people exiting through the nth entrance / exit, and T be the total time.
[0067] q t Also can be seen as the change value of the number of people staying in the area in the t unit time period;
[0068] (3.2). Calculate the cumulative change value Q of the number of people staying in the area in the t unit time period t , Q t is a sequence function about total time T, Q t =∑ t q t , t∈T;
[0069] (3.3). Take the central moving average of Q t , decompose the trend function TQ t of Q t , same as above;
[0070] (3.4). Remove the statistical error TQ t accumulated over time from the cumulative change value Q t of the number of people staying in the area to obtain the accurate cumulative change value SQ t of the number of people staying in the area, SQ t =Q t -TQ t ;
[0071] The formula for calculating the number of people staying in the area in the preceding time is set as:
[0072]
[0073] (4). The number of people staying in the area Rt in the current time is transmitted to the data reporting module, and the data reporting module reports to the superior department.
Claims
1. A people counting system in an area, characterized by: The monitoring camera port, the server port and the management department port, the monitoring camera port can shoot all the access personnel of the set area, and the number of access personnel of each entrance is analyzed and extracted from the photographed image, the server port includes a data transmission module, a data acquisition and storage module, a big data analysis and processing module and a number calculation module, the data transmission module can realize information intercommunication between the monitoring camera port and the server port and between the server port and the management department port, the data acquisition and storage module can collect and store the personnel access data of each entrance obtained by the monitoring camera port, the big data analysis and processing module can analyze the personnel access data collected by the data acquisition and storage module, and fit the personnel statistical error function E, the number calculation module can calculate the real-time remaining number RT of the set area by combining the original remaining number R0 in the set area, the personnel access data and the personnel statistical error function, the management department port includes a data extraction module and a data reporting module, the data extraction module can extract the real-time remaining number data of the set area calculated by the number calculation module in real time, and the data reporting module can report the real-time remaining number data of the set area extracted by the data extraction module to the superior department in real time to display the number of people in the set area.
2. The system for counting people in a region according to claim 1, characterized in that: The monitoring camera port includes a monitoring camera terminal, a monitoring data acquisition module and a monitoring data acquisition module, the monitoring data acquisition module can obtain the required data information from the server port, the monitoring camera terminal is fixedly installed at all entrances of the set area, each monitoring camera terminal can shoot the access personnel of each entrance, and the monitoring data acquisition module can identify the entering personnel and the leaving personnel in the photos shot by each monitoring camera terminal and count the number of the identified entering personnel and leaving personnel respectively.
3. The system for counting people in a region according to claim 1, wherein: The number calculation module includes a region original remaining number calculation unit and a statistical error elimination module, the region original remaining number calculation unit can statistically calculate the original remaining number in the set area, the statistical error elimination module can cumulatively calculate all the access personnel data of the entrances and exits collected by the data acquisition and storage module, and eliminate the personnel statistical error cumulative data Et calculated by the personnel statistical error function E of the data analysis and processing module to finally obtain the cumulative change data of the remaining number in the region.
4. A method for counting the number of people in an area using the system for counting the number of people in an area according to claims 1 to 3, characterized by: The method comprises the following steps: (1). The data acquisition and storage module collects the access personnel quantity data of all entrances and exits extracted by the monitoring camera port: The number of people entering and exiting each entrance and exit P T = {p1, p2, p3,... p t}, p t = {(C 1,i , C 1,o ), (C 2,i , C 2,o ), (C 3,i , C 3,o ),... (C n,i , C n,o )}, and transmit the data to the server; wherein: p t is the set of the number of people entering and leaving each entrance in the tth unit time period, C n,i is the number of people entering the nth entrance, C n,o is the number of people leaving the nth entrance, T is the total time; (2). The big data analysis and processing module fits the error in the access personnel quantity of each entrance to obtain the personnel statistical error function E; (3). Calculate the remaining number of people in the pre-time setting area and the statistical error Et that should be eliminated at the current time, take the remaining number of people in the pre-time setting area as the original remaining number of people R0, and the statistical time period is from the beginning of the pre-time to the end of the current time. In this statistical time period, from the cumulative change value of the number of people entering and leaving all entrances and exits of the setting area, eliminate the statistical error that should be eliminated at the current time, and obtain the cumulative change accurate value SQ of the remaining number of people in the domain t Add the original remaining number of people R0 in the area and the cumulative change accurate value SQ of the remaining number of people in the area t to obtain the remaining number of people R in the area at the current time t , which can be expressed by the formula as follows: t R t =R0+SQ (4). The current time region remaining number Rt is transmitted to the data reporting module, and the data reporting module reports to the superior department.
5. The method of claim 4, wherein: The method for fitting function of the error in the access personnel quantity of all entrances of the set area by the big data analysis and processing module is as follows: (2.1). Calculate the difference value q of all access data of the personnel in and out obtained by the monitoring camera port of the set area per unit time t , q t is a sequence function about total time T, q t =∑C n,i -∑C n,o , t∈T; where C n,i is the number of people entering the nth doorway, C n,o is the number of people exiting the nth doorway, and T is the total time. (2.2). Calculate the cumulative change value Q of the number of people remaining in the area within t unit time periods t , Q t is a sequence function about total time T, Q t =∑ t q t , t∈T; (2.3). For Q t Taking the centered moving average, decompose Q t into the trend function TQ t , define f as the frequency of the time series, i.e. the number of units of time in 24 hours, and n as the length of the time series. When f is an odd number, the calculation formula of the trend function is: When f is even, binomial moving average is performed, and the calculation formula of the trend function is: (2.4).Q t The trend of the change should be "0", then TQ t is the statistical error accumulated over time, observe TQ t , and TQ t is the fitting function, which is the personnel statistical error function E.
6. The method of claim 4, wherein: The calculation method of the number of people remaining in the pre-set time zone is as follows: (3.1). Calculate the difference value q of all access data of the personnel in and out obtained by the monitoring camera port of the set area per unit time t , q t is a sequence function about total time T, q t =∑C n,i -∑C n,o , t∈T; where C n,i is the number of people entering the nth doorway, C n,o is the number of people exiting the nth doorway, and T is the total time. (3.2). Calculate the cumulative change value Q of the number of people remaining in the area within t unit time periods t , Q t is a sequence function about total time T, Q t =∑ t q t , t∈T; (3.3). For Q t Taking the centered moving average, decompose Q t into a trend function TQ t , as above; (3.4). From the accumulated change value Q of the number of people remaining in the region t remove the accumulated statistical error TQ over time t to obtain the accurate accumulated change value SQ of the number of people remaining in the region t , SQ t = Q t - TQ t ; The calculation formula of the number of people remaining in the pre-set time zone is: The calculation formula of the number of people remaining in the pre-set time zone is: