Pedestrian flow detection method and device, storage medium and electronic equipment

By using detection lines of polylines or curves in the flow detection, the data captured by the camera equipment is solved, and the problem of large amounts of manpower and easy missed inspections is achieved, and efficient and accurate flow detection is achieved.

CN119027874APending Publication Date: 2024-11-26SUZHOU WANDIANZHANG NETWORK TECH CO LTD

Patent Information

Application Number
CN202411110437.0
Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Filing Date
2024-08-13
Publication Date
2024-11-26

AI Technical Summary

Technical Problem

The prior art requires a lot of labor costs when calculating the flow of people, and missed inspections are prone to occur when calculating for a long time or when intensive flow of people, resulting in inaccurate data.

Method used

Use polyline or curve detection lines to detect people flow, obtain shooting data through the camera equipment, process the intersection of the motion trajectory and the detection line, update the flow detection data, reduce missed detection and improve accuracy.

Benefits of technology

It reduces the cost of people flow detection, improves the accuracy of detection data, reduces the missed detection, and enhances the accuracy of detection.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN119027874A_ABST
    Figure CN119027874A_ABST
Patent Text Reader

Abstract

The invention provides a pedestrian flow detection method and device, a storage medium and electronic equipment, and is applied to the technical field of computers, and the method comprises the steps: obtaining photographing data obtained by photographing a configured photographing region through photographing equipment after the pedestrian flow detection configuration of the photographing equipment is completed; the shooting area comprises a detection area, the detection area comprises a detection line, and the detection line is a broken line or a curve; and processing the shooting data, and when it is determined that pedestrians appear in the detection area, the motion trail of the pedestrians and the detection line form an intersection point, and the motion direction of the motion trail satisfies a preset detection direction, determining that the pedestrian flow is an effective pedestrian flow, and updating pedestrian flow detection data. The broken-line or curved-line detection line is arranged in the detection area, and the broken-line or curved-line detection line increases the probability that the motion trail of the pedestrian in the detection area and the detection line form the intersection point, so that the situation of missing detection due to the fact that the motion trail of the pedestrian and the detection line do not form the intersection point is reduced, and the data precision of pedestrian flow detection is improved.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present application relates to the field of computer technology, and in particular to a method and device for detecting human flow, a storage medium and an electronic device. Background Art

[0002] In public places such as shopping malls, subway stations, tourist attractions, etc., traffic data is crucial for security management, resource allocation, and business strategy formulation. With the widespread use of random video surveillance systems, it is no longer necessary for staff to count traffic on site. Staff can count traffic through video surveillance systems. This method requires a lot of manpower costs, and when counting for a long time or when the traffic is dense, manual counting is prone to missing statistics, resulting in inaccurate traffic data. Summary of the invention

[0003] In view of this, the embodiments of the present application provide a method and device for detecting human flow, a storage medium and an electronic device. The present application uses a detection line with a broken line or a curve to perform human flow detection, which eliminates the need for manual human flow statistics and reduces the cost of human flow detection. The detection line with a broken line or a curve increases the probability of forming an intersection with the movement trajectory of pedestrians, avoids missed detection, and improves the accuracy of human flow detection.

[0004] To achieve the above objectives, the present application provides the following technical solutions:

[0005] A method for detecting human flow, comprising:

[0006] After completing the configuration of the camera device for detecting the flow of people, obtaining the shooting data obtained by the camera device shooting the configured shooting area; the shooting area includes the detection area, and the detection area includes a detection line, the detection line is a broken line or a curve, and the two endpoints of the detection line are on the boundary line of the detection area;

[0007] The captured data is processed, and when it is determined that a pedestrian appears in the detection area, the motion trajectory of the pedestrian in the detection area is obtained; when the motion trajectory forms an intersection with the detection line and the motion direction of the motion trajectory meets the preset detection direction, the pedestrian is determined to be a valid human flow, and the human flow detection data is updated.

[0008] The above method may optionally include configuring the camera device to detect human traffic, including:

[0009] Acquire the shooting configuration information of the camera device input by the user, set various shooting parameters of the camera device according to the shooting configuration information, and determine the shooting area of ​​the camera device after the shooting parameters are configured;

[0010] Determine a maximum detection range in the shooting area, and display the maximum detection range to the user, so that the user selects a detection area in the maximum detection range;

[0011] Connecting the coordinates selected by the user in the detection area in sequence to form a detection line, wherein the coordinates of the end points of the detection line are located on the boundary line of the detection area;

[0012] The detection direction of the camera device is set to complete the human flow detection configuration of the camera device.

[0013] In the above method, optionally, the shooting area or the detection area includes a target place, and the detection line is used to reduce a blind area for detecting crowds at the target place.

[0014] The above method may optionally further include: when the target location is located in the detection area, after connecting the two end points of the detection line, at least one closed area is formed, and the target location is located in any one of the closed areas.

[0015] The above method may optionally further include: when a straight line formed by connecting the two endpoints of the detection line is located in front of the entrance and exit of the target place, there is a turning point on the detection line located within the area formed by the first straight line and the second straight line; the first straight line is a straight line formed by the two endpoints of the detection line; the second straight line is a straight line parallel to the first straight line, and the target place is located on the second straight line.

[0016] In the above method, optionally, the updating of the human flow detection data includes:

[0017] generating a pedestrian record of the pedestrian;

[0018] The pedestrian record is updated to a human flow detection database corresponding to the movement direction.

[0019] In the above method, optionally, the processing of the photographed data includes:

[0020] Using a pre-trained recognition model to perform recognition processing on the captured data;

[0021] A recognition result output by the recognition model is obtained to indicate whether there is a pedestrian in the detection area.

[0022] A pedestrian flow detection device, comprising:

[0023] Camera and processing equipment;

[0024] After the processing device completes the configuration of the camera device for detecting the flow of people, the camera device is used to shoot the configured shooting area and transmit the shooting data to the processing device; the shooting area includes the detection area, and the detection area includes the detection line, and the detection line is a broken line or a curve;

[0025] The processing device is used to process the captured data, and when it is determined that a pedestrian appears in the detection area, obtain the motion trajectory of the pedestrian in the detection area, and when the motion trajectory forms an intersection with the detection line and the motion direction of the motion trajectory meets the preset detection direction, update the pedestrian flow detection data based on the motion direction of the pedestrian.

[0026] In the above device, optionally, the process of the processing device configuring the camera device to detect human flow includes:

[0027] Acquire the shooting configuration information of the camera device input by the user, set various shooting parameters of the camera device according to the shooting configuration information, and determine the shooting area of ​​the camera device after the shooting parameters are configured;

[0028] Determine a maximum detection range in the shooting area, and display the maximum detection range to the user, so that the user selects a detection area in the maximum detection range;

[0029] Connecting the coordinates selected by the user in the detection area in sequence to form a detection line, wherein the coordinates of the end points of the detection line are located on the boundary line of the detection area;

[0030] The detection direction of the camera device is set to complete the human flow detection configuration of the camera device.

[0031] In the above-mentioned device, optionally, the shooting area or the detection area includes a target place, and the detection line is used to reduce a blind area for detecting crowds in the target place.

[0032] The above-mentioned device may optionally further include: when the target location is located in the detection area, after connecting the two end points of the detection line, at least one closed area is formed, and the target location is located in any closed area.

[0033] The above-mentioned device may optionally further include: there is a turning point on the detection line located in the area formed by the first straight line and the second straight line; the first straight line is a straight line formed by the two endpoints of the detection line; the second straight line is a straight line that includes the target location and is parallel to the first straight line.

[0034] In the above device, optionally, the process of the processing device updating the human flow detection data includes:

[0035] generating a pedestrian record of the pedestrian;

[0036] The pedestrian record is updated to a human flow detection database corresponding to the movement direction.

[0037] Optionally, in the above-mentioned apparatus, the process of the processing device processing the photographed data includes:

[0038] Using a pre-trained recognition model to perform recognition processing on the captured data;

[0039] A recognition result output by the recognition model is obtained to indicate whether there is a pedestrian in the detection area.

[0040] A storage medium includes stored instructions, wherein when the instructions are executed, the device where the storage medium is located is controlled to execute the above-mentioned human flow detection method.

[0041] An electronic device includes a memory and one or more instructions, wherein the one or more instructions are stored in the memory and are configured to be executed by one or more processors to perform the above-mentioned human flow detection method.

[0042] Compared with the prior art, this application has the following advantages:

[0043] The present application provides a method and device for detecting human flow, a storage medium and an electronic device, including: after completing the configuration of human flow detection of a camera device, obtaining shooting data obtained by shooting a configured shooting area with a camera device; the shooting area includes a detection area, and the detection area includes a detection line, the detection line is a broken line or a curve, and the two endpoints of the detection line are on the boundary line of the detection area; processing the shooting data, when it is determined that a pedestrian appears in the detection area, obtaining the motion trajectory of the pedestrian in the detection area, when the motion trajectory forms an intersection with the detection line, and the motion direction of the motion trajectory meets the preset detection direction, determining that the pedestrian is a valid human flow, and updating the human flow detection data. The present application sets a detection area in the shooting area of ​​the camera device, sets a broken line or a curved detection line in the detection area, and the broken line or the curved detection line increases the probability that the motion trajectory of the pedestrian in the detection area forms an intersection with the detection line, thereby reducing the situation where the motion trajectory of the pedestrian does not form an intersection with the detection line, avoiding missed detection, and improving the data accuracy of human flow detection. BRIEF DESCRIPTION OF THE DRAWINGS

[0044] In order to more clearly illustrate the embodiments of the present application or the technical solutions in the prior art, the drawings required for use in the embodiments or the description of the prior art will be briefly introduced below. Obviously, the drawings described below are only embodiments of the present application. For ordinary technicians in this field, other drawings can be obtained based on the provided drawings without paying any creative work.

[0045] Figure 1 A flow chart of human flow detection provided in an embodiment of the present application;

[0046] Figure 2 A flow chart of a method for configuring a camera device to detect human flow provided in an embodiment of the present application;

[0047] Figure 3 An example diagram of a scene for detecting the flow of people at a cashier counter provided in an embodiment of the present application;

[0048] Figure 4 Another example diagram of a scene of detecting the flow of people at a cashier counter provided in an embodiment of the present application;

[0049] Figure 5 A schematic diagram of the structure of a crowd flow detection device provided in an embodiment of the present application;

[0050] Figure 6 A schematic diagram of the structure of an electronic device provided in an embodiment of the present application. DETAILED DESCRIPTION

[0051] The following will be combined with the drawings in the embodiments of the present application to clearly and completely describe the technical solutions in the embodiments of the present application. Obviously, the described embodiments are only part of the embodiments of the present application, not all of the embodiments. Based on the embodiments in the present application, all other embodiments obtained by ordinary technicians in this field without creative work are within the scope of protection of this application.

[0052] In this application, the terms "comprises", "comprising" or any other variations thereof are intended to cover non-exclusive inclusion, so that a process, method, article or device comprising 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, article or device. In the absence of further restrictions, an element defined by the sentence "comprising a ..." does not exclude the presence of other identical elements in the process, method, article or device comprising the element.

[0053] As can be seen from the background technology, the traditional way of detecting human flow is for staff to count people in a video surveillance system and collect human flow data. This method requires a lot of manpower costs, and when counting for a long time or when the flow of people is dense, manual counting is very likely to miss detections, resulting in inaccurate human flow detection data.

[0054] To solve the above-mentioned problems, the present application provides a method for detecting human flow. Using the solution provided by the present application, there is no need for staff to count the flow of people in the monitoring screen, which effectively reduces labor costs, reduces the cost of human flow detection, effectively reduces the probability of missed detection during long-term statistics and when the flow of people is dense, and improves the accuracy of human flow detection data.

[0055] The present application can be used in many general or special computing device environments or configurations, such as personal computers, server computers, handheld or portable devices, tablet devices, multi-processor devices, distributed computing environments including any of the above devices or equipment, etc.

[0056] Reference Figure 1 , is a flow chart of a human flow detection provided in an embodiment of the present application, and is specifically described as follows:

[0057] S101. After completing the configuration of the camera device for detecting the flow of people, obtain the shooting data obtained by the camera device shooting the configured shooting area; the shooting area includes the detection area, and the detection area includes a detection line, the detection line is a broken line or a curve, and the two endpoints of the detection line are on the boundary line of the detection area.

[0058] The imaging device may be a device with a recording function, such as a camera.

[0059] Preferably, it may be a device having both the recording function and the data processing function, that is, the device integrates the recording function and the processor for processing the recording data.

[0060] After completing the configuration of the camera device for human flow detection, the camera device shoots and records in real time, and the shooting or recording area is configured when the human flow detection configuration is performed.

[0061] The crowd detection configuration of the camera equipment can be configured and changed according to user needs, thereby realizing personalized configuration of crowd detection. This solution supports dynamic setting of crowd detection configuration, so it can be applied to various scenarios that require crowd detection, such as stores, checkout counters, buses, etc.

[0062] By configuring the head-up height, angle and other contents of the camera device, the shooting area of ​​the camera device is determined. After the camera device starts working, the shooting data of the shooting area is sent to the processor with data processing function in real time. The user can set the maximum detection range and the detection area based on the shooting area of ​​the camera device, and then draw the detection line in the detection area so that the subsequent system can use the detection line to detect the flow of people.

[0063] Furthermore, after completing the configuration of the flow detection of the camera device, the shooting area of ​​the camera device includes the detection area, and the detection area includes the detection line, the detection line is a user-defined broken line or curve, and the two endpoints of the detection line are on the boundary line of the detection area. The user sets the detection line based on his own detection needs, and the detection line can be a broken line or a curve. The user can draw a detection line of any shape to meet the various needs of the user. Therefore, the detection line provided by the present application can be applied to various places where the flow of people needs to be detected, and has a wide range of applications.

[0064] Furthermore, relative to a straight line detection line, a broken line or curved detection line increases the detection range of pedestrians in the detection area, and increases the probability that the motion trajectory of pedestrians in the detection area intersects with the detection line, thereby reducing the situation where the motion trajectory of pedestrians does not intersect with the detection line, causing missed detection, reducing detection blind spots and dead angles, and reducing the probability of missed detection.

[0065] Preferably, the shooting data may be video data shot by a camera device.

[0066] S102, processing the captured data, and when it is determined that a pedestrian appears in the detection area, obtaining the motion trajectory of the pedestrian in the detection area, and when the motion trajectory forms an intersection with the detection line and the motion direction of the motion trajectory meets the preset detection direction, determining that the pedestrian is a valid human flow, and updating the human flow detection data.

[0067] Preferably, the processor uses a pre-trained recognition model to perform recognition processing on the captured data, obtains a recognition result output by the recognition model that characterizes whether there are pedestrians in the detection area, and determines whether there are pedestrians in the detection area based on the recognition result. Preferably, the recognition model is a model for recognizing pedestrians, and the recognition model can be constructed using algorithms such as neural networks, vector machines, decision trees or random forests.

[0068] When a pedestrian appears in the detection area, the motion trajectory of the pedestrian in the detection area is obtained. When the motion trajectory forms an intersection with the detection line and the motion direction of the motion trajectory meets the preset detection direction, the pedestrian is determined to be the pedestrian flow that needs to be counted, that is, the pedestrian is determined to be a valid pedestrian flow, and then the pedestrian flow detection data is updated.

[0069] In the embodiments provided in the present application, the detection line includes at least one turning point, such as Figure 3 As shown, the detection line ac1c2c3b includes turning points c1, c2, and c3. Preferably, the turning points can be on the boundary line of the detection area or in the detection area. The detection line ac1c2c3b divides the detection area into multiple small areas, and obtains 5 small areas, namely small area aB2c1, small area B1ac1c2, small area c1c2c3, small area c2c3bB4 and small area c3bB3. When the motion trajectory of pedestrians in the detection area shows cross-area behavior, that is, from one small area to another small area, at this time the motion trajectory forms an intersection with the detection line, and the behavior can be determined as effective traffic flow. The detection line provided in the present application increases the detection accuracy of the motion trajectory of pedestrians and increases the probability of pedestrians and the detection line forming an intersection by dividing the detection area into multiple small areas, thereby reducing the detection blind area of ​​effective traffic flow.

[0070] Furthermore, the detection direction is configured in the process of configuring the camera equipment for pedestrian flow detection. There can be multiple detection directions. It should be noted that when the pedestrian's movement direction is consistent with the preset detection direction and the pedestrian's movement trajectory forms an intersection with the detection line (here it can be understood that the pedestrian's movement trajectory passes through the detection line), the pedestrian is determined to be a valid pedestrian flow; thereby, it is possible to effectively filter out data that passes the detection line but has a movement direction different from the preset detection direction, thereby improving the accuracy of the pedestrian flow detection data.

[0071] Furthermore, when updating the pedestrian flow detection data, a pedestrian record of the pedestrian is first generated, and then the pedestrian record is updated to the pedestrian flow detection database corresponding to the direction of movement. It should be noted that the pedestrian record includes the record generation time, whether it is a specific person, the direction of movement, etc.

[0072] This application sets different human flow detection data for different detection directions, separates the human flow data for different detection directions, and facilitates subsequent data processing. Pedestrian records are updated to the human flow detection database corresponding to the movement direction, that is, pedestrian records are updated to the human flow detection database of the detection room satisfied by the movement direction of the pedestrian.

[0073] Furthermore, the above recognition model can identify whether the pedestrian is a specific person, and the specific person is a person who does not need to record the flow of people, such as a staff member. When the pedestrian is a staff member, the pedestrian record of the pedestrian is also entered into the specific person record library, so as to filter the pedestrian records in the human flow detection database later.

[0074] This application can also report and store videos of pedestrians in motion or key images (images that meet the capture requirements).

[0075] In the method provided by the embodiment of the present application, after completing the configuration of the camera device for detecting the flow of people, the camera device is obtained to shoot the configured shooting area to obtain shooting data; the shooting area includes the detection area, and the detection area includes the detection line, the detection line is a broken line or a curve, and the two endpoints of the detection line are on the boundary line of the detection area; the shooting data is processed, and when it is determined that a pedestrian appears in the detection area, the movement trajectory of the pedestrian in the detection area is obtained, and when the movement trajectory forms an intersection with the detection line, and the movement direction of the movement trajectory meets the preset detection direction, the pedestrian is determined to be a valid flow of people, and the flow of people detection data is updated. The present application sets the detection area in the shooting area of ​​the camera device, and sets a broken line or a curved detection line in the detection area. The broken line or the curved detection line increases the probability that the movement trajectory of pedestrians in the detection area forms an intersection with the detection line, thereby reducing the situation where the movement trajectory of pedestrians does not form an intersection with the detection line, avoiding missed detection, and improving the data accuracy of the flow of people detection.

[0076] Reference Figure 2 , which is a flow chart of a method for configuring a camera device to detect human flow provided in an embodiment of the present application, and is specifically described as follows:

[0077] S201: Acquire shooting configuration information of a camera device input by a user, set various shooting parameters of the camera device according to the shooting configuration information, and determine a shooting area of ​​the camera device after the shooting parameters are configured.

[0078] The various shooting parameters of the camera device include but are not limited to detection height parameters, filtering height parameters, angle configuration parameters, start shooting time parameters, end shooting time parameters, shielding area parameters, etc.

[0079] The shooting configuration information includes the specific contents of various shooting parameters of the camera device. After completing the configuration of various shooting parameters of the camera device, the shooting area of ​​the camera device can be determined.

[0080] S202: Determine a maximum detection range in the shooting area, and display the maximum detection range to the user, so that the user can select a detection area in the maximum detection range.

[0081] The processor determines the maximum detection range in the shooting area. Preferably, the shooting area can be used as the maximum detection range. Further, the maximum detection range can be pre-set. For another example, the center of the shooting area can be used as the origin to radiate outward to form a preset shape, such as a circle, a quadrilateral, etc. The obtained shape is the maximum detection range. Preferably, the maximum detection range can also be determined based on the target specified by the user in the shooting area. The target specified by the user in different application scenarios is different. For example, when used to count the flow of people at the cash register, the specified target is the cash register. The maximum detection range in the shooting area can also be a maximum detection range defined by the user.

[0082] After determining the maximum detection range, the maximum detection range is displayed to the user so that the user can select the detection area within the maximum detection range. This application supports user-defined detection areas, so this application is suitable for various scenarios, such as cashier counters, doorways and other crowded / irregular places. The detection range can be set flexibly to meet the diverse needs of users.

[0083] S203 , connecting the coordinates selected by the user in the detection area in sequence to form a detection line, with the coordinates of the endpoints of the detection line being located on the boundary line of the detection area.

[0084] After selecting the detection area, the user also needs to set the detection line. The user can form a detection line by selecting coordinates in the detection area and then connecting each coordinate in sequence. It should be noted that the coordinates of the endpoints of the detection line are located on the boundary of the detection area. Preferably, the user can directly draw the detection line, use native js to drag the mouse point, realize the movement on the line, and combine canvas to draw the endpoint movement effect.

[0085] Preferably, the coordinates selected by the user cannot exceed the range of the detection area. When the user selects the coordinates, it is necessary to determine whether the coordinates are within the detection area. If the coordinates are not within the detection range, an error is reported to further determine that the coordinates are invalid. Preferably, the coordinates can be returned to the initial position; if the coordinates are within the detection range, the coordinates are determined to be valid.

[0086] For example, the following code is a specific implementation method for determining whether a moving point (coordinate) exceeds a preset detection range.

[0087] isPointOnLineWithWidth(xp,yp,x1,y1,x2,y2,pointWidth=6,lineWidth=3){

[0088] / / Calculate the vector of the line segment

[0089] var lineVec={x:x2-x1,y:y2-y1};

[0090] / / Calculate the vector from the starting point of the line segment to the point

[0091] varpointVec={x:xp-x1,y:yp-y1};

[0092] / / Calculate the dot product of the vectors

[0093] var dot=(pointVec.x*lineVec.x)+(pointVec.y*lineVec.y);

[0094] / / Calculate the length square of the line segment

[0095] var lineLenSquared=(lineVec.x*lineVec.x)+(lineVec.y*lineVec.y);

[0096] / / Check if the dot product is between 0 and the square of the line segment length

[0097] if(dot<0||dot>lineLenSquared){

[0098] return false; / / The point is not on the line segment

[0099] }

[0100] / / Calculate the square of the vertical distance from the point to the line segment

[0101] varparam=dot / lineLenSquared;

[0102] var nearestVec={x:lineVec.x*param,y:lineVec.y*param};

[0103] var distVec={x:pointVec.x-nearestVec.x,y:pointVec.y-nearestVec.y};

[0104] var distSquared=(distVec.x*distVec.x)+(distVec.y*distVec.y);

[0105] / / Consider point width and line width

[0106] var totalWidth=(pointWidth / 2)+(lineWidth / 2);

[0107] var threshold = totalWidth*totalWidth; / / The threshold is the square of the width

[0108] / / If the vertical distance is less than or equal to the threshold, the point is considered to be on the line segment

[0109] return distSquared<=threshold;

[0110] },

[0111] Through the above code, the processing device can determine whether the coordinates or moving points selected by the user are within the detection area.

[0112] S204: Set the detection direction for the camera device to complete the configuration of the human flow detection for the camera device.

[0113] The detection direction of the camera device is set, for example, the direction is left, right, upward or upward, and there can be multiple detection directions. Preferably, after setting the detection direction, the corresponding configuration rule is also obtained. When the configuration rule is met, the pedestrian flow detection data needs to be updated. The content of the configuration rule includes: the running direction of the pedestrian meets the detection direction, and the motion trajectory forms an intersection with the detection line.

[0114] Preferably, the pedestrian flow detection configuration of the shooting device can be changed according to needs. When the user has new needs later, the shooting device can be reconfigured, or the new configuration information can be updated to the camera device so that the pedestrian flow detection configuration of the camera device can be updated according to the new configuration information. The new configuration information may include the configuration content of the shooting area of ​​the camera device, the configuration content of the detection area, the configuration content of the detection line, etc.

[0115] Reference Figure 3 and Figure 4 , is a scene example diagram of the cashier flow detection provided by the embodiment of the present application, which shows the shooting range of the camera device, which includes the cashier flow detection, the maximum detection range, the detection area and the detection line. The detection area can be a quadrilateral or other shapes, and the detection line covers the entrance and exit of the target place as much as possible. The two endpoints of the detection line are respectively on the non-adjacent boundary lines of the detection area, such as Figure 3 As shown, the endpoint a of the detection line is on the boundary line B1B2 of the detection area, and the endpoint b is on the boundary line B2B3 of the detection area.

[0116] Preferably, the shooting area or detection line in the present application includes a target location, which is a location where the flow of people needs to be detected, such as a cashier counter, a store entrance, etc. The target location in the detection area can improve the data accuracy of the flow of people detection. Furthermore, the target location can be located on the boundary line of the detection area, specifically Figure 3 As shown, it can also be completely within the detection area, as shown in Figure 4 shown.

[0117] Figure 3 and Figure 4 The preset detection directions of the camera device shown can be two directions: walking towards the cashier counter and leaving the cashier counter.

[0118] In the embodiment provided in the present application, when the straight line formed by connecting the two endpoints of the detection line is located in front of the entrance and exit of the target place, there is a turning point on the detection line that is located within the area formed by the first straight line and the second straight line. Preferably, the turning point can be located on the second straight line, and the area formed by the first straight line and the second straight line is the area between the first straight line and the second straight line. The first straight line is a straight line formed by the two endpoints of the detection line; the second straight line is a straight line parallel to the first straight line, and the target place is located on the second straight line. Figure 3 As shown, the first straight line is the straight line formed by connecting endpoint a and endpoint b, and the second straight line is line segment B1B4. The second straight line passes through the target location. At this time, the turning point c2 is on line segment B1B4. It can be understood that the speed point c2 is located in the area formed by the first straight line and the second straight line.

[0119] Furthermore, the detection line is formed by connecting a plurality of points in sequence, and the point that is the terminal of the detection line is the endpoint of the detection line, and the remaining points can be regarded as turning points. Preferably, when the straight line formed by connecting the two endpoints of the detection is located in front of the entrance and exit of the target place, there is a turning point located in the target area on the detection line, and the target area is the area between the first straight line and the second straight line in the detection area. In other words, the area between the first straight line and the second straight line in the detection area is the target area; the first straight line is the straight line formed by connecting the two endpoints of the detection line, the second straight line is a straight line parallel to the first straight line, and the target place is located on the second straight line.

[0120] by Figure 3 For example, the first straight line is a straight line formed by connecting point a and point b, and the second straight line is a straight line passing through point B1 and point B4. Furthermore, the target area is a quadrilateral B1abBA, and c2 is a turning point located in the target area.

[0121] At this time, the detection line increases the detection area and range, which can reduce the detection blind spots and blind spots between the target place and the detection line, so as to avoid pedestrians walking towards the target place from the blind spots and blind spots, resulting in the pedestrians' movement trajectory being unable to form an intersection with the detection line, avoiding missed detection, improving detection accuracy, and the detected data is comprehensive, avoiding repeated detection and missed detection that occur when the detection line is a straight line.

[0122] by Figure 3 To explain, by setting the detection line of the broken line, when a pedestrian walks from the B1a side to the cashier counter, because there is a detection line extending toward the cashier counter among the detection lines of the broken line, the probability of the pedestrian walking towards the cashier counter and forming an intersection with the detection line, or crossing the area, is increased. At this time, the possibility of missed detection when the pedestrian walks from the B1a side to the cashier counter is effectively reduced, thereby reducing the detection blind area.

[0123] Preferably, Figure 4 As shown, when the target place is located in the detection area, after the two end points of the detection line are connected, at least one closed area is formed, and the target place is located in any of the closed areas. Further, the closed area where the target place is located can be determined as the target area, and the line segments forming the target area can all be used as the detection line. At this time, the target place is located in the closed area, which can completely avoid the situation where the user's path to the cashier counter does not intersect with the detection line, completely eliminating the detection blind area, thereby avoiding the situation of missed detection, and further improving the accuracy of the detection data.

[0124] The present application also provides a human flow detection device, which can also be regarded as a human flow monitoring system. Figure 5 , is a structural schematic diagram of a human flow detection device provided in an embodiment of the present application. As shown in the figure, the human flow detection device includes a camera device 501 and a processing device 502.

[0125] After the processing device 502 completes the configuration of the camera device 501 for detecting the flow of people, the camera device 501 is used to shoot the configured shooting area and transmit the shooting data to the processing device 502; the shooting area includes the detection area, and the detection area includes the detection line, which is a broken line or a curve;

[0126] The processing device 502 is used to process the captured data, and when it is determined that a pedestrian appears in the detection area, obtain the motion trajectory of the pedestrian in the detection area, and when the motion trajectory forms an intersection with the detection line and the motion direction of the motion trajectory meets the preset detection direction, update the pedestrian flow detection data based on the motion direction of the pedestrian.

[0127] In the device provided by the embodiment of the present application, after completing the configuration of the camera device for detecting the flow of people, the camera device is obtained to shoot the configured shooting area to obtain shooting data; the shooting area includes the detection area, and the detection area includes the detection line, the detection line is a broken line or a curve, and the two endpoints of the detection line are on the boundary line of the detection area; the shooting data is processed, and when it is determined that a pedestrian appears in the detection area, the movement trajectory of the pedestrian in the detection area is obtained, and when the movement trajectory forms an intersection with the detection line, and the movement direction of the movement trajectory meets the preset detection direction, the pedestrian is determined to be a valid flow of people, and the flow of people detection data is updated. The present application sets the detection area in the shooting area of ​​the camera device, and sets a broken line or a curved detection line in the detection area. The broken line or the curved detection line increases the probability that the movement trajectory of pedestrians in the detection area forms an intersection with the detection line, thereby reducing the situation where the movement trajectory of pedestrians does not form an intersection with the detection line, avoiding missed detection, and improving the data accuracy of the flow of people detection.

[0128] In another embodiment provided by the present application, the process of configuring the processing device of the apparatus to perform human flow detection configuration on the camera device includes:

[0129] Acquire the shooting configuration information of the camera device input by the user, set various shooting parameters of the camera device according to the shooting configuration information, and determine the shooting area of ​​the camera device after the shooting parameters are configured;

[0130] Determine a maximum detection range in the shooting area, and display the maximum detection range to the user, so that the user selects a detection area in the maximum detection range;

[0131] Connecting the coordinates selected by the user in the detection area in sequence to form a detection line, wherein the coordinates of the end points of the detection line are located on the boundary line of the detection area;

[0132] The detection direction of the camera device is set to complete the human flow detection configuration of the camera device.

[0133] In another embodiment provided in the present application, the shooting area or the detection area of ​​the device includes a target place, and the detection line is used to reduce a blind area for crowd detection at the target place.

[0134] In another embodiment provided in the present application, the device further includes: when the target location is located in the detection area, after connecting the two end points of the detection line, at least one closed area is formed, and the target location is located in any one of the closed areas.

[0135] In another embodiment provided in the present application, the device also includes: there is a turning point on the detection line located in the area formed by the first straight line and the second straight line; the first straight line is a straight line formed by the two endpoints of the detection line; the second straight line is a straight line that includes the target location and is parallel to the first straight line.

[0136] In another embodiment provided by the present application, the process of updating the human flow detection data by the processing device of the apparatus includes:

[0137] generating a pedestrian record of the pedestrian;

[0138] The pedestrian record is updated to a human flow detection database corresponding to the movement direction.

[0139] In another embodiment provided by the present application, the process of processing the photographing data by the processing device of the apparatus includes:

[0140] Using a pre-trained recognition model to perform recognition processing on the captured data;

[0141] A recognition result output by the recognition model is obtained to indicate whether there is a pedestrian in the detection area.

[0142] An embodiment of the present application further provides a storage medium, which includes stored instructions, wherein when the instructions are executed, the device where the storage medium is located is controlled to execute the above-mentioned human flow detection method.

[0143] The present application also provides an electronic device, whose structural diagram is as follows: Figure 6 As shown, it specifically includes a memory 601 and one or more instructions 602, wherein the one or more instructions 602 are stored in the memory 601 and are configured to be executed by one or more processors 603 to execute the one or more instructions 602 to perform the above-mentioned human flow detection method.

[0144] It should be noted that the information (including but not limited to user device information, user personal information, etc.) and data (including but not limited to data used for analysis, stored data, displayed data, etc.) involved in this application are all information and data authorized by the user or fully authorized by all parties, and the collection, use and processing of relevant data must comply with relevant laws, regulations and standards of relevant countries and regions.

[0145] The specific implementation processes and derivative methods of the above-mentioned embodiments are all within the protection scope of this application.

[0146] Each embodiment in this specification is described in a progressive manner, and the same or similar parts between the embodiments can refer to each other, and each embodiment focuses on the differences from other embodiments. In particular, for the system or system embodiment, since it is basically similar to the method embodiment, the description is relatively simple, and the relevant parts can refer to the partial description of the method embodiment. The system and system embodiments described above are merely schematic, wherein the units described as separate components may or may not be physically separated, and the components displayed as units may or may not be physical units, that is, they may be located in one place, or they may be distributed on multiple network units. Some or all of the modules may be selected according to actual needs to achieve the purpose of the scheme of this embodiment. Ordinary technicians in this field can understand and implement it without creative work.

[0147] Professionals may further appreciate that the units and algorithm steps of each example described in conjunction with the embodiments disclosed herein can be implemented in electronic hardware, computer software, or a combination of the two. In order to clearly illustrate the interchangeability of hardware and software, the composition and steps of each example have been generally described in the above description according to function. Whether these functions are performed in hardware or software depends on the specific application and design constraints of the technical solution. Professionals and technicians may use different methods to implement the described functions for each specific application, but such implementation should not be considered to be beyond the scope of this application.

[0148] The above description of the disclosed embodiments enables those skilled in the art to implement or use the present application. Various modifications to these embodiments will be apparent to those skilled in the art, and the general principles defined herein may be implemented in other embodiments without departing from the spirit or scope of the present application. Therefore, the present application will not be limited to the embodiments shown herein, but will conform to the widest scope consistent with the principles and novel features disclosed herein.

Claims

1. A method for detecting human flow, characterized in that: include: After completing the configuration of the camera device for detecting the flow of people, obtaining the shooting data obtained by the camera device shooting the configured shooting area; the shooting area includes the detection area, and the detection area includes a detection line, the detection line is a broken line or a curve, and the two endpoints of the detection line are on the boundary line of the detection area; The captured data is processed, and when it is determined that a pedestrian appears in the detection area, the motion trajectory of the pedestrian in the detection area is obtained; when the motion trajectory forms an intersection with the detection line and the motion direction of the motion trajectory meets the preset detection direction, the pedestrian is determined to be a valid human flow, and the human flow detection data is updated.

2. The method according to claim 1, characterized in that The process of configuring the camera device for human flow detection includes: Acquire the shooting configuration information of the camera device input by the user, set various shooting parameters of the camera device according to the shooting configuration information, and determine the shooting area of ​​the camera device after the shooting parameters are configured; Determine a maximum detection range in the shooting area, and display the maximum detection range to the user, so that the user selects a detection area in the maximum detection range; Connecting the coordinates selected by the user in the detection area in sequence to form a detection line, wherein the coordinates of the end points of the detection line are located on the boundary line of the detection area; The detection direction of the camera device is set to complete the human flow detection configuration of the camera device.

3. The method according to claim 1, characterized in that The shooting area or the detection area includes a target location, and the detection line is used to reduce a blind area for detecting crowds at the target location.

4. The method according to claim 3, characterized in that: Also includes: When the target location is located in the detection area, after the two end points of the detection line are connected, at least one closed area is formed, and the target location is located in any one of the closed areas.

5. The method according to claim 3, characterized in that: Also includes: When the straight line formed by connecting the two endpoints of the detection line is located in front of the entrance and exit of the target place, there is a turning point on the detection line located in the area formed by the first straight line and the second straight line; the first straight line is a straight line formed by connecting the two endpoints of the detection line; the second straight line is a straight line parallel to the first straight line, and the target place is located on the second straight line.

6. The method according to claim 1, characterized in that The updating of the human flow detection data includes: generating a pedestrian record of the pedestrian; The pedestrian record is updated to a human flow detection database corresponding to the movement direction.

7. The method according to claim 1, characterized in that The processing of the photographing data includes: Using a pre-trained recognition model to perform recognition processing on the captured data; A recognition result output by the recognition model is obtained to indicate whether there is a pedestrian in the detection area.

8. A human flow detection device, characterized in that: include: Camera and processing equipment; After the processing device completes the configuration of the camera device for detecting the flow of people, the camera device is used to shoot the configured shooting area and transmit the shooting data to the processing device; the shooting area includes the detection area, and the detection area includes the detection line, and the detection line is a broken line or a curve; The processing device is used to process the captured data, and when it is determined that a pedestrian appears in the detection area, obtain the motion trajectory of the pedestrian in the detection area, and when the motion trajectory forms an intersection with the detection line and the motion direction of the motion trajectory meets the preset detection direction, update the pedestrian flow detection data based on the motion direction of the pedestrian.

9. A storage medium, characterized in that: The storage medium includes stored instructions, wherein when the instructions are executed, the device where the storage medium is located is controlled to execute the human flow detection method according to any one of claims 1 to 7.

10. An electronic device, characterized in that: It comprises a memory and one or more instructions, wherein the one or more instructions are stored in the memory and are configured to be executed by one or more processors to perform the human flow detection method as described in any one of claims 1-7.

Citation Information

Patent Citations

  • Public transport passenger flow statistics device and method

    CN112580633A

  • Image processing apparatus, method, and non-transitory computer-readable storage medium

    CN113393552A

  • Personnel access detection method, device and equipment and storage medium

    CN117423176A

  • Method, device, and storage medium for pedestrian counting in forward looking surveillance scenario

    WO2015131734A1

Cited By

  • People flow channel track detection method, device, equipment and medium

    CN121482096A