CN106845620B - A kind of passenger flow counting method based on quene state analysis - Google Patents
A kind of passenger flow counting method based on quene state analysis Download PDFInfo
- Publication number
- CN106845620B CN106845620B CN201611203541.XA CN201611203541A CN106845620B CN 106845620 B CN106845620 B CN 106845620B CN 201611203541 A CN201611203541 A CN 201611203541A CN 106845620 B CN106845620 B CN 106845620B
- Authority
- CN
- China
- Prior art keywords
- area
- passenger flow
- sub
- flow queue
- input image
- Prior art date
- Legal status (The legal status is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the status listed.)
- Active
Links
- 238000000034 method Methods 0.000 title claims abstract description 34
- 238000004458 analytical method Methods 0.000 title claims description 13
- 238000012544 monitoring process Methods 0.000 claims abstract description 18
- 230000007246 mechanism Effects 0.000 claims abstract description 7
- 238000001514 detection method Methods 0.000 claims description 14
- 230000006872 improvement Effects 0.000 description 8
- 238000004364 calculation method Methods 0.000 description 6
- 238000010586 diagram Methods 0.000 description 5
- 230000009286 beneficial effect Effects 0.000 description 2
- 230000008859 change Effects 0.000 description 2
- 239000003086 colorant Substances 0.000 description 2
- 238000005516 engineering process Methods 0.000 description 2
- 238000007726 management method Methods 0.000 description 2
- 238000012935 Averaging Methods 0.000 description 1
- 238000013459 approach Methods 0.000 description 1
- 230000008901 benefit Effects 0.000 description 1
- 238000011161 development Methods 0.000 description 1
- 230000000694 effects Effects 0.000 description 1
- 238000000605 extraction Methods 0.000 description 1
- 238000005286 illumination Methods 0.000 description 1
- 238000003384 imaging method Methods 0.000 description 1
- 238000012986 modification Methods 0.000 description 1
- 230000004048 modification Effects 0.000 description 1
- 238000013486 operation strategy Methods 0.000 description 1
- 230000008569 process Effects 0.000 description 1
- 238000012545 processing Methods 0.000 description 1
- 238000006467 substitution reaction Methods 0.000 description 1
- 238000011410 subtraction method Methods 0.000 description 1
Classifications
-
- G—PHYSICS
- G06—COMPUTING; CALCULATING OR COUNTING
- G06M—COUNTING MECHANISMS; COUNTING OF OBJECTS NOT OTHERWISE PROVIDED FOR
- G06M11/00—Counting of objects distributed at random, e.g. on a surface
-
- G—PHYSICS
- G06—COMPUTING; CALCULATING OR COUNTING
- G06V—IMAGE OR VIDEO RECOGNITION OR UNDERSTANDING
- G06V20/00—Scenes; Scene-specific elements
- G06V20/50—Context or environment of the image
- G06V20/52—Surveillance or monitoring of activities, e.g. for recognising suspicious objects
- G06V20/53—Recognition of crowd images, e.g. recognition of crowd congestion
-
- H—ELECTRICITY
- H04—ELECTRIC COMMUNICATION TECHNIQUE
- H04N—PICTORIAL COMMUNICATION, e.g. TELEVISION
- H04N7/00—Television systems
- H04N7/18—Closed-circuit television [CCTV] systems, i.e. systems in which the video signal is not broadcast
Landscapes
- Engineering & Computer Science (AREA)
- Physics & Mathematics (AREA)
- General Physics & Mathematics (AREA)
- Theoretical Computer Science (AREA)
- Multimedia (AREA)
- Signal Processing (AREA)
- Image Analysis (AREA)
- Image Processing (AREA)
Abstract
The present invention provides the passenger flow counting methods analyzed based on quene state, comprising the following steps: S1, obtains the video streaming image of monitoring area as input picture;S2, at least one passenger flow queue region is cooked up in the input image using setting regions;S3, passenger flow queue region is divided into several subregions that width is not less than pedestrian's shoulder breadth;S4, it uses background subtraction and combines context update mechanism to extract the foreground area in passenger flow queue region;S5, foreground pixel proportion in all subregion is calculated, when being more than or equal to threshold value P, determine that the subregion logic state is 1, otherwise determine that the subregion logic state is 0, the logic state of all subregions is stored in array, the number in quantity statistics passenger flow queue region for being 1 by logic state in array.In the present invention, passenger flow statistics when passing through the channel of regular shape to pedestrian are realized, passenger flow statistics efficiency and speed are improved.
Description
Technical Field
The invention relates to the field of video detection, in particular to a passenger flow counting method based on queue state analysis.
Background
In the management and decision-making of public places such as shopping malls, shopping centers, airports, stations and the like, the flow of people is indispensable data. Through counting the people flow, namely the number of people entering and exiting, the operation work in public places can be effectively monitored and organized in real time, and safer environment and higher-quality service are provided for people. Taking a shopping mall as an example, the flow of people is a very basic and important index, is closely related to the sales volume of the shopping mall, and if the accurate and real flow of people is known, reliable reference information can be provided for sales, services and logistics.
The traditional people counting method utilizes manual detection or contact type equipment, but with the arrival of the information era, the invention of an automatic people counting method is necessary. The intelligent people counting technology is an intelligent management system established by a method combining computer vision and image processing, and under the condition of no need of manual intervention, people counting in passenger flow is realized only by analyzing a video sequence shot by a camera in real time.
In the prior art, cameras can be arranged at entrances and exits of supermarkets and shopping malls, and the number of people passing in and out is counted by an image video recognition technology. However, this approach has large errors. Because not all pedestrians entering and exiting a mall or supermarket are customers or consumers. If the staff who goes in and out of the shopping mall and the supermarket and the staff who performs temporary work go in and out of the shopping mall, the staff can be captured by the camera, so that the passenger flow statistics is inaccurate. However, there are similar solutions in the prior art based on collecting the colors of the garments of the workers and eliminating the workers from the total number of passenger flows. However, in the prior art, a large number of positive and negative samples need to be acquired for clothes and skin colors of workers, so that the operation is complex and the calculation cost is high. Particularly, when the worker changes the clothes in four seasons, the worker needs to change the clothes to eliminate the positive sample containing the worker, which also increases the difficulty and calculation overhead of carrying out statistics on passenger flow in places with complex environments such as markets, supermarkets and the like to a certain extent.
Disclosure of Invention
The invention aims to disclose a passenger flow counting method based on queue state analysis, which is used for realizing passenger flow statistics when pedestrians pass through a passage with a regular shape, improving the passenger flow statistics efficiency and speed and reducing the calculation overhead.
In order to achieve the above object, the present invention provides a passenger flow counting method based on queue status analysis, comprising the following steps:
s1, acquiring a video stream image of the monitoring area as an input image;
s2, planning at least one passenger flow queue area in the input image by using the set area;
s3, dividing the passenger flow queue area into a plurality of sub-areas with the width not less than the shoulder width of the pedestrian;
s4, extracting a foreground area in the passenger flow queue area by adopting a background difference method and combining a background updating mechanism;
s5, calculating the proportion of foreground pixels in each sub-area, judging the logic state of the sub-area to be 1 when the proportion of the foreground pixels in each sub-area is greater than or equal to a threshold value P, otherwise judging the logic state of the sub-area to be 0, then storing the logic states of all the sub-areas into an array, and counting the number of people in the passenger flow queue area according to the number of the logic states of 1 in the array.
As a further improvement of the present invention, the step S1 specifically includes: and acquiring a video stream image of a monitoring area as an input image through a camera, wherein the monitoring area is positioned right below the camera.
As a further improvement of the present invention, the set region in step S2 has an axisymmetric shape.
As a further improvement of the present invention, the setting area in step S2 includes a rectangle, a square, an ellipse, a circle, a semicircle, a semi-ellipse or an equilateral triangle.
As a further improvement of the present invention, the widths of all the sub-regions in the step S3 are equal.
As a further improvement of the present invention, the "background update mechanism" in step S4 is specifically: input image F at current framet(x, y) and the background image B of the previous framet-1(x, y) when the following two conditions are met simultaneously, inputting the current frame into an image Ft(x, y) defining a new background image to collectively make a predictive update for the next frame of input image; wherein,
the first condition is as follows: current frame input image Ft(x, y) and the background image B of the previous framet-1The inter-frame difference of (x, y) is less than a threshold delta,
and a second condition: previous frame input image and current frame input image F sampled within time interval tautThe inter-frame difference of (x, y) is less than the threshold δ.
As a further development of the invention, the threshold δ is 50% of the total number of pixels in the sub-region and the time interval τ is 0.5 seconds.
As a further improvement of the present invention, the step S5 specifically includes:
counting the proportion of foreground pixels in each sub-region, when the proportion of the foreground pixels contained in the sub-region is greater than or equal to a threshold value P, judging that the logic state of the sub-region is 1, and when the proportion of the foreground pixels contained in the sub-region is less than the threshold value P, judging that the logic state of the sub-region is 0, wherein the threshold value P is 50%;
and storing the logic states of all the sub-areas into an array, and counting the number of people in the passenger flow queue area by calculating the number of the logic states in the array to be 1.
As a further improvement of the present invention, the step S5 further includes using a detection area that is the same as a sub-area in the passenger flow queue area, sliding the center of the detection area to the boundary of adjacent sub-areas, and counting the number of foreground pixels included in the detection area; and when the proportion of foreground pixels contained in the detection area is greater than or equal to a threshold value P, resetting the logic state of any one of two adjacent sub-areas connected with the detection area, of which the original logic state is 0, to 1.
As a further improvement of the present invention, the method further comprises the following steps after the step S5: and setting a mark area for the sub-area at the end part in the passenger flow queue area to track the sub-area at the end part so as to determine that all pedestrians in the passenger flow queue area pass through the passenger flow queue area, and starting to count the next passenger flow queue when the mark area leaves the passenger flow queue area.
Compared with the prior art, the invention has the beneficial effects that: according to the invention, the passenger flow statistics is realized when the pedestrian passes through the passage with the regular shape, the passenger flow statistics efficiency and speed are improved, the calculation overhead is obviously reduced, and the passenger flow statistics method has good market prospect and commercial value.
Drawings
FIG. 1 is a schematic flow chart of an embodiment of a method for counting passenger flows based on queue status analysis according to the present invention;
FIG. 2 is a schematic diagram of the operation of FIG. 1 to obtain video stream images of a monitored area;
fig. 3 is a schematic diagram of the setting region in step S2 being a rectangle;
FIG. 4 is a schematic diagram of a passenger flow queue rectangular area divided into a plurality of sub-areas;
fig. 5 is a schematic diagram of performing sliding detection on two adjacent sub-regions by using detection regions with the same sub-region;
FIG. 6 is a diagram of an example of an application of a queue status analysis-based passenger flow counting method according to the present invention.
Detailed Description
The present invention is described in detail with reference to the embodiments shown in the drawings, but it should be understood that these embodiments are not intended to limit the present invention, and those skilled in the art should understand that functional, methodological, or structural equivalents or substitutions made by these embodiments are within the scope of the present invention.
Please refer to fig. 1 to fig. 6, which illustrate an embodiment of a method for counting passenger flows based on queue status analysis according to the present invention.
In the present embodiment, the method for counting the number of pedestrians having a certain passing rule in a place such as a cash register, a ticket gate, an airport security check passage, etc., which is relatively fixed in the indoor or outdoor, includes the following steps, based on a fixed or mobile image capturing device, such as a video camera, a still camera, a track-mounted video camera, or a still camera.
First, step S1 is executed to acquire a video stream image of a monitored area as an input image.
The passenger flow counting method based on queue state analysis in the embodiment is based on vertical shooting by a camera and is suitable for outdoor situations and/or indoor situations.
As shown in fig. 2, in the present embodiment, the step S1 specifically includes: video stream images of a monitored area 30 are acquired as input images by the camera 10, the monitored area 30 being located directly below the camera 10.
Specifically, the camera 10 is disposed immediately above the vicinity of the entrance 20, and a pedestrian can enter the monitoring area 30 from the entrance 20 in the direction of the arrow 201. The monitoring area 30 acquired by the camera 10 may completely cover the entire area of the doorway 20. For example, when the monitoring area 30 is disposed in a strip-shaped area at a checkout counter of a supermarket, the monitoring area 30 may be an area enclosed by guide rails of one of the checkout counters, or an area enclosed by guide rails of a plurality of checkout counters, as shown in fig. 6.
In fig. 2, the monitoring area 30 is rectangular, but may be square or circular or have other shapes. The camera 10 is located directly above the centre point 301 of the monitored area 30, from which we can deduce that the monitored area 30 is located directly below the camera 10. Therefore, as shown in fig. 6, the camera 10 may be disposed on the top of the monitoring area 30, and only the camera 10 may be disposed directly above or obliquely above the areas where the three cash registers of the cash register a, the cash register B, and the cash register C are located, so that the video stream images formed by the passenger streams passing through the respective cash registers are captured in real time by one camera 10 or by a plurality of cameras 10.
Next, step S2 is executed to plan at least one passenger flow queue area in the input image using the setting area.
Specifically, referring to fig. 3, the video stream image obtained by the camera 10 from the monitoring area 30 includes a passenger queue area 302, i.e., the passenger queue area 302 is only a component of the input image. In order to reduce the calculation consumption, in the embodiment, only the passenger flow queue area 302 in the input image is analyzed, and the number of pedestrians continuously passing through the passenger flow queue area 302 in a certain time is determined, so that the passenger flow at the entrance and exit of the supermarket gate does not need to be counted, thereby avoiding the interference of the passenger flow formed by the staff who enter and exit the entrance and exit of the supermarket gate on the real passenger flow formed by the customers who purchase the commodities, and improving the accuracy of the passenger flow counting and counting of the customers who purchase the commodities in the supermarket.
As shown in fig. 6, three passenger queue areas, that is, a passenger queue area 3021, a passenger queue area 3022, and a passenger queue area 3023 are formed in the monitoring area 30. Seven sub-regions, namely a sub-region 3031 to a sub-region 3037, are planned in the passenger flow queue region 3021 by a rectangular set region; seven sub-areas, namely sub-area 3131 to sub-area 3137, are planned in the passenger flow queue area 3022 by a rectangular setting area; seven sub-regions, that is, a sub-region 3231 to a sub-region 3237, are planned in the passenger flow queue region 3023 by a rectangular setting region. The cashier desk A, the cashier desk B and the cashier desk C can be respectively positioned at one side of the three passenger flow queue areas.
In fig. 6, each sub-area may be approximately the width of a normal male, and pedestrians may pass in sequence from left to right in the three passenger flow queuing areas. A camera 10 may be arranged above each cash register station to acquire input images; of course, a panoramic camera may be arranged above the cash register area to respectively shoot a plurality of groups of pedestrians, and three passenger flow queue areas are planned in the input image. The moving tracks of the pedestrians in the three passenger flow queue areas are relatively fixed, so that the pedestrians in the input image acquired by the method have better regularity, and the tracking and counting operation on the pedestrians at the later stage is facilitated.
In fig. 3, the passenger queue area 302 in the monitoring area 30 is selected by a rectangular setting area. Because the passenger flow queue area at the cash register passage of the shopping mall is relatively fixed, the passenger flow queue area is preset by the rectangular setting area, which is feasible and efficient.
Specifically, in the present embodiment, the passenger flow queue area 302 formed by the rectangular setting area is defined by the upper left-hand coordinate (x)1,y1) And the coordinates of the lower right corner (x)2,y2) And (6) determining. If Δ x is taken to be x2-x1,Δy=y2-y1Then | Δ x | determines the length of the traffic queue area 302 and | Δ y | determines the width of the traffic queue area 302. When setting the rectangular passenger queue area 302, it should be ensured that it covers the cash register channel, and | Δ y | is as wide as possible.
In the present embodiment, the set area in step S2 is in an axisymmetric shape, and it is further preferable that the set area includes a rectangle, a square, an ellipse, a circle, a semicircle, a semi-ellipse, or an equilateral triangle, and is most preferably a rectangle.
Next, step S3 is executed to divide the passenger flow queue area into sub-areas having a width not smaller than the shoulder width of the pedestrian. Thereby dividing the passenger flow queue area 302 into ten sub-areas 303, each sub-area 303 being sized to accommodate exactly a single pedestrian. Of course, the passenger flow queue area 302 may be divided into a greater or lesser number of sub-areas according to the length of the cash channel. A pedestrian may pass through the passenger flow queue area 302 in the direction of the arrow in fig. 5.
The traffic objects are individual pedestrians at the checkout lane and pass through the checkout counter in sequence. In this embodiment, the average body width Δ s of a single passenger flow object is counted in advance, then the passenger flow queue area 302 is divided into a series of sub-areas 303 from right to left with reference to fig. 4 by taking the size of Δ s as an interval, and the number N of the sub-areas 303 is calculated by using the following formula:
n ═ fix (| Δ x |/Δ s), where fix is the rounding operator.
The value of Δ s can be set according to actual conditions, because it has a certain relationship with the height of the camera 10, the higher the camera 10 is, the wider the field of view is, the smaller the size of a single passenger flow object is when imaging, and therefore, the value of Δ s can be determined by performing statistical averaging on the actual size of the passenger flow object in the image input by the camera 10.
In the present embodiment, the widths of all the sub-regions 303 in step S3 are equal. The width of the sub-region 303 is greater than or equal to the maximum width that can be formed by the shoulder and arm of an adult male in any swinging state, and it can be equivalently determined that the maximum width of the sub-region 303 is less than or equal to 2 meters.
Next, step S4 is executed to extract a foreground region in the passenger flow queue region by using a background subtraction method in combination with a background update mechanism. In the present embodiment, the monitoring area 30 formed by the camera 10 is a cash register passage, and a passenger flow queue area defined by a rectangular setting area is a specific analysis target.
In the case where no passenger passes through, the image B (x, y) of the passenger queue area 302 is relatively stable in the camera 10, and thus can be used as a background image. When a passenger flow object enters the cash register channel (i.e., the passenger flow queue area 302), the passenger flow queue area 302 has a larger gray value change in the passenger flow queue area 302 relative to the current frame background image B (x, y) in the current frame input image F (x, y) of the camera 10. Therefore, the passenger flow foreground region can be detected by the image difference operation in the prior art. Specifically, in the present embodiment, the difference image D (x, y) is calculated using the following formula:
then, the difference image D (x, y) is binarized to obtain a binary image BW (x, y), and an operation formula is as follows:
where T is a division threshold, and a specific division threshold T is set to 40. The area with the value 1 in the binary image BW (x, y) is defined as a foreground area containing the passenger flow object.
Of course, the background area is not always constant. For example, differences in morning and evening illumination, changes in associated facilities at the checkout lane, and the like all result in corresponding changes in the current frame background image B (x, y). Therefore, a background updating mechanism is introduced, which is beneficial to improving the background difference effect, so that the foreground area and the number of foreground pixels can be better detected.
In the present embodiment, the current frame input image F (x, y) and the previous frame background image B among the plurality of input images in real time in the camera 10 are selected according to the passenger flow queue area 302t-1(x, y) to update the background for the prediction. In particular, the image F is input using the appropriate current framet(x, y) to update the background image B of the previous framet-1(x, y). The current frame foreground input image F (x, y) needs to satisfy the following two conditions:
the first condition is as follows: current frame input image Ft(x, y) and the background image B of the previous framet-1The inter-frame difference of (x, y) is less than a threshold delta,
and a second condition: previous frame input image and current frame input image F sampled within time interval tautThe inter-frame difference of (x, y) is less than the threshold δ.
Wherein the condition one is used for ensuring the current frame input image Ft(x, y) with respect to the previous frame background image Bt-1(x, y) has a small variation, and condition two is used to ensure that the process of updating the background frame input image has good stability.
In the first condition and the second condition, the specific calculation mode of the interframe difference is: in the manner described above in this embodiment, the difference image between two frames is calculated and binarized to obtain a binary image, and then the difference between two frames is measured by the number of regions in the binary image, which is 1. Preferably, the threshold δ is set to 50% of the total number of pixels in the sub-region 303. The time interval τ in condition two is set to 0.5 second. For the current frame input image F satisfying the above two conditionst(x, y), the present invention is set as a new background, i.e., a background image B defining the current frame input image as the next frame input imaget(x,y)=Ft(x, y). By updating the background in real time and extracting the foreground area in the passenger flow queue area 302 by adopting a background difference method, the extraction efficiency of the foreground area and the foreground pixel quantity is improved, so that the pedestrian area in the sub-area 303 can be better grabbed.
Then, step S5 is executed to calculate the proportion of foreground pixels in the foreground area in each sub-area in the sub-area, when the proportion is greater than or equal to the threshold P, the logic state of the sub-area is determined to be 1, otherwise, the logic state of the sub-area is determined to be 0, then the logic states of all the sub-areas are stored in an array, and the number of people in the passenger flow queue area is counted according to the number of logic states in the array being 1.
In the present embodiment, step S5 specifically includes:
counting the proportion of foreground pixels in each sub-area 303 of the passenger flow queue area 302, when the proportion of the foreground pixels contained in the sub-area is greater than or equal to a threshold value P, determining that the logic state of the sub-area is 1, and when the proportion of the foreground pixels contained in the sub-area is less than the threshold value P, determining that the logic state of the sub-area is 0, wherein the threshold value P is 50%;
and storing the logic states of all the sub-areas into an array, and counting the number of people in the passenger flow queue area by calculating the number of the logic states in the array to be 1.
The sub-area 303 with the logic state of 1 represents that the sub-area 303 has a passenger flow object (i.e. a passenger flow target), and the number of passengers in the passenger flow queue area 302 can be counted by counting the number of all 1 in the array.
Typically, a single passenger flow object spans two sub-areas, which affects the determination of the logic state of the corresponding sub-area. To solve this problem, the logic state of each sub-region 303 needs to be reset. Referring to fig. 5, in the present embodiment, a rectangular frame 100 having the same size as the sub-area 303 is used to slide and detect whether a passenger flow target object crossing the two sub-areas exists at the boundary between two adjacent sub-areas (i.e., the sub-area 303a and the sub-area 303 b). Specifically, the center of the rectangular frame is slid to the boundary of the adjacent sub-regions, then the number of foreground pixels contained in the rectangular frame region is counted, and if the number of foreground pixels contained in the rectangular frame region is greater than 50% of the total number of pixels in a single sub-region, the logic state of any one sub-region with the original logic state of 0 in the two adjacent sub-regions is reset to be 1.
In the present embodiment, the method further includes, after step S5, the steps of: a mark area is set for the sub-area at the end in the passenger flow queue area 302 to perform tracking on the sub-area at the end, so as to determine that all pedestrians in the passenger flow queue area have passed through the passenger flow queue area 302, and when the mark area leaves the passenger flow queue area 302, counting for the next passenger flow queue is started. For example, we can define the leftmost sub-region 303a in fig. 5 as a sign region, and when a pedestrian object captured in the sub-region 303a moves from left to right and leaves the passenger queue region 302, then the passenger flow statistics of the next cycle is started.
Assuming that the passenger flow direction slides from left to right in the passenger flow queue area 302 through a rectangular frame (the size is the same as that of the sub-area 303), an area which just contains a passenger flow target object and is positioned at the leftmost end is selected as a mark area, target tracking is performed on the mark area, when the tracked target moves out of the passenger flow queue area from left to right, all the passenger flow objects in the current passenger flow queue are judged to pass through the monitoring area, and counting statistics on the number of people in the next passenger flow queue is started. Specifically, a classic Mean-Shift-based target tracking algorithm is adopted to perform tracking operation.
Through the passenger flow counting method based on queue state analysis shown in the embodiment, the information such as the number of customers who actually participate in purchasing and the residence time of per-person account settlement can be more directly counted by means of the passenger flow information at the position of the cash register channel of the shopping mall, and the information is helpful for the shopping mall to count per-person consumption of the customers on the same day and can reflect the self-cash register service efficiency of the shopping mall. The shopping mall can correspondingly adjust the self-operation strategy through the information to improve the operation efficiency, so that the shopping mall has better market value and good economic benefit. The passenger flow technical method can be networked with a shopping mall background server to detect the passenger flow load of each cash channel in real time, so that the client is guided to go to the cash channel with less queuing number for payment, the payment of the client is greatly facilitated, and the time for queuing for payment is saved.
The above-listed detailed description is only a specific description of a possible embodiment of the present invention, and they are not intended to limit the scope of the present invention, and equivalent embodiments or modifications made without departing from the technical spirit of the present invention should be included in the scope of the present invention.
It will be evident to those skilled in the art that the invention is not limited to the details of the foregoing illustrative embodiments, and that the present invention may be embodied in other specific forms without departing from the spirit or essential attributes thereof. The present embodiments are therefore to be considered in all respects as illustrative and not restrictive, the scope of the invention being indicated by the appended claims rather than by the foregoing description, and all changes which come within the meaning and range of equivalency of the claims are therefore intended to be embraced therein. Any reference sign in a claim should not be construed as limiting the claim concerned.
Furthermore, it should be understood that although the present description refers to embodiments, not every embodiment may contain only a single embodiment, and such description is for clarity only, and those skilled in the art should integrate the description, and the embodiments may be combined as appropriate to form other embodiments understood by those skilled in the art.
Claims (10)
1. A passenger flow counting method based on queue state analysis is characterized by comprising the following steps:
s1, acquiring a video stream image of the monitoring area as an input image;
s2, planning at least one passenger flow queue area in the input image by using the set area;
s3, dividing the passenger flow queue area into a plurality of sub-areas with the width not less than the shoulder width of the pedestrian;
s4, extracting a foreground area in the passenger flow queue area by adopting a background difference method and combining a background updating mechanism;
s5, calculating the proportion of foreground pixels in each sub-area, judging the logic state of the sub-area to be 1 when the proportion of the foreground pixels in each sub-area is greater than or equal to a threshold value P, otherwise judging the logic state of the sub-area to be 0, then storing the logic states of all the sub-areas into an array, and counting the number of people in the passenger flow queue area according to the number of the logic states of 1 in the array;
the step S3 further includes: and using a rectangular frame with the same size as the sub-area to slide and detect the boundary of the two adjacent sub-areas.
2. The method according to claim 1, wherein the step S1 is specifically: and acquiring a video stream image of a monitoring area as an input image through a camera, wherein the monitoring area is positioned right below the camera.
3. The method according to claim 1, wherein the setting area in step S2 is in an axisymmetric shape.
4. The method of claim 3, wherein the setting area in step S2 comprises a rectangle, square, oval, circle, semicircle, semi-oval, or equilateral triangle.
5. The method according to claim 3 or 4, wherein the widths of all sub-areas in step S3 are equal.
6. The queue status analysis-based passenger flow counting method according to claim 5, wherein the "background update mechanism" in step S4 is specifically: input image F at current framet(x, y) and the background image B of the previous framet-1(x, y) when the following two conditions are met simultaneously, inputting the current frame into an image Ft(x, y) defining a new background image to collectively make a predictive update for the next frame of input image; wherein,
the first condition is as follows: current frame input image Ft(x, y) and the background image B of the previous framet-1The inter-frame difference of (x, y) is less than a threshold delta,
and a second condition: previous frame input image and current frame input image F sampled within time interval tautThe inter-frame difference of (x, y) is less than the threshold δ.
7. The method of claim 6, wherein the threshold δ is 50% of the total number of pixels in a sub-region and the time interval τ is 0.5 seconds.
8. The method according to claim 6, wherein the step S5 is specifically:
counting the proportion of foreground pixels in each sub-region, when the proportion of the foreground pixels contained in the sub-region is greater than or equal to a threshold value P, judging that the logic state of the sub-region is 1, and when the proportion of the foreground pixels contained in the sub-region is less than the threshold value P, judging that the logic state of the sub-region is 0, wherein the threshold value P is 50%;
and storing the logic states of all the sub-areas into an array, and counting the number of people in the passenger flow queue area by calculating the number of the logic states in the array to be 1.
9. The passenger flow counting method according to claim 8, wherein the step S5 further comprises counting the number of foreground pixels contained in the detection area by sliding the center of the detection area to the boundary of the adjacent sub-areas using the same detection area as the sub-area in the passenger flow queue area; and when the proportion of foreground pixels contained in the detection area is greater than or equal to a threshold value P, resetting the logic state of any one of two adjacent sub-areas connected with the detection area, of which the original logic state is 0, to 1.
10. The passenger flow counting method according to claim 1, further comprising, after said step S5, the steps of: and setting a mark area for the sub-area at the end part in the passenger flow queue area to track the sub-area at the end part so as to determine that all pedestrians in the passenger flow queue area pass through the passenger flow queue area, and starting to count the next passenger flow queue when the mark area leaves the passenger flow queue area.
Priority Applications (1)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
CN201611203541.XA CN106845620B (en) | 2016-12-19 | 2016-12-19 | A kind of passenger flow counting method based on quene state analysis |
Applications Claiming Priority (1)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
CN201611203541.XA CN106845620B (en) | 2016-12-19 | 2016-12-19 | A kind of passenger flow counting method based on quene state analysis |
Publications (2)
Publication Number | Publication Date |
---|---|
CN106845620A CN106845620A (en) | 2017-06-13 |
CN106845620B true CN106845620B (en) | 2019-09-10 |
Family
ID=59135947
Family Applications (1)
Application Number | Title | Priority Date | Filing Date |
---|---|---|---|
CN201611203541.XA Active CN106845620B (en) | 2016-12-19 | 2016-12-19 | A kind of passenger flow counting method based on quene state analysis |
Country Status (1)
Country | Link |
---|---|
CN (1) | CN106845620B (en) |
Families Citing this family (9)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
CN107368947A (en) * | 2017-06-16 | 2017-11-21 | 深圳市盛路物联通讯技术有限公司 | A kind of play field management and device |
CN108647587B (en) * | 2018-04-23 | 2021-08-24 | 腾讯科技(深圳)有限公司 | People counting method, device, terminal and storage medium |
CN108664912B (en) * | 2018-05-04 | 2022-12-20 | 北京学之途网络科技有限公司 | Information processing method and device, computer storage medium and terminal |
CN111104828A (en) * | 2018-10-26 | 2020-05-05 | 深圳技威时代科技有限公司 | People counting method and device and storage medium |
CN111325057B (en) * | 2018-12-14 | 2024-02-27 | 杭州海康威视数字技术股份有限公司 | Queuing queue detection method and device |
CN110659588A (en) * | 2019-09-02 | 2020-01-07 | 平安科技(深圳)有限公司 | Passenger flow volume statistical method and device and computer readable storage medium |
CN110751329B (en) * | 2019-10-17 | 2022-12-13 | 中国民用航空总局第二研究所 | Control method and device for airport security check channel, electronic equipment and storage medium |
CN111310733B (en) * | 2020-03-19 | 2023-08-22 | 成都云盯科技有限公司 | Personnel access detection method, device and equipment based on monitoring video |
CN114119648A (en) * | 2021-11-12 | 2022-03-01 | 史缔纳农业科技(广东)有限公司 | Pig counting method for fixed channel |
Citations (5)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
CN102542289A (en) * | 2011-12-16 | 2012-07-04 | 重庆邮电大学 | Pedestrian volume statistical method based on plurality of Gaussian counting models |
CN103164711A (en) * | 2013-02-25 | 2013-06-19 | 昆山南邮智能科技有限公司 | Regional people stream density estimation method based on pixels and support vector machine (SVM) |
CN103871082A (en) * | 2014-03-31 | 2014-06-18 | 百年金海科技有限公司 | Method for counting people stream based on security and protection video image |
CN104092988A (en) * | 2014-07-10 | 2014-10-08 | 深圳市中控生物识别技术有限公司 | Method, device and system for managing passenger flow in public place |
CN106203276A (en) * | 2016-06-30 | 2016-12-07 | 中原智慧城市设计研究院有限公司 | A kind of video passenger flow statistical system and passenger flow statistical method |
Family Cites Families (1)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
JP6276519B2 (en) * | 2013-05-22 | 2018-02-07 | 株式会社 日立産業制御ソリューションズ | Person counting device and human flow line analyzing device |
-
2016
- 2016-12-19 CN CN201611203541.XA patent/CN106845620B/en active Active
Patent Citations (5)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
CN102542289A (en) * | 2011-12-16 | 2012-07-04 | 重庆邮电大学 | Pedestrian volume statistical method based on plurality of Gaussian counting models |
CN103164711A (en) * | 2013-02-25 | 2013-06-19 | 昆山南邮智能科技有限公司 | Regional people stream density estimation method based on pixels and support vector machine (SVM) |
CN103871082A (en) * | 2014-03-31 | 2014-06-18 | 百年金海科技有限公司 | Method for counting people stream based on security and protection video image |
CN104092988A (en) * | 2014-07-10 | 2014-10-08 | 深圳市中控生物识别技术有限公司 | Method, device and system for managing passenger flow in public place |
CN106203276A (en) * | 2016-06-30 | 2016-12-07 | 中原智慧城市设计研究院有限公司 | A kind of video passenger flow statistical system and passenger flow statistical method |
Also Published As
Publication number | Publication date |
---|---|
CN106845620A (en) | 2017-06-13 |
Similar Documents
Publication | Publication Date | Title |
---|---|---|
CN106845620B (en) | A kind of passenger flow counting method based on quene state analysis | |
Del Pizzo et al. | Counting people by RGB or depth overhead cameras | |
CN105844234B (en) | Method and equipment for counting people based on head and shoulder detection | |
US9641763B2 (en) | System and method for object tracking and timing across multiple camera views | |
CN201255897Y (en) | Human flow monitoring device for bus | |
CN102867177B (en) | A kind of demographic method based on gradation of image coupling | |
Sen et al. | Accurate speed and density measurement for road traffic in India | |
US20190373221A1 (en) | System and method for activity monitoring using video data | |
CN102867349B (en) | People counting method based on elliptical ring template matching | |
US20150310365A1 (en) | System and method for video-based detection of goods received event in a vehicular drive-thru | |
CN101477641A (en) | Demographic method and system based on video monitoring | |
Del Pizzo et al. | A versatile and effective method for counting people on either RGB or depth overhead cameras | |
US20150310459A1 (en) | System and method for video-based detection of drive-arounds in a retail setting | |
US20130148848A1 (en) | Method and apparatus for video analytics based object counting | |
KR20120053949A (en) | Object counter and method for counting objects | |
JPH1049718A (en) | Device for counting number of passing person and system for managing number of visiting and leaning person using the device | |
US11657650B2 (en) | Techniques for automatically identifying secondary objects in a stereo-optical counting system | |
CN106127292B (en) | Flow method of counting and equipment | |
JP6549400B2 (en) | System and method for video-based detection of drive and pedestrian walk-offs in trains of vehicles and pedestrians | |
US20230154192A1 (en) | Person flow analysis method and system, electronic device, and readable storage medium | |
CN106570449B (en) | A kind of flow of the people defined based on region and popularity detection method and detection system | |
CN113420726B (en) | Region de-duplication passenger flow statistical method based on overlook image | |
US20130195317A1 (en) | Apparatus for measuring traffic using image analysis and method thereof | |
Denman et al. | Large scale monitoring of crowds and building utilisation: A new database and distributed approach | |
CN111127096B (en) | Commodity area passenger flow optimization statistical method and system based on head and shoulder and face recognition |
Legal Events
Date | Code | Title | Description |
---|---|---|---|
PB01 | Publication | ||
PB01 | Publication | ||
SE01 | Entry into force of request for substantive examination | ||
SE01 | Entry into force of request for substantive examination | ||
GR01 | Patent grant | ||
GR01 | Patent grant |