Flow detection method, device, equipment and storage medium
The ToF sensor with dot matrix transmission and reception addresses the issue of directional ambiguity in channel gates by precisely counting pedestrians entering and leaving, improving flow statistics accuracy.
Patent Information
- Application Number
- CN202310111656.X
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2023-02-10
- Publication Date
- 2024-12-13
- Estimated Expiration
- 2043-02-10
AI Technical Summary
Existing channel gates in public venues cannot accurately distinguish the direction of pedestrian flow, leading to inaccurate statistics that hinder effective crowd control and operation management.
Employing a Time of Flight (ToF) sensor with dot matrix transmission and reception to collect real-time detection data, determine target channels, and analyze changes in channel numbers to differentiate between entering and exiting pedestrian traffic.
Accurately counts pedestrians in both directions, enhancing the precision of flow statistics and enabling more informed operational strategies.
Smart Images

Figure CN116129545B_ABST
Abstract
Description
Technical Field
[0001] The embodiments of the present application relate to the technical field of traffic statistics, and in particular to a traffic detection method, device, equipment and storage medium. Background Art
[0002] In the field of traffic statistics, when conducting traffic statistics on a target object, taking the statistics of human flow as an example, in the context of today's growing population, human flow statistics in public places such as shopping malls, subways, stations, office buildings, etc. are of great significance for the flow control, organization and operation of the venues.
[0003] In the above places, a channel gate is usually used to count pedestrian flow, and the existing channel gate uses an infrared sensor. The counting principle of the channel gate is: when someone passes through the channel of the gate, the infrared sensor detects that an object has passed, and a person can be counted as passing.
[0004] However, the existing channel gates have the defect of being unable to determine the direction in which pedestrians pass through the gates, that is, the channel gates can only count the number of pedestrians passing through the gates, but cannot count the pedestrians entering or leaving the venue through the channel gates separately, making the statistics of pedestrian flow inaccurate, which is not conducive to the operator's decision-making on crowd control, organization of operations and other work in the venue. Summary of the invention
[0005] The embodiments of the present application provide a flow detection method, apparatus, device and storage medium, which can solve the problem of inaccurate flow statistics and can effectively determine the number of targets passing through the corresponding detection area of the flow detection device in different travel directions, thereby improving the accuracy of flow statistics.
[0006] In a first aspect, an embodiment of the present application provides a flow detection method, which is applied to a flow detection device, wherein the flow detection device includes a ToF sensor, and the data transmission and reception form of the ToF sensor is a dot matrix transmission and reception. The flow detection method includes:
[0007] Collect detection data corresponding to the ToF sensor in real time, where the detection data includes detection information of each dot matrix channel on the ToF sensor;
[0008] Determine the target channel where the target object is detected according to the detection information recorded in the detection data;
[0009] According to the number of target channels, determine the start and end of the corresponding detection cycle;
[0010] Based on the change in the number of target channels within the detection period, the number of target objects passing in the corresponding passing direction is determined.
[0011] In a second aspect, an embodiment of the present application provides a flow detection device, the flow detection device comprising:
[0012] A data acquisition module, configured to acquire detection data corresponding to the ToF sensor in real time, the detection data including detection information of each dot matrix channel on the ToF sensor;
[0013] A channel determination module is configured to determine a target channel in which a target object is detected according to the detection information recorded in the detection data;
[0014] A cycle determination module, configured to determine the start and end of a corresponding detection cycle according to the number of target channels;
[0015] The quantity counting module is configured to determine the quantity of target objects passing in the corresponding passing direction based on the quantity change of the target channels within the detection period.
[0016] In a third aspect, an embodiment of the present application provides a flow detection device, the flow detection device comprising:
[0017] one or more processors;
[0018] a ToF sensor communicatively coupled to the one or more processors;
[0019] The storage device is used to store one or more programs. When the one or more programs are executed by one or more processors, the one or more processors implement the flow detection method in any of the above embodiments.
[0020] In a fourth aspect, an embodiment of the present application further provides a storage medium storing computer executable instructions, which, when executed by a processor, are used to execute a flow detection method as in any of the above embodiments.
[0021] The present application detects the target channel when the corresponding target object passes through through a dot matrix ToF sensor and determines the detection period. Thus, according to the changes in the target channel within the detection period, the number of target objects passing through the corresponding direction of travel is determined, thereby realizing flow detection of the target objects. In addition, the number of target objects passing through the corresponding detection area of the flow detection device in different directions can be effectively determined, which not only improves the accuracy of flow statistics, but also helps the operators of the venue to formulate more complete operation strategies for the venue. BRIEF DESCRIPTION OF THE DRAWINGS
[0022] Figure 1 A flow chart of the flow detection method provided in the embodiment of the present application;
[0023] Figure 2 A flowchart of the steps for determining the number of target objects in a corresponding direction of travel provided by an embodiment of the present application;
[0024] Figure 3 A schematic diagram of pedestrian traffic provided by an embodiment of the present application;
[0025] Figure 4 A schematic diagram of pedestrian traffic provided by another embodiment of the present application;
[0026] Figure 5 A schematic diagram of a flow detection device provided in one embodiment of the present application;
[0027] Figure 6 A schematic diagram of the structure of a flow detection device provided in one embodiment of the present application. DETAILED DESCRIPTION
[0028] The embodiments of the present application are 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 embodiments of the present application, rather than to limit the embodiments of the present application. It should also be noted that, for ease of description, only parts related to the embodiments of the present application are shown in the accompanying drawings, rather than all structures.
[0029] The terms "first", "second", etc. in the specification and claims of the present application are used to distinguish similar objects, and are not used to describe a specific order or sequence. It should be understood that the data used in this way can be interchangeable under appropriate circumstances, so that the embodiments of the present application can be implemented in an order other than those illustrated or described here, and the objects distinguished by "first", "second", etc. are generally a class, and the number of objects is not limited. For example, the first object can be one or more. In addition, "and / or" in the specification and claims represents at least one of the connected objects, and the character " / " generally represents that the objects associated with each other are in an "or" relationship. In the description of the present application, "multiple" means two or more, and "several" means one or more.
[0030] In order to facilitate a better understanding of the technical solution of the present application, the technical solution of the present application is described below by taking the statistics of pedestrian flow as an example. In places with large pedestrian flow, channel gates are widely used, which can play a role in counting pedestrian flow. However, due to defects in the detection method of the channel gate, it can only count pedestrians in a single direction of travel, and will count pedestrians in the other opposite direction of travel into the predetermined number of people in the direction of travel. For example, the channel gate in the related art can only count pedestrians in the direction of travel entering the venue from the outside of the venue, but cannot accurately count pedestrians in the direction of travel leaving the venue from the inside of the venue, and will count pedestrians in the direction of travel leaving the venue from the inside of the venue into the direction of travel entering the venue from the outside of the venue, that is, it cannot distinguish pedestrians in different directions of travel, resulting in inaccurate statistics of pedestrian flow.
[0031] To this end, the embodiments of the present application provide a flow detection method, device, equipment and storage medium. The above-mentioned flow detection method can be applied to a flow detection device, and the flow detection device includes a ToF (Time of Flight) sensor, and the data transmission and reception form of the ToF sensor is a dot matrix transmission and reception. It can be understood that the ToF sensor generally includes a transmitting part and a receiving part, which can emit light, ultrasonic waves, electromagnetic waves, etc. for distance detection. For example, the ToF sensor emits modulated near-infrared light, which is reflected after encountering an object. The ToF sensor converts the distance of the photographed scene by calculating the time difference or phase difference between the emission and reflection of the light to generate corresponding distance information. For a ToF sensor using dot matrix transmission and reception, it can use a dot matrix light source for dot matrix transmission, such as using a VCSEL light source as a dot matrix light source, thereby emitting multiple beams of light for distance detection; and dot matrix reception is also used when receiving, so as to determine the distance information corresponding to each beam of light. Therefore, a ToF sensor using dot matrix transmission and reception includes multiple dot matrix channels.
[0032] Figure 1 The flow chart of the flow detection method provided in the embodiment of the present application is as follows: Figure 1 As shown, the flow detection method of the present application includes the following steps:
[0033] Step S110: collecting detection data corresponding to the ToF sensor in real time.
[0034] It should be conceived that the flow detection device includes a processor for processing data. The detection information corresponding to each dot matrix channel in the ToF sensor, such as distance, channel number and other information, is transmitted to the processor and collected and processed by the processor. In addition, the flow detection device corresponds to the existence of a detection area. It can be imagined that the detection area is not an artificially demarcated area, but due to the layout of the dot matrix channels on the ToF sensor, the flow detection device can effectively detect the area range of the target object.
[0035] Moreover, the flow detection equipment is arranged at the entrance and exit passages of the above-mentioned places, so that pedestrians can pass through the detection area, so as to facilitate the counting of pedestrian flow. It can be understood that the passage of pedestrians in the detection area is a continuous process, so the flow detection equipment needs to collect detection data in real time, and the real-time collection method is helpful to accurately judge the direction of pedestrian passage.
[0036] Step S120: Determine the target channel where the target object is detected according to the detection information recorded in the detection data.
[0037] The target channel is a number of dot matrix channels in the ToF sensor, where the target channel is the dot matrix channel whose corresponding detection information meets the preset conditions. For human detection, the corresponding threshold can be preset as a preset condition to determine that the target object is a person. For example, for pedestrians, a corresponding preset interval can be set. Of course, the value of the preset interval is related to the height of the target object, that is, the corresponding threshold can be preset for the endpoint of the preset interval according to the height of the person.
[0038] Therefore, in one embodiment, if the detection information includes a distance value, the detection information corresponding to each dot matrix channel is judged to determine the target channel. For example, when the distance value corresponding to the dot matrix channel is within a preset interval, the dot matrix channel is determined to be the target channel.
[0039] For example, the ToF sensor in the flow detection equipment is set at a height of 2.5m to detect the distance in the vertical direction. That is, when no one is passing, the distance value detected by each dot matrix channel of the ToF sensor is 2.5m. Taking a person's height of 0.8m to 2m as an example, the endpoints of the preset interval correspond to 0.5m and 1.7m respectively. Of course, the endpoints of the preset area can also be set to 0m to 1.7m respectively. If the distance value corresponding to a dot matrix channel is 0.8m, then the distance value is within the preset interval, and the target channel includes the dot matrix channel.
[0040] Step S130: Determine the start and end of the corresponding detection cycle according to the number of target channels.
[0041] It can be understood that the detection period is the period corresponding to the pedestrian passing through the detection area, and the flow detection device corresponds to the detection data of pedestrian passing during the detection period. Moreover, the start and end of the detection period can be re-determined, such as determining the start and end time of the detection period according to the number of target channels.
[0042] It should be considered that when pedestrians pass through the detection area, the number of target channels changes in a process that satisfies the change of first increasing to the maximum value, then maintaining for a period of time, and then decreasing. Therefore, when a target channel is detected, it means that there is a target object passing through the detection area of the flow detection channel. The moment when the target channel is detected can be used as the starting moment of the detection cycle; after the detection cycle starts, when the target channel is no longer detected, the moment when the target channel is last detected can be used as the ending moment.
[0043] For example, in some embodiments, the start and end of the detection period can also be determined based on the comparison between the number of target channels and a preset number. Specifically, corresponding to the start time of the detection period, a first preset value can be set as the preset number for comparison; corresponding to the end time of the detection period, a second preset value can be set as the preset number for comparison. For example, when the number of target channels meets the first preset value, such as when the number is equal to the first preset value, it is determined that the detection period starts, so that the detection data corresponding to the moment can be extracted to perform human flow statistics; when the number of target channels meets the second preset value, such as when the number is equal to the second preset value, it is determined that the detection period ends, so that the detection data corresponding to the moment can be extracted to perform human flow statistics.
[0044] Step S140: Determine the number of target objects passing in the corresponding passing direction based on the change in the number of target channels within the detection cycle.
[0045] When pedestrians pass through the detection area, the number of target channels changes in a process that first increases to a maximum value, then maintains for a period of time, and then decreases. The flow detection device can not only determine whether pedestrians pass through the detection area by the change in the number of target channels, but also determine the direction of pedestrians' passage.
[0046] For example, the dot matrix channel corresponding to the target channel recorded at the starting time is used as the first dot matrix channel, and the dot matrix channel corresponding to the target channel recorded at the ending time is used as the second dot matrix channel. Therefore, the flow detection device determines the pedestrian's direction of passage based on the first dot matrix channel and the second dot matrix channel.
[0047] It can be understood that a plurality of dot matrix channels correspond to the detection area, and each dot matrix channel corresponds to a sub-area in the detection area. When a pedestrian is located in a part of the detection area, the corresponding dot matrix channel detects the corresponding distance, and then the dot matrix channel is determined as the target channel.
[0048] For the first dot matrix channel, if it corresponds to several sub-areas of the detection area; for the second dot matrix channel, if it corresponds to several other sub-areas in the detection area, for example, the first dot matrix channel corresponds to the sub-area close to the outside of the venue, and the second dot matrix channel corresponds to the sub-area close to the inside of the venue, the direction of pedestrian passage can be determined. Of course, after determining that there are multiple detection data of pedestrians passing through the detection area, that is, when there are multiple detection data that meet the above-mentioned quantity change process, it can be determined that there is a person passing, and one person passing can be recorded in the pedestrian flow statistics.
[0049] It can be seen from the above scheme that the flow detection equipment that applies the flow detection method of the present application can perform flow statistics on target objects such as pedestrians. It can not only count the number of passing target objects, but also judge the passing direction of the target objects, thereby realizing the statistics of the number of target objects passing through the corresponding detection area of the flow detection equipment in different directions. This scheme better meets the needs of some places in the relevant technology for pedestrian flow statistics, makes flow statistics more accurate, and helps the operators of the venues to formulate more complete operating strategies for the venues.
[0050] In one embodiment of the present application, during the detection period, the flow detection device generally records a plurality of quantity information, the quantity information including the number of channels corresponding to the target channel and the channel information corresponding to the target channel, such as the number corresponding to the target channel, the position in the dot matrix channel, etc. It is understandable that the quantity information recorded during the detection period can correspond to the change in the number of target channels during the passage of the target object.
[0051] Figure 2 A flowchart of the steps for determining the number of target objects in the corresponding direction of travel provided by an embodiment of the present application, such as Figure 2 As shown, the flow detection method of the present application also includes:
[0052] Step S210, obtaining first quantity information corresponding to the start time of the detection cycle, second quantity information corresponding to the end time of the detection cycle, and third quantity information corresponding to the target time when the number of target channels is the largest within the detection cycle.
[0053] Step S220: Determine the passing direction of the target object according to the first channel information recorded in the first quantity information and the second channel information recorded in the second quantity information.
[0054] Step S230: Determine whether the target object passes through the detection area corresponding to the flow detection device along the passing direction according to the first quantity information, the second quantity information and the third quantity information.
[0055] It can be understood that in the detection cycle, the quantity information can reflect the change of the target channel. Therefore, by reading the first quantity information corresponding to the start time of the detection cycle, the second quantity information corresponding to the end time of the detection cycle, and the third quantity information corresponding to the target time when the number of target channels is the largest, it can be imagined that the moment when the number of target channels is the largest corresponds to the pedestrian being completely located in the detection area. In addition, the method of the present application can be based on the first quantity information and the second quantity information to judge the direction of travel of the pedestrian. For the direction of travel of the pedestrian, correspondingly, since the first quantity information corresponds to the start time, the pedestrian initially enters the detection area, so there is a corresponding target channel I; and since the second quantity information corresponds to the end time, the pedestrian is about to leave the detection area, and there is also a corresponding target channel II. Target channel I and target channel II correspond to some dot matrix channels on the ToF sensor respectively. After determining the number of the dot matrix channels corresponding to both target channel I and target channel II, correspondingly, the device can determine the position corresponding to the start time and the end time of the pedestrian at the detection cycle, and the position corresponds to a part of the sub-area of the detection area. Therefore, according to the position corresponding to the start time and the end time, the direction of travel of the pedestrian can be further determined.
[0056] Moreover, according to the first quantity information, the second quantity information and the third quantity information, it can be determined that the pedestrian passes through the detection area along the corresponding passage direction. It can be understood that there are corresponding target channels at the start time, the target time and the end time, which can determine that the pedestrian passes through the detection area completely within the detection period, and based on the above scheme, it can be determined whether the pedestrian's passage direction is to enter or leave the place.
[0057] This solution can judge the direction of travel of the target object (such as pedestrians) based on the changes in the target channel reflected by the quantity information. It can also determine whether the target object has completely passed through based on the information of each stage of the target object's travel, thereby avoiding misjudgment and effectively improving the accuracy of traffic statistics.
[0058] In one embodiment of the present application, the dot matrix channel of the ToF sensor includes a first area channel and a second area channel. It can be understood that the first area channel and the second area channel correspond to a number of dot matrix channels respectively. The device can determine the direction of pedestrian passage by judging whether the target channel at different times belongs to the first area channel or the second area channel. The first quantity information records the first channel information, and the second quantity information records the second channel information. It can be understood that in the channel information, information such as the number corresponding to the target channel and the position in the dot matrix channel can be recorded, so that the area to which the target channel belongs can be determined.
[0059] Therefore, when the target channel corresponding to the first channel information is the first area channel, and the target channel corresponding to the second channel information is the second area channel, the pedestrian's travel direction can be determined to be the first travel direction; and when the target channel corresponding to the first channel information is the second area channel, and the target channel corresponding to the second channel information is the first area channel, the pedestrian's travel direction can be determined to be the second travel direction.
[0060] For example, the flow detection device is set at the entrance and exit of the venue. Therefore, in the detection area, the first area channel corresponds to the sub-area closest to the outside of the venue, and the second area channel corresponds to the sub-area closest to the inside of the venue. At the start of the detection cycle, the device can determine that there are pedestrians passing through the sub-area corresponding to the first area channel based on the detection data. At the end of the detection cycle, the device can determine that there are pedestrians passing through the sub-area corresponding to the second area channel based on the detection data, and then determine that the pedestrians are moving along the first passing direction, that is, the pedestrians enter the venue from outside the venue.
[0061] At the start of the detection cycle, the device can determine based on the detection data that there are pedestrians passing through the sub-area corresponding to the second area channel. At the end of the detection cycle, the device can determine based on the detection data that there are pedestrians passing through the sub-area corresponding to the first area channel, and then determine that the pedestrians are moving along the second direction of travel, that is, the pedestrians are leaving the venue from inside the venue.
[0062] This solution determines the direction of travel of the target object (such as a pedestrian) by selecting the detection data corresponding to the start and end times of the detection cycle, thereby overcoming the defect that the related technology cannot detect the direction of travel of the target object in flow detection, and effectively realizes the statistics of the number of target objects passing through the corresponding detection area of the flow detection equipment in different directions, thus meeting the needs of human flow statistics.
[0063] In one embodiment of the present application, the dot matrix channel of the ToF sensor includes a first area channel, a second area channel and a third area channel. It can be understood that the first area channel, the second area channel and the third area channel correspond to a plurality of dot matrix channels respectively, and therefore, the first area channel, the second area channel and the third area channel correspond to a plurality of different sub-areas in the detection area respectively. The third area channel is located between the first area channel and the second area channel, that is, the distribution of the dot matrix channels on the ToF sensor is the first area channel, the third area channel and the second area channel in sequence.
[0064] When the target channel corresponding to the first channel information is the first area channel, the target channel corresponding to the second channel information is the second area, and the target channel corresponding to the third channel information is the third area channel, the device can determine that the pedestrian passes through the detection area along the first travel direction. Therefore, the device can add one person to the number of pedestrians in that direction.
[0065] When the target channel corresponding to the first channel information is the second area channel, the target channel corresponding to the second channel information is the first area, and the target channel corresponding to the third channel information is the third area channel, the device can determine that the pedestrian passes through the detection area along the second travel direction. Therefore, the device can add one person to the number of pedestrians in this direction.
[0066] For example, the flow detection device is set at the entrance and exit channel of the venue. Therefore, in the detection area, the first area channel corresponds to the sub-area closest to the outside of the venue, and the second area channel corresponds to the sub-area closest to the inside of the venue. Therefore, at the start time of the detection cycle, the device determines that there are pedestrians passing through the sub-area corresponding to the first area channel, and at the end time of the detection cycle, the device determines that there are pedestrians passing through the sub-area corresponding to the second area channel. In addition, there is also third channel information, that is, the device can determine that there are pedestrians passing through the sub-area corresponding to the third area channel, and then the device can determine that the pedestrian is traveling along the first travel direction and that the pedestrian has completely passed through the detection area.
[0067] This solution can combine multiple detection data within the detection cycle to accurately judge whether the target object has completely passed through the detection area along the corresponding travel direction, reduce the occurrence of misjudgment, and effectively improve the accuracy of traffic statistics.
[0068] Figure 3 A schematic diagram of pedestrian traffic provided by an embodiment of the present application, such as Figure 3 As shown, the flow detection device 310 is set in the entrance and exit channel, and pedestrians can pass through the flow detection device 310. The ToF sensor 311 in the flow detection device 310 can be set on the upper part of the device, and the detection direction of the ToF sensor 311 is perpendicular to the direction of human passage, that is, the ToF sensor 311 emits near-infrared light toward the ground. The ToF sensor 311 includes a plurality of dot matrix channels, for example, the dot matrix channels are set to a 4*4 matrix layout to form a dot matrix transceiver.
[0069] For ease of understanding, the rectangular area shown in the schematic diagram corresponds to the dot matrix channel, which is divided into 16 areas, and some areas in the rectangular area are displayed in different grayscales in the figure to indicate that pedestrians are passing. Specifically, when pedestrians are walking, the device can determine whether the corresponding dot matrix channel is the target channel based on the detection data corresponding to the dot matrix channel. Therefore, for the target channel, Figure 3 The area with high gray value schematically represents the current moving position of the pedestrian, and the dot matrix channel corresponding to this area is the target channel.
[0070] Taking the direction shown in the figure as an example, when pedestrians pass through the flow detection device 310 from right to left, the number and position of the target channels are changing. As shown in the figure, the change in the number of target channels satisfies the change process of first increasing to the maximum value and then maintaining for a period of time before decreasing, that is, the number of target channels satisfies the change process of first increasing, then maintaining, and then decreasing. Moreover, the number information of the target channels can also indicate the position change of the target channels, and its position change also corresponds to the direction of pedestrian passage, such as from right to left. The flow detection device 310 records the detection data collected during the detection cycle. By processing and analyzing the detection data, if it is determined that the change of the target channel satisfies the above-mentioned change process, it can be determined that there is a pedestrian passing through the flow detection device 310 from right to left. Therefore, the device can count one person passing in this direction.
[0071] Figure 4 A schematic diagram of pedestrian traffic provided by another embodiment of the present application, such as Figure 4 As shown, the flow detection device 310 is arranged in the inlet and outlet channel, and pedestrians can pass through the flow detection device 310. The ToF sensor 311 in the flow detection device 310 can be arranged on the upper part of the device, and the detection direction of the ToF sensor 311 is perpendicular to the direction of human passage.
[0072] Taking the illustrated direction as an example, in one scenario, a pedestrian moves forward from right to left. When the pedestrian passes through the flow detection device 310 from right to left, the pedestrian may turn back halfway, such as Figure 4 Although the number change of the target channels satisfies the process of increasing first, maintaining, and then decreasing, the target channels corresponding to the start and end times of the detection cycle are the same, that is, the position change of the target channels does not satisfy the process of changing from right to left, thereby determining that the pedestrian did not pass through the flow detection device 310 from right to left.
[0073] Figure 5 This is a schematic diagram of a flow detection device provided in one embodiment of the present application. The device is used to execute the flow detection method provided in the above embodiment and has the corresponding functional modules and beneficial effects of the execution method. Figure 5 As shown, the device includes: a data acquisition module 501, a channel determination module 502, a cycle determination module 503 and a quantity statistics module 504.
[0074] Among them, the data acquisition module 501 is configured to collect detection data corresponding to the ToF sensor in real time, and the detection data includes detection information of each dot matrix channel on the ToF sensor; the channel determination module 502 is configured to determine the target channel where the target object is detected according to the detection information recorded in the detection data; the cycle determination module 503 is configured to determine the start and end of the corresponding detection cycle according to the number of target channels; the quantity statistics module 504 is configured to determine the number of target objects passing in the corresponding direction of travel based on the change in the number of target channels within the detection cycle.
[0075] Based on the above embodiment, the detection information includes the distance value, and the channel determination module 502 is further configured as follows:
[0076] When the distance value corresponding to the dot matrix channel is within a preset interval, the corresponding dot matrix channel is determined to be the target channel; wherein the value of the preset interval is associated with the height of the target object.
[0077] Based on the above embodiment, the period determination module 503 is further configured as follows:
[0078] When the number of target channels meets a first preset value, determining that a detection cycle starts;
[0079] When the number of target channels meets a second preset value, it is determined that the detection cycle ends.
[0080] On the basis of the above embodiment, a plurality of quantity information is recorded in the detection cycle, the quantity information corresponds to the change in the number of target channels during the passage of the target object, and the quantity information includes the number of channels and the channel information corresponding to the target channel; the quantity statistics module 504 is further configured as follows:
[0081] Obtaining first quantity information corresponding to the start time of the detection period, second quantity information corresponding to the end time of the detection period, and third quantity information corresponding to the target time when the number of target channels is the largest within the detection period;
[0082] Determine the passing direction of the target object according to the first channel information recorded in the first quantity information and the second channel information recorded in the second quantity information;
[0083] According to the first quantity information, the second quantity information and the third quantity information, it is determined whether the target object passes through the detection area corresponding to the flow detection device along the passing direction.
[0084] On the basis of the above embodiment, the dot matrix channel of the ToF sensor includes a first area channel and a second area channel; the quantity counting module 504 is further configured as follows:
[0085] When the target channel corresponding to the first channel information is the first regional channel and the target channel corresponding to the second channel information is the second regional channel, determining that the passing direction of the target object is the first passing direction;
[0086] When the target channel corresponding to the first channel information is the second area channel and the target channel corresponding to the second channel information is the first area channel, determining that the passing direction of the target object is the second passing direction;
[0087] The first passing direction and the second passing direction are opposite to each other.
[0088] On the basis of the above embodiment, the dot matrix channel of the ToF sensor includes a first area channel, a second area channel and a third area channel, and the third area channel is located between the first area channel and the second area channel; the quantity counting module 504 is further configured as:
[0089] When the target channel corresponding to the first channel information is the first regional channel, the target channel corresponding to the second channel information is the second regional channel, and the target channel corresponding to the third channel information recorded in the third quantity information is the third regional channel, it is determined that the target object passes through the detection area along the first passing direction;
[0090] When the target channel corresponding to the first channel information is the second area channel, the target channel corresponding to the second channel information is the first area channel, and the target channel corresponding to the third channel information recorded in the third quantity information is the third area channel, it is determined that the target object passes through the detection area along the second passage direction.
[0091] It is worth noting that in the embodiment of the above-mentioned flow detection device, the various functional 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 various functional modules are only for the convenience of distinguishing each other, and are not used to limit the scope of protection of this application.
[0092] Figure 6 This is a schematic diagram of the structure of a flow detection device provided in one embodiment of the present application. The device is used to execute the flow detection method provided in the above embodiment and has the corresponding functional modules and beneficial effects of the execution method. Figure 6As shown, the device includes a processor 601, a memory 602, an input device 603 and an output device 604. The number of processors 601 in the device can be one or more, and one processor 601 is taken as an example in the figure; the processor 601, the memory 602, the input device 603 and the output device 604 in the device can be connected via a bus or other means, and the figure takes the connection via a bus as an example. The memory 602, as a computer-readable storage medium, can be used to store software programs, computer executable programs and modules, such as program instructions / modules corresponding to the flow detection method in the embodiment of the present application. The processor 601 executes various functional applications and data processing of the device by running the software programs, instructions and modules stored in the memory 602, that is, realizes the above-mentioned flow detection method.
[0093] The memory 602 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 recorded or created during the use of the flow detection device, etc. In addition, the memory 602 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 602 may further include a memory remotely arranged relative to the processor 601, and these remote memories may be connected to the terminal 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.
[0094] The input device 603 can be used to input corresponding digital or character information to the processor 601, and generate key signal input related to the user settings and function control of the device. For example, the input device 603 can be a ToF sensor, and the ToF sensor can transmit the relevant data detected to the processor 601. The output device 604 can be used to send or display key signal output related to the user settings and function control of the device. For example, the output device 604 can be a display screen, a digital tube, etc., which can be used to display the traffic statistics of the target object passing through the detection device, such as the number of targets entering and leaving the place. In some embodiments, the output device 604 also includes a data transmission device, which can transmit data to the server through a wired method such as RS484, CAN, etc. or a wireless method such as WIFI, BLE (Bluetooth LowEnergy).
[0095] An embodiment of the present application also provides a storage medium storing computer executable instructions, which, when executed by a processor, are used to perform relevant operations in the flow detection method provided in any embodiment of the present application.
[0096] Computer-readable storage media include permanent and non-permanent, removable and non-removable media that can be implemented by any method or technology to store information. Information can be computer-readable instructions, data structures, program modules or other data. Examples of computer storage media include, but are not limited to, phase change memory (PRAM), static random access memory (SRAM), dynamic random access memory (DRAM), other types of random access memory (RAM), read-only memory (ROM), electrically erasable programmable read-only memory (EEPROM), flash memory or other memory technology, compact disk read-only memory (CD-ROM), digital versatile disk (DVD) or other optical storage, magnetic cassettes, magnetic disk storage or other magnetic storage devices or any other non-transmission media that can be used to store information that can be accessed by a computing device.
[0097] It should also be noted that the terms "include", "comprises" or any other variations thereof are intended to cover non-exclusive inclusion, so that a process, method, commodity or device including a series of elements includes not only those elements, but also other elements not explicitly listed, or also includes elements inherent to such process, method, commodity or device. In the absence of more restrictions, the elements defined by the sentence "comprises a ..." do not exclude the existence of other identical elements in the process, method, commodity or device including the elements.
[0098] Note that the above are only preferred embodiments of the present application and the technical principles used. Those skilled in the art will understand that the present application 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 application. Therefore, although the present application is described in more detail through the above embodiments, the present application is not limited to the above embodiments, and may include more other equivalent embodiments without departing from the concept of the present application, and the scope of the present application is determined by the scope of the appended claims.
Claims
1. A flow detection method, characterized in that: Applied to a flow detection device, the flow detection device includes a ToF sensor, the data transmission and reception form of the ToF sensor is a dot matrix transmission and reception, and the flow detection method includes: Collecting detection data corresponding to the ToF sensor in real time, the detection data including detection information of each dot matrix channel on the ToF sensor; Determining a target channel in which a target object is detected according to the detection information recorded in the detection data; According to the number of the target channels, determining the start and end of the corresponding detection cycle; Determine the number of target objects passing through the corresponding passing direction based on the change in the number of target channels within the detection period; Wherein, a plurality of quantity information is recorded in the detection cycle, the quantity information corresponds to the change in the quantity of target channels during the passage of the target object, and the quantity information includes the number of channels and the channel information corresponding to the target channel; The determining the number of the target objects passing in the corresponding passing direction based on the change in the number of the target channels within the detection period includes: Acquire first quantity information corresponding to the start time of the detection cycle, second quantity information corresponding to the end time of the detection cycle, and third quantity information corresponding to the target time when the number of target channels is the largest within the detection cycle; determining a passing direction of the target object according to the first channel information recorded in the first quantity information and the second channel information recorded in the second quantity information; Determine, according to the first quantity information, the second quantity information, and the third quantity information, whether the target object passes through the detection area corresponding to the flow detection device along the passing direction; Furthermore, the dot matrix channel of the ToF sensor includes a first area channel, a second area channel and a third area channel, and the third area channel is located between the first area channel and the second area channel; The determining, according to the first quantity information, the second quantity information, and the third quantity information, whether the target object passes through the detection area corresponding to the flow detection device along the passing direction comprises: When the target channel corresponding to the first channel information is the first area channel, the target channel corresponding to the second channel information is the second area channel, and the target channel corresponding to the third channel information recorded in the third quantity information is the third area channel, it is determined that the target object passes through the detection area along the first passing direction; When the target channel corresponding to the first channel information is the second area channel, the target channel corresponding to the second channel information is the first area channel, and the target channel corresponding to the third channel information recorded in the third quantity information is the third area channel, it is determined that the target object passes through the detection area along the second passing direction.
2. The flow detection method according to claim 1, characterized in that: The detection information includes a distance value, and determining, according to the detection information recorded in the detection data, a target channel in which the target object is detected includes: When the distance value corresponding to the dot matrix channel is within a preset interval, determining the corresponding dot matrix channel as a target channel; The value of the preset interval is associated with the height of the target object.
3. The flow detection method according to claim 1 or 2, characterized in that: Determining the start and end of the corresponding detection cycle according to the number of the target channels includes: When the number of the target channels meets a first preset value, determining that the detection cycle starts; When the number of the target channels meets a second preset value, it is determined that the detection cycle ends.
4. The flow detection method according to claim 1, characterized in that: The determining the passing direction of the target object according to the first channel information recorded in the first quantity information and the second channel information recorded in the second quantity information includes: When the target channel corresponding to the first channel information is the first regional channel and the target channel corresponding to the second channel information is the second regional channel, determining that the passing direction of the target object is the first passing direction; When the target channel corresponding to the first channel information is the second area channel and the target channel corresponding to the second channel information is the first area channel, determining that the passing direction of the target object is the second passing direction; The first passing direction and the second passing direction are opposite to each other.
5. A flow detection device, characterized in that: Applied to flow detection equipment, the flow detection equipment includes a ToF sensor, the data transmission and reception form of the ToF sensor is dot matrix transmission and reception, and the flow detection device includes: A data acquisition module, configured to acquire detection data corresponding to the ToF sensor in real time, wherein the detection data includes detection information of each dot matrix channel on the ToF sensor; a channel determination module, configured to determine a target channel in which a target object is detected according to the detection information recorded in the detection data; A cycle determination module, configured to determine the start and end of a corresponding detection cycle according to the number of the target channels; A quantity counting module, configured to determine the number of the target objects passing in the corresponding passing direction based on the change in the number of the target channels within the detection period; Wherein, a plurality of quantity information is recorded in the detection cycle, the quantity information corresponds to the change in the quantity of target channels during the passage of the target object, and the quantity information includes the number of channels and the channel information corresponding to the target channel; The data statistics module is configured as follows: Acquire first quantity information corresponding to the start time of the detection cycle, second quantity information corresponding to the end time of the detection cycle, and third quantity information corresponding to the target time when the number of target channels is the largest within the detection cycle; determining a passing direction of the target object according to the first channel information recorded in the first quantity information and the second channel information recorded in the second quantity information; Determine, according to the first quantity information, the second quantity information, and the third quantity information, whether the target object passes through the detection area corresponding to the flow detection device along the passing direction; Furthermore, the dot matrix channel of the ToF sensor includes a first area channel, a second area channel and a third area channel, and the third area channel is located between the first area channel and the second area channel; The data statistics module is also configured as follows: When the target channel corresponding to the first channel information is the first area channel, the target channel corresponding to the second channel information is the second area channel, and the target channel corresponding to the third channel information recorded in the third quantity information is the third area channel, it is determined that the target object passes through the detection area along the first passing direction; When the target channel corresponding to the first channel information is the second area channel, the target channel corresponding to the second channel information is the first area channel, and the target channel corresponding to the third channel information recorded in the third quantity information is the third area channel, it is determined that the target object passes through the detection area along the second passing direction.
6. A flow detection device, characterized in that: The flow detection device comprises: one or more processors; a ToF sensor in communication with one or more of the processors; A storage device for storing one or more programs. When one or more of the programs are executed by one or more of the processors, the one or more processors implement the flow detection method as described in any one of claims 1 to 4.
7. The flow detection device according to claim 6, characterized in that: The ToF sensor is arranged perpendicular to the moving direction of the target object, so that the detection direction of the ToF sensor is perpendicular to the moving direction of the target object.
8. A storage medium storing computer executable instructions, characterized in that: The computer executable instructions are used to perform the flow detection method according to any one of claims 1 to 4 when executed by a processor.
Citation Information
Patent Citations
Radar-based channel people counting method and system
CN110490030A
