Curve scene recognition method and device, equipment, storage medium and program product
By acquiring the lane centerline coordinates from historical scene clips, calculating changes in vehicle direction, and identifying curve scenarios, the problem of high difficulty in acquiring curve scenario data is solved, thus improving the accuracy of autonomous driving algorithms.
Patent Information
- Application Number
- CN202510990836.9
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2025-07-18
- Publication Date
- 2025-10-31
AI Technical Summary
Acquiring curve scene data is quite difficult. Existing technologies struggle to accurately identify and acquire high-quality curve scene data, which affects the training and validation of autonomous driving algorithms.
By acquiring the lane centerline coordinates from historical scene segments, the changes in vehicle direction are calculated. The changes in the lane centerline direction reflect the changes in vehicle direction, and the scene recognition results are determined, including whether there are curved scenes.
It achieves accurate identification of curve scenes in historical scene fragments, simplifies the acquisition of curve scene data, and improves the training and verification effect of autonomous driving algorithms.
Smart Images

Figure CN120877246A_ABST
Abstract
Description
Technical Field
[0001] This application relates to the field of vehicle technology, and in particular to methods, devices, equipment, storage media, and program products for curve scene recognition. Background Technology
[0002] With the development of intelligent driving technology, the demand for data from real traffic scenarios is increasing. This data from real traffic scenarios can not only be used to train and validate autonomous driving algorithms, but also to improve vehicle perception, decision-making, and control algorithms.
[0003] High-quality data from real-world traffic scenarios can significantly improve the accuracy of autonomous driving algorithms, vehicle perception, decision-making, and control algorithms. However, due to technical limitations in the data collection process, as well as the relatively rare and complex nature of curves, acquiring data on curves is quite challenging. Summary of the Invention
[0004] The main objective of this application is to provide a method, apparatus, device, storage medium, and program product for recognizing curved scenes, aiming to solve the technical problem of the high difficulty in acquiring data related to curved scenes.
[0005] To achieve the above objectives, this application proposes a method for recognizing curve scenes, the method comprising:
[0006] Obtain historical scene fragments;
[0007] Based on the coordinate information of the lane centerline corresponding to each frame of data in the historical scene segment, the change in the vehicle's driving direction is determined.
[0008] Based on the changes, a scene recognition result is determined, which includes whether the historical scene segment contains a curved scene or not.
[0009] In one embodiment, the coordinate information includes multiple coordinate points on the lane centerline, and the step of determining the change in vehicle driving direction based on the coordinate information of the lane centerline corresponding to each frame of data in the historical scene segment includes:
[0010] Based on the multiple coordinate points, calculate the direction angle of the sub-line segment formed by two adjacent coordinate points on the lane centerline in each frame of data, and calculate the length of the lane centerline.
[0011] The curvature angle of the vehicle centerline is calculated based on the direction angle of each sub-segment corresponding to the lane centerline.
[0012] Based on the bending angle and the length, the change in the vehicle's driving direction is determined.
[0013] In one embodiment, the plurality of coordinate points are arranged in sequence, and the step of calculating the curvature angle of the vehicle centerline based on the direction angle of each sub-segment corresponding to the lane centerline includes:
[0014] When each frame of data corresponds to at least two direction angles, or when the start point and end point of the coordinate points corresponding to each frame of data are in different half-planes, determine whether there is an angle jump between the at least two direction angles;
[0015] If it exists, the curvature angle of the lane centerline is calculated based on the direction angles corresponding to the starting point and the ending point, respectively.
[0016] In one embodiment, the step of determining the change in the vehicle's direction of travel based on the bending angle and the length includes:
[0017] Based on the bending angle and the length, determine the angle change of the lane centerline for each preset length;
[0018] Traverse the data of each frame in the historical scene segment, determine whether the angle change corresponding to the target frame is less than a preset angle threshold, and obtain the determination result. The target frame includes the starting frame of the historical scene segment.
[0019] Based on the judgment result, determine the change in the vehicle's driving direction corresponding to the target frame;
[0020] The step of determining the scene recognition result based on the changes includes:
[0021] Based on the changes in the vehicle's driving direction corresponding to the target frame, scene marking is performed on the target frame;
[0022] Update the target frame to the next frame, return to the step of determining whether the angle change corresponding to the target frame is less than a preset angle threshold, until the target frame is the end frame, and obtain the scene recognition result.
[0023] In one embodiment, the step of determining the change in the vehicle's driving direction corresponding to the target frame based on the judgment result includes:
[0024] If the judgment result is that the angle change is greater than or equal to the preset angle threshold, then the change in the vehicle's driving direction corresponding to the target frame is determined to be a continuous change in direction.
[0025] If the judgment result is that the angle change is less than a preset angle threshold, then the change in the vehicle's driving direction corresponding to the target frame is determined to be a direction jump.
[0026] In one embodiment, the step of scene marking of the target frame based on the change in the vehicle's driving direction corresponding to the target frame includes at least one of the following:
[0027] If the target frame corresponds to a continuous change in direction, and the previous frame of the target frame corresponds to a continuous change in direction, then the target frame is marked as the end frame of the first curve.
[0028] If the target frame corresponds to a continuous change in direction, and the previous frame of the target frame corresponds to a sudden change in direction, then the target frame is marked as the starting frame of the second curve.
[0029] If the target frame corresponds to a continuous change in direction, and the target frame is the first frame in the historical scene segment, then the target frame is marked as the starting frame of the third curve;
[0030] If the change corresponding to the target frame is a directional jump, and the change corresponding to the previous frame of the target frame is a continuous directional change, then the target frame is marked as a non-curved road.
[0031] In one embodiment, after determining the scene recognition result based on the changes, the method further includes:
[0032] Based on the scene marking results of the target frame, the time period of the vehicle's travel on the curve is determined;
[0033] Based on the travel time period and the corresponding frame number for each curve, the vehicle's first travel speed on the curve is determined.
[0034] In one embodiment, the curve scene exists in at least one scene sub-segment, and the at least one scene sub-segment is arranged sequentially among them;
[0035] After determining the scene recognition result based on the changes, the method further includes:
[0036] Traverse the at least one scene sub-fragment and determine whether the target scene sub-fragment is continuous with the previous scene sub-fragment, wherein the target scene sub-fragment does not include the first scene sub-fragment;
[0037] If they are consecutive, the target scene sub-segment is merged with the previous scene sub-segment to obtain the first scene sub-segment;
[0038] If they are not continuous, the target scene sub-segment will be used as the second scene sub-segment;
[0039] Update the target scene sub-fragment to the next scene sub-fragment, return to the step of determining whether the target scene sub-fragment is continuous with the previous scene sub-fragment, until the target scene sub-fragment is the last scene sub-fragment, and obtain the target scene fragment after merging.
[0040] In one embodiment, the step of determining whether a target scene sub-segment is continuous with the previous scene sub-segment includes:
[0041] Obtain the second speed of the vehicle in the target scene sub-segment;
[0042] Calculate the frame difference between the starting frame of the target scene sub-fragment and the ending frame of the previous scene sub-fragment;
[0043] Based on the frame difference, the preset sampling period, and the second driving speed, calculate the first theoretical distance between the vehicle and the starting frame of the target scene sub-segment and the ending frame of the previous scene sub-segment;
[0044] If the first theoretical distance is less than the first distance threshold, then the target scene sub-segment is determined to be continuous with the previous scene sub-segment.
[0045] In one embodiment, after the step of obtaining the merged target scene fragment, the method further includes:
[0046] Obtain the second speed of the vehicle in the target scene segment;
[0047] Determine the target frame number corresponding to the target scene segment;
[0048] Based on the target number of frames, the preset sampling period, and the second driving speed, calculate the second theoretical distance of the vehicle in the target scene segment;
[0049] If the second theoretical distance is greater than or equal to the second distance threshold, then the target scene segment is taken as the corresponding segment of the reasonable curve scene.
[0050] Furthermore, to achieve the above objectives, this application also proposes a curve scene recognition device, which includes:
[0051] The acquisition module is used to acquire historical scene fragments;
[0052] The determination module is used to determine the changes in the vehicle's driving direction based on the coordinate information of the lane centerline corresponding to each frame of data in the historical scene segment;
[0053] The recognition module is used to determine the scene recognition result based on the changes, wherein the scene recognition result includes whether there is a curve scene or not in the historical scene segment.
[0054] In addition, to achieve the above objectives, this application also proposes a curve scene recognition device, the device comprising: a memory, a processor, and a computer program stored in the memory and executable on the processor, the computer program being configured to implement the steps of the curve scene recognition method as described above.
[0055] In addition, to achieve the above objectives, this application also proposes a storage medium, which is a computer-readable storage medium, on which a computer program is stored, and when the computer program is executed by a processor, it implements the steps of the curve scene recognition method described above.
[0056] In addition, to achieve the above objectives, this application also provides a computer program product, which includes a computer program that, when executed by a processor, implements the steps of the curve scene recognition method described above.
[0057] One or more technical solutions proposed in this application have at least the following technical effects:
[0058] This application obtains historical scene segments. Since changes in the direction of the lane centerline reflect changes in the lane direction, and thus changes in the vehicle's driving direction, this embodiment can accurately determine changes in the vehicle's driving direction based on the coordinate information of the lane centerline corresponding to each frame of data in the historical scene segment. Furthermore, based on changes in the vehicle's driving direction, the scene recognition result of the historical scene segment can be accurately determined. For example, the scene recognition result obtained may be that there is a curve scene in the historical scene segment, or that there is no curve scene in the historical scene segment. Through the above recognition method, this application only needs to obtain historical scene segments and accurately obtain the scene recognition result of curves in the historical scene segments in the above manner, thereby easily obtaining data about curve scenes. Attached Figure Description
[0059] The accompanying drawings, which are incorporated in and form part of this specification, illustrate embodiments consistent with this application and, together with the description, serve to explain the principles of this application.
[0060] To more clearly illustrate the technical solutions in the embodiments of this application or the prior art, the drawings used in the description of the embodiments or the prior art will be briefly introduced below. Obviously, for those skilled in the art, other drawings can be obtained based on these drawings without creative effort.
[0061] Figure 1 This is a flowchart illustrating an embodiment of the curve scene recognition method of this application.
[0062] Figure 2A simplified flowchart illustrating the curve scene recognition method provided in Embodiment 1 of this application;
[0063] Figure 3 This is a schematic diagram of a scene provided for Embodiment 1 of the curve scene recognition method of this application;
[0064] Figure 4 This is a flowchart illustrating Embodiment 2 of the curve scene recognition method of this application;
[0065] Figure 5 This is a schematic diagram of a scene provided for Embodiment 2 of the curve scene recognition method of this application;
[0066] Figure 6 This is a flowchart illustrating Embodiment 3 of the curve scene recognition method of this application;
[0067] Figure 7 This is a schematic diagram of the module structure of the curve scene recognition device according to an embodiment of this application;
[0068] Figure 8 This is a schematic diagram of the device structure of the hardware operating environment involved in the curve scene recognition method in this application embodiment.
[0069] The purpose, features, and advantages of this application will be further explained in conjunction with the embodiments and with reference to the accompanying drawings. Detailed Implementation
[0070] It should be understood that the specific embodiments described herein are merely illustrative of the technical solutions of this application and are not intended to limit this application.
[0071] To better understand the technical solution of this application, a detailed description will be provided below in conjunction with the accompanying drawings and specific implementation methods.
[0072] It should be noted that the executing entity in this embodiment can be a computing service device with data processing, network communication, and program execution functions, such as a tablet computer, personal computer, or mobile phone, or an electronic device or a curve scene recognition device capable of performing the above functions. The following description uses a curve scene recognition device as an example to illustrate this embodiment and the subsequent embodiments.
[0073] Based on this, embodiments of this application provide a method for recognizing curved road scenes, referring to... Figure 1 , Figure 1 This is a flowchart illustrating the first embodiment of the curve scene recognition method of this application.
[0074] In this embodiment, the curve scene recognition method includes steps S10 to S30:
[0075] Step S10: Obtain historical scene fragments;
[0076] With the development of intelligent driving technology, the demand for data from real-world traffic scenarios is increasing. This data can not only be used to train and validate autonomous driving algorithms, but also to improve vehicle perception, decision-making, and control algorithms. High-quality real-world traffic scenario data can significantly improve the accuracy of autonomous driving algorithms, vehicle perception, decision-making, and control algorithms; however, due to technical limitations involved in data collection, as well as the relatively rare and complex nature of curves, obtaining data on curves is quite difficult.
[0077] To address the aforementioned issues, this embodiment acquires historical scene fragments to offline identify whether curved scenes exist within these fragments. This allows the historical scene fragments with scene recognition results to serve as effective sample data for training and validating autonomous driving algorithms, vehicle perception algorithms, driving decision-making algorithms, and vehicle control algorithms. Consequently, the autonomous driving algorithms trained based on this effective sample data can accurately identify situations such as vehicles crossing lane lines or highway ramps in curved scenes.
[0078] Specifically, historical scene fragments can be historically collected vehicle driving records or vehicle driving information generated through simulation; historical scene fragments include multiple frames of data, and the scene information corresponding to each frame of data includes timestamps, map information, vehicle driving speed, etc.
[0079] The map information includes vehicle location information, coordinates of the center lines of lanes in the road, etc.
[0080] Step S20: Based on the coordinate information of the lane centerline corresponding to each frame of data in the historical scene segment, determine the change in the vehicle's driving direction;
[0081] Since changes in the direction of the lane centerline can reflect changes in the direction of the vehicle's lane, and thus reflect changes in the vehicle's driving direction, this embodiment determines changes in the vehicle's driving direction based on the coordinate information of the lane centerline corresponding to each frame of data in the historical scene segment.
[0082] It is understood that, based on the coordinate information of the lane centerline corresponding to each frame of data in the historical scene segment, the change in the direction of the vehicle centerline can be determined, thereby determining the change in the vehicle's driving direction based on the change in the direction of the vehicle centerline.
[0083] The coordinate information of the lane centerline may include multiple coordinate points on the lane centerline, as well as lane type information (fast lane, slow lane, etc.), lane width, lane directionality (single lane, two lanes, etc.).
[0084] Reference Figure 2 Step S20 includes steps A1 to A2:
[0085] Step A1: Based on the multiple coordinate points, calculate the direction angle of the sub-line segment formed by two adjacent coordinate points on the lane centerline in each frame of data, and calculate the length of the lane centerline;
[0086] Since the lane centerline corresponding to each frame of data consists of multiple coordinate points, and any two adjacent coordinate points form a sub-segment, the heading angle of the sub-segment can be calculated based on the coordinate points corresponding to each sub-segment; refer to Figure 3 Coordinate point 1 and coordinate point 2 form sub-segment 1, coordinate point 2 and coordinate point 3 form sub-segment 2, and coordinate point 3 and coordinate point 4 form sub-segment 3.
[0087] One specific implementation method for calculating the direction angle of the sub-line segment formed by two adjacent coordinate points on the lane centerline in each frame of data, based on the multiple coordinate points, can be:
[0088] Assuming the starting coordinates of each sub-segment are (start_x, start_y) and the ending coordinates are (end_x, end_y), the formula for calculating the headings of the sub-segment can be:
[0089] headings=arctan((end_y-start_y) / (end_x-start_x));
[0090] Where arctan is the arctangent function.
[0091] Based on the above method, the direction angle of the sub-segment formed by two adjacent coordinate points on the center line of the lane in each frame of data can be calculated. Furthermore, the direction angles of each sub-segment can be combined into a direction angle list.
[0092] In one feasible implementation, if the headings list is not empty, the first element of the headings list can be copied and inserted at index 0 of the headings list; thereby ensuring that the number of coordinate points of the lane centerline is consistent with the number of direction angles in the headings list, and can be analyzed later.
[0093] Additionally, a dictionary named lane_center_headings can be created, with the lane_id corresponding to each frame of data stored as the key and the headings of multiple sub-segments corresponding to each lane centerline stored as the value. That is, each frame_i is bound to the lane centerline ego_obj_laneid and the headings list, and stored in lane_center_headings.
[0094] Furthermore, a specific implementation method for calculating the length of the lane centerline based on the plurality of coordinate points may be:
[0095] Based on the multiple coordinate points, the length of the sub-segment formed by two adjacent coordinate points on the lane centerline in each frame of data is calculated. The lengths of each sub-segment corresponding to the lane centerline are accumulated to calculate the length of the corresponding lane centerline ego_obj_laneid.
[0096] Step A2: Calculate the curvature angle of the vehicle centerline based on the direction angles of each sub-segment corresponding to the lane centerline;
[0097] Since the sub-segments are continuous, the direction angles of the continuous sub-segments can reflect the direction changes of the vehicle centerline. In this embodiment, the curvature angle of the vehicle centerline is calculated based on the direction angles of the sub-segments corresponding to the lane centerline.
[0098] Step A3: Based on the bending angle and the length, determine the change in the vehicle's driving direction.
[0099] Furthermore, in order to uniformly determine the changes in the vehicle's driving direction below the center line of each lane in a quantitative manner, this embodiment determines the changes in the vehicle's driving direction based on the bending angle and the length.
[0100] Due to the lack of high-precision maps, this embodiment cannot accurately obtain the curvature of the lane centerline, and the length of the lane centerline corresponding to each frame of data may not be equal. This embodiment can determine a unified comparison method, compare the curvature of the lane centerline corresponding to different lengths in each frame of data under the same standard, thereby determining the overall change in the vehicle's driving direction.
[0101] Step S30: Based on the changes, determine the scene recognition result, which includes whether there is a curve scene or not in the historical scene segment.
[0102] Furthermore, by analyzing changes in the vehicle's direction of travel, it is possible to determine whether the vehicle is in a curve scenario, a right U-turn scenario, or / or a U-turn scenario, thus obtaining the scene recognition result.
[0103] In this embodiment, historical scene segments are acquired. Since changes in the direction of the lane centerline reflect changes in the lane direction, and thus changes in the vehicle's driving direction, this embodiment can accurately determine changes in the vehicle's driving direction based on the coordinate information of the lane centerline corresponding to each frame of data in the historical scene segments. Based on the direction angles of each sub-segment of the lane centerline, the curvature angle of the vehicle centerline is calculated. Based on the curvature angle and the length, the changes in the direction of the lane centerline are quantified, thereby accurately determining changes in the vehicle's driving direction. Furthermore, based on changes in the vehicle's driving direction, the scene recognition result of the historical scene segments can be accurately determined, thus easily obtaining data about vehicle turning scenes.
[0104] Based on the first embodiment of this application, in the second embodiment of this application, the content that is the same as or similar to that in Embodiment 1 above can be referred to the above description, and will not be repeated hereafter. Based on this, please refer to... Figure 4 Step A2 further includes steps B1 to B3:
[0105] Step B1: When each frame of data corresponds to at least two direction angles, or when the start point and end point of the coordinate points corresponding to each frame of data are in different half-planes, determine whether there is an angle jump between the at least two direction angles.
[0106] It should be noted that the multiple coordinate points are arranged in order, as shown in the reference. Figure 3 From coordinate point 1 to coordinate point 2, the coordinate points are arranged in order of their positions.
[0107] It is understood that if each frame of data corresponds to a direction angle of zero or only one direction angle (i.e., the number of elements in the headings list is less than or equal to 1), then it is considered that the direction angle of the sub-line segment corresponding to the frame of data cannot reflect the curvature angle of the lane centerline, that is, it cannot form a valid angle. In this case, this embodiment sets angle to a negative value (e.g., -1).
[0108] If the direction angle corresponding to each frame of data is 2, then the direction angle of the sub-segment corresponding to that frame of data is considered to reflect the curvature angle of the lane centerline, that is, it can form a valid angle. The coordinate points corresponding to these two direction angles are 2, that is, only one line segment or curve can be formed between the two coordinate points. Assume that the first element in the list headings is denoted as start_point_heading, and the last element in the list headings is denoted as end_point_heading. When the direction angle corresponding to each frame of data is 2, the formula for calculating the curvature angle angle of the lane centerline is: angle = abs(start_point_heading - end_point_heading), where abs is an absolute value function.
[0109] If each frame of data corresponds to at least two direction angles, it is considered that the direction angle of the sub-segment corresponding to the frame of data can reflect the curvature angle of the lane centerline. In order to determine whether there is only one curve scenario from the starting point to the ending point in the coordinate points corresponding to each frame of data, this embodiment further determines whether there is an angle jump between the at least two direction angles.
[0110] Similarly, when the start and end points of the corresponding coordinates in each frame of data are in the same half-plane, it is assumed that the vehicle's driving direction may always remain on the same side (refer to...). Figure 5 (Coordinates 1 and 3 are in the same half-plane), meaning the direction may be continuously changing, and there may only be one curve between the starting point and the ending point; specifically, if start_point_heading*end_point_heading≥0, then it is considered that the starting point and the ending point in the corresponding coordinates of each frame of data are in the same half-plane. At this time, the formula for calculating the curvature angle of the lane centerline is: angle=abs(start_point_heading-end_point_heading), where abs is an absolute value function.
[0111] When the start and end points of the corresponding coordinate points in each frame of data are in different half-planes (refer to...) Figure 5 When coordinate points 3 and 5 are in different half-planes, it is considered that the vehicle's driving direction has changed significantly (the vehicle may have turned or there are at least two curves between the starting point and the ending point). Therefore, when the starting point and the ending point in the coordinate points of each frame of data are in different half-planes, in order to determine whether there is only one curve scene from the starting point to the ending point in the coordinate points of each frame of data, this embodiment further determines whether there is an angle jump between the at least two direction angles.
[0112] Specifically, if start_point_heading*end_point_heading<0, it is assumed that the start and end points of the corresponding coordinate points in each frame of data are in different half-planes.
[0113] Step B2: If it exists, calculate the curvature angle of the lane centerline based on the direction angles corresponding to the starting point and the ending point, respectively.
[0114] This is understandable, since the range of the arctangent function is... The direction angle needs to represent a complete circumference, i.e., 360 degrees (or 2π radians). If only the direction angle calculated based on the arctangent function is represented... Within this range, only half a circle from due south to due north can be represented, which cannot fully represent all possible directions; therefore, in this embodiment, the direction angle calculated based on the arctangent function is normalized to the range [-π, π).
[0115] Furthermore, since the value range of each element in the above list headings is [-π, π), the elements in the list headings may have jumps from -π to π, or from π to -π; specifically, the specific implementation of determining whether there is an angular jump between the at least two direction angles can be:
[0116] Calculate the absolute value of the difference between any two adjacent direction angles in the headings list, abs_diff. If there exists abs_diff > curve_lane_angle_threshold, then the elements in the headings list are considered to have a jump between -π and π or π and -π. Here, curve_lane_angle_threshold is the angle change threshold (this threshold can be...). or (etc.); if all abs_diff in the headings list are less than or equal to curve_lane_angle_threshold, then it is considered that there is no jump between -π and π, or between π and -π in the headings.
[0117] However, when using this calculation method, if the direction angle crosses the boundary between -π and π, directly calculating the angle difference will lead to incorrect results; for example, the change from an angle close to π to an angle close to -π is actually a very small change, but direct subtraction will result in a large value close to 2π, leading to inaccurate calculation results.
[0118] Therefore, in this embodiment, when there is an angle jump, the curvature angle of the lane centerline is calculated based on the direction angles corresponding to the starting point and the ending point, and the calculated curvature angle is standardized. The standardized curvature angle is in the range of [0, 2π).
[0119] Specifically, if the elements in the headings list have angle jumps and the starting point start_point_heading>0 (indicating that the starting direction is located in the left half-plane), in order to make the ending point and the starting point in the same quadrant or adjacent quadrants, this embodiment calculates the curvature angle of the lane centerline based on the direction angles corresponding to the starting point and the ending point respectively: angle=2π-start_point_heading+end_point_heading.
[0120] If start_point_heading <= 0 (indicating the starting direction is in the right half-plane), in order to ensure that the end point and the start point are in the same quadrant or adjacent quadrants, this embodiment calculates the curvature angle of the lane centerline based on the direction angles corresponding to the start point and the end point respectively: angle = 2π - end_point_heading + start_point_heading; thereby eliminating the discontinuity caused by crossing the -π to π boundary, and accurately determining whether there is an angle jump between the at least two direction angles.
[0121] Furthermore, a specific implementation method for determining the change in vehicle travel direction based on the bending angle and the length may be:
[0122] Based on the bending angle and the length, determine the angle change of the lane centerline for each preset length; traverse the data of each frame in the historical scene segment, determine whether the angle change corresponding to the target frame is less than a preset angle threshold, and obtain a judgment result, wherein the target frame includes the starting frame of the historical scene segment; based on the judgment result, determine the change in the vehicle driving direction corresponding to the target frame.
[0123] In order to ensure that the curvature of lane centerlines of different lengths can be compared, this embodiment will determine the angle change of lane centerlines of each preset length based on the curvature angle and the length. That is, the curvature of lane centerlines of different lengths is normalized and converted into the angle change of lane centerlines of each preset length.
[0124] The angle change of the lane centerline for each preset length can be the angle change of the lane centerline per meter or the angle change of the lane centerline per kilometer, thereby achieving a unified measurement of the curve characteristics of lanes of different lengths.
[0125] Specifically, the change in angle of the lane centerline per meter can be expressed as: lane_angle_per_meter = angle * 180 / (π * lane_length), where lane_length is the length of the lane centerline.
[0126] Furthermore, the implementation method for determining the change in the vehicle's driving direction corresponding to the target frame based on the judgment result can be:
[0127] If the determination result is that the angle change is greater than or equal to a preset angle threshold, then the change in the vehicle's driving direction corresponding to the target frame is determined to be a continuous change in direction; if the determination result is that the angle change is less than the preset angle threshold, then the change in the vehicle's driving direction corresponding to the target frame is determined to be a change in direction.
[0128] Specifically, iterate through each frame from the start frame_start to the end frame_end, and check whether the change in the angle of the lane centerline per meter in each frame (lane_angle_per_meter) is greater than or equal to a preset angle threshold (curve_lane_angle_threshold). The preset angle threshold (the threshold for the rate of change of the curvature of the lane centerline) can be 0.6 or 0.5, etc.
[0129] Since the rate of change of curvature of a curve is continuous, that is, the change of vehicle direction is also smooth, if the judgment result is that the angle change is greater than or equal to a preset angle threshold, then the change of vehicle direction corresponding to the target frame is determined to be a continuous change in direction, that is, the vehicle is considered to be in a curve; if the judgment result is that the angle change is less than the preset angle threshold, then the change of vehicle direction corresponding to the target frame is determined to be a change in direction, that is, the vehicle is considered not to be in a curve.
[0130] Furthermore, in order to obtain scene recognition results for historical scene fragments, the specific implementation method for determining the scene recognition results based on the changes can be:
[0131] Based on the change in the vehicle's driving direction corresponding to the target frame, the target frame is marked as a scene; the target frame is updated to the next frame, and the step of judging whether the angle change corresponding to the target frame is less than a preset angle threshold is returned until the target frame is the end frame, and the scene recognition result is obtained.
[0132] It is understood that after determining the change in the vehicle's driving direction corresponding to the target frame during the above traversal process, scene labeling can be performed on the scene recognition result corresponding to the target frame; for example, when the angle change is greater than or equal to a preset angle threshold, it is considered that the vehicle is in a curve, and the vehicle can be labeled as being in a curve in the target frame; thus, when the target frame is the end frame of the traversal, the scene recognition result corresponding to each frame is obtained.
[0133] Specifically, the implementation method for scene marking of the target frame based on the change in the vehicle's driving direction corresponding to the target frame can be at least one of the following:
[0134] If the target frame corresponds to a continuous change in direction, and the previous frame of the target frame corresponds to a continuous change in direction, then the target frame is marked as the end frame of the first curve.
[0135] If the target frame corresponds to a continuous change in direction, and the previous frame of the target frame corresponds to a sudden change in direction, then the target frame is marked as the starting frame of the second curve.
[0136] If the target frame corresponds to a continuous change in direction, and the target frame is the first frame in the historical scene segment, then the target frame is marked as the starting frame of the third curve;
[0137] If the change corresponding to the target frame is a directional jump, and the change corresponding to the previous frame of the target frame is a continuous directional change, then the target frame is marked as a non-curved road.
[0138] Specifically, if the change in angle of the lane centerline per meter is greater than or equal to a preset angle threshold (curve_lane_angle_threshold), that is, the target frame corresponds to a continuous change in direction; and the previous frame of the target frame corresponds to a continuous change in direction, then the vehicle is considered to be in the first curve corresponding to the previous frame. At this time, the target frame can be marked as the end frame of the first curve, that is, the end frame of the first curve is updated to the target frame. At this time, the vehicle is already in the curve and continues to be in the curve.
[0139] If the target frame corresponds to a continuous change in direction, and the previous frame of the target frame corresponds to a sudden change in direction, then the target frame is marked as the starting frame of the second curve, that is, the vehicle begins to enter the new curve.
[0140] If the target frame corresponds to a continuous change in direction, and the target frame is the first frame in the historical scene segment, then the target frame is marked as the starting frame of the third curve; that is, the vehicle begins to enter the first curve in the historical scene segment; or, if the target frame corresponds to a continuous change in direction, and there is no corresponding frame with a continuous change in direction before the target frame, then the target frame is marked as the starting frame of the third curve.
[0141] If the change corresponding to the target frame is a directional jump, and the change corresponding to the previous frame of the target frame is a continuous directional change, then the target frame is marked as a non-curve; that is, when the vehicle leaves the curve, the target frame can be marked as a non-curve, or the marking can be stopped and the marking can be restarted at the next curve.
[0142] The final scene labeling results can be stored in a two-dimensional list curve_time_list, where each element in the two-dimensional list curve_time_list represents the start frame and end frame of the curve, for example, ([start frame of curve 1, end frame of curve 1], [start frame of curve 2, end frame of curve 2]...).
[0143] Furthermore, the specific implementation method for determining the scene recognition result based on the aforementioned changes can be:
[0144] Based on the scene labeling results of the target frame, the driving time period of the vehicle on the curve is determined; based on the driving time period and the corresponding frame number of each curve, the first driving speed of the vehicle on the curve is determined.
[0145] Since the scene recognition results corresponding to each frame may be the same or different, the driving time of the vehicle on the curve can be determined based on the scene marking results obtained from the above scene marking. For example, the driving time of the vehicle on the curve can be calculated based on the marked frame from when the vehicle enters the curve to when the vehicle leaves the curve. At the same time, the first driving speed of the vehicle on the curve can be determined based on the driving time and the number of frames corresponding to each curve.
[0146] Specifically, the starting frame corresponding to the driving time period can be used as the vehicle's first driving speed on the curve, or the average driving speed can be calculated based on the driving time period and the number of frames corresponding to each curve, and the average driving speed can be used as the first driving speed; furthermore, the vehicle's first driving speed ego_v on the curve can be stored in a one-dimensional list curve_ego_v_list.
[0147] In this embodiment, by eliminating the discontinuity caused by crossing the -π to π boundary, it is possible to accurately determine whether there is an angle jump between the at least two direction angles; by traversing the data of each frame in the historical scene segment, it is determined whether the angle change corresponding to the target frame is less than a preset angle threshold, and a judgment result is obtained. Based on the judgment result, the change in the vehicle's driving direction corresponding to the target frame is determined; based on the change in the vehicle's driving direction corresponding to the target frame, the target frame is marked as a scene; multiple curves in the historical scene segment, as well as the vehicle's driving time and first driving speed on the curves, are accurately located; thereby improving the accuracy of the data obtained about the vehicle turning scene.
[0148] Based on the first and second embodiments of this application, in the third embodiment of this application, the content that is the same as or similar to that in Embodiment 1 above can be referred to the above description, and will not be repeated hereafter. Based on this, please refer to... Figure 6 After step S30, steps C1 to C4 are also included:
[0149] Step C1: Traverse the at least one scene sub-fragment and determine whether the target scene sub-fragment is continuous with the previous scene sub-fragment. The target scene sub-fragment does not include the first scene sub-fragment.
[0150] It should be noted that the curve scene exists in at least one scene sub-segment, and the at least one scene sub-segment is arranged in order (arranged in ascending order of frame size); that is, the multiple curves identified above exist in different scene sub-segments respectively; since the data of each frame in the historical scene segment is continuous, the detected curve scene may also be continuous. Therefore, this embodiment traverses the at least one scene sub-segment and determines whether the target scene sub-segment is continuous with the previous scene sub-segment, thereby obtaining a longer and more continuous curve scene.
[0151] It is understood that a curve scene corresponds to a curve segment. This embodiment aims to merge curve segments that are considered to be continuous into a larger curve segment.
[0152] Since the first scene sub-fragment does not have a previous scene sub-fragment, the target scene sub-fragment in this embodiment does not include the first scene sub-fragment. That is, starting from the second scene sub-fragment, the at least one scene sub-fragment is traversed.
[0153] The specific implementation of determining whether the target scene sub-segment is continuous with the previous scene sub-segment can be as follows:
[0154] Obtain the second driving speed of the vehicle in the target scene sub-segment; calculate the frame difference between the starting frame of the target scene sub-segment and the ending frame of the previous scene sub-segment; based on the frame difference, a preset sampling period, and the second driving speed, calculate the first theoretical distance between the vehicle and the starting frame of the target scene sub-segment and the ending frame of the previous scene sub-segment; if the first theoretical distance is less than a first distance threshold, then determine that the target scene sub-segment and the previous scene sub-segment are continuous.
[0155] It should be noted that the second driving speed is the same as the first driving speed corresponding to each curve identified above.
[0156] In this embodiment, the theoretical distance between two adjacent target scene sub-segments is determined to be less than a first distance threshold. If it is less, it is considered that the two target scene sub-segments should be merged.
[0157] Specifically, first, the second driving speed v of the vehicle in the target scene sub-segment is obtained, and the frame difference between the starting frame of the target scene sub-segment and the ending frame of the previous scene sub-segment is calculated, that is, the frame difference frame_diff between the current curve segment and the previous curve segment is calculated; based on the frame difference, the preset sampling period, and the second driving speed, the first theoretical distance between the vehicle and the starting frame of the target scene sub-segment and the ending frame of the previous scene sub-segment is calculated, that is, the theoretical distance between the starting frame of the current curve segment and the ending frame of the previous curve segment is calculated.
[0158] Assuming a preset sampling period of 10Hz (once every 0.1 seconds), the formula for calculating the first theoretical distance can be: v*0.1*frame_diff.
[0159] If the first theoretical distance is less than the first distance threshold, then the target scene sub-segment is determined to be continuous with the previous scene sub-segment; wherein, the first distance threshold merge_meter_threshold can be 30 meters or 25 meters, etc.
[0160] If the first theoretical distance is greater than or equal to the first distance threshold, then it is determined that the target scene sub-segment is discontinuous with the previous scene sub-segment.
[0161] Step C2: If the scenes are consecutive, merge the target scene sub-segment with the previous scene sub-segment to obtain the first scene sub-segment.
[0162] It is understandable that if the target scene sub-segment is continuous with the previous scene sub-segment, the target scene sub-segment can be merged with the previous scene sub-segment to obtain the first scene sub-segment; the merged first scene sub-segment can be stored in the list curve_time_merge.
[0163] Step C3: If the scenes are not continuous, then the target scene sub-segment is taken as the second scene sub-segment.
[0164] It is understandable that if the target scene sub-fragment is continuous with the previous scene sub-fragment, the target scene sub-fragment will not be merged with the previous scene sub-fragment, and the target scene sub-fragment will be treated as a separate second scene sub-fragment; the unmerged second scene sub-fragment can be stored in the list curve_time_merge.
[0165] Step C4: Update the target scene sub-fragment to the next scene sub-fragment, return to the step of determining whether the target scene sub-fragment is continuous with the previous scene sub-fragment, until the target scene sub-fragment is the last scene sub-fragment, and obtain the target scene fragment after merging.
[0166] By repeatedly performing the above traversal process until the target scene sub-fragment is the last scene sub-fragment, the target scene sub-fragments after merging are obtained (including the merged first scene sub-fragment and the unmerged second scene sub-fragment), that is, the final list curve_time_merge is obtained.
[0167] Furthermore, after obtaining the merged target scene fragment, the following can also be done:
[0168] Obtain the second driving speed of the vehicle in the target scene segment; determine the target frame number corresponding to the target scene segment; calculate the second theoretical distance of the vehicle in the target scene segment based on the target frame number, the preset sampling period, and the second driving speed; if the second theoretical distance is greater than or equal to the second distance threshold, then the target scene segment is regarded as a reasonable segment corresponding to the curve scene.
[0169] Furthermore, in order to retain curve segments that are long enough and reasonable, this embodiment also checks the actual length of each curve segment and calculates the theoretical travel distance of the vehicle by combining it with the vehicle speed, thereby more accurately selecting effective curve segments.
[0170] Specifically, the second driving speed of the vehicle in the target scene segment is first obtained, and the target frame number corresponding to the target scene segment is determined. Specifically, the difference between the end frame and the start frame of the target scene segment can be used as the target frame number frame_diff.
[0171] Further, based on the target frame number, the preset sampling period, and the second driving speed, the second theoretical distance of the vehicle in the target scene segment is calculated; specifically, the second theoretical distance of the curve segment corresponding to the target scene segment can be calculated when the second driving speed exists and is not zero; assuming the data sampling period is 10Hz (i.e., data is collected once every 0.1 seconds), the second theoretical distance is: v*0.1*frame_diff.
[0172] It should be noted that the second distance threshold can be 30 meters or 25 meters. The second distance threshold can be the same as or larger than the first distance threshold. It is understood that if the second theoretical distance is greater than or equal to the second distance threshold, the curve segment is considered to be long enough, and the above merging process is reasonable. The target scene segment is taken as the corresponding segment of the reasonable curve scene.
[0173] Furthermore, the target scene fragment is stored in the list curve_time_check.
[0174] This embodiment uses a first distance threshold to capture continuous curves during the merging stage, and a second distance threshold to ensure the effectiveness and importance of the curves when verifying their reasonableness. This can improve the accuracy and practicality of curve identification and processing while maintaining data integrity, thereby enhancing the accuracy of the acquired data on vehicle steering scenarios.
[0175] It should be noted that the above examples are only for understanding this application and do not constitute a limitation on the curve scene recognition method of this application. Any simple transformations based on this technical concept are all within the protection scope of this application.
[0176] This application also provides a curve scene recognition device, please refer to... Figure 7 The curve scene recognition device includes:
[0177] Module 10 is used to acquire historical scene fragments;
[0178] The determination module 20 is used to determine the changes in the vehicle's driving direction based on the coordinate information of the lane center line corresponding to each frame of data in the historical scene segment;
[0179] The identification module 30 is used to determine the scene identification result based on the changes, wherein the scene identification result includes whether there is a curve scene or not in the historical scene segment.
[0180] In one embodiment, the coordinate information includes multiple coordinate points on the lane centerline, and the determining module 20 includes:
[0181] The first calculation submodule is used to calculate the direction angle of the sub-line segment formed by two adjacent coordinate points on the lane centerline in each frame of data based on the multiple coordinate points, and to calculate the length of the lane centerline.
[0182] The second calculation submodule is used to calculate the curvature angle of the vehicle centerline based on the direction angle of each sub-segment corresponding to the lane centerline;
[0183] The first determining submodule is used to determine the change in the vehicle's driving direction based on the bending angle and the length.
[0184] In one embodiment, the plurality of coordinate points are arranged in sequence, and the second calculation submodule includes:
[0185] The first judgment unit is used to determine whether there is an angle jump between the at least two direction angles when each frame of data corresponds to at least two direction angles, or when the start point and end point of the coordinate points corresponding to each frame of data are in different half planes.
[0186] The calculation unit is used to calculate the curvature angle of the lane centerline based on the direction angles corresponding to the starting point and the ending point, if present.
[0187] In one embodiment, the first determining submodule includes:
[0188] The first determining unit is used to determine the angle change of the lane centerline for each preset length based on the bending angle and the length;
[0189] The second judgment unit is used to traverse the data of each frame in the historical scene segment, judge whether the angle change corresponding to the target frame is less than a preset angle threshold, and obtain the judgment result. The target frame includes the starting frame of the historical scene segment.
[0190] The second determining unit is used to determine the change in the vehicle's driving direction corresponding to the target frame based on the judgment result;
[0191] The identification module 30 includes:
[0192] The tagging submodule is used to tag the target frame based on the changes in the vehicle's driving direction corresponding to the target frame.
[0193] The return submodule is used to update the target frame to the next frame, return the step of judging whether the angle change corresponding to the target frame is less than the preset angle threshold, until the target frame is the end frame, and obtain the scene recognition result.
[0194] In one embodiment, the second determining unit includes:
[0195] The first determining subunit is used to determine that the change in the vehicle's driving direction corresponding to the target frame is a continuous change in direction if the determination result is that the angle change is greater than or equal to a preset angle threshold.
[0196] The second determining subunit is used to determine the change in the vehicle's driving direction corresponding to the target frame as a direction jump if the judgment result is that the angle change is less than a preset angle threshold.
[0197] In one embodiment, the tagging submodule includes at least one of the following:
[0198] The first marking unit is used to mark the target frame as the end frame of the first curve if the change situation corresponding to the target frame is a continuous change in direction, and the change situation corresponding to the previous frame of the target frame is a continuous change in direction.
[0199] The second marking unit is used to mark the target frame as the starting frame of the second curve if the change situation corresponding to the target frame is a continuous change in direction and the change situation corresponding to the previous frame of the target frame is a sudden change in direction.
[0200] The third marking unit is used to mark the target frame as the starting frame of the third curve if the change corresponding to the target frame is a continuous change in direction and the target frame is the first frame in the historical scene segment.
[0201] The fourth marking unit is used to mark the target frame as a non-curved road if the change corresponding to the target frame is a directional jump and the change corresponding to the previous frame of the target frame is a continuous directional change.
[0202] In one embodiment, after the step of determining the scene recognition result based on the changes, the device further includes:
[0203] The time period determination module is used to determine the time period of the vehicle's travel on the curve based on the scene marking results of the target frame;
[0204] The speed determination module is used to determine the vehicle's first speed on the curve based on the driving time period and the corresponding frame number of each curve.
[0205] In one embodiment, the curve scene exists in at least one scene sub-segment, and the at least one scene sub-segment is arranged sequentially among them;
[0206] After the step of determining the scene recognition result based on the changes, the device further includes:
[0207] The traversal module is used to traverse the at least one scene sub-fragment and determine whether the target scene sub-fragment is continuous with the previous scene sub-fragment, wherein the target scene sub-fragment does not include the first scene sub-fragment;
[0208] The merging module is used to merge the target scene sub-segment with the previous scene sub-segment if they are consecutive, to obtain the first scene sub-segment;
[0209] The first setting module is used to, if the scene segments are not continuous, use the target scene segment as the second scene segment;
[0210] The return module is used to update the target scene sub-segment to the next scene sub-segment, return the step of determining whether the target scene sub-segment is continuous with the previous scene sub-segment, until the target scene sub-segment is the last scene sub-segment, and obtain the target scene segment after merging.
[0211] In one embodiment, the traversal module includes:
[0212] The acquisition submodule is used to acquire the second driving speed of vehicles in the target scene sub-segment;
[0213] The third calculation submodule is used to calculate the frame difference between the starting frame of the target scene sub-segment and the ending frame of the previous scene sub-segment.
[0214] The fourth calculation submodule is used to calculate the first theoretical distance between the vehicle and the vehicle corresponding to the starting frame of the target scene sub-segment and the ending frame of the previous scene sub-segment based on the frame difference, the preset sampling period, and the second driving speed.
[0215] The second determining submodule is used to determine that the target scene sub-segment is continuous with the previous scene sub-segment if the first theoretical distance is less than the first distance threshold.
[0216] In one embodiment, after the step of obtaining the merged target scene fragment, the apparatus further includes:
[0217] The acquisition module is used to acquire the second driving speed of the vehicle in the target scene segment;
[0218] The frame count determination module is used to determine the target frame count corresponding to the target scene segment;
[0219] The distance calculation module is used to calculate the second theoretical distance of the vehicle in the target scene segment based on the target frame number, the preset sampling period, and the second driving speed;
[0220] The second setting module is used to, if the second theoretical distance is greater than or equal to the second distance threshold, then use the target scene segment as a reasonable segment corresponding to the curve scene.
[0221] The curve scene recognition device provided in this application, employing the curve scene recognition method in the above embodiments, can solve the technical problem of the high difficulty in acquiring data related to curve scenes. Compared with the prior art, the beneficial effects of the curve scene recognition device provided in this application are the same as those of the curve scene recognition method provided in the above embodiments, and other technical features in the curve scene recognition device are the same as those disclosed in the methods of the above embodiments, and will not be repeated here.
[0222] This application provides a curve scene recognition device, which includes: at least one processor; and a memory communicatively connected to the at least one processor; wherein the memory stores instructions executable by the at least one processor, and the instructions are executed by the at least one processor to enable the at least one processor to perform the curve scene recognition method in the above embodiment 1.
[0223] The following is for reference. Figure 8 The diagram illustrates a structural schematic suitable for implementing the curve scene recognition device of the present application embodiments. The curve scene recognition device in the present application embodiments may include, but is not limited to, mobile terminals such as mobile phones, tablets, laptops, digital broadcast receivers, PDAs (Personal Digital Assistants), PMPs (Portable Media Players), in-vehicle terminals (e.g., in-vehicle navigation terminals), and fixed terminals such as digital TVs and desktop computers. Figure 8 The curve scene recognition device shown is merely an example and should not impose any limitations on the functionality and scope of use of the embodiments of this application.
[0224] like Figure 8As shown, the curve scene recognition device may include a processing unit 1001 (e.g., a central processing unit, a graphics processing unit, etc.), which can perform various appropriate actions and processes according to a program stored in a read-only memory (ROM) 1002 or a program loaded from a storage device 1003 into a random access memory (RAM) 1004. The RAM 1004 also stores various programs and data required for the operation of the curve scene recognition device. The processing unit 1001, ROM 1002, and RAM 1004 are interconnected via a bus 1005. An input / output (I / O) interface 1006 is also connected to the bus. Typically, the following systems can be connected to the I / O interface 1006: input devices 1007 including, for example, a touchscreen, touchpad, keyboard, mouse, image sensor, microphone, accelerometer, gyroscope, etc.; output devices 1008 including, for example, a liquid crystal display (LCD), speaker, vibrator, etc.; storage devices 1003 including, for example, magnetic tape, hard disk, etc.; and communication devices 1009. Communication device 1009 allows the curve scene recognition device to communicate wirelessly or wiredly with other devices to exchange data. Although curve scene recognition devices with various systems are shown in the figures, it should be understood that implementation or possession of all the systems shown is not required. More or fewer systems may be implemented alternatively.
[0225] Specifically, according to the embodiments disclosed in this application, the processes described above with reference to the flowcharts can be implemented as computer software programs. For example, embodiments disclosed in this application include a computer program product comprising a computer program carried on a computer-readable medium, the computer program containing program code for performing the methods shown in the flowcharts. In such embodiments, the computer program can be downloaded and installed from a network via a communication device, or installed from storage device 1003, or installed from ROM 1002. When the computer program is executed by processing device 1001, it performs the functions defined in the methods of the embodiments disclosed in this application.
[0226] The curve scene recognition device provided in this application, employing the curve scene recognition method in the above embodiments, can solve the technical problem of the high difficulty in acquiring data related to curve scenes. Compared with the prior art, the beneficial effects of the curve scene recognition device provided in this application are the same as those of the curve scene recognition method provided in the above embodiments, and other technical features in this curve scene recognition device are the same as those disclosed in the method of the previous embodiment, and will not be repeated here.
[0227] It should be understood that the various parts disclosed in this application can be implemented using hardware, software, firmware, or a combination thereof. In the description of the above embodiments, specific features, structures, materials, or characteristics can be combined in any suitable manner in one or more embodiments or examples.
[0228] The above description is merely a specific embodiment of this application, but the scope of protection of this application is not limited thereto. Any variations or substitutions that can be easily conceived by those skilled in the art within the scope of the technology disclosed in this application should be included within the scope of protection of this application. Therefore, the scope of protection of this application should be determined by the scope of the claims.
[0229] This application provides a computer-readable storage medium having computer-readable program instructions (i.e., a computer program) stored thereon, the computer-readable program instructions being used to execute the curve scene recognition method in the above embodiments.
[0230] The computer-readable storage medium provided in this application may be, for example, a USB flash drive, but is not limited to, electrical, magnetic, optical, electromagnetic, infrared, or semiconductor systems, devices, or any combination thereof. More specific examples of computer-readable storage media may include, but are not limited to: electrical connections having one or more wires, portable computer disks, hard disks, random access memory (RAM), read-only memory (ROM), erasable programmable read-only memory (EPROM or flash memory), optical fiber, portable compact disk read-only memory (CD-ROM), optical storage devices, magnetic storage devices, or any suitable combination thereof. In this embodiment, the computer-readable storage medium may be any tangible medium containing or storing a program that can be used by or in conjunction with an instruction execution system, system, or device. The program code contained on the computer-readable storage medium may be transmitted using any suitable medium, including but not limited to: wires, optical cables, RF (Radio Frequency), etc., or any suitable combination thereof.
[0231] The aforementioned computer-readable storage medium may be included in the curve scene recognition device; or it may exist independently and not assembled into the curve scene recognition device.
[0232] The aforementioned computer-readable storage medium carries one or more programs, which, when executed by the curve scene recognition device, cause the curve scene recognition device to perform the aforementioned curve scene recognition method.
[0233] Computer program code for performing the operations of this application can be written in one or more programming languages or a combination thereof, including object-oriented programming languages such as Java, Smalltalk, and C++, and conventional procedural programming languages such as the "C" language or similar programming languages. The program code can be executed entirely on the user's computer, partially on the user's computer, as a standalone software package, partially on the user's computer and partially on a remote computer, or entirely on a remote computer or server. In cases involving remote computers, the remote computer can be connected to the user's computer via any type of network—including a Local Area Network (LAN) or a Wide Area Network (WAN)—or can be connected to an external computer (e.g., via the Internet using an Internet service provider).
[0234] The flowcharts and block diagrams in the accompanying drawings illustrate the architecture, functionality, and operation of possible implementations of systems, methods, and computer program products according to various embodiments of this application. In this regard, each block in a flowchart or block diagram may represent a module, segment, or portion of code containing one or more executable instructions for implementing a specified logical function. It should also be noted that in some alternative implementations, the functions indicated in the blocks may occur in a different order than those indicated in the drawings. For example, two consecutively indicated blocks may actually be executed substantially in parallel, and they may sometimes be executed in reverse order, depending on the functions involved. It should also be noted that each block in the block diagrams and / or flowcharts, and combinations of blocks in the block diagrams and / or flowcharts, can be implemented using a dedicated hardware-based system that performs the specified function or operation, or using a combination of dedicated hardware and computer instructions.
[0235] The modules described in the embodiments of this application can be implemented in software or hardware. The names of the modules do not necessarily limit the functionality of the unit itself.
[0236] The readable storage medium provided in this application is a computer-readable storage medium that stores computer-readable program instructions (i.e., a computer program) for executing the above-described curve scene recognition method, which can solve the technical problem of the high difficulty in acquiring data about curve scenes. Compared with the prior art, the beneficial effects of the computer-readable storage medium provided in this application are the same as the beneficial effects of the curve scene recognition method provided in the above embodiments, and will not be repeated here.
[0237] This application also provides a computer program product, including a computer program that, when executed by a processor, implements the steps of the curve scene recognition method described above.
[0238] The computer program product provided in this application can solve the technical problem of the high difficulty in acquiring data on curved scenes. Compared with the prior art, the beneficial effects of the computer program product provided in this application are the same as those of the curved scene recognition method provided in the above embodiments, and will not be repeated here.
[0239] The above description is only a part of the embodiments of this application and does not limit the patent scope of this application. All equivalent structural transformations made under the technical concept of this application and using the contents of the specification and drawings of this application, or direct / indirect applications in other related technical fields, are included in the patent protection scope of this application.
Claims
1. A method for recognizing curved road scenes, characterized in that, The method includes: Obtain historical scene fragments; Based on the coordinate information of the lane centerline corresponding to each frame of data in the historical scene segment, the change in the vehicle's driving direction is determined. Based on the changes, a scene recognition result is determined, which includes whether the historical scene segment contains a curved scene or not.
2. The method as described in claim 1, characterized in that, The coordinate information includes multiple coordinate points on the lane centerline. The step of determining the change in vehicle driving direction based on the coordinate information of the lane centerline corresponding to each frame of data in the historical scene segment includes: Based on the multiple coordinate points, calculate the direction angle of the sub-line segment formed by two adjacent coordinate points on the lane centerline in each frame of data, and calculate the length of the lane centerline. The curvature angle of the vehicle centerline is calculated based on the direction angle of each sub-segment corresponding to the lane centerline. Based on the bending angle and the length, the change in the vehicle's driving direction is determined.
3. The method as described in claim 2, characterized in that, The multiple coordinate points are arranged in sequence, and the step of calculating the curvature angle of the vehicle centerline based on the direction angle of each sub-segment corresponding to the lane centerline includes: When each frame of data corresponds to at least two direction angles, or when the start point and end point of the coordinate points corresponding to each frame of data are in different half-planes, determine whether there is an angle jump between the at least two direction angles; If it exists, the curvature angle of the lane centerline is calculated based on the direction angles corresponding to the starting point and the ending point, respectively.
4. The method as described in claim 2, characterized in that, The step of determining the change in the vehicle's driving direction based on the bending angle and the length includes: Based on the bending angle and the length, determine the angle change of the lane centerline for each preset length; Traverse the data of each frame in the historical scene segment, determine whether the angle change corresponding to the target frame is less than a preset angle threshold, and obtain the determination result. The target frame includes the starting frame of the historical scene segment. Based on the judgment result, determine the change in the vehicle's driving direction corresponding to the target frame; The step of determining the scene recognition result based on the changes includes: Based on the changes in the vehicle's driving direction corresponding to the target frame, scene marking is performed on the target frame; Update the target frame to the next frame, return to the step of determining whether the angle change corresponding to the target frame is less than a preset angle threshold, until the target frame is the end frame, and obtain the scene recognition result.
5. The method as described in claim 4, characterized in that, The step of determining the change in the vehicle's driving direction corresponding to the target frame based on the judgment result includes: If the judgment result is that the angle change is greater than or equal to the preset angle threshold, then the change in the vehicle's driving direction corresponding to the target frame is determined to be a continuous change in direction. If the judgment result is that the angle change is less than a preset angle threshold, then the change in the vehicle's driving direction corresponding to the target frame is determined to be a direction jump.
6. The method as described in claim 5, characterized in that, The step of scene marking of the target frame based on the change in the vehicle's driving direction corresponding to the target frame includes at least one of the following: If the target frame corresponds to a continuous change in direction, and the previous frame of the target frame corresponds to a continuous change in direction, then the target frame is marked as the end frame of the first curve. If the target frame corresponds to a continuous change in direction, and the previous frame of the target frame corresponds to a sudden change in direction, then the target frame is marked as the starting frame of the second curve. If the target frame corresponds to a continuous change in direction, and the target frame is the first frame in the historical scene segment, then the target frame is marked as the starting frame of the third curve; If the change corresponding to the target frame is a directional jump, and the change corresponding to the previous frame of the target frame is a continuous directional change, then the target frame is marked as a non-curved road.
7. The method as described in claim 4, characterized in that, After determining the scene recognition result based on the changes, the method further includes: Based on the scene marking results of the target frame, the time period of the vehicle's travel on the curve is determined; Based on the travel time period and the corresponding frame number for each curve, the vehicle's first travel speed on the curve is determined.
8. The method as described in claim 1, characterized in that, The curve scene exists in at least one scene sub-segment, and the at least one scene sub-segment is arranged in sequence; After determining the scene recognition result based on the changes, the method further includes: Traverse the at least one scene sub-fragment and determine whether the target scene sub-fragment is continuous with the previous scene sub-fragment, wherein the target scene sub-fragment does not include the first scene sub-fragment; If they are consecutive, the target scene sub-segment is merged with the previous scene sub-segment to obtain the first scene sub-segment; If they are not continuous, the target scene sub-segment will be used as the second scene sub-segment; Update the target scene sub-fragment to the next scene sub-fragment, return to the step of determining whether the target scene sub-fragment is continuous with the previous scene sub-fragment, until the target scene sub-fragment is the last scene sub-fragment, and obtain the target scene fragment after merging.
9. The method as described in claim 8, characterized in that, The step of determining whether a target scene sub-segment is continuous with the previous scene sub-segment includes: Obtain the second speed of the vehicle in the target scene sub-segment; Calculate the frame difference between the starting frame of the target scene sub-fragment and the ending frame of the previous scene sub-fragment; Based on the frame difference, the preset sampling period, and the second driving speed, calculate the first theoretical distance between the vehicle and the starting frame of the target scene sub-segment and the ending frame of the previous scene sub-segment; If the first theoretical distance is less than the first distance threshold, then the target scene sub-segment is determined to be continuous with the previous scene sub-segment.
10. The method as described in claim 8, characterized in that, After the step of obtaining the merged target scene fragment, the method further includes: Obtain the second speed of the vehicle in the target scene segment; Determine the target frame number corresponding to the target scene segment; Based on the target number of frames, the preset sampling period, and the second driving speed, calculate the second theoretical distance of the vehicle in the target scene segment; If the second theoretical distance is greater than or equal to the second distance threshold, then the target scene segment is taken as the corresponding segment of the reasonable curve scene.
11. A curve scene recognition device, characterized in that, The device includes: The acquisition module is used to acquire historical scene fragments; The determination module is used to determine the changes in the vehicle's driving direction based on the coordinate information of the lane centerline corresponding to each frame of data in the historical scene segment; The recognition module is used to determine the scene recognition result based on the changes, wherein the scene recognition result includes whether there is a curve scene or not in the historical scene segment.
12. A curve scene recognition device, characterized in that, The device includes: a memory, a processor, and a computer program stored in the memory and executable on the processor, the computer program being configured to implement the steps of the curve scene recognition method as described in any one of claims 1 to 10.
13. A storage medium, characterized in that, The storage medium is a computer-readable storage medium, and a computer program is stored on the storage medium. When the computer program is executed by a processor, it implements the steps of the curve scene recognition method as described in any one of claims 1 to 10.
14. A computer program product, characterized in that, The computer program product includes a computer program that, when executed by a processor, implements the steps of the curve scene recognition method as described in any one of claims 1 to 10.