Road traffic information detection method, controller and storage medium

By obtaining the intersection of the motion trajectory and the preset boundary in the road surveillance video, the road behavior is judged, which solves the problem of low accuracy of vehicle or pedestrian behavior determination in the existing technology and achieves more accurate road traffic information statistics.

CN118629201APending Publication Date: 2024-09-10GUANGZHOU YUNCONG INFORMATION TECH CO LTD
View PDF 0 Cites 0 Cited by

Patent Information

Application Number
CN202410666689.5
Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Filing Date
2024-05-27
Publication Date
2024-09-10

AI Technical Summary

Technical Problem

In the existing technology, the accuracy of determining the road behavior of vehicles or pedestrians in road surveillance videos is low, and there are omissions and false positives.

Method used

By obtaining the movement trajectory of the detection target from the road surveillance video at the target intersection, it is judged whether the trajectory intersects with the preset boundary, and the road behavior is judged based on the positional relationship between the detection target and the boundary, and the vehicle is determined using the preset boundary and the road behavior determination area. Or the steering situation of pedestrians to reduce false alarms and false negatives.

Benefits of technology

It improves the accuracy of road behavior judgment, simplifies the steps of road behavior judgment, ensures the accuracy of road traffic information, and avoids the problem of inaccurate traffic statistics caused by omissions and false positives.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN118629201A
    Figure CN118629201A
Patent Text Reader

Abstract

The invention relates to the technical field of computers, particularly provides a road traffic information detection method, a controller and a storage medium, and aims to solve the problem that the accuracy is low when road behaviors of vehicles or pedestrians in a road monitoring video are judged. In order to achieve the purpose, the method comprises the steps of obtaining a motion trail of a detection target from a road monitoring video of a target intersection, judging whether the motion trail intersects with a preset boundary or not, if yes, conducting road behavior judgment according to the position relation between the detection target and the preset boundary, and generating road traffic information of the target intersection according to a judgment result. Thus, road behavior judgment is triggered by intersection of the motion trail of the detection target and the preset boundary, preliminary filtering of the detection target can be realized, the accuracy of road behavior judgment is effectively improved, road behavior judgment of the detection target is packaged, steps required by road behavior judgment are simplified, and the road behavior judgment efficiency is improved. The road traffic information of the target intersection is simply and effectively counted.
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 specifically provides a method for detecting road traffic information, a controller and a storage medium. Background Art

[0002] In recent years, with the gradual improvement of road networks and the rapid growth of traffic volume, urban traffic management has become of great significance to the construction of safe cities. In order to reduce the cost of traffic management and obtain traffic information more flexibly and efficiently, it has become an inevitable development trend for intelligent video surveillance to move towards digitalization, intelligence and diversification. At present, urban construction usually deploys surveillance cameras at ordinary T-junctions and crossroads, and uses intelligent video surveillance technology to detect targets in real-time video images, and detect pedestrians and vehicles in all directions of the intersection in real time.

[0003] Based on the surveillance video of traffic intersections, when counting vehicles and pedestrians at each intersection, a tripwire algorithm can be used, that is, a "warning line" is artificially set in the video image, and a prompt or alarm is given to vehicles or pedestrians that cross the warning line. However, this tripwire algorithm is based on a single rule report, and there will inevitably be omissions and false alarms.

[0004] For example, see Appendix Figure 1 , Figure 1 Track line 1 in the figure is used to indicate the track of vehicles turning into various directions, such as straight-moving vehicles, left-turning vehicles and right-turning vehicles (green track line), and track line 2 is a trip line drawn to count the flow of vehicles turning into various directions. However, if the vehicle travels along track line 3, there will be a situation where the vehicle is missed. See the attached Figure 2 If the vehicle follows the Figure 2 If the vehicle is traveling along the track line 4 in the figure, the vehicle direction will be misreported.

[0005] Accordingly, a new solution is needed in the art to solve the above problems. Summary of the invention

[0006] In order to overcome the above-mentioned defects, the present application is proposed to provide a solution or at least partially solve the problem of low accuracy in determining the road behavior of vehicles or pedestrians in road monitoring videos.

[0007] In a first aspect, the present application provides a method for detecting road traffic information, comprising:

[0008] Obtain the motion trajectory of the detection target from the road surveillance video of the target intersection;

[0009] Determining whether the motion trajectory intersects with a preset boundary, wherein the preset boundary is a filter line pre-defined in the road monitoring video for determining the validity of road behavior;

[0010] If they intersect, making a road behavior judgment based on the positional relationship between the detection target and the preset boundary;

[0011] According to the judgment result, the road traffic information of the target intersection is generated.

[0012] In one technical solution for detecting the above-mentioned road traffic information, the preset boundary includes a boundary of a preset road behavior determination area, and the road behavior determination area is an area defined at the target intersection for determining whether to trigger a road behavior;

[0013] The road behavior judgment comprises:

[0014] Determining a positional relationship between the detection target and the road behavior determination area;

[0015] If the detection target is located in the road behavior determination area, determining that the detection target has invaded the road behavior determination area; and / or,

[0016] Determining whether the detection target has a retention behavior according to the time the detection target is located inside the road behavior determination area; and / or,

[0017] If the detected target is outside the road behavior determination area, it is determined that the detected target escapes from the road behavior determination area.

[0018] In one technical solution for detecting the above-mentioned road traffic information, the determining the positional relationship between the detection target and the road behavior determination area includes:

[0019] Based on the image frame after the motion trajectory in the road monitoring video intersects with the preset boundary, obtaining the boundary coordinate information of the road behavior determination area and the coordinate information of the detection target;

[0020] Based on a crossing number algorithm or a surrounding number algorithm, it is determined whether the detection target enters the road behavior determination area according to the boundary coordinate information and the coordinate information of the detection target.

[0021] In a technical solution for detecting the above-mentioned road traffic information, judging whether the detected target has a lingering behavior according to the time when the detected target is located inside the road behavior determination area includes:

[0022] Based on the time when the motion trajectory in the road monitoring video intersects the preset boundary, determining the start time point and the end time point when the detection target is located in the road behavior determination area;

[0023] According to the start time point and the end time point, counting the retention time of the detection target entering the road behavior determination area;

[0024] If the retention time reaches a preset standard, it is determined that the detection target has retention behavior.

[0025] In one technical solution for detecting the above-mentioned road traffic information, the target intersection is further provided with a road turning statistical line, and the road turning statistical line includes at least one of a straight statistical line, a left turn statistical line, a right turn statistical line and a return statistical line;

[0026] The road behavior judgment is performed according to the positional relationship between the detection target and the preset boundary, including:

[0027] When the motion trajectory of the detection target crosses the preset boundary and then crosses the road turning statistical line, it is determined that the detection target has a road behavior corresponding to the road turning statistical line.

[0028] In a technical solution for detecting the above-mentioned road traffic information, before the road behavior judgment is performed, the following is also included:

[0029] Obtaining an intersection time point at which the motion trajectory intersects the preset boundary in the road monitoring video;

[0030] With respect to the motion trajectory, obtaining the position of the detection target in a frame of image before the intersection time point in the road monitoring video;

[0031] According to the position of the detection target, it is determined whether the detection target crosses the preset boundary from a preset direction.

[0032] In a technical solution for detecting the above-mentioned road traffic information, the determining whether the detected target crosses the preset boundary from a preset direction includes:

[0033] Setting the direction of the preset boundary and using the preset boundary as a first vector;

[0034] Determine a second vector, wherein the second vector takes an endpoint on one side of the preset boundary as a vector starting point and takes the detection target as a vector end point;

[0035] Determining a relative position of the detection target relative to the preset boundary according to the outer product of the first vector and the second vector;

[0036] It is determined whether the detection target crosses the preset boundary from a preset direction according to the relative position.

[0037] In a technical solution for detecting the above-mentioned road traffic information, judging whether the detected target crosses the preset boundary from a preset direction according to the relative position includes:

[0038] If the relative position is that the detection target is located clockwise of the preset boundary, it is determined that the detection target crosses the preset boundary from a preset direction;

[0039] If the relative position is that the detection target is located counterclockwise of the preset boundary, it is determined that the detection target does not cross the preset boundary from the preset direction.

[0040] In a second aspect, a controller is provided, which includes at least one processor and at least one memory, wherein the memory is suitable for storing multiple program codes, and the program codes are suitable for being loaded and run by the processor to execute the road traffic information detection method described in any one of the technical solutions of the above-mentioned road traffic information detection method.

[0041] In a third aspect, a computer-readable storage medium is provided, which stores a plurality of program codes, wherein the program codes are suitable for being loaded and run by a processor to execute the road traffic information detection method described in any one of the technical solutions of the above-mentioned road traffic information detection method.

[0042] The above one or more technical solutions of this application have at least one or more of the following Beneficial effects:

[0043] In the technical solution of the present application, the present application obtains the motion trajectory of the detection target from the road monitoring video of the target intersection, determines whether the motion trajectory intersects with the preset boundary, and if so, performs road behavior judgment based on the positional relationship between the detection target and the preset boundary, and generates road traffic information of the target intersection based on the judgment result. Through the above configuration, the road behavior judgment is triggered by the intersection of the motion trajectory of the detection target with the preset boundary, which can achieve preliminary filtering of the detection target, and then encapsulate the road behavior judgment of the detection target. The road behavior judgment is performed using the positional relationship between the preset boundary and the detection target, which can effectively improve the accuracy of the road behavior judgment, and can also simplify the steps required for the road behavior judgment, so as to achieve simple and effective statistics of the road traffic information of the target intersection.

[0044] Furthermore, the present application also sets multiple road turning statistical lines at the target intersection in the road monitoring video, determines the turning of the detection target at the target intersection by combining the preset boundary and the road turning statistical line, and uses the preset boundary as a filter line to ensure the effectiveness of the road turning statistical line, thereby achieving correct and effective road turning statistics, improving the accuracy of the road traffic information finally obtained, and avoiding the problem of inaccurate road traffic statistical data caused by omission or false reporting of road turning behavior. In addition, it can also reduce the error caused by inaccurate drawing of road turning statistical lines and improve the accuracy of road turning behavior determination. BRIEF DESCRIPTION OF THE DRAWINGS

[0045] The disclosure of the present application will become easier to understand with reference to the accompanying drawings. It is easy for those skilled in the art to understand that these drawings are only for illustrative purposes and are not intended to limit the scope of protection of the present application. In addition, similar numbers in the drawings are used to represent similar parts, among which:

[0046] Figure 1 It is a schematic diagram of an actual scenario in which underreporting occurs when counting vehicle turns in the prior art;

[0047] Figure 2 It is a schematic diagram of an actual scenario in which a false alarm occurs when counting vehicle turns in the prior art;

[0048] Figure 3 is a schematic flow chart of main steps of a method for detecting road traffic information according to an embodiment of the present application;

[0049] Figure 4 This is a schematic diagram of an actual scenario in which a detection target crosses a preset boundary in one implementation of the embodiments of the present application;

[0050] Figure 5 is a schematic diagram of a first vector and a second vector and the outer product therebetween in one implementation of the embodiments of the present application;

[0051] Figure 6 is a schematic diagram of the relative positions of a detection target and a preset boundary in one implementation of the embodiments of the present application;

[0052] Figure 7 is a schematic diagram of a detection target and a road behavior determination area in one implementation of the embodiments of the present application;

[0053] Figure 8 It is a schematic diagram of an actual scene of a combination of a road turning statistical line and a preset boundary in one implementation method of the present application;

[0054] Fig. 9This is the main step flow of a method for detecting road traffic information according to an implementation example of the present application. DETAILED DESCRIPTION

[0055] Some embodiments of the present application are described below with reference to the accompanying drawings. Those skilled in the art should understand that these embodiments are only used to explain the technical principles of the present application and are not intended to limit the protection scope of the present application.

[0056] In the description of the present application, "module" and "processor" may include hardware, software or a combination of the two. A module may include hardware circuits, various suitable sensors, communication ports, memory, and may also include software parts, such as program code, or a combination of software and hardware. The processor may be a central processing unit, a microprocessor, an image processor, a digital signal processor or any other suitable processor. The processor has data and / or signal processing functions. The processor may be implemented in software, hardware or a combination of the two. Non-temporary computer-readable storage media include any suitable medium that can store program code, such as a disk, a hard disk, an optical disk, a flash memory, a read-only memory, a random access memory, etc. The term "A and / or B" means all possible combinations of A and B, such as only A, only B or A and B. The term "at least one A or B" or "at least one of A and B" has a similar meaning to "A and / or B" and may include only A, only B or A and B. The singular terms "one" and "the" may also include plural forms.

[0057] See attached Figure 3 , Figure 3 FIG. 1 is a flow chart showing the main steps of a method for detecting road traffic information according to an embodiment of the present application. Figure 3 As shown, the method for detecting road traffic information in the embodiment of the present application mainly includes the following steps S101 to S104.

[0058] Step S101: Acquire the motion trajectory of the detection target from the road monitoring video of the target intersection.

[0059] In this embodiment, the road monitoring video is road surface monitoring obtained with the permission of relevant departments.

[0060] In one implementation, road surface monitoring videos of forked intersections where traffic flow or road intersection flow is relatively concentrated may be acquired as road monitoring videos of the target intersection.

[0061] In this embodiment, the detection targets may include vehicles or pedestrians captured in the road monitoring video.

[0062] In one implementation, based on video processing technology, the motion trajectory of the detection target can be obtained for each image frame of the road monitoring video within a preset time period.

[0063] In one implementation, the video processing technology may include target tracking technology and intelligent video analysis technology, etc. Among them, the target tracking technology extracts the motion trajectory of the detection target in the road monitoring video by tracking the position of the detection target between consecutive frames of the image; the intelligent video analysis technology detects the movement of objects in the video screen by foreground extraction and other methods, or uses pattern recognition technology to conduct targeted modeling of the detection target to be monitored in the screen, thereby obtaining the motion trajectory of the detection target.

[0064] Step S102: Determine whether the motion trajectory intersects with a preset boundary.

[0065] In this embodiment, the preset boundary is a filter line pre-delineated in the road monitoring video for determining the validity of road behavior. The preset boundary can be a figure of different shapes. For example, the preset boundary can be a quadrilateral area. If the quadrilateral area is a road behavior determination area, the preset boundary can be used to determine whether the detection target invades the road behavior determination area. The preset boundary can also be a line segment. Through the tripwire algorithm, when it is detected that a detection target crosses the tripwire, that is, when the pixel point set of the detection target and the pixel point set on the preset boundary have an intersection, the system will issue a prompt.

[0066] In one implementation, a region of interest (ROI) intelligent video encoding technology may be used to draw a preset boundary, and the types of preset boundaries that may be drawn include: a point, a straight line, a rectangle, an ellipse, or an irregular shape.

[0067] In one implementation, after step S102, the present embodiment may further include determining whether a road behavior determination is required based on the direction in which the detection target crosses a preset boundary. For example, if the detection target crosses a preset boundary from a preset direction, a road behavior determination is performed on the detection target; if the detection target does not cross the preset boundary from a preset direction, a road behavior determination is not performed on the detection target.

[0068] As an example, see the attached Figure 4 , Figure 4 FIG. 1 is a schematic diagram of an actual scene in which a detection target crosses a preset boundary in one implementation of the present application. Figure 4As shown, the direction of the arrow on the boundary 5 is the preset direction corresponding to the boundary 5. If the rectangular frame 1 crosses the boundary 5, since the direction in which the rectangular frame 1 crosses the boundary 5 is the same as the preset direction, the road behavior judgment corresponding to the boundary 5 can be performed or the road behavior alarm can be triggered; and when the rectangular frame 2 crosses the boundary 5, the direction in which the rectangular frame 2 crosses the boundary 5 is opposite to the preset direction, and the road behavior judgment corresponding to the boundary 5 will not be triggered.

[0069] In one implementation, determining whether the detected target crosses a preset boundary from a preset direction may specifically include steps S1021 to S1023:

[0070] Step S1021: Obtaining the intersection time point where the motion trajectory intersects the preset boundary in the road monitoring video.

[0071] Step S1022: for the motion trajectory, obtain the position of the detection target in a frame of image before the intersection time point in the road monitoring video.

[0072] Step S1023: determining, based on the position of the detection target, whether the detection target crosses the preset boundary from a preset direction.

[0073] In one implementation, step S1023 may specifically include steps S10231 to S10234:

[0074] Step S10231: Set the direction of a preset boundary and use the preset boundary as the first vector.

[0075] Step S10232: Determine the second vector.

[0076] In this embodiment, the second vector uses an endpoint on one side of the preset boundary as a vector starting point and uses the detection target as a vector end point.

[0077] Step S10233: Determine the relative position of the detection target relative to the preset boundary according to the outer product of the first vector and the second vector.

[0078] Step S10234: Determine whether the detection target crosses a preset boundary from a preset direction according to the relative position.

[0079] In one implementation, step S10234 may specifically include:

[0080] If the relative position is that the detection target is located clockwise of the preset boundary, it is determined that the detection target crosses the preset boundary from the preset direction.

[0081] If the relative position is that the detection target is located counterclockwise of the preset boundary, it is determined that the detection target does not cross the preset boundary from the preset direction.

[0082] In one embodiment, see the attached Figure 5 , Figure 5 Schematic diagram of a first vector, a second vector and the outer product thereof in one embodiment of the present application. Figure 5 As shown, there is an angle θ between vector a and vector b, and the outer product of vector a and vector b and vector n are perpendicular to the plane formed by vectors a and b.

[0083] In this embodiment, Figure 5 In this case, vector a is used as the first vector, vector b is used as the second vector, and vector n is set as the positive direction of the outer product. Then step S10233 may specifically include steps S201 to S203:

[0084] Step S201: Use the right-hand rule to find the direction of the outer product of vector a and vector b.

[0085] In this embodiment, the direction of the outer product of vector a and vector b is perpendicular to the plane formed by vectors a and b.

[0086] In this embodiment, the right-hand rule means that the palm stands on the vector a of the plane where a and b are located. When the palm turns from a to b, the direction of the thumb is the direction of the desired outer product.

[0087] Step S202: If the direction of the outer product is the same as the direction of vector n, it is determined that vector b is located in the counterclockwise direction of vector a.

[0088] Step S203: If the direction of the outer product is opposite to the direction of vector n, it is determined that vector b is located in the clockwise direction of vector a.

[0089] In this embodiment, when the outer product vector is in the same direction as vector n, vector a needs to turn counterclockwise through an angle θ to coincide with vector b; when the outer product vector is in the opposite direction to vector n, vector a needs to turn clockwise through an angle θ to coincide with vector b.

[0090] In one implementation, the relative position of the detection target and the preset boundary may be obtained according to the positional relationship between the first vector and the second vector.

[0091] As an example, see the attached Figure 6 , Figure 6 Schematic diagram of the relative position of the detection target and the preset boundary in one implementation of the present application. Figure 6 As shown, it can be Figure 6The line segment AB in the figure is used as the preset boundary, and point C or point D is used as the position of the detection target. A is taken as the origin, and point C is in the counterclockwise direction of the line segment AB. The endpoint A of the preset boundary can be set as the origin in advance. Since the line segment AB can coincide with AC after turning less than 180 degrees counterclockwise, the detection target point C is located in the counterclockwise direction of the preset boundary line segment AB; since the line segment AB can coincide with AD after turning less than 180 degrees clockwise, the detection target point D is located in the clockwise direction of the preset boundary line segment AB.

[0092] Step S103: If they intersect, road behavior judgment is performed based on the positional relationship between the detection target and the preset boundary.

[0093] In this embodiment, the road behavior determined by the preset boundary may include detecting the turning of the target at the target intersection and detecting whether the target invades, stays or escapes from the road behavior determination area.

[0094] In one embodiment, the preset boundary may include a boundary of a preset road behavior determination area. The road behavior determination area is an area defined at the target intersection for determining whether a road behavior is triggered.

[0095] In one implementation, the road behavior judgment may include at least one of step S1031 and step S1032 to step S1034:

[0096] Step S1031: Determine the positional relationship between the detection target and the road behavior determination area.

[0097] Step S1032: If the detection target is located in the road behavior determination area, determine that the detection target invades the road behavior determination area.

[0098] Step S1033: judging whether the detection target has a lingering behavior according to the time the detection target is located inside the road behavior determination area.

[0099] Step S1034: If the detection target is outside the road behavior determination area, it is determined that the detection target escapes from the road behavior determination area.

[0100] In one implementation, step S1031 may further include:

[0101] Step S10311: based on the image frame after the motion trajectory in the road monitoring video intersects with the preset boundary, the boundary coordinate information of the road behavior determination area and the coordinate information of the detection target are obtained.

[0102] Step S10312: Based on the intersection number algorithm or the surrounding number algorithm, determine whether the detection target enters the road behavior determination area according to the boundary coordinate information and the coordinate information of the detection target.

[0103] In this embodiment, the detection target may be visualized as a point, the road behavior determination area may be visualized as a polygon, and a crossing number algorithm or a surrounding number algorithm may be used to determine whether the point is within the polygon.

[0104] The crossing number algorithm refers to calculating the number of times a ray starting from a point crosses the polygon boundary. When the number is an even number, the point is outside the polygon; when the number is an odd number, the point is inside the polygon. The winding number algorithm refers to calculating the number of times the polygon rotates around the point. When the number of times the polygon rotates is 0, the point is outside the polygon; otherwise, the point is inside the polygon.

[0105] In one implementation, step S1033 may further include:

[0106] Step S10331: Based on the time when the motion trajectory in the road monitoring video intersects with the preset boundary, determine the start time point and the end time point when the detection target is located in the road behavior determination area.

[0107] Step S10332: According to the start time point and the end time point, the residence time of the detection target in the road behavior determination area is counted.

[0108] Step S10333: If the retention time reaches the preset standard, it is determined that the detection target has retention behavior.

[0109] In one embodiment, the preset standard is a retention time standard that can be preset. For example, the preset standard can be 10 seconds.

[0110] In one embodiment, see the attached Figure 7 , Figure 7 Schematic diagram of a detection target and a road behavior determination area in one embodiment of the present application. Figure 7 As shown, rectangular frame 3 is the detection target in the road monitoring video, and rectangular frame 4 is the road behavior determination area set at the target intersection.

[0111] In this embodiment, Figure 7 For example, a coordinate system can be established in a frame image in a road monitoring video, and the position coordinates of the central pixel point of the rectangular frame 3 are used as the coordinate information rect1 of the detection target; the boundary position information Points[x0, y0, x1, y1, x2, y2, x3, y3] of the rectangular frame 4 is used as the boundary coordinate information of the road behavior judgment area.

[0112] Among them, (x0, y0), (x1, y1), (x2, y2) and (x3, y3) are the coordinates of the four pixel points at the upper left corner, upper right corner, lower left corner and lower right corner of the rectangular frame 4 respectively, and Points[x0, y0, x1, y1, x2, y2, x3, y3] is a set of pixel points obtained based on the pixel points on the rectangular frame composed of four pixel points.

[0113] The positional relationship between the detection target and the road behavior determination area may include: rect1 coincides with the position of the pixel point included in Points, rect1 is located inside the closed boundary formed by Points, and rect1 is outside the closed boundary formed by Points.

[0114] In one implementation, when it is detected that rect1 is located inside the closed boundary formed by Points, it is determined that the detection target has invaded the road behavior determination area, and an intrusion alarm is triggered.

[0115] In one embodiment, when it is detected that rect1 is located inside the closed boundary formed by Points, time counting can be started. When rect1 is continuously located inside the closed boundary formed by Points for a preset time, it is determined that the detected object has a stay behavior in the road behavior determination area corresponding to the rectangular frame 4.

[0116] In one embodiment, a road turning statistical line can be set at the target intersection to count the turning situation of the detection target at the target intersection. The road turning statistical line can include at least one of a straight statistical line, a left turn statistical line, a right turn statistical line and a return statistical line.

[0117] In one implementation, step S103 may further specifically include:

[0118] When the motion trajectory of the detection target crosses the preset boundary and the road turning statistical line, it is determined that the detection target has a road behavior corresponding to the road turning statistical line.

[0119] Among them, the road turning statistical line can adopt a safety monitoring mechanism of tripwire intrusion, that is, by using the road turning statistical line as a tripwire, when the target object crosses the tripwire in the set direction of movement, it will trigger the corresponding alarm of the road turning statistical line.

[0120] In one embodiment, the road turning statistical lines may include straight-ahead statistical lines, left-turn statistical lines, right-turn statistical lines, and return statistical lines. Figure 8 , Figure 8 1 is a schematic diagram of a practical scenario of a road turning statistical line and a preset boundary combination in one embodiment of the present application. Figure 8As shown, a combination of road turning statistical lines and preset boundaries can be used to effectively determine whether the detection target has a road behavior corresponding to the road turning statistical line at the target intersection.

[0121] in, Figure 8 a is the filter line (equivalent to the preset boundary in this embodiment), b is the straight-through statistical line, c is the left-turn statistical line, d is the right-turn statistical line, and e is the return statistical line. Among them, the road behavior corresponding to b is that the detection target goes straight at the target intersection; the road behavior corresponding to c is that the detection target turns left at the target intersection; the road behavior corresponding to d is that the detection target turns right at the target intersection; and the road behavior corresponding to e is that the detection target turns around at the target intersection.

[0122] In this embodiment, if the motion trajectory of the detection target intersects with a and then with b, it is determined that the detection target has a straight-going road behavior; if the motion trajectory of the detection target intersects with a and then with c, it is determined that the detection target has a left turn on the road; if the motion trajectory of the detection target intersects with a and then with d, it is determined that the detection target has a right turn on the road; if the motion trajectory of the detection target intersects with a and then with e, it is determined that the detection target has a U-turn on the road; if the motion trajectory of the detection target does not intersect with a, the road behavior of the detection target is not determined.

[0123] In one embodiment, the number of detection targets crossing each road turning statistical line can also be used to check the statistical results of vehicle turning conditions. As an example, the sum of the number of detection targets crossing the straight statistical line (b), the left turn statistical line (c), the right turn statistical line (d) or the return statistical line (e) can be compared with the number of detection targets crossing the preset boundary (a). If they are equal, it indicates that there are no omissions in the detection targets in the statistical results. If they are not equal, it indicates that there are detection targets that are not included in the statistical results. Therefore, by checking the total number of detection targets in the statistical results, the accuracy of the statistical results can be improved, thereby achieving accurate statistics of the flow data of pedestrians or vehicles at various intersections.

[0124] Step S104: Generate road traffic information of the target intersection according to the judgment result.

[0125] In this embodiment, road traffic information may include vehicle flow and pedestrian flow at the target intersection, may also include turning information of vehicles or pedestrians at the target intersection, and may also include information whether vehicles or pedestrians at the target intersection have committed any violations, all of which do not affect the normal implementation of the embodiments of the present application.

[0126] In this embodiment, the judgment result can be used to generate warning information to generate road traffic information. For example, after determining that the detection target has a road behavior that invades the road behavior judgment area, the corresponding invasion warning information is generated, and then the road traffic information of the target intersection is generated; for example, after determining that the detection target has a road behavior of going straight, turning left, turning right, or turning back, the corresponding warning behavior is generated to count the number of detection targets that have road behaviors of going straight, turning left, turning right, or turning back, so as to generate road traffic information, that is, the turning situation of the detection target at the target intersection.

[0127] In one embodiment, see the attached Fig. 9 , Fig. 9 The main steps of the method for detecting road traffic information according to an implementation of an embodiment of the present application are shown in the following figure. Fig. 9 As shown, this embodiment may include steps S301 to S302:

[0128] Step S301: Obtain the detection result of each frame of road monitoring image.

[0129] In this embodiment, the road monitoring image may be a monitoring image at the target intersection. The detection result includes the location information of the detection target and the specific boundary. Among them, the detection target may include vehicles, pedestrians or other objects appearing in the road monitoring image. The specific boundary is equivalent to the "preset boundary" in this embodiment, which is used to judge the road behavior of the detection target, and may include the boundary of the road behavior determination area, the filter line or other boundary used to determine the validity of the road behavior.

[0130] Step S302: Determine whether to set a behavior alarm for the road monitoring image. If so, proceed to step S303; if not, return to step S301.

[0131] In one implementation, whether to set the behavior alarm type may be initialized in advance, or the user's setting requirements may be obtained through human-computer interaction to determine whether the behavior alarm needs to be set.

[0132] Step S303: If yes, determine the positional relationship between the detection target and the specific boundary, and proceed to at least one of step S304, step S305 and step S306.

[0133] In this embodiment, the positional relationship may include the detection target crossing a specific boundary from a preset direction, the detection target not crossing a specific boundary from a preset direction, the detection target entering a closed area formed by a specific boundary, and the detection target leaving a closed area formed by a specific area, etc.

[0134] In this implementation, at least one of step S304, step S305, and step S306 may be selected according to the preset category of the behavior alarm.

[0135] Step S304: Perform intrusion determination based on the position relationship.

[0136] In this embodiment, intrusion judgment refers to judging whether the detection target has entered a closed area formed by a specific boundary. If so, it is determined that the detection target has intruded into the road.

[0137] In one implementation, the road-staying behavior may be judged based on the duration of the detection target entering a closed area formed by a specific boundary.

[0138] Step S305: Escape determination is performed based on the position relationship.

[0139] In this embodiment, escape judgment refers to judging whether the detected target has left the closed area formed by a specific boundary. If so, it is determined that the detected target has escaped from the road.

[0140] Step S306: Perform tripwire determination based on the position relationship.

[0141] In this embodiment, the trip wire judgment refers to judging whether the detection target crosses a specific boundary from a preset direction. If so, it is determined that the detection target has a turning road behavior.

[0142] Step S307: Generate warning information according to the judgment result.

[0143] In this implementation manner, the warning information may be equivalent to the “road traffic information” in this embodiment.

[0144] Step S308: saving the current position relationship so as to obtain the detection result of the road monitoring image next time.

[0145] Based on the above steps S101 to S104, this embodiment triggers road behavior judgment by detecting the intersection of the motion trajectory of the target with the preset boundary, which can achieve preliminary filtering of the detection target, and then encapsulate the road behavior judgment of the detection target. The road behavior judgment is performed by utilizing the positional relationship between the preset boundary and the detection target, which can effectively improve the accuracy of road behavior judgment, and can also simplify the steps required for road behavior judgment, thereby achieving simple and effective statistics of road traffic information at the target intersection.

[0146] Furthermore, this embodiment also sets a plurality of road turning statistical lines at the target intersection in the road monitoring video, determines the turning of the detection target at the target intersection by combining the preset boundary and the road turning statistical line, and uses the preset boundary as the filter line to ensure the validity of the road turning statistical line, thereby achieving correct and effective road turning statistics, improving the accuracy of the road traffic information finally obtained, and avoiding the problem of inaccurate road traffic statistical data caused by omission or false reporting of road turning behavior. In addition, it can also reduce the error caused by inaccurate drawing of road turning statistical lines, and improve the accuracy of road turning behavior determination.

[0147] It should be pointed out that although the various steps in the above embodiments are described in a specific order, those skilled in the art can understand that in order to achieve the effect of the present application, different steps do not have to be executed in such an order. They can be executed simultaneously (in parallel) or in other orders. These changes are within the scope of protection of the present application.

[0148] It is understood by those skilled in the art that all or part of the processes in the method for implementing the above-mentioned embodiment of the present application can also be completed by instructing the relevant hardware through a computer program, and the computer program can be stored in a computer-readable storage medium, and the computer program can implement the steps of the above-mentioned various method embodiments when executed by the processor. Among them, the computer program includes computer program code, and the computer program code can be in source code form, object code form, executable file or some intermediate form. The computer-readable storage medium may include: any entity or device, medium, U disk, mobile hard disk, disk, optical disk, computer memory, read-only memory, random access memory, electrical carrier signal, telecommunication signal and software distribution medium, etc. that can carry the computer program code.

[0149] Furthermore, the present application also provides a controller. In a controller embodiment according to the present application, the controller includes a processor and a memory, the memory can be configured to store a program for executing the road traffic information detection method of the above method embodiment, and the processor can be configured to execute the program in the memory, which includes but is not limited to the program for executing the road traffic information detection method of the above method embodiment. For ease of explanation, only the parts related to the embodiment of the present application are shown. For specific technical details not disclosed, please refer to the method part of the embodiment of the present application. The controller can be a controller device formed by various electronic devices.

[0150] In the embodiment of the present application, the controller may be a controller device formed by various electronic devices. In some possible implementations, the controller may include multiple memories and multiple processors. The program for executing the method for detecting road traffic information of the above method embodiment may be divided into multiple subprograms, each of which may be loaded and run by a processor to execute different steps of the method for detecting road traffic information of the above method embodiment. Specifically, each subprogram may be stored in different memories, respectively, and each processor may be configured to execute programs in one or more memories to jointly implement the method for detecting road traffic information of the above method embodiment, that is, each processor executes different steps of the method for detecting road traffic information of the above method embodiment, respectively, to jointly implement the method for detecting road traffic information of the above method embodiment.

[0151] The above-mentioned multiple processors may be processors deployed on the same device. For example, the above-mentioned controller may be a high-performance device composed of multiple processors, and the above-mentioned multiple processors may be processors configured on the high-performance device. In addition, the above-mentioned multiple processors may also be processors deployed on different devices. For example, the above-mentioned controller may be a server cluster, and the above-mentioned multiple processors may be processors on different servers in the server cluster.

[0152] Furthermore, the present application also provides a computer-readable storage medium. In a computer-readable storage medium embodiment according to the present application, the computer-readable storage medium can be configured to store a program for executing the road traffic information detection method of the above-mentioned method embodiment, and the program can be loaded and run by the processor to implement the above-mentioned road traffic information detection method. For ease of explanation, only the parts related to the embodiment of the present application are shown. For specific technical details not disclosed, please refer to the method part of the embodiment of the present application. The computer-readable storage medium can be a memory device formed by various electronic devices. Optionally, the computer-readable storage medium in the embodiment of the present application is a non-temporary computer-readable storage medium.

[0153] Further, it should be understood that since the setting of each module is only for illustrating the functional units of the device of the present application, the physical devices corresponding to these modules may be the processor itself, or a part of the software in the processor, a part of the hardware, or a part of the combination of software and hardware. Therefore, the number of each module in the figure is only schematic.

[0154] It is understood by those skilled in the art that each module in the device can be adaptively split or merged. Such splitting or merging of specific modules will not cause the technical solution to deviate from the principle of the present application, and therefore, the technical solutions after splitting or merging will fall within the protection scope of the present application.

[0155] So far, the technical solutions of the present application have been described in conjunction with the preferred embodiments shown in the accompanying drawings. However, it is easy for those skilled in the art to understand that the protection scope of the present application is obviously not limited to these specific embodiments. Without departing from the principles of the present application, those skilled in the art can make equivalent changes or substitutions to the relevant technical features, and the technical solutions after these changes or substitutions will fall within the protection scope of the present application.

Claims

1. A method for detecting road traffic information, characterized in that: The method comprises: Obtain the motion trajectory of the detection target from the road surveillance video of the target intersection; Determining whether the motion trajectory intersects with a preset boundary, wherein the preset boundary is a filter line pre-defined in the road monitoring video for determining the validity of road behavior; If they intersect, making a road behavior judgment based on the positional relationship between the detection target and the preset boundary; According to the judgment result, the road traffic information of the target intersection is generated.

2. The method for detecting road traffic information according to claim 1, characterized in that: The preset boundary includes a boundary of a preset road behavior determination area, and the road behavior determination area is an area defined at the target intersection for determining whether a road behavior is triggered; The road behavior judgment comprises: Determining a positional relationship between the detection target and the road behavior determination area; If the detection target is located in the road behavior determination area, determining that the detection target has invaded the road behavior determination area; and / or, Determining whether the detection target has a retention behavior according to the time the detection target is located inside the road behavior determination area; and / or, If the detected target is outside the road behavior determination area, it is determined that the detected target escapes from the road behavior determination area.

3. The method for detecting road traffic information according to claim 2, characterized in that: The determining the positional relationship between the detection target and the road behavior determination area includes: Based on the image frame after the motion trajectory in the road monitoring video intersects with the preset boundary, obtaining the boundary coordinate information of the road behavior determination area and the coordinate information of the detection target; Based on a crossing number algorithm or a surrounding number algorithm, it is determined whether the detection target enters the road behavior determination area according to the boundary coordinate information and the coordinate information of the detection target.

4. The method for detecting road traffic information according to claim 2, characterized in that: The determining, based on the time that the detection target is located inside the road behavior determination area, whether the detection target has a retention behavior comprises: Based on the time when the motion trajectory in the road monitoring video intersects the preset boundary, determining the start time point and the end time point when the detection target is located in the road behavior determination area; According to the start time point and the end time point, counting the retention time of the detection target entering the road behavior determination area; If the retention time reaches a preset standard, it is determined that the detection target has retention behavior.

5. The method for detecting road traffic information according to claim 1, characterized in that: The target intersection is also provided with a road turning statistical line, and the road turning statistical line includes at least one of a straight statistical line, a left turn statistical line, a right turn statistical line and a return statistical line; The road behavior judgment is performed according to the positional relationship between the detection target and the preset boundary, including: When the motion trajectory of the detection target crosses the preset boundary and then crosses the road turning statistical line, it is determined that the detection target has a road behavior corresponding to the road turning statistical line.

6. The method for detecting road traffic information according to any one of claims 1 or 5, characterized in that: Before the road behavior judgment is performed, the method further includes: Obtaining an intersection time point at which the motion trajectory intersects the preset boundary in the road monitoring video; With respect to the motion trajectory, obtaining the position of the detection target in a frame of image before the intersection time point in the road monitoring video; According to the position of the detection target, it is determined whether the detection target crosses the preset boundary from a preset direction.

7. The method for detecting road traffic information according to claim 6, characterized in that: The determining whether the detection target crosses the preset boundary from a preset direction includes: Setting the direction of the preset boundary and using the preset boundary as a first vector; Determine a second vector, wherein the second vector takes an endpoint on one side of the preset boundary as a vector starting point and takes the detection target as a vector end point; Determining a relative position of the detection target relative to the preset boundary according to the outer product of the first vector and the second vector; It is determined whether the detection target crosses the preset boundary from a preset direction according to the relative position.

8. The method for detecting road traffic information according to claim 7, characterized in that: The determining, according to the relative position, whether the detection target crosses the preset boundary from a preset direction includes: If the relative position is that the detection target is located clockwise of the preset boundary, it is determined that the detection target crosses the preset boundary from a preset direction; If the relative position is that the detection target is located counterclockwise of the preset boundary, it is determined that the detection target does not cross the preset boundary from the preset direction.

9. A controller, comprising at least one processor and at least one memory, wherein the memory is suitable for storing a plurality of program codes, characterized in that: The program code is suitable for being loaded and run by the processor to execute the method for detecting road traffic information according to any one of claims 1 to 8.

10. A computer-readable storage medium storing a plurality of program codes, characterized in that: The program code is suitable for being loaded and run by a processor to execute the method for detecting road traffic information according to any one of claims 1 to 8.