Method, device, computer equipment and medium for determining vehicle curve driving state

By extracting and identifying the positional relationship between the vehicle and the curved traffic marking line, and using computer algorithms to automatically determine the vehicle's curved driving status, it solves the problems of low manual review efficiency and low accuracy in the existing technology, and achieves efficient and accurate curve detection. Road driving status monitoring.

CN112183214BActive Publication Date: 2024-09-24刘丽
View PDF 0 Cites 0 Cited by

Patent Information

Application Number
CN202010907939.1
Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
Filing Date
2020-09-02
Publication Date
2024-09-24
Estimated Expiration
2040-09-02

AI Technical Summary

Technical Problem

In the existing technology, the review of illegal vehicle behavior on curves mainly relies on manual methods, which are inefficient and inaccurate, making it difficult to effectively identify and judge the illegal driving status of vehicles on curves.

Method used

By obtaining the image to be detected, the positional relationship between the target vehicle and the curved traffic marking line is extracted, and computer algorithms are used to automatically identify and determine the vehicle's curved driving status, including pre-recognition and real-time recognition methods, to improve recognition efficiency and accuracy.

Benefits of technology

It realizes the automatic recognition and judgment of the vehicle's curved driving status, improves the recognition accuracy and efficiency, reduces manual intervention, and enhances the ability to monitor vehicle driving behavior.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN112183214B
    Figure CN112183214B
Patent Text Reader

Abstract

The present application relates to the field of computer technology, and in particular to a method, device, computer equipment and storage medium for distinguishing the driving state of a vehicle on a curve. The method comprises: obtaining an image to be detected; when a target vehicle and a curve traffic sign are extracted from the image to be detected, obtaining the positional relationship between the target vehicle and the curve traffic sign; and distinguishing the driving state of the target vehicle on the curve according to the positional relationship. The method can improve the accuracy of distinguishing the driving state of a vehicle on a curve.
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, device, computer equipment and medium for determining a vehicle's curve driving state. Background Art

[0002] In the field of traffic, illegal driving of vehicles not only brings safety hazards to themselves, but also threatens the lives of other people. Therefore, it is particularly important to capture illegal behaviors through traffic cameras and impose penalties.

[0003] Currently, the review of vehicle violations based on curves is done manually, which is not only inefficient, but also prone to errors, resulting in low accuracy of the review. Summary of the invention

[0004] Based on this, it is necessary to provide a method, device, computer equipment and medium for determining the vehicle's curve driving state that can improve the accuracy of determining vehicle illegal behavior in response to the above-mentioned technical problems.

[0005] A method for determining a vehicle's driving state on a curve, the method comprising:

[0006] Acquire the image to be detected;

[0007] When the target vehicle and the curve traffic marking line are extracted from the image to be detected, the positional relationship between the target vehicle and the curve traffic marking line is obtained;

[0008] The curve driving state of the target vehicle is determined based on the position relationship.

[0009] In one embodiment, the curve traffic marking line is pre-identified and stored in association with the geographical location;

[0010] After obtaining the image to be detected, it also includes:

[0011] Obtaining a geographical location corresponding to the image to be detected, and obtaining a pre-identified curve traffic sign line according to the geographical location; or,

[0012] Curved traffic signs are identified in real time;

[0013] After obtaining the image to be detected, it also includes:

[0014] Perform curve recognition on the image to be detected to obtain the curve traffic marking line.

[0015] In one embodiment, a method for identifying a curved traffic sign line includes:

[0016] Extracting traffic marking lines from an image to be detected or a reference image used for pre-identifying traffic marking lines on a curved road;

[0017] Reference data points are calculated based on the data points through which the traffic sign line passes, and the connecting line of the reference data points represents the direction of the traffic sign line;

[0018] Each reference data point is fitted to obtain a reference line segment, and whether the traffic sign line is a curve traffic sign line is determined according to the reference line segment.

[0019] In one embodiment, the reference data points are calculated based on the data points through which the traffic sign line passes, including:

[0020] According to the extension direction of the traffic sign line, the corresponding data point pairs are determined from the data points through which the traffic sign line passes;

[0021] A reference data point is calculated based on each data point pair.

[0022] In one embodiment, fitting each reference data point to obtain a reference line segment includes:

[0023] Extract the reference ordinate corresponding to each reference data point;

[0024] Dividing each reference ordinate into a plurality of reference ordinate sets according to a preset step length, so that fitting is performed according to a reference data point set corresponding to each reference ordinate set, and the obtained fitting degrees are all greater than a preset threshold value;

[0025] The reference line segments are obtained according to the fitting lines corresponding to each reference data point set.

[0026] In one embodiment, the method for calculating the degree of fit includes:

[0027] Calculate the first deviation of the reference horizontal coordinate corresponding to the reference data point;

[0028] Calculate the second deviation of the horizontal coordinates of each fitting point on the reference line segment obtained by fitting relative to the average value of the reference horizontal coordinates;

[0029] The fitting degree corresponding to the reference line segment is obtained according to the first deviation degree and the second deviation degree.

[0030] In one embodiment, obtaining a positional relationship between a target vehicle and a curve traffic sign line, and determining a curve driving state of the target vehicle according to the positional relationship includes:

[0031] Get the target detection frame corresponding to the target vehicle;

[0032] When the target detection frame and the curve traffic sign line have an intersection, it is determined that the target vehicle crosses the curve line.

[0033] In one embodiment, obtaining a positional relationship between a target vehicle and a curve traffic sign line, and determining a curve driving state of the target vehicle according to the positional relationship includes:

[0034] Obtain the target ordinate and target abscissa corresponding to the target position point on the target vehicle;

[0035] Extracting each reference data point whose reference ordinate is equal to the target ordinate, and the reference abscissa of each reference data point;

[0036] Whether the target vehicle changes lanes on a curve is determined based on the magnitude relationship between each reference horizontal coordinate and the target horizontal coordinate.

[0037] In one embodiment, the target vehicle includes a first target vehicle and a second target vehicle corresponding to two consecutive frames;

[0038] Obtain the target ordinate and target abscissa corresponding to the target position point on the target vehicle, including:

[0039] Obtain a first target detection frame corresponding to the first target vehicle, and obtain a first target ordinate and a first target abscissa corresponding to a center point of the first target detection frame;

[0040] Obtain a second target detection frame corresponding to the second target vehicle, and obtain a second target ordinate and a second target abscissa corresponding to a center point of the second target detection frame.

[0041] In one embodiment, extracting each reference data point whose reference ordinate is equal to the target ordinate and the reference abscissa of each reference data point includes:

[0042] Extracting first reference data points whose reference ordinates are equal to the first target ordinates, and first reference abscissas corresponding to the first reference data points;

[0043] Extract each second reference data point whose reference ordinate is equal to the second target ordinate, and the second reference abscissa corresponding to each second reference data point.

[0044] In one embodiment, judging whether the target vehicle changes lanes on a curve according to the magnitude relationship between each reference horizontal coordinate and the target horizontal coordinate includes:

[0045] Calculate a first difference between the first target horizontal coordinate and each first reference horizontal coordinate, and obtain a first quantity corresponding to the first difference greater than zero;

[0046] Calculate a second difference between the second target horizontal coordinate and each second reference horizontal coordinate, and obtain a second quantity corresponding to the second difference greater than zero;

[0047] When the first number is equal to the second number, it is determined that the target vehicle has not changed lanes on a curve.

[0048] In one embodiment, after acquiring the image to be detected, the method further includes:

[0049] Extract vehicles from the image to be detected;

[0050] Get the license plate information corresponding to each vehicle;

[0051] Each license plate information is matched with the target license plate, and the vehicle corresponding to the successfully matched license plate information is extracted as the target vehicle.

[0052] A device for determining a vehicle's curve driving state, the device comprising:

[0053] An image acquisition module, used for acquiring an image to be detected;

[0054] A position relationship acquisition module is used to acquire the position relationship between the target vehicle and the curve traffic marking line when the target vehicle and the curve traffic marking line are extracted from the image to be detected;

[0055] The discrimination module is used to discriminate the curve driving state of the target vehicle according to the position relationship.

[0056] A computer device comprises a memory and a processor, wherein the memory stores a computer program and the processor implements the steps of the above method when executing the computer program.

[0057] A computer-readable storage medium stores a computer program, which implements the steps of the above method when executed by a processor.

[0058] The above-mentioned vehicle curve driving state discrimination method, device, computer equipment and storage medium obtain the image to be detected; and automatically identify the target vehicle and the curve traffic marking line in the image to be detected in the computer, thereby improving the recognition efficiency and recognition accuracy. When the computer automatically extracts the target vehicle and the curve traffic marking line from the image to be detected, the positional relationship between the target vehicle and the curve traffic marking line is automatically obtained using the algorithm in the computer, and then the curve driving state of the target vehicle can be discriminated based on the positional relationship, realizing the automatic discrimination of the legality of the target vehicle's driving behavior on the curve, and improving the recognition accuracy and recognition efficiency of the vehicle's driving behavior. BRIEF DESCRIPTION OF THE DRAWINGS

[0059] Figure 1 This is an application scenario diagram of a method for determining a vehicle's curve driving state in an embodiment;

[0060] Figure 2 1 is a flow chart of a method for determining a vehicle's curve driving state in one embodiment;

[0061] Figure 3 A schematic diagram of a flow chart of a method for identifying a curved traffic sign line provided in an embodiment;

[0062] Figure 4 A schematic diagram of a curve traffic marking line provided in an embodiment;

[0063] Figure 5 A schematic diagram of fitting a curve using reference data points provided in an embodiment;

[0064] Figure 6 A schematic flow chart of a method for determining a curve driving state of a target vehicle according to a position relationship provided in an embodiment;

[0065] Figure 7 A schematic flow chart of a method for acquiring a target vehicle provided in an embodiment;

[0066] Figure 8 A schematic diagram of a vehicle curve lane change or line crossing violation review process provided in an embodiment;

[0067] Fig. 9 is a structural block diagram of a device for determining a vehicle's curve driving state in one embodiment;

[0068] Fig.10 FIG. 4 is a diagram showing the internal structure of a computer device in one embodiment. DETAILED DESCRIPTION

[0069] In order to make the purpose, technical solution and advantages of the present application more clearly understood, the present application is further described in detail below in conjunction with the accompanying drawings and embodiments. It should be understood that the specific embodiments described herein are only used to explain the present application and are not used to limit the present application.

[0070] The vehicle curve driving state determination method provided in this application can be applied to Figure 1 In the application environment shown. The image acquisition device 102 communicates with the server 104 through the network, and the server 104 can also be connected to the terminal 103 through the network. The server 104 obtains the image to be detected acquired by the image acquisition device 102; when the server 104 extracts the target vehicle and the curve traffic sign line from the image to be detected, the server 104 obtains the positional relationship between the target vehicle and the curve traffic sign line; the server 104 determines the curve driving state of the target vehicle according to the positional relationship. Further, the server can also send the curve driving state of the target vehicle to the terminal 103.

[0071] Among them, the image acquisition device 102 can be but is not limited to various cameras, monitors and other devices with image acquisition functions, the terminal 103 can be but is not limited to various personal computers, laptops, smart phones, tablets and portable wearable devices, and the server 104 can be implemented by an independent server or a server cluster composed of multiple servers.

[0072] In one embodiment, Figure 2 As shown, a method for distinguishing the vehicle's driving state on a curve is provided. Figure 1 The server 104 in the example is used as an example. In other embodiments, the method can also be applied to the terminal 103. The method includes the following steps:

[0073] Step 210: Acquire an image to be detected.

[0074] Specifically, the server can obtain a video stream collected by an image acquisition device, and then obtain image frames from the video stream at a preset frequency, and use the image frames as images to be detected. For example, the server obtains a monitoring video stream from a monitoring device installed on a road, and then obtains an image to be detected from the monitoring video stream, wherein the image to be detected may contain traffic information on the road.

[0075] Step 220: When the target vehicle and the curve traffic marking line are extracted from the image to be detected, the positional relationship between the target vehicle and the curve traffic marking line is obtained.

[0076] When the server detects the target vehicle from the image to be detected, the driving state of the target vehicle is determined, where the driving state can be whether the target vehicle follows traffic rules. The server can determine whether the target vehicle follows traffic rules on a curve. Specifically, when the server successfully detects a curve traffic sign line from the image to be detected, the positional relationship between the target vehicle and the curve traffic sign line is obtained, and the driving state of the target vehicle is obtained according to the positional relationship, where the positional relationship can be determined according to the position coordinates.

[0077] Step 230, determining the curve driving state of the target vehicle according to the position relationship.

[0078] The server can obtain the position coordinates of the target vehicle and the curve traffic marking line in the image to be detected, and obtain the position relationship between the target vehicle and the curve traffic marking line according to the position coordinates. The position relationship may include intersection and separation, and then the driving state of the target vehicle is obtained according to the position relationship. If the position relationship meets the requirements, the driving state of the target vehicle is determined to be qualified, otherwise it is unqualified.

[0079] In this embodiment, the driving state of the target vehicle on the curve can be judged according to the positional relationship between each target vehicle and the curve traffic marking line. The target vehicle and the curve traffic marking line can be automatically identified from the image to be detected based on the acquired image to be detected. There is no need for manual participation in the judgment of the driving state of the target vehicle, which improves the recognition accuracy and efficiency of the vehicle's driving behavior.

[0080] In one of the embodiments, the curve traffic sign line is pre-identified and stored in association with the geographical location; after obtaining the image to be detected, it also includes: obtaining the geographical location corresponding to the image to be detected, and obtaining the pre-identified curve traffic sign line according to the geographical location.

[0081] The geographic location may be the location information corresponding to a road intersection. Specifically, the curve traffic marking lines are pre-stored, and the road information of multiple road intersections may be pre-marked and stored as a structured file, such as saving it in a json file, and then the structured file may be associated with the geographic location and stored. For example, the road information may include the traffic marking line information corresponding to the road, such as a stop line, a solid white line, and a solid yellow line. Specifically, different traffic marking lines may be marked with different colors. Furthermore, it may be pre-marked whether the traffic marking line contained in the road intersection is a curve or a straight road, as well as the number of curves or straight roads contained, the position coordinates of each curve or straight road, etc.

[0082] The server searches for a structured file corresponding to the geographical location from pre-stored information according to the acquired geographical location, and extracts the corresponding curve traffic marking line from the structured file.

[0083] In another embodiment, the curve traffic sign line is identified in real time; after acquiring the image to be detected, it also includes: performing curve recognition on the image to be detected to obtain the curve traffic sign line.

[0084] Specifically, when the curve information corresponding to the road intersection is not pre-stored in the structured file corresponding to the road intersection, it also includes: the server performs real-time image recognition on the received image to be detected, and obtains the curve information of the road intersection according to the algorithm recognition result, such as whether the road intersection contains a curve traffic sign line.

[0085] In this embodiment, there are at least two methods for obtaining curve traffic sign lines. One is obtained by manual pre-marking. Since the information is marked in advance, the corresponding curve information can be directly extracted from the pre-stored structured file, which improves the efficiency of information acquisition. The other is obtained by real-time recognition using an algorithm, which is suitable for scenarios when curve information is not marked in advance. By combining the two methods, the curve information of the road intersection can be obtained in any scenario, which improves the ability to obtain curve information.

[0086] In one embodiment, if Figure 3 As shown, a flow chart of a method for identifying a curved traffic sign line is provided, including:

[0087] Step 310: extracting traffic marking lines from the image to be detected or a reference image used to pre-identify traffic marking lines on curved roads.

[0088] Traffic marking lines may include straight roads and curves, etc. Specifically, the server may directly obtain the traffic marking lines corresponding to the image to be detected from a pre-annotated structured file, or the server may use a pre-trained recognition model to recognize the image to be detected and extract the traffic marking lines in the image to be detected. Specifically, the training method of the recognition model includes: first obtaining multiple images to be detected, then pre-marking the categories and position coordinates of the traffic marking lines in the image to be detected, and then inputting the image to be detected with marked traffic marking lines of various types, such as straight roads and curves, into the network model, training the network model to obtain a recognition model, and then using the trained recognition model to detect and recognize the traffic marking lines in the received image to be detected.

[0089] Step 320, reference data points are calculated based on the data points through which the traffic sign line passes, and the connecting line of the reference data points represents the direction of the traffic sign line.

[0090] like Figure 4 As shown, a schematic diagram of a curve traffic marking line is provided. Figure 5 A schematic diagram of fitting a curve using reference data points is provided. Figure 4 as well as Figure 5, the line that passes through the vehicle is the traffic sign line. It can be seen that the traffic sign line is a solid traffic line composed of multiple data points and has a width. The line segment located in the middle of the three lines is the reference line segment, which is obtained by fitting based on the reference data points, and the reference data points are extracted from the data points through which the traffic sign line passes according to preset rules, such as obtaining multiple data points with equal ordinates, and then extracting one of the data points from the multiple data points as a reference data point, so that the ordinates of the reference data points are not equal. In other embodiments, reference data points can also be extracted from the data points according to other rules. Then, the reference data points can be connected to obtain a reference line segment, and the reference line segment represents the direction of the traffic sign line.

[0091] Step 330 , fitting each reference data point to obtain a reference line segment, and determining whether the traffic sign line is a curve traffic sign line according to the reference line segment.

[0092] Specifically, the reference data points can be connected to obtain a reference line segment, and then the reference line segment can be judged whether it is a curve traffic sign line according to parameters such as the trend or shape of the reference line segment. Figure 4 as well as Figure 5 ,exist Figure 4 as well as Figure 5 The curve line passing through the vehicle is formed by connecting the reference data points at the center position of the thick solid line passing through the vehicle. For example, the curvature of the reference line segment can be calculated, and whether the reference line segment is a curve traffic marking line can be obtained based on the curvature.

[0093] In this embodiment, considering that the traffic sign line identified from the image to be detected is a thick solid line, reference data points are extracted from multiple data points according to preset rules, and reference line segments are generated according to the lines connecting the reference data points. Then, the shape of the traffic sign line can be determined according to the shape of the reference line segments, such as whether the traffic sign line is a curve traffic sign line or a straight road traffic sign line.

[0094] In one of the embodiments, a method for determining data points through which a traffic sign line passes includes: obtaining the total number of data points constituting an outer contour of the traffic sign line; numbering the data points of the outer contour according to a preset rule; connecting the corresponding data points of the outer contour in order of the numbers to generate a straight line, and obtaining a straight line equation corresponding to the straight line based on the coordinates of the data points of each outer contour, so as to obtain the data points through which the traffic sign line passes based on the straight line equation.

[0095] Traffic marking lines are composed of a large number of data points, some of which are used to form the boundaries of traffic marking lines, such as the outer contour, and some of which are used to form the internal points of traffic marking lines. The data points that form the outer contour and the internal points together form a thick solid line shape of the traffic marking line. The white solid line and the yellow solid line in the road lane line information obtained by the server are collectively referred to as lane lines, and are set as the lane line set l solid There are n lane lines composition, The i-th lane line express The contour is composed of m points, where (x, y) is the position coordinate of each data point.

[0096] Specifically, the step of generating a straight line equation according to the data points of the outer contour of the lane marking line includes:

[0097] Step 1: The server can obtain the total number of data points corresponding to the outer contour of the traffic sign line, such as m, and initialize j = 0, and select the corresponding traffic sign line The coordinates of the j%mth data point in and the coordinates of the (j+1)%mth data point Where j%m represents the remainder of j divided by m. These two data points will form a line segment l j , and then the line segment l can be calculated based on the position coordinates of each data point j The expressions are as shown in formula (1) to formula (3).

[0098] y=k j *x+b j (1)

[0099] k j =(y j+1 -y j ) / (x j+1 -x j ) (2)

[0100] b j =y j -k j *x j (3)

[0101] Among them, k j is the proportional coefficient corresponding to the jth data point, b j is the intercept corresponding to the jth data point, and then according to the line segment l j The range of the horizontal axis [min(x j , x j+1 ), max(x j , x j+1 )] can calculate the line segment lj All points passed through jp , and then l jp Join Among them yes The point set consisting of all the data points passed.

[0102] Step 2: Update j=j+1 to determine whether j satisfies j≤m. If so, continue to execute step 1 to obtain the equation of the line formed by the data points. Otherwise, proceed to step 3 to obtain the point set composed of all the data points that the traffic sign line passes through. It should be noted that j=j+1 is continuously updated and looped until j=m, that is, all the points are looped through, and the process ends.

[0103] Step 3, after step 1 and step 2, you can get The point set consisting of all the data points passed

[0104] In this embodiment, the linear equation corresponding to the outer contour of the traffic sign line is obtained according to the position coordinates corresponding to the data points, and then all the data points through which the traffic sign line passes can be obtained according to the linear equation. And when it is necessary to obtain data points with equal ordinates on two linear equations, the linear equations corresponding to the two can be directly used for solving, which improves the efficiency and accuracy of data calculation.

[0105] In one embodiment, the reference data points are calculated based on the data points through which the traffic sign line passes, including: determining corresponding data point pairs from the data points through which the traffic sign line passes according to the extension direction of the traffic sign line; and calculating the reference data points based on each data point pair.

[0106] The data point pair may be composed of data points with equal ordinates, and the data point pair may include at least two data points. In other embodiments, the data point pair may also include more than two data points. For example, the server extracts the data points with equal ordinates according to the ordinates of each data point to form data point pairs, and then obtains the abscissa of the data point in each data point pair, and calculates the abscissa of the reference data point according to each abscissa.

[0107] Specifically, the server obtains data points with equal ordinates according to the equations of each line, and forms data point pairs with equal ordinates. This includes: obtaining reference data points according to the coordinates of each data point, including: averaging the horizontal coordinates of data points with equal ordinates; using the average as the horizontal coordinate of the reference data point, and the vertical coordinate as the vertical coordinate of the reference data point, and obtaining the reference data point according to the horizontal coordinate and the vertical coordinate. At this time, the reference data point can be called a central data point. It should be noted that the reference data point here is the central data point corresponding to the central position, and all central data points form a central point set.

[0108] In one embodiment, the center point set can be calculated based on the point set composed of data points. The center point set is used as the reference data point, specifically including:

[0109] First find out The maximum ordinate y max =max(y0, y1, ..., ym) and the minimum ordinate y min =min(y 0 ,y 1 , …, y m ), then let y tempt =y min Go through Find all the points in y that satisfy y = y tempt The point set, Then calculate the point set The center point in Then click Add to the center point set In the same way, let y tempt =y min +1, and continue the above process until y tempt =y max So far. Then the center point set is the center point set composed of reference data points

[0110] In this embodiment, the reference data point is located using the ordinate and abscissa of each data point. The reference data point can be obtained using only the coordinate information of the data point, making the acquisition of the reference data point more accurate. The data points passed by the pre-established straight line equation are continuous, and then the reference data point is obtained using the pre-established straight line equation, making the acquisition of the reference data point more accurate and convenient, thereby improving the processing speed of the computer.

[0111] In one embodiment, each reference data point is fitted to obtain a reference line segment, including: extracting a reference vertical coordinate corresponding to each reference data point; dividing each reference vertical coordinate into a plurality of reference vertical coordinate sets according to a preset step size, so that fitting is performed according to a reference data point set corresponding to each reference vertical coordinate set, and the obtained fitting degree is greater than a preset threshold; and obtaining a reference line segment according to the fitting line corresponding to each reference data point set.

[0112] Specifically, after obtaining the reference data points, the reference data points can be fitted to obtain the traffic sign lines. However, the amount of reference data points is particularly large. In order to improve the processing efficiency of the computer, fitting points can also be extracted from the reference data points, and then the fitting points are used to fit the traffic sign lines. Specifically, the step of extracting fitting points from the reference data points includes:

[0113] refer to Figure 4 as well as Figure 5 ,from Figure 5 It can be seen that the curve is composed of multiple straight line segments, and each straight line segment is connected by two fitting points, where the fitting points are extracted from the reference data points. For example, assuming that it is a curved road, the main task of extracting fitting points from reference data points is to obtain a preset step length, and then use the preset step length to extract fitting points from the reference data points so that the curve obtained by fitting the fitting points meets the requirements. Specifically, the step of extracting fitting points from reference data points may include:

[0114] Step 1: Let y b =y min ,y e =y b +s y , where y min is the reference data point, i.e., the center point set The minimum value of the vertical coordinate, s y The preset step size is the step size of the vertical coordinate each time it increases. For example, you can set s y =1,s y It can be set according to the smoothness of the curve. If the curve is relatively smooth, this value can be set larger, otherwise it can be set smaller. At the same time, assuming that the straight line segment set is line ss , the purpose is to load all straight line segments and the initial fit Initial fitting line l be .

[0115] Step 2: First take the center point set The vertical coordinate range is [y b ,y e ], and then perform straight line fitting on these point sets to obtain the fitted straight line Then calculate the fitting line The fitness R 2 .

[0116] Step 3: Determine the degree of fit R 2 Is it satisfied? If satisfied, update y e =y e +s y , And continue to Step 2 to calculate the fit; if it is not satisfied, execute Step 4 with a step size s twice y Continue to judge to fit the curve using the fewest line segments possible.

[0117] Step 4: Fit the line l be Add to collection line ss In, update y b =y e ,y e =y b +s y , If y e <y max , then continue with Step 2, otherwise proceed to Step 5.

[0118] Step 5: Get the lane straight line segment fitting set

[0119] In this embodiment, the reference ordinate is adjusted using a preset step size to obtain an adjusted ordinate, and then the reference ordinate and the adjusted ordinate are extracted as fitting points to fit the curve. Fewer reference data points are used in the curve fitting process, and the numerical requirements of the fitting degree can be met, thereby reducing the redundancy of computer calculations in the curve fitting process and improving the efficiency of computer calculations.

[0120] In one embodiment, a method for calculating the degree of fit includes: calculating a first deviation of a reference horizontal coordinate corresponding to a reference data point; calculating a second deviation of the horizontal coordinates of each fitting point on the fitted reference line segment relative to an average value of the reference horizontal coordinate; and obtaining the degree of fit corresponding to the reference line segment based on the first deviation and the second deviation.

[0121] Specifically, the server obtains a point set corresponding to all data points passed by the fitted reference line as shown in formula (4).

[0122]

[0123]

[0124]

[0125]

[0126] R 2 =D px / D tx (8)

[0127] Calculate the reference line according to formula (5) Specifically, when the reference data point set corresponding to the reference data point is the center point set, the center point set is first calculated. The mean of the horizontal coordinates is as shown in formula (5), and then the variance formula of the horizontal coordinates of the center point set is calculated as shown in formula (6), and then the fitting line point set is calculated The horizontal coordinate is relative to the center point set The variance of the mean of the horizontal coordinates is as shown in formula (7), and finally the fitting degree of the i-th lane line is obtained as shown in formula (8). Then according to the fitting degree R 2 The value of the traffic sign line determines whether it is a curve traffic sign line. For example, when R 2 >0.775, the i-th lane line is judged to be a curve, otherwise it is a straight line.

[0128] In this embodiment, a computer is used to automatically calculate the degree of fit, and whether the traffic sign line is a curve is determined based on the degree of fit. The numerical value of the degree of fit can also be adjusted according to actual conditions. The entire calculation process is completely automatically performed by the computer and does not require manual judgment, thereby improving the efficiency and accuracy of data processing.

[0129] In one of the embodiments, the positional relationship between the target vehicle and the curve traffic sign line is obtained, and the curve driving state of the target vehicle is determined based on the positional relationship, including: obtaining a target detection frame corresponding to the target vehicle; when the target detection frame and the curve traffic sign line have an intersection, determining that the target vehicle is crossing the curve line.

[0130] Object detection box C obj It can be the chassis fitting frame of the target vehicle or the frame formed by the four tire points of the vehicle. The user can make a choice according to the usage scenario. obj The steps of curve pressing are as follows: Get the detection frame C of the target vehicle obj And the straight line segment fitting set line of all curved lanes ss . Calculate whether the straight line segment is consistent with the detection box C obj If there is an intersection, it is considered as a line crossing. If not, it is not considered as a line crossing. For details, please refer to Figure 4 as well as Figure 5 ,exist Figure 4 as well as Figure 5 There is an intersection between the vehicle and the straight segment, so it is judged that the vehicle is crossing the line on the curve, that is, the vehicle's driving status on the curve is illegal.

[0131] In one embodiment, if Figure 6 As shown, a schematic flow chart of a method for determining the curve driving state of a target vehicle according to a position relationship in an embodiment is provided. Figure 4 as well as Figure 5 , the method comprising:

[0132] Step 610, obtaining the target ordinate and target abscissa corresponding to the target position point on the target vehicle.

[0133] Specifically, the target vehicle includes a first target vehicle and a second target vehicle corresponding to two consecutive frames; the server obtains a first target detection frame corresponding to the first target vehicle, and the server obtains a first target vertical coordinate and a first target horizontal coordinate corresponding to a center position point of the first target detection frame; the server obtains a second target detection frame corresponding to the second target vehicle, and the server obtains a second target vertical coordinate and a second target horizontal coordinate corresponding to a center position point of the second target detection frame.

[0134] Step 620, extracting each reference data point whose reference ordinate is equal to the target ordinate, and the reference abscissa of each reference data point.

[0135] Specifically, the server extracts each first reference data point whose reference vertical coordinate is equal to the first target vertical coordinate, and the first reference horizontal coordinate corresponding to each first reference data point; the server extracts each second reference data point whose reference vertical coordinate is equal to the second target vertical coordinate, and the second reference horizontal coordinate corresponding to each second reference data point.

[0136] Step 630, judging whether the target vehicle changes lanes on a curve based on the magnitude relationship between each reference horizontal coordinate and the target horizontal coordinate.

[0137] Specifically, the server calculates a first difference between the first target horizontal coordinate and each first reference horizontal coordinate, and obtains a first quantity corresponding to the first difference greater than zero; the server calculates a second difference between the second target horizontal coordinate and each second reference horizontal coordinate, and obtains a second quantity corresponding to the second difference greater than zero; when the first quantity is equal to the second quantity, it is judged that the target vehicle has not changed lanes on a curve, otherwise it is judged that the target vehicle has changed lanes on a curve, that is, the driving state of the target vehicle on the curve is illegal.

[0138] In one embodiment, the server determines whether the target vehicle has made an illegal lane change on the curved traffic sign line. The server first obtains the detection frame C of the target vehicle. obj And the center point set of all curved lanes Specifically, it includes:

[0139] Step 1: The server first calculates the center point of the target detection box Then calculate the center point set l pc In the vertical axis The horizontal axis of Then calculate the center point The distance from the horizontal coordinate to the horizontal coordinate of each center point set And count len ci > 0. If the lanes calculated from the two frames are different, then the target vehicle has violated the lane change law. Otherwise, no lane change violation has occurred.

[0140] In one embodiment, if Figure 7 As shown, a schematic flow chart of a method for acquiring a target vehicle is provided. Specifically, after acquiring the image to be detected, the method further includes:

[0141] Step 710: extracting vehicles from the image to be detected.

[0142] Specifically, the server obtains the image X captured by the traffic camera to be reviewed and the license plate number S of the target vehicle obj Furthermore, the number of images X captured by the traffic camera to be reviewed and obtained from the server is greater than one.

[0143] Then, the server uses a deep learning network model such as the yolo-V3 model to detect and identify all vehicles x in image X. i The detection box position And determine vehicle x i Is it a motor vehicle? If x i If it is a non-motor vehicle, then x i Filter out directly, if there is x i If it is a motor vehicle, proceed to the next step. If all detected vehicles are not motor vehicles, then the target vehicle in image X is directly determined to be a non-motor vehicle, and there is no vehicle violation.

[0144] Step 720, obtaining the license plate information corresponding to each vehicle.

[0145] Specifically, the server detects and identifies motor vehicles based on a deep learning model such as the yolo-V3 network model, including: obtaining images and the license plate number of the target vehicle in each image, manually marking all vehicles appearing in the image with a rectangular frame, and marking whether the vehicle is a motor vehicle or a non-motor vehicle, using the above-mentioned labeled images to train the yolo-V3 target detection network to obtain a motor vehicle and non-motor vehicle detection model. The server can then use the above model to perform motor vehicle and non-motor vehicle detection on the image to be reviewed, and obtain the location frame of each vehicle and the classification of motor vehicle or non-motor vehicle.

[0146] The server determines whether each vehicle is a motor vehicle. If it is a non-motor vehicle, it is filtered out and the vehicle does not proceed to the following steps. If there is a motor vehicle among all the vehicles, the next step is performed. If not, the target vehicle is determined to be a non-motor vehicle and there is no lane change violation in the target vehicle.

[0147] Use the deep learning target detection network model SSD to detect the motor vehicle x obtained by S2 i Perform license plate detection to obtain the license plate image P i , and get the license plate detection frame position at the same time Furthermore, the deep learning detection network SSD model detects motor vehicle x iThe steps of obtaining a license plate include: obtaining a motor vehicle image x i For the motor vehicle image x i Manually mark the license plate position with a rectangular box. Use the labeled images to train the SSD target detection deep neural network to obtain the license plate detection network model. Use the obtained license plate detection model to detect the motor vehicle image x i Perform license plate detection to obtain the license plate position frame and the license plate image P i . Use the image text recognition model CRNN to obtain the license plate P i Perform character recognition to obtain the license plate character S i .

[0148] Furthermore, the step of recognizing a license plate based on a deep learning text recognition model CRNN includes: obtaining a license plate image. For the license plate image, manually labeling its label according to the license plate characters. Using the labeled image to train the CRNN text recognition deep neural network to obtain a license plate recognition network model. Then using the obtained license plate recognition model to recognize the license plate, thereby obtaining the characters of the license plate.

[0149] Step 730, matching each license plate information with the target license plate, and extracting the vehicle corresponding to the successfully matched license plate information as the target vehicle.

[0150] Use the target vehicle's license plate character S obj The license plate character S of each motor vehicle i If no match is found, the target vehicle lane change violation in image X is directly judged as suspected. The reason for suspicion is that the target vehicle does not exist. If a match is found, the target vehicle x is obtained. obj and the location box of the target vehicle in image X and the license plate P of the target vehicle obj and the location box of the license plate in image X

[0151] Furthermore, the step of matching the target vehicle includes: obtaining the real license plate number of the target vehicle and obtaining the license plate number of each motor vehicle. Comparing the difference between the identified license plate number of each motor vehicle and the license plate number of the target vehicle, the difference comparison here is based on whether the identified license plate number and the real license plate number have the same characters in the corresponding positions of other characters except the first province Chinese character, such as 4 consecutive characters. If so, the motor vehicle with the license plate number is the target vehicle; if not, it is determined that the lane change violation of the target vehicle is suspected, and the suspected reason is given: the target vehicle does not exist in the image.

[0152] like Figure 8As shown, a schematic diagram of a vehicle curve lane change or line crossing violation review flow chart is provided, including:

[0153] Step 810, obtaining the image to be reviewed and the license plate number. When the server successfully extracts the image to be reviewed and the license plate number from the image to be reviewed, the process goes to step 820, otherwise it is determined that the vehicle is not illegal.

[0154] Step 820, detect the vehicle and determine whether it is a motor vehicle. If it is determined to be a motor vehicle, go to step 830, otherwise it is determined that the vehicle is not illegal.

[0155] Step 830, check the license plate to determine whether the license plate exists. If the license plate exists, go to step 840, otherwise it is determined that the vehicle is not illegal.

[0156] Step 840, perform license plate character recognition.

[0157] Step 850, use the license plate number to match the target vehicle. If the match is successful, go to step 860, if the match is unsuccessful, determine that the vehicle is not illegal.

[0158] Step 860, read the road marking structure file.

[0159] Step 870: curved lane determination and line segment fitting.

[0160] Step 880, determine whether the vehicle crosses the line or changes lanes. If the vehicle crosses the line or changes lanes, the vehicle is determined to be in violation of the law; otherwise, the vehicle is determined to be not in violation of the law.

[0161] This embodiment is mainly used for intelligent review of whether the target vehicle in the image captured by the traffic camera has illegally changed lanes or crossed the line in a curved lane environment. By using deep learning target vehicle detection, target classification and recognition, and character recognition models, it can accurately find the target vehicle in a complex environment and identify the vehicle's license plate number. It can also perform curve judgment and fitting on the road marking information, and finally determine whether there is any illegal behavior of changing lanes or crossing the line. At the same time, the entire review process is automatically detected and identified, which not only saves manpower, but also ensures the openness and fairness of the review work.

[0162] In one embodiment, Fig. 9 As shown, a device for determining a vehicle's curve driving state is provided, comprising:

[0163] The image acquisition module 910 is used to acquire the image to be detected.

[0164] The position relationship acquisition module 920 is used to acquire the position relationship between the target vehicle and the curve traffic marking line when the target vehicle and the curve traffic marking line are extracted from the image to be detected.

[0165] The determination module 930 is used to determine the curve driving state of the target vehicle according to the position relationship.

[0166] In one embodiment, the curve traffic sign is pre-identified and stored in association with the geographical location; the device further comprises:

[0167] The first curve acquisition module is used to acquire the geographical location corresponding to the image to be detected, and acquire the pre-identified curve traffic sign line according to the geographical location.

[0168] Alternatively, the curved traffic sign line is recognized in real time; the device further comprises:

[0169] The second curve acquisition module is used to perform curve recognition on the image to be detected to obtain the curve traffic marking line.

[0170] In one embodiment, the device further comprises:

[0171] The marking line extraction module is used to extract traffic marking lines from the image to be detected or the reference image used to pre-identify the traffic marking lines on the curve.

[0172] The reference point calculation module is used to calculate reference data points based on the data points that the traffic sign line passes through, and the connection line of the reference data points represents the direction of the traffic sign line.

[0173] The curve determination module is used to fit each reference data point to obtain a reference line segment, and determine whether the traffic sign line is a curve traffic sign line according to the reference line segment.

[0174] In one embodiment, the reference point calculation module includes:

[0175] The data point pair determination unit is used to determine corresponding data point pairs from the data points that the traffic sign line passes through according to the extension direction of the traffic sign line.

[0176] The reference point determination unit is used to calculate a reference data point based on each data point pair.

[0177] In one embodiment, the curve determination module includes:

[0178] The reference ordinate extraction unit is used to extract the reference ordinate corresponding to each reference data point.

[0179] The preset threshold calculation unit is used to divide each reference ordinate into multiple reference ordinate sets according to a preset step size, so that fitting is performed according to the reference data point set corresponding to each reference ordinate set, and the fitting degree obtained is greater than the preset threshold.

[0180] The fitting unit is used to obtain reference line segments according to the fitting lines corresponding to each reference data point set.

[0181] In one embodiment, the device further comprises:

[0182] The first deviation calculation module is used to calculate a first deviation degree of a reference horizontal coordinate corresponding to a reference data point.

[0183] The second deviation calculation module is used to calculate the second deviation of the horizontal coordinates of each fitting point on the reference line segment obtained by fitting relative to the average value of the reference horizontal coordinates.

[0184] The fitting degree calculation module is used to obtain the fitting degree corresponding to the reference line segment according to the first deviation degree and the second deviation degree.

[0185] In one embodiment, the determination module 930 includes:

[0186] The detection frame acquisition unit is used to acquire the target detection frame corresponding to the target vehicle.

[0187] The line crossing determination unit is used to determine whether the target vehicle crosses the curve line when the target detection frame and the curve traffic sign line have an intersection.

[0188] In one embodiment, the determination module 930 includes:

[0189] The target coordinate acquisition unit is used to acquire the target vertical coordinate and the target horizontal coordinate corresponding to the target position point on the target vehicle.

[0190] The reference horizontal coordinate acquisition unit is used to extract each reference data point whose reference vertical coordinate is equal to the target vertical coordinate, and the reference horizontal coordinate of each reference data point.

[0191] The lane change determination unit is used to determine whether the target vehicle changes lanes on a curve according to the size relationship between each reference horizontal coordinate and the target horizontal coordinate.

[0192] In one embodiment, the target vehicle includes a first target vehicle and a second target vehicle corresponding to two consecutive frames;

[0193] The target coordinate acquisition unit includes:

[0194] The first target coordinate acquisition subunit is used to acquire a first target detection frame corresponding to the first target vehicle, and acquire a first target vertical coordinate and a first target horizontal coordinate corresponding to a center position point of the first target detection frame.

[0195] The second target coordinate acquisition subunit is used to acquire a second target detection frame corresponding to the second target vehicle, and acquire a second target ordinate and a second target abscissa corresponding to a center point of the second target detection frame.

[0196] In one embodiment, the reference horizontal coordinate acquisition unit includes:

[0197] The first reference horizontal coordinate acquisition subunit is used to extract each first reference data point whose reference vertical coordinate is equal to the first target vertical coordinate, and the first reference horizontal coordinate corresponding to each first reference data point.

[0198] The second reference horizontal coordinate acquisition subunit is used to extract each second reference data point whose reference vertical coordinate is equal to the second target vertical coordinate, and the second reference horizontal coordinate corresponding to each second reference data point.

[0199] In one embodiment, the lane change determination unit includes:

[0200] The first quantity calculation subunit is used to calculate the first difference between the first target horizontal coordinate and each first reference horizontal coordinate, and obtain the first quantity corresponding to the first difference greater than zero.

[0201] The second quantity calculation subunit is used to calculate the second difference between the second target horizontal coordinate and each second reference horizontal coordinate, and obtain the second quantity corresponding to the second difference greater than zero.

[0202] The lane change determination subunit is used to determine that the target vehicle has not changed lanes on a curve when the first number is equal to the second number.

[0203] In one embodiment, the device further comprises:

[0204] The vehicle extraction module is used to extract vehicles from the image to be detected.

[0205] The license plate information acquisition module is used to obtain the license plate information corresponding to each vehicle.

[0206] The target vehicle extraction module is used to match each license plate information with the target license plate, and extract the vehicle corresponding to the successfully matched license plate information as the target vehicle.

[0207] In one embodiment, a computer device is provided. The computer device may be a server, and its internal structure diagram may be as follows: Fig.10 As shown. The computer device includes a processor, a memory, a network interface and a database connected through a system bus. Among them, the processor of the computer device is used to provide computing and control capabilities. The memory of the computer device includes a non-volatile storage medium and an internal memory. The non-volatile storage medium stores an operating system, a computer program and a database. The internal memory provides an environment for the operation of the operating system and the computer program in the non-volatile storage medium. The database of the computer device is used for traffic road processing related data. The network interface of the computer device is used to communicate with an external terminal through a network connection. When the computer program is executed by the processor, a method for determining the driving state of a vehicle traffic curve is implemented.

[0208] Those skilled in the art will understand that Fig.10 The structure shown in the figure is only a block diagram of a part of the structure related to the solution of the present application, and does not constitute a limitation on the computer device to which the solution of the present application is applied. The specific computer device may include more or fewer components than those shown in the figure, or combine certain components, or have a different arrangement of components.

[0209] In one embodiment, a computer device is provided, including a memory and a processor, wherein the memory stores a computer program, and the processor implements the following steps when executing the computer program: acquiring an image to be detected; when a target vehicle and a curve traffic sign line are extracted from the image to be detected, acquiring a positional relationship between the target vehicle and the curve traffic sign line; and determining a curve driving state of the target vehicle based on the positional relationship.

[0210] In one of the embodiments, the curve traffic sign lines are pre-identified and stored in association with the geographic location; when the processor executes the computer program to implement the steps after obtaining the image to be detected, it is also used to: obtain the geographic location corresponding to the image to be detected, and obtain the pre-identified curve traffic sign lines based on the geographic location; or, the curve traffic sign lines are identified in real time; when the processor executes the computer program to implement the steps after obtaining the image to be detected, it is also used to: perform curve recognition on the image to be detected to obtain the curve traffic sign lines.

[0211] In one of the embodiments, when the processor executes the computer program to implement the steps of the method for identifying curved traffic sign lines, it is also used to: extract the traffic sign lines from the image to be detected or the reference image used to pre-identify the curved traffic sign lines; calculate reference data points based on the data points through which the traffic sign lines pass, and the line connecting the reference data points represents the direction of the traffic sign lines; fit each reference data point to obtain a reference line segment, and determine whether the traffic sign line is a curved traffic sign line based on the reference line segment.

[0212] In one of the embodiments, when the processor executes the computer program to implement the step of calculating the reference data points based on the data points through which the traffic sign line passes, it is also used to: determine the corresponding data point pairs from the data points through which the traffic sign line passes according to the extension direction of the traffic sign line; and calculate the reference data points based on each data point pair.

[0213] In one of the embodiments, when the processor executes a computer program to implement the step of fitting each reference data point to obtain a reference line segment, it is also used to: extract the reference vertical coordinate corresponding to each reference data point; divide each reference vertical coordinate into multiple reference vertical coordinate sets according to a preset step size, so that fitting is performed according to the reference data point set corresponding to each reference vertical coordinate set, and the obtained fitting degree is greater than a preset threshold; and obtain a reference line segment according to the fitting line corresponding to each reference data point set.

[0214] In one embodiment, a method for calculating the degree of fit includes: calculating a first deviation of a reference horizontal coordinate corresponding to a reference data point; calculating a second deviation of the horizontal coordinates of each fitting point on the fitted reference line segment relative to an average value of the reference horizontal coordinate; and obtaining the degree of fit corresponding to the reference line segment based on the first deviation and the second deviation.

[0215] In one of the embodiments, when the processor executes the computer program, it realizes the step of obtaining the positional relationship between the target vehicle and the curve traffic sign line, and judging the curve driving state of the target vehicle according to the positional relationship, and is also used for: obtaining the target detection frame corresponding to the target vehicle; when the target detection frame and the curve traffic sign line have an intersection, determining that the target vehicle is crossing the curve line.

[0216] In one of the embodiments, when the processor executes the computer program, it realizes the step of obtaining the positional relationship between the target vehicle and the curve traffic marking line, and judging the curve driving state of the target vehicle according to the positional relationship, and is also used for: obtaining the target vertical coordinate and the target horizontal coordinate corresponding to the target position point on the target vehicle; extracting each reference data point whose reference vertical coordinate is equal to the target vertical coordinate, and the reference horizontal coordinate of each reference data point; judging whether the target vehicle changes lanes on the curve according to the size relationship between each reference horizontal coordinate and the target horizontal coordinate.

[0217] In one embodiment, the target vehicle includes a first target vehicle and a second target vehicle corresponding to two consecutive frames; when the processor executes the computer program to implement the step of obtaining the target vertical coordinate and the target horizontal coordinate corresponding to the target position point on the target vehicle, it is also used to: obtain a first target detection frame corresponding to the first target vehicle, obtain the first target vertical coordinate and the first target horizontal coordinate corresponding to the center position point of the first target detection frame; obtain a second target detection frame corresponding to the second target vehicle, and obtain the second target vertical coordinate and the second target horizontal coordinate corresponding to the center position point of the second target detection frame.

[0218] In one embodiment, when the processor executes the computer program to implement the step of extracting each reference data point whose reference ordinate is equal to the target ordinate and the reference horizontal coordinate of each reference data point, it is also used to: extract each first reference data point whose reference ordinate is equal to the first target ordinate and the first reference horizontal coordinate corresponding to each first reference data point; extract each second reference data point whose reference ordinate is equal to the second target ordinate and the second reference horizontal coordinate corresponding to each second reference data point.

[0219] In one of the embodiments, when the processor executes the computer program to implement the step of determining whether the target vehicle changes lanes on a curve based on the size relationship between each reference horizontal coordinate and the target horizontal coordinate, it is also used to: calculate a first difference between the first target horizontal coordinate and each first reference horizontal coordinate, and obtain a first quantity corresponding to the first difference greater than zero; calculate a second difference between the second target horizontal coordinate and each second reference horizontal coordinate, and obtain a second quantity corresponding to the second difference greater than zero; when the first quantity is equal to the second quantity, determine that the target vehicle has not changed lanes on a curve.

[0220] In one of the embodiments, the processor executes the computer program to implement the steps after acquiring the image to be detected, and is also used to: extract vehicles from the image to be detected; obtain the license plate information corresponding to each vehicle; match each license plate information with the target license plate, and extract the vehicle corresponding to the successfully matched license plate information as the target vehicle.

[0221] In one embodiment, a computer-readable storage medium is provided, on which a computer program is stored. When the computer program is executed by a processor, the following steps are implemented: acquiring an image to be detected; when a target vehicle and a curve traffic sign line are extracted from the image to be detected, acquiring a positional relationship between the target vehicle and the curve traffic sign line; and determining a curve driving state of the target vehicle based on the positional relationship.

[0222] In one of the embodiments, the curve traffic sign lines are pre-identified and stored in association with the geographic location; when the computer program is executed by the processor to implement the steps after obtaining the image to be detected, it is also used to: obtain the geographic location corresponding to the image to be detected, and obtain the pre-identified curve traffic sign lines based on the geographic location; or, the curve traffic sign lines are identified in real time; when the computer program is executed by the processor to implement the steps after obtaining the image to be detected, it is also used to: perform curve recognition on the image to be detected to obtain the curve traffic sign lines.

[0223] In one of the embodiments, when the computer program is executed by a processor to implement the steps of the method for identifying curved traffic signs, it is also used to: extract traffic signs from an image to be detected or a reference image used to pre-identify curved traffic signs; calculate reference data points based on data points through which the traffic signs pass, and the line connecting the reference data points represents the direction of the traffic signs; fit each reference data point to obtain a reference line segment, and determine whether the traffic sign is a curved traffic sign based on the reference line segment.

[0224] In one embodiment, when the computer program is executed by a processor to implement the step of calculating reference data points based on the data points through which the traffic sign line passes, it is also used to: determine corresponding data point pairs from the data points through which the traffic sign line passes based on the extension direction of the traffic sign line; and calculate reference data points based on each data point pair.

[0225] In one of the embodiments, when the computer program is executed by a processor to implement the step of fitting each reference data point to obtain a reference line segment, it is also used to: extract the reference vertical coordinate corresponding to each reference data point; divide each reference vertical coordinate into multiple reference vertical coordinate sets according to a preset step size, so that fitting is performed according to the reference data point set corresponding to each reference vertical coordinate set, and the obtained fitting degree is greater than a preset threshold; and obtain a reference line segment according to the fitting line corresponding to each reference data point set.

[0226] In one embodiment, when the computer program is executed by a processor, the steps of implementing the method for calculating the degree of fit are also used to: calculate a first deviation of a reference horizontal coordinate corresponding to a reference data point; calculate a second deviation of the horizontal coordinates of each fitting point on the fitted reference line segment relative to the average value of the reference horizontal coordinate; and obtain the degree of fit corresponding to the reference line segment based on the first deviation and the second deviation.

[0227] In one of the embodiments, when the computer program is executed by the processor, it is implemented to obtain the positional relationship between the target vehicle and the curve traffic sign line, and the step of determining the curve driving state of the target vehicle based on the positional relationship is also used to: obtain the target detection frame corresponding to the target vehicle; when the target detection frame and the curve traffic sign line have an intersection, determine that the target vehicle is crossing the curve line.

[0228] In one of the embodiments, when the computer program is executed by the processor, it is implemented to obtain the positional relationship between the target vehicle and the curve traffic marking line, and the step of determining the curve driving state of the target vehicle based on the positional relationship is also used to: obtain the target vertical coordinate and target horizontal coordinate corresponding to the target position point on the target vehicle; extract each reference data point whose reference vertical coordinate is equal to the target vertical coordinate, and the reference horizontal coordinate of each reference data point; and determine whether the target vehicle changes lanes on the curve based on the size relationship between each reference horizontal coordinate and the target horizontal coordinate.

[0229] In one embodiment, the target vehicle includes a first target vehicle and a second target vehicle corresponding to two consecutive frames; when the computer program is executed by the processor to implement the step of obtaining the target vertical coordinate and the target horizontal coordinate corresponding to the target position point on the target vehicle, it is also used to: obtain a first target detection frame corresponding to the first target vehicle, obtain the first target vertical coordinate and the first target horizontal coordinate corresponding to the center position point of the first target detection frame; obtain a second target detection frame corresponding to the second target vehicle, and obtain the second target vertical coordinate and the second target horizontal coordinate corresponding to the center position point of the second target detection frame.

[0230] In one embodiment, when the computer program is executed by a processor to implement the steps of extracting each reference data point whose reference ordinate is equal to the target ordinate, and the reference horizontal coordinate of each reference data point, it is also used to: extract each first reference data point whose reference ordinate is equal to the first target ordinate, and the first reference horizontal coordinate corresponding to each first reference data point; extract each second reference data point whose reference ordinate is equal to the second target ordinate, and the second reference horizontal coordinate corresponding to each second reference data point.

[0231] In one of the embodiments, when the computer program is executed by the processor to implement the step of determining whether the target vehicle changes lanes on a curve based on the size relationship between each reference horizontal coordinate and the target horizontal coordinate, it is also used to: calculate a first difference between the first target horizontal coordinate and each first reference horizontal coordinate, and obtain a first quantity corresponding to the first difference greater than zero; calculate a second difference between the second target horizontal coordinate and each second reference horizontal coordinate, and obtain a second quantity corresponding to the second difference greater than zero; when the first quantity is equal to the second quantity, determine that the target vehicle has not changed lanes on a curve.

[0232] In one of the embodiments, when the computer program is executed by the processor, the steps after obtaining the image to be detected are also used to: extract vehicles from the image to be detected; obtain the license plate information corresponding to each vehicle; match each license plate information with the target license plate, and extract the vehicle corresponding to the successfully matched license plate information as the target vehicle.

[0233] Those skilled in the art can understand that all or part of the processes in the above-mentioned embodiments can be completed by instructing the relevant hardware through a computer program, and the computer program can be stored in a non-volatile computer-readable storage medium. When the computer program is executed, it can include the processes of the embodiments of the above-mentioned methods. Among them, any reference to memory, storage, database or other media used in the embodiments provided in the present application can include non-volatile and / or volatile memory. Non-volatile memory can include read-only memory (ROM), programmable ROM (PROM), electrically programmable ROM (EPROM), electrically erasable programmable ROM (EEPROM) or flash memory. Volatile memory can include random access memory (RAM) or external cache memory. As an illustration and not limitation, RAM is available in many forms, such as static RAM (SRAM), dynamic RAM (DRAM), synchronous DRAM (SDRAM), double data rate SDRAM (DDRSDRAM), enhanced SDRAM (ESDRAM), synchronous link (Synchlink) DRAM (SLDRAM), memory bus (Rambus) direct RAM (RDRAM), direct memory bus dynamic RAM (DRDRAM), and memory bus dynamic RAM (RDRAM).

[0234] The technical features of the above embodiments may be combined arbitrarily. To make the description concise, not all possible combinations of the technical features in the above embodiments are described. However, as long as there is no contradiction in the combination of these technical features, they should be considered to be within the scope of this specification.

[0235] The above embodiments only express several implementation methods of the present application, and the descriptions thereof are relatively specific and detailed, but they cannot be understood as limiting the scope of the invention patent. It should be pointed out that, for a person of ordinary skill in the art, several variations and improvements can be made without departing from the concept of the present application, and these all belong to the protection scope of the present application. Therefore, the protection scope of the patent of the present application shall be subject to the attached claims.

Claims

1. A method for determining a vehicle's driving state on a curve, the method comprising: Acquire the image to be detected; Curved traffic marking lines are pre-identified and stored in association with the geographical location; Acquire the geographical location corresponding to the image to be detected, and acquire the pre-identified curve traffic sign line according to the geographical location; or, the curve traffic sign line is identified in real time; perform curve recognition on the image to be detected to obtain the curve traffic sign line; When a target vehicle and a curve traffic sign line are extracted from the image to be detected, a positional relationship between the target vehicle and the curve traffic sign line is obtained; Determining the curve driving state of the target vehicle according to the positional relationship; The method for identifying a curved traffic sign line includes: Extracting traffic marking lines from the image to be detected or a reference image used to pre-identify traffic marking lines on a curved road; According to the extension direction of the traffic sign line, a corresponding data point pair is determined from the data points through which the traffic sign line passes; a reference data point is calculated based on each of the data point pairs, and the connection line of the reference data points represents the direction of the traffic sign line; Each of the reference data points is fitted to obtain a reference line segment, and whether the traffic sign line is a curve traffic sign line is determined according to the reference line segment.

2. The method according to claim 1, characterized in that The step of fitting each of the reference data points to obtain a reference line segment comprises: Extract the reference ordinate corresponding to each reference data point; Dividing each of the reference ordinates into a plurality of reference ordinate sets according to a preset step length, so that fitting is performed according to a reference data point set corresponding to each of the reference ordinate sets, and the obtained fitting degrees are all greater than a preset threshold value; A reference line segment is obtained according to the fitting line corresponding to each reference data point set.

3. The method according to claim 2, characterized in that The calculation method of the degree of fit includes: Calculate a first deviation of a reference horizontal coordinate corresponding to the reference data point; Calculating a second deviation of the horizontal coordinates of each fitting point on the reference line segment obtained by fitting relative to the average value of the reference horizontal coordinates; The fitting degree corresponding to the reference line segment is obtained according to the first deviation degree and the second deviation degree.

4. The method according to any one of claims 1 to 3, characterized in that: The obtaining of the positional relationship between the target vehicle and the curve traffic sign line, and determining the curve driving state of the target vehicle according to the positional relationship, includes: Obtaining a target detection frame corresponding to the target vehicle; When the target detection frame and the curve traffic sign line have an intersection, it is determined that the target vehicle crosses the curve line.

5. The method according to any one of claims 1 to 3, characterized in that: The obtaining of the positional relationship between the target vehicle and the curve traffic sign line, and determining the curve driving state of the target vehicle according to the positional relationship, includes: Obtaining a target ordinate and a target abscissa corresponding to a target position point on the target vehicle; Extracting each reference data point whose reference ordinate is equal to the target ordinate, and the reference abscissa of each reference data point; Whether the target vehicle changes lanes on a curve is determined according to the magnitude relationship between each reference horizontal coordinate and the target horizontal coordinate.

6. The method according to claim 5, characterized in that The target vehicle includes a first target vehicle and a second target vehicle corresponding to two consecutive frames; The step of obtaining a target ordinate and a target abscissa corresponding to a target position point on the target vehicle includes: Obtain a first target detection frame corresponding to a first target vehicle, and obtain a first target ordinate and a first target abscissa corresponding to a center point of the first target detection frame; A second target detection frame corresponding to the second target vehicle is obtained, and a second target ordinate and a second target abscissa corresponding to a center point of the second target detection frame are obtained.

7. The method according to claim 6, characterized in that The extracting of each reference data point whose reference ordinate is equal to the target ordinate, and the reference abscissa of each reference data point, comprises: Extracting first reference data points whose reference ordinates are equal to the first target ordinates, and first reference abscissas corresponding to the first reference data points; Extract each second reference data point whose reference ordinate is equal to the second target ordinate, and the second reference abscissa corresponding to each second reference data point.

8. The method according to claim 7, characterized in that The step of judging whether the target vehicle changes lanes on a curve according to the magnitude relationship between each reference horizontal coordinate and the target horizontal coordinate includes: Calculate a first difference between the first target horizontal coordinate and each of the first reference horizontal coordinates, and obtain a first quantity corresponding to the first difference greater than zero; Calculate a second difference between the second target horizontal coordinate and each of the second reference horizontal coordinates, and obtain a second quantity corresponding to the second difference greater than zero; When the first number is equal to the second number, it is determined that the target vehicle does not change lanes on a curve.

9. The method according to any one of claims 1 to 3, characterized in that: After acquiring the image to be detected, the method further includes: Extracting a vehicle from the image to be detected; Obtaining license plate information corresponding to each of the vehicles; The license plate information is matched with the target license plate, and the vehicle corresponding to the successfully matched license plate information is extracted as the target vehicle.

10. A device for determining a vehicle's curve driving state, characterized in that: The device comprises: An image acquisition module, used for acquiring an image to be detected; Curved traffic marking lines are pre-identified and stored in association with the geographical location; A first curve acquisition module is used to acquire a geographical location corresponding to the image to be detected, and acquire a pre-identified curve traffic sign line according to the geographical location; or The curve traffic marking line is identified in real time; A second curve acquisition module is used to perform curve recognition on the image to be detected to obtain curve traffic marking lines; A position relationship acquisition module, used for acquiring the position relationship between the target vehicle and the curve traffic sign line when the target vehicle and the curve traffic sign line are extracted from the image to be detected; A determination module, used for determining the curve driving state of the target vehicle according to the position relationship; The device further comprises: A marking line extraction module, used to extract traffic marking lines from the image to be detected or a reference image used to pre-identify curved traffic marking lines; A reference point calculation module is used to determine corresponding data point pairs from the data points through which the traffic sign line passes according to the extension direction of the traffic sign line; a reference data point is calculated based on each of the data point pairs, and the connection line of the reference data points represents the direction of the traffic sign line; The curve determination module is used to fit each of the reference data points to obtain a reference line segment, and determine whether the traffic sign line is a curve traffic sign line according to the reference line segment.

11. A computer device comprising a memory and a processor, wherein the memory stores a computer program, wherein: When the processor executes the computer program, the steps of the method according to any one of claims 1 to 9 are implemented.

12. A computer-readable storage medium having a computer program stored thereon, characterized in that: When the computer program is executed by a processor, the steps of the method according to any one of claims 1 to 9 are implemented.