Road surface arrow identification method, device and equipment and storage medium
By acquiring road scene data, determining the orthophoto binary image, extracting skeleton lines and identifying main axis straight segments and branch segments, and using geometric topological relationships to identify arrow categories and directions, the problem of low recognition accuracy in existing technologies is solved, achieving efficient and accurate road arrow recognition.
Patent Information
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2026-02-02
- Publication Date
- 2026-04-10
AI Technical Summary
In existing technologies, road arrow recognition schemes are poorly adaptable to factors such as wear, dirt, and changes in lighting, resulting in low recognition accuracy, missed recognition, or misrecognition, making it difficult to meet the stability and accuracy requirements of intelligent driving systems.
By acquiring road scene data, determining the orthophoto binary image, extracting the skeleton lines of the road surface arrows, determining the main axis straight line segments and branch line segments based on the skeleton lines, and using geometric topological relationships to identify the semantic category and direction of travel of the arrows.
It improves the accuracy and stability of road arrow recognition, reduces the interference of environmental factors on the recognition results, and meets the core requirements of intelligent driving systems.
Smart Images

Figure CN121838084A_ABST
Abstract
Description
Technical Field
[0001] This application relates to the field of image processing, and more specifically, to a method, apparatus, device, and storage medium for recognizing road arrows. Background Technology
[0002] With the rapid development of intelligent driving technology, high-precision map construction and real-time environmental perception have become core components supporting the safe operation of unmanned vehicles. Roadside arrow markings, as key traffic signs guiding vehicle steering and regulating lane driving, directly impact the lane-level positioning, path planning, and driving control decisions of unmanned vehicles through accurate identification of their semantic categories (such as straight, left turn, right turn, etc.) and directions of travel. This is a crucial prerequisite for ensuring the reliability and safety of intelligent driving systems; therefore, the research and optimization of related recognition technologies has always been a key focus of the industry.
[0003] Currently, template matching is the most widely used technology in the field of road arrow recognition. The core logic of this solution is as follows: pre-store the shape templates of various standard road arrows; after acquiring road scene images through vehicle-mounted sensors, perform simple preprocessing on the images to filter out suspected arrow regions; then compare the contours and sizes of these regions with the pre-stored templates one by one; and determine the semantic category and direction of travel of the arrow based on the comparison results.
[0004] However, this existing technology has significant drawbacks: in real road environments, road arrows will wear down and become covered with dirt due to long-term use. At the same time, factors such as changes in light intensity (such as strong light reflection and weak light on cloudy or rainy days) and shifts in shooting angles will also cause deviations between the actual shape of the arrow and the standard template. Template matching is poorly adaptable to these morphological differences, and is prone to low recognition accuracy, missed recognition, or misrecognition, making it difficult to meet the requirements of intelligent driving systems for recognition stability and accuracy. Summary of the Invention
[0005] In view of this, the purpose of this application is to provide a method, apparatus, device and storage medium for road arrow recognition, which can improve the accuracy, stability and efficiency of recognizing the semantic category and direction of travel of road arrows.
[0006] In a first aspect, embodiments of this application provide a method for recognizing road surface arrows, the method comprising: Obtain road scene data containing road surface arrow markers; Based on the road scene data, an orthophoto projection binary image of the road surface arrow mark is determined; Extract the skeleton lines of the road surface arrow marks from the orthophoto binary image; Based on the skeleton line, the main axis straight segment and at least one branch line segment of the road surface arrow mark are determined; Based on the geometric topological relationship between the main axis straight segment and the at least one branch segment, the semantic category and direction of travel of the road surface arrow mark are determined.
[0007] Optionally, the road scene data is image data or point cloud data; The process of acquiring road scene data containing road surface arrow markings includes: Acquire image data containing the road surface arrow markings captured by the vehicle-mounted camera; or, Acquire point cloud data containing the road surface arrow markings collected by the vehicle-mounted lidar.
[0008] Optionally, determining the orthophoto binary image of the road surface arrow mark based on the road scene data includes: If the road scene data is image data, then the image data is projected onto a plane parallel to the vehicle chassis according to the camera posture to obtain an orthographic projection image; The orthophoto image is subjected to grayscale and binarization processing to obtain the orthophoto binary image; or, If the road scene data is point cloud data, then the point cloud of the road surface arrow mark is separated by high-pass filtering based on the point cloud intensity value; Principal component analysis is performed on the point cloud to obtain the fitting plane and the major axis. The point cloud is orthorectified onto the fitting plane, and a minimum bounding rectangle is constructed with the major axis and the minor axis. The region within the rectangle is rasterized into the orthorectified binary image.
[0009] Optionally, constructing the minimum bounding rectangle of the road surface arrow mark using the major and minor axes includes: Principal component analysis was performed on the road surface arrow markings; Based on the results of the principal component analysis, the major and minor axes of the road surface arrow markings on the fitted plane were determined; Using the major and minor axes as references, construct an initial bounding rectangle aligned with the coordinate axes; The minimum bounding rectangle is generated based on the extreme coordinates of the road surface arrow marks in the initial bounding rectangle.
[0010] Optionally, determining the main axis straight segment and at least one branch segment of the road surface arrow mark based on the skeleton line includes: Multiple straight line segments are extracted from the skeleton line using the LSD straight line segment detection algorithm; The longest straight segment is designated as the main axis straight segment, and the remaining straight segments are designated as branch segments.
[0011] Optionally, determining the semantic category and direction of travel of the road surface arrow mark based on the geometric topological relationship between the main axis straight segment and the at least one branch segment includes: Calculate the vector angle between each of the branch segments and the main axis line segment; Based on at least one of the following: the absolute value and sign of the included vector angle, the positional relationship of the intersection point of the branch segment and the main axis line segment, the distance between the endpoint of the branch segment and the endpoint of the main axis line segment, and the marker width variation feature at the endpoint of the main axis line segment, a preset category discrimination rule is matched to determine the semantic category. The forward direction is determined based on the endpoints of the main axis line segment corresponding to the semantic category and the mark width variation characteristics at the endpoints of the main axis line segment.
[0012] Optionally, after determining the semantic category and direction of travel of the road surface arrow mark based on the main axis straight segment and the at least one branch segment, the method further includes: Based on the semantic category, the direction of travel, and the minimum bounding rectangle, a vectorized representation of the road surface arrow mark is generated.
[0013] Secondly, embodiments of this application provide a road surface arrow recognition device, the device comprising: The road scene data acquisition module is used to acquire road scene data containing road surface arrow markings; The binary image determination module is used to determine the orthophoto binary image of the road surface arrow mark based on the road scene data; The skeleton line extraction module is used to extract the skeleton lines of the road arrow markings from the orthophoto binary image; The skeleton line analysis module is used to determine the main axis straight line segment and at least one branch line segment of the road surface arrow mark based on the skeleton line. The category direction determination module is used to determine the semantic category and forward direction of the road surface arrow mark based on the geometric topological relationship between the main axis straight segment and the at least one branch segment.
[0014] Optionally, the road scene data is image data or point cloud data; The process of acquiring road scene data containing road surface arrow markings includes: Acquire image data containing the road surface arrow markings captured by the vehicle-mounted camera; or, Acquire point cloud data containing the road surface arrow markings collected by the vehicle-mounted lidar.
[0015] Optionally, determining the orthophoto binary image of the road surface arrow mark based on the road scene data includes: If the road scene data is image data, then the image data is projected onto a plane parallel to the vehicle chassis according to the camera posture to obtain an orthographic projection image; The orthophoto image is subjected to grayscale and binarization processing to obtain the orthophoto binary image; or, If the road scene data is point cloud data, then the point cloud of the road surface arrow mark is separated by high-pass filtering based on the point cloud intensity value; Principal component analysis is performed on the point cloud to obtain the fitting plane and the major axis. The point cloud is orthorectified onto the fitting plane, and a minimum bounding rectangle is constructed with the major axis and the minor axis. The region within the rectangle is rasterized into the orthorectified binary image.
[0016] Optionally, constructing the minimum bounding rectangle of the road surface arrow mark using the major and minor axes includes: Principal component analysis was performed on the road surface arrow markings; Based on the results of the principal component analysis, the major and minor axes of the road surface arrow markings on the fitted plane were determined; Using the major and minor axes as references, construct an initial bounding rectangle aligned with the coordinate axes; The minimum bounding rectangle is generated based on the extreme coordinates of the road surface arrow marks in the initial bounding rectangle.
[0017] Optionally, determining the main axis straight segment and at least one branch segment of the road surface arrow mark based on the skeleton line includes: Multiple straight line segments are extracted from the skeleton line using the LSD straight line segment detection algorithm; The longest straight segment is designated as the main axis straight segment, and the remaining straight segments are designated as branch segments.
[0018] Optionally, determining the semantic category and direction of travel of the road surface arrow mark based on the geometric topological relationship between the main axis straight segment and the at least one branch segment includes: Calculate the vector angle between each of the branch segments and the main axis line segment; Based on at least one of the following: the absolute value and sign of the included vector angle, the positional relationship of the intersection point of the branch segment and the main axis line segment, the distance between the endpoint of the branch segment and the endpoint of the main axis line segment, and the marker width variation feature at the endpoint of the main axis line segment, a preset category discrimination rule is matched to determine the semantic category. The forward direction is determined based on the endpoints of the main axis line segment corresponding to the semantic category and the mark width variation characteristics at the endpoints of the main axis line segment.
[0019] Optionally, the apparatus further includes a vectorized representation data determination module, used for: After determining the semantic category and direction of travel of the road arrow mark based on the main axis straight line segment and the at least one branch line segment, vectorized representation data of the road arrow mark is generated according to the semantic category, the direction of travel and the minimum bounding rectangle.
[0020] Thirdly, embodiments of this application provide a computer device, including: a processor, a memory, and a bus. The memory stores machine-readable instructions executable by the processor. When the computer device is running, the processor communicates with the memory via the bus. When the machine-readable instructions are executed by the processor, the steps of the road arrow recognition method described in any of the optional embodiments of the first aspect are performed.
[0021] Fourthly, embodiments of this application provide a computer-readable storage medium storing a computer program that, when executed by a processor, performs the steps of the road arrow recognition method described in any of the optional embodiments of the first aspect.
[0022] The technical solution provided in this application includes, but is not limited to, the following beneficial effects: Acquiring road scene data containing road arrow markings provides the foundational raw material for the entire road arrow recognition process, ensuring that all subsequent processing steps have a clearly defined analysis target. This step is compatible with both image data and point cloud data, adapting to the acquisition needs of different vehicle-mounted sensors, ensuring the flexibility and comprehensiveness of data sources, and laying a reliable data foundation for subsequent accurate extraction of arrow features and accurate identification of categories and directions.
[0023] Determining orthophoto binary images based on road scene data effectively solves the problems of viewpoint offset and background interference in the original data. Orthophoto processing corrects the non-orthophoto viewpoint of the vehicle sensor and restores the true shape of the road arrows; binarization processing clearly distinguishes the arrow area from the background road surface, removes redundant information, makes the arrow features more prominent, significantly reduces the difficulty of subsequent feature extraction, provides clear and clean image support for skeleton line extraction, and improves the accuracy of subsequent processing steps.
[0024] By extracting skeleton lines from orthographically projected binary images, the arrowhead shape is simplified and its core contour is focused. By removing redundant pixels in the arrowhead region, the skeleton lines retain the core structural features of the arrow, transforming complex arrow images into concise, 1-pixel-wide continuous lines. This not only reduces the amount of data required for subsequent processing and improves processing efficiency, but also avoids interference from irrelevant factors such as arrow wear and stains on the core features, providing a clear and explicit analytical framework for accurately extracting straight line segments.
[0025] By defining the main axis straight segment and branch segments based on the skeleton lines, the core functional characteristics of the arrow are accurately separated. The main axis straight segment corresponds to the basic forward direction of the arrow, while the branch segments correspond to the turning guidance function of the arrow. This distinction captures the essential structural characteristics of road arrows, decomposing the complex arrow shape into key line segments that are easy to analyze. This provides a clear analytical object for subsequent category and direction determination, simplifies the logic of subsequent topological relationship analysis, reduces the difficulty of judgment, and improves the pertinence of the analysis.
[0026] The semantic category and direction of travel are determined based on the geometric topological relationship between the main axis straight segment and the branch segment. This method fully utilizes the standardized features and structural logic of road arrows, improving the accuracy and stability of recognition. The geometric topological relationship possesses strong objectivity and stability, unaffected by external factors such as arrow wear and changes in lighting. It accurately reflects the structural differences between different types of arrows, thereby achieving accurate matching of semantic categories and precise determination of the direction of travel, meeting the core requirement of reliable recognition results for intelligent driving.
[0027] The invention employs a step-by-step process of "data acquisition - image preprocessing - feature simplification - core feature separation - category and direction determination," focusing on the core features of the arrows layer by layer and gradually reducing the complexity of the analysis. Each step plays a role in improving the core objective of "improving recognition accuracy, stability, and efficiency," ensuring both the comprehensiveness of the data source and the accuracy of feature extraction, while avoiding interference from the external environment through structured analysis logic. Ultimately, it achieves efficient and accurate recognition of the semantic category and direction of travel of road arrows, reliably meeting the core requirements of intelligent driving systems for road arrow recognition.
[0028] To make the above-mentioned objectives, features and advantages of this application more apparent and understandable, preferred embodiments are described below in detail with reference to the accompanying drawings. Attached Figure Description
[0029] To more clearly illustrate the technical solutions of the embodiments of this application, the accompanying drawings used in the embodiments will be briefly introduced below. It should be understood that the following drawings only show some embodiments of this application and should not be regarded as a limitation of the scope. For those skilled in the art, other related drawings can be obtained based on these drawings without creative effort.
[0030] Figure 1 A flowchart of a road surface arrow recognition method provided in Embodiment 1 of this application is shown; Figure 2 An example diagram of the skeleton line style of a road arrow mark provided in Embodiment 1 of this application is shown; Figure 3 This illustration shows an example diagram of the semantic category of a road arrow mark provided in Embodiment 1 of this application; Figure 4 A flowchart of a method for generating a minimum bounding rectangle provided in Embodiment 1 of this application is shown; Figure 5 A schematic diagram of a straight road arrow mark provided in Embodiment 1 of this application is shown; Figure 6 A flowchart of a branch segment determination method provided in Embodiment 1 of this application is shown; Figure 7 A flowchart of a semantic category and direction of travel determination method provided in Embodiment 1 of this application is shown; Figure 8 This illustration shows a schematic diagram of the processing of the minimum bounding rectangle of a road surface arrow provided in Embodiment 1 of this application; Figure 9 This illustration shows a schematic diagram of the extraction of straight segments and included angles of road surface arrow skeleton lines provided in Embodiment 1 of this application; Figure 10 This illustration shows a schematic diagram of a road surface arrow width sampling method provided in Embodiment 1 of this application; Figure 11 This illustration shows a schematic diagram of a road arrow recognition device provided in Embodiment 2 of this application; Figure 12 A schematic diagram of the structure of a computer device provided in Embodiment 3 of this application is shown. Detailed Implementation
[0031] To make the objectives, technical solutions, and advantages of the embodiments of this application clearer, the technical solutions of the embodiments of this application will be clearly and completely described below with reference to the accompanying drawings. Obviously, the described embodiments are only some embodiments of this application, and not all embodiments. The components of the embodiments of this application described and shown in the accompanying drawings can generally be arranged and designed in various different configurations. Therefore, the following detailed description of the embodiments of this application provided in the accompanying drawings is not intended to limit the scope of the claimed application, but merely represents selected embodiments of this application. All other embodiments obtained by those skilled in the art based on the embodiments of this application without inventive effort are within the scope of protection of this application.
[0032] Example 1 To facilitate understanding of this application, the following is combined with... Figure 1 The flowchart of the road arrow recognition method provided in Embodiment 1 of this application illustrates Embodiment 1 in detail.
[0033] See Figure 1 As shown, Figure 1 A flowchart of a road surface arrow recognition method provided in Embodiment 1 of this application is shown, wherein the method includes steps S101 to S105: S101: Obtain road scene data containing road surface arrow markers.
[0034] Specifically, road scene data is divided into two categories: image data collected by vehicle-mounted cameras and point cloud data collected by vehicle-mounted LiDAR. In vehicle driving scenarios, a single frame image may not be able to capture the complete road arrow due to occlusion by vehicles or other objects. Therefore, LiDAR needs to collect point cloud data from multiple angles and fuse them to form complete road arrow point cloud data. The two types of data can then be used to construct orthographic projection binary images of the road arrows.
[0035] S102: Determine the orthophoto binary image of the road surface arrow mark based on the road scene data.
[0036] Specifically, different processing procedures need to be adopted according to the type of road scene data: if it is image data, the viewpoint needs to be corrected first, and then grayscale and binarization are performed; if it is point cloud data, the arrow point cloud needs to be separated first, and then through fitting, projection and rasterization processing, an orthophoto binary image (denoted as Image_B) with pixel values containing only 255 (representing road arrow) and 0 (representing background road) is finally generated.
[0037] S103: Extract the skeleton line of the road surface arrow mark from the orthophoto binary image.
[0038] Specifically, the Zhang-Suen unpacking algorithm is used to process the orthophoto projection binary image Image_B. This algorithm can remove redundant pixels in the image and finally obtain a continuous and complete road arrow skeleton line with a width of 1 pixel, which lays the foundation for subsequent extraction of straight line segments.
[0039] See Figure 2 As shown, Figure 2 An example diagram of a skeleton line style for road arrow markings provided in Embodiment 1 of this application is shown. The diagram shows simplified skeleton lines corresponding to 12 different arrows (presented in line form, with each skeleton line located within a dashed box). Below each skeleton line is a corresponding text label indicating its semantic category, which are, in order: straight, right turn, left turn, straight and right turn, straight and left turn, merge to the right, left and right turn, left-middle-right turn, U-turn to the left, left turn and left U-turn, straight and left U-turn, and merge to the left.
[0040] S104: Based on the skeleton line, determine the main axis straight segment and at least one branch segment of the road surface arrow mark.
[0041] Specifically, the LSD straight segment detection algorithm is first used to extract straight segments from the skeleton line. Because road arrow markings may be worn, the segmented polylines of the skeleton line may not be complete straight lines. The LSD algorithm can effectively detect the core straight segments (such as denoted as...). , , (etc.); then, based on the standardized format of road surface arrows (the length of the main axis straight segment must be longer than that of the branch segment), by comparing the lengths of all extracted straight segments, the longest straight segment is determined as the main axis straight segment (e.g., The remaining straight segments are then determined as branch segments (e.g. , ).
[0042] S105: Based on the geometric topological relationship between the main axis straight segment and the at least one branch segment, determine the semantic category and forward direction of the road surface arrow mark.
[0043] Specifically, the geometric topological relationships include: the vector angle between the branch segment and the main axis straight segment, the location of their intersection, the distance between the endpoint of the branch segment and the endpoint of the main axis, and the characteristics of the width variation of the marker at the endpoint of the main axis. These topological parameters need to be calculated using formulas first, and then the semantic categories are matched in combination with the preset 12 types of road arrow discrimination rules (such as straight, left turn, right turn, straight + left turn, etc.). At the same time, the direction of travel is determined based on the width variation of the main axis endpoint (the end with increasing width and the largest variation is the arrow end).
[0044] See Figure 3 As shown, Figure 3 The figure shows an example diagram of the semantic categories of road arrow markings provided in Embodiment 1 of this application. The diagram shows 12 different styles of road arrows (each arrow is located within a dashed box). The semantic category text is marked below each arrow, which are, in order: straight, right turn, left turn, straight and right turn, straight and left turn, merge to the right, turn left and right, turn left, center left and right, make a U-turn to the left, turn left and make a U-turn to the left, straight and make a U-turn to the left, and merge to the left.
[0045] In an optional implementation, the road scene data is image data or point cloud data; the step of acquiring road scene data including road surface arrow markings includes: Acquire image data containing the road surface arrow markings captured by the vehicle-mounted camera.
[0046] Specifically, the original images captured by the vehicle-mounted camera usually have a non-orthogonal, vertically downward perspective (i.e., not parallel to the vehicle chassis). The perspective needs to be corrected in conjunction with the camera's posture to eliminate the influence of the tilted perspective on the arrow shape. Furthermore, a single frame image may have incomplete arrows due to occlusion, which needs to be supplemented with other data in subsequent processing. However, this step is only responsible for acquiring the original image data.
[0047] Alternatively, acquire point cloud data containing the road surface arrow markings collected by the vehicle-mounted lidar.
[0048] Specifically, in the point cloud data collected by LiDAR, the point cloud intensity value of the road arrow is higher than that of the surrounding road surface due to its own material characteristics. This characteristic is the core basis for subsequent separation of the road arrow point cloud. At the same time, in order to solve the occlusion problem that may exist in the single-view point cloud, LiDAR needs to collect point clouds from multiple angles and fuse them to ensure that the obtained road arrow point cloud is complete and independent.
[0049] In an optional implementation, determining the orthophoto binary image of the road surface arrow markings based on the road scene data includes: If the road scene data is image data, then the image data is projected onto a plane parallel to the vehicle chassis according to the camera posture to obtain an orthographic projection image; Specifically, "projection based on camera posture" refers to converting the original tilted view image into a "vertically downward overlooking" view by calculating the camera's intrinsic and extrinsic parameters. The projected image plane is parallel to the vehicle chassis and is denoted as the orthophoto image Image1. This image can realistically reproduce the actual shape of the road arrows and avoid arrow deformation caused by tilted view.
[0050] The orthophoto image is subjected to grayscale and binarization processing to obtain the orthophoto binary image.
[0051] Specifically, the processing consists of two steps: the first step is grayscale conversion, which converts the color orthophoto image Image1 into a grayscale image with a grayscale value range of 0 to 255 (0 represents black and 255 represents white); the second step is binarization, which uses Otsu's method or high-pass filtering to distinguish the road arrows from the background. Since the road arrows are brighter than the background road surface, the algorithm can uniformly assign a value of 255 to the pixels in the arrow area of the grayscale image and uniformly assign a value of 0 to the pixels in the background area, finally obtaining the orthophoto binary image Image_B.
[0052] Alternatively, if the road scene data is point cloud data, then a high-pass filter is used to separate the point cloud of the road surface arrow markings based on the point cloud intensity value; Specifically, by utilizing the characteristic that "the intensity value of the road arrow point cloud is higher than that of the surrounding road surface", a high-pass filter is used to set an intensity threshold to filter out point clouds with intensity values higher than the threshold. These point clouds are then separated from the overall road point cloud to form individual, complete, and independent road arrow point clouds, thus avoiding confusion with the surrounding road point clouds.
[0053] Principal component analysis is performed on the point cloud to obtain the fitting plane and the major axis. The point cloud is orthorectified onto the fitting plane, and a minimum bounding rectangle is constructed with the major axis and the minor axis. The region within the rectangle is rasterized into the orthorectified binary image.
[0054] Specifically, the process consists of three steps: The first step, Principal Component Analysis (PCA) and Projection: PCA is performed on the separated road surface arrow point cloud to fit the plane containing the point cloud (denoted as the fitting plane A) and the major axis on that plane (denoted as...). , The axis of the main extension direction of the point cloud is calculated, and the normal vector of the fitting surface A (denoted as a, a vector perpendicular to the fitting surface A) is calculated. Then, according to the direction of the normal vector a, the road surface arrow point cloud is orthographically projected onto the fitting surface A to ensure that the shape of the arrow remains unchanged after projection.
[0055] The second step is to construct the minimum bounding rectangle: using the major axis of the fitted surface A as the bounding rectangle. and perpendicular to minor axis (denoted as Using the axis of the secondary extension direction of the point cloud as its edge, construct the initial bounding rectangle of the road arrow; then transform the xy coordinates of the point cloud to pixel coordinates in the image coordinate system with the top-left corner point O (the pixel origin of the top-left corner of the rectangle) as the origin, according to the resolution M = 2 cm / pixel (M is the coordinate transformation resolution parameter, a fixed value of 2). Finally, obtain the smallest bounding rectangle that just encloses the point cloud of the road arrow (denoted as ). ).
[0056] The third step is to rasterize and generate a binary image: This involves using the minimum bounding rectangle... Pixels belonging to the road surface arrow point cloud are assigned a value of 255, and pixels not belonging to the arrow point cloud are assigned a value of 0. After rasterization, an orthophoto binary image Image_B is obtained, which is consistent with the image data processing result.
[0057] In an optional implementation, see Figure 4 As shown, Figure 4 The flowchart of a method for generating a minimum bounding rectangle according to Embodiment 1 of this application is shown, wherein the step of constructing the minimum bounding rectangle of the road surface arrow mark with the major axis and the minor axis includes steps S401 to S403: S401: Perform principal component analysis on the road surface arrow markings.
[0058] Specifically, this step performs PCA processing on the separated individual road surface arrow point clouds. The core purpose is to analyze the distribution characteristics of the point cloud to determine the main extension direction of the point cloud (which will be used to define the major axis) and the plane in which the point cloud is located (which will be used for projection), so as to provide a spatial reference for the subsequent construction of the circumscribed rectangle.
[0059] S402: Based on the results of the principal component analysis, determine the major and minor axes of the road surface arrow markings on the fitted plane.
[0060] Specifically, PCA analysis outputs the variance of the point cloud in different directions, and the axis corresponding to the direction with the largest variance is the major axis on the fitted surface A. The variance is the second largest and is the same as The axis corresponding to the vertical direction is the minor axis. Long axis and short axis Together, they constitute the core benchmark for describing the spatial dimensions of road surface arrows.
[0061] S403: Construct an initial bounding rectangle aligned with the coordinate axes, using the major and minor axes as references.
[0062] Specifically, the longer side of the initial bounding rectangle is parallel to the major axis. The shorter side is parallel to the minor axis. Furthermore, the boundary of the rectangle must cover the road surface arrow point cloud. and All points in the direction; at the same time, the rectangle needs to be aligned with the x-axis and y-axis of the image coordinate system (with the top left corner O as the origin) to facilitate subsequent coordinate transformation and rasterization processing.
[0063] S404: Generate the minimum bounding rectangle based on the extreme coordinate values of the road surface arrow marks in the initial bounding rectangle.
[0064] Specifically, the coordinate extrema refer to the maximum / minimum value (x) of the road surface arrow point cloud in the image coordinate system corresponding to the initial bounding rectangle along the x-axis. max : Maximum x-axis coordinate value, x min (minimum x-axis coordinate) and maximum / minimum y-axis value. max : Maximum y-axis coordinate value, y min (Minimum y-axis coordinate value); using these extreme values as boundaries, shrink the boundary of the initial bounding rectangle until it just covers all the arrow point cloud—that is, the left boundary of the rectangle is x. min The right boundary is x max The lower boundary is y min The upper boundary is y max Finally, the smallest bounding rectangle R1 is generated (R1: the smallest rectangle that just encloses the arrow point cloud, uniquely corresponding to the bounding range of a single arrow), ensuring that there is no extra background area within the rectangle.
[0065] See Figure 5 As shown, Figure 5The illustration shows a schematic diagram of a straight road arrow mark provided in Embodiment 1 of this application, wherein the arrow body is white and the background is a black rectangular area, and the overall shape is a vertically upward straight arrow.
[0066] In an optional implementation, see Figure 6 As shown, Figure 6 The flowchart illustrates a method for determining branch segments according to Embodiment 1 of this application, wherein determining the main axis straight segment and at least one branch segment of the road surface arrow mark based on the skeleton line includes steps S601-S602: S601: The LSD line segment detection algorithm is used to extract multiple line segments from the skeleton line.
[0067] Specifically, due to potential wear and stains on the road surface arrows, the 1-pixel wide skeleton line extracted by the Zhang-Suen algorithm may not have perfectly straight segments (it may contain minor bends or breaks). The LSD algorithm can accurately extract the core straight segments (such as those denoted as...) from the skeleton line by detecting features like the gradient and length of the straight lines. , , Ls is a general identifier for line segments. The subscripts 1, 2, and 3 represent the 1st, 2nd, and 3rd line segments, respectively, and uniquely correspond to different extracted line segments. It can also control the false detection rate and ensure that the extracted line segments are consistent with the actual structure of the arrows.
[0068] S602: The longest straight line segment is designated as the main axis straight line segment, and the remaining straight line segments are designated as branch segments.
[0069] Specifically, based on the core characteristic of the national unified road arrow standard—"the main straight segment is the main extension of the arrow, and its length must be greater than the branch segment indicating the turn"—the lengths of all straight segments extracted from S301 are measured and compared; the longest straight segment (such as...) is selected... The main axis line segment is determined, responsible for representing the basic forward direction of the arrow; the remaining line segments (such as...) , The segment is then identified as a branch line, responsible for representing the turning information of the arrow (such as left turn or right turn instructions).
[0070] In an optional implementation, see Figure 7 As shown, Figure 7 The flowchart illustrates a method for determining semantic category and direction of travel provided in Embodiment 1 of this application, wherein determining the semantic category and direction of travel of the road surface arrow mark based on the geometric topological relationship between the main axis straight segment and the at least one branch segment includes steps S701-S703: S701: Calculate the vector angle between each of the branch segments and the main axis line segment.
[0071] Specifically, the calculation process consists of three steps: The first step is to determine the equation of the line and its intersection point: Let the principal axis line segment be... (The only main axis straight line segment), the branch segment is Ls n (n≥2, Ls) n The nth line segment (where n is the branch segment number, and n≥2 uniquely corresponds to different branch segments) is first established according to the two-point form. and Ls n The equation of the straight line is given by formula (1):
[0072] The characters in formula (1) are defined as follows: a: The coefficients of the x-term of the equation of a straight line (the x-term parameters that uniquely correspond to a certain straight line); b: The coefficient of the y-term of the equation of a straight line (the y-term parameter that uniquely corresponds to a certain straight line); c: The constant term of the equation of a straight line (a constant parameter that uniquely corresponds to a certain straight line); x: The x-coordinate of any point on the line (coordinate variable, uniquely corresponding to the horizontal position of the point); y: The y-coordinate of any point on the line (coordinate variable, the vertical position of the unique corresponding point).
[0073] Then By combining the equations of the two lines Lsn, we can obtain formula (2). When the two lines are not parallel, we can solve for the unique intersection point P (x_P, y_P).
[0074] Formula (2): ; The characters in formula (2) are defined as follows: n: Line segment number (when n=1, it uniquely corresponds to the principal axis line segment) When n≥2, the unique corresponding branch segment Ls n ); The nth line segment (Ls) n The coefficient of the x-term in the linear equation (uniquely corresponding to Ls) n (x parameters); The nth line segment (Ls) n The coefficient of the y-term in the linear equation (uniquely corresponding to Ls) n (the y-parameters); The nth line segment (Ls) nThe constant term of the linear equation (uniquely corresponding to Ls) n (constant parameters); The nth line segment (Ls) n The x-axis coordinate of any point on the Ls (coordinate variable, uniquely corresponding to Ls) n (Horizontal position of the upper point) The nth line segment (Ls) n The y-coordinate of any point on the Ls axis (coordinate variable, uniquely corresponding to Ls) n (Vertical position of the top point) : Main axis straight segment The coefficient of the x-term in the equation of the straight line (unique correspondence) (x parameters); : Main axis straight segment The coefficient of the y-term in the equation of the straight line (unique correspondence) (the y-parameters); : Main axis straight segment The constant term of the equation of the straight line (unique correspondence) (constant parameters); : Main axis straight segment The x-coordinate of any point on the x-axis (coordinate variable, uniquely corresponding) (Horizontal position of the upper point) : Main axis straight segment The y-coordinate of any point on the graph (coordinate variable, uniquely corresponding) (Vertical position of the upper point).
[0075] The second step is to calculate the distance from the point to the line: according to formula (3), calculate the distance of the branch segment Ls. n The two endpoints (P0) n :Ls n The first endpoint uniquely corresponds to Ls n The starting point; P1 n :Ls n The second endpoint uniquely corresponds to Ls n (End point) to the straight line segment of the main axis The distance dist is used as the starting point of the branch segment vector, and the endpoint with the smaller distance is used as the starting point of the branch segment vector to construct the branch segment vector Lv. n (P0) n P1 n (n≥2, Lv) n The vector of the nth branch segment uniquely corresponds to Ls. n (direction and length); and simultaneously with the main axis straight line segment The two endpoints (P01: the first endpoint of Ls1, uniquely corresponding to the starting point of Ls1; P11: The second endpoint, uniquely corresponding Starting from the endpoint of P01, construct two direction vectors Lv11(P01, P11) of the principal axis (Lv11: Ls1 from P01 to P1). n The vector (uniquely corresponding to one direction of Ls1) and Lv21(P11, P01) (Lv21: the vector of Ls1 from P11 to P01, uniquely corresponding to the opposite direction of Ls1).
[0076] Formula (3): ; The characters in formula (3) are defined as follows: dist: The distance value to be determined (uniquely corresponding to the perpendicular distance from a point to a line); a: The coefficients of the x-term of the equation of the target line (Ls1 in this case) (the x-term parameters that uniquely correspond to Ls1); b: The coefficients of the y-term of the equation of the target line (Ls1 in this case) (the y-term parameter that uniquely corresponds to Ls1); c: The constant term of the equation of the target line (Ls1 in this case) (the constant parameter that uniquely corresponds to Ls1); x: The point from which the distance is to be determined (here, P0) n Or P1 n The x-axis coordinate of ) (uniquely corresponding to the horizontal position of this point); y: The point whose distance is to be determined (here, P0) n Or P1 n The y-coordinate of (the vertical position that uniquely corresponds to this point); √(a²+b²): The magnitude of the coefficients of the target line equation (uniquely corresponds to the length of the vector formed by a and b, used for distance normalization).
[0077] The third step is to calculate the angle between the vectors: according to the dot product formula (4), calculate the branch segment vector Lv respectively. n With principal axis vector Lv 11 Lv 21 The included angle θ1 n (θ1) n :Lv n With Lv 11 The angle between the two vectors (which uniquely corresponds to the angle between the two vectors) and θ2 n (θ2) n :Lv n With Lv 21 The angle between the two vectors (which uniquely corresponds to the angle between the two vectors) is ultimately set to 0 ≤ θ. nAn angle less than 90° is taken as the vector angle between the branch segment and the principal axis (denoted as θ). n n≥2, θ n The final angle between the nth branch segment and the principal axis, uniquely corresponding to Ls. n (The angle between Ls1 and Ls1) reflects the direction of the branch line relative to the main axis (such as left or right veer).
[0078] Formula (4): ; The characters in formula (4) are defined as follows: θ n The angle between the nth group of vectors (here, Lv) n The angle between Lv11 or Lv21 uniquely corresponds to the angle between the two sets of vectors. cos(θ n ): Angle θ n The cosine value (calculated value of trigonometric function); : The vector of the nth branch segment (the direction vector that uniquely corresponds to Lsn); : Direction vector of the principal axis line segment (Lv when k=1) 11 When k=2, it is Lv 21 (The two directions that uniquely correspond to the main axis).
[0079] S702: Based on at least one of the following: the absolute value and sign of the included angle of the vectors, the positional relationship of the intersection point of the branch segment and the main axis line segment, the distance between the endpoint of the branch segment and the endpoint of the main axis line segment, and the marker width variation feature at the endpoint of the main axis line segment, a preset category discrimination rule is matched to determine the semantic category.
[0080] Specifically, three key distance parameters need to be defined first: Dist1: The distance between the intersection point P (x_P, y_P) and the nearest endpoint of the principal axis Ls1 (such as P01) (uniquely corresponding to the straight-line distance from the intersection point to the nearest endpoint of the principal axis). Dist2 n (n≥2): Intersection point P and branch segment Ls n The nearest endpoint (e.g., P0) n The distance (the straight-line distance from the unique corresponding intersection point to the nearest endpoint of the nth branch segment); Dist3 n (n≥2): The nearest endpoint of the main axis (e.g., P01) and the branch segment Ls n The nearest endpoint (e.g., P0) n The distance (the straight-line distance from the nearest endpoint of the main axis to the nearest endpoint of the nth branch segment).
[0081] Combined with the vector angle θ n and the width change feature, match the following preset rules (only the core categories are listed, covering 12 types of rules in total). The threshold parameters in all formulas are fixed values, and the character definitions are unique: 1. Straight arrow: No branch line segments, only containing the main axis Ls1; by using vertical line segments Lsp n (Lsp n : The sampled vertical line segment at the starting end of the main axis, uniquely corresponding to the sampled line at one end of the main axis), Lep n (Lep n : The sampled vertical line segment at the terminating end of the main axis, uniquely corresponding to the sampled line at the other end of the main axis) (sampling at an equal distance Lth1, Lth1: sampling distance threshold, fixed value, uniquely corresponding to the sampling interval) to measure the width width_s n (width_s n : The arrow width at Lsp n , uniquely corresponding to the width value at one end of the main axis), width_e n (width_e n : The arrow width at Lep n , uniquely corresponding to the width value at the other end of the main axis). The direction with a smaller width change is the rear direction, and the direction with an increasing and larger width change is the front direction.
[0082] 2. Right-turn arrow: 1 main axis Ls1 + 1 branch line segment Ls2; θ2 needs to satisfy formula (5), and Dist32 < l_th1 (l_th1: distance threshold 1, fixed value 3 pixels, uniquely corresponding to the short-distance judgment criterion).
[0083] Formula (5):
[0084] Character definitions in formula (5): : The vector angle between the second branch line segment Ls2 and the main axis Ls1 (uniquely corresponding to the angle between Ls2 and Ls1); |θ2|: The absolute value of θ2 (uniquely corresponding to the non-negative value of θ2); θ_th1: Angle threshold 1, fixed value 80 degrees (uniquely corresponding to the maximum allowable value of the turning angle); θ2 < 0: θ2 is negative, uniquely indicating that Ls2 deflects to the right relative to Ls1.
[0085] 3. Left-turn arrow: 1 main axis Ls1 + 1 branch line segment Ls2; θ2 needs to satisfy formula (6), and Dist32 < l_th1 (l_th1 = 3 pixels).
[0086] Formula (6):
[0087] Definitions of each character in Formula (6): θ2: The vector angle between the second branch line segment Ls2 and the main axis Ls1 (uniquely corresponding to the angle between Ls2 and Ls1); |θ2|: The absolute value of θ2 (uniquely corresponding to the non - negative value of θ2); θ_th1: Angle threshold 1, a fixed value of 80 degrees (uniquely corresponding to the maximum allowable value of the steering angle); θ2>0: θ2 is a positive value, uniquely indicating that Ls2 deflects to the left relative to Ls1.
[0088] 4. Left - and - right turn arrows: 1 main axis Ls1 + 2 branch line segments Ls2, Ls3; Ls2 satisfies the right - turn rule (Formula 5 + Dist32 < 3), and Ls3 satisfies Formula (7) and Dist33 < l_th1 (l_th1 = 3 pixels).
[0089] Formula (7): ; Definitions of each character in Formula (7): θ3: The vector angle between the third branch line segment Ls3 and the main axis Ls1 (uniquely corresponding to the angle between Ls3 and Ls1); |θ3|: The absolute value of θ3 (uniquely corresponding to the non - negative value of θ3); θ_th1: Angle threshold 1, a fixed value of 80 degrees (uniquely corresponding to the maximum allowable value of the steering angle); θ3>0: θ3 is a positive value, uniquely indicating that Ls3 deflects to the left relative to Ls1.
[0090] 5. Left - rear U - turn arrow: 1 main axis Ls1 + 1 branch line segment Ls2; Dist32 > l_th3 (l_th3: distance threshold 3, a fixed value of 10 pixels, uniquely corresponding to the long - distance judgment criterion), θ2 satisfies Formula (8), and there are no arrow - shaped elements at both ends of the main axis.
[0091] Formula (8): ; Definitions of each character in Formula (8): θ2: The vector angle between the second branch line segment Ls2 and the main axis Ls1 (uniquely corresponding to the angle between Ls2 and Ls1); |θ2|: The absolute value of θ2 (uniquely corresponding to the non - negative value of θ2); θ_th2: Angle threshold 2, a fixed value of 170 degrees (uniquely corresponding to the large - angle judgment criterion); θ_th3: Angle threshold 3, fixed value 10 degrees (the only standard for judging small angles); "OR": Logical OR relation, either condition must be met.
[0092] Other categories (such as straight + right turn, straight + left turn, merging to the right, etc.) are all determined using similar logic, combined with the corresponding formulas (such as formulas 9 and 10, which are consistent with formula 8 in form and have the same parameters) and distance threshold matching rules, to finally determine the semantic category.
[0093] The character definitions of Formula (9) (the angle rule of Ls3 in the left turn + left rear turn arrow) and Formula (10) (the angle rule of Ls2 in the straight + left rear turn arrow) are completely consistent with those of Formula (8), except that the applicable branch segment numbers are different, and the character definitions remain unique.
[0094] S703: Determine the forward direction based on the endpoints of the main axis line segment corresponding to the semantic category and the mark width variation characteristics at the endpoints of the main axis line segment.
[0095] Specifically, firstly, the "candidate forward direction endpoints" of the main axis line segment are determined based on semantic categories—for example, in right-turn and left-turn arrows, the main axis endpoints that satisfy the included angle condition are candidate endpoints; then, they are verified through width variation features: at the two endpoints of the main axis, the vertical line segment Lsp is used respectively. n (Lsp) n (Sampling vertical line segment at the spindle start end), Lep n (Lep) n (Sampling vertical line segments at the spindle termination end) (Equal-distance sampling Lth1, Lth1: fixed sampling distance threshold) Measure the width_s of the arrow marker. n (width_s) n Lsp n (arrow width), width_e n (width_e) n :Lep n (Arrow width at one end); if the width of one end changes little (the width remains basically unchanged), it is the direction behind the arrow; if the width of the other end changes much and shows an increasing trend (the width increases towards the arrow tip), it is the direction in front of the arrow (i.e. the forward direction).
[0096] See Figure 8 As shown, Figure 8This diagram illustrates the processing of the minimum bounding rectangle of a road surface arrow according to Embodiment 1 of this application. The leftmost sub-figure shows the initial straight arrow and its corresponding boundary labels L1, L2, R1, and R2. The middle sub-figure shows the state of the arrow in a coordinate system with O as the origin and X and Y as the coordinate axes, and also labels the major axis LZ1, minor axis LZ2, and boundaries L1, L2, and R1. The rightmost sub-figure shows the boundary state of the adjusted arrow, and also labels the major axis LZ1 and boundaries L1, L2, R1, and R2.
[0097] See Figure 9 As shown, Figure 9 This diagram illustrates the extraction of straight segments and included angles of a road surface arrow skeleton line according to Embodiment 1 of this application. The leftmost sub-figure shows the initial outline of the arrow; the middle sub-figure shows the main axis straight segment Ls1 and the branch segment Ls2 extracted from the skeleton line, and marks the intersection point P, the endpoint Ps1 of Ls1, the endpoint Ps2 of Ls2, and the included angle β between Ls1 and Ls2; the rightmost sub-figure shows the positional relationship between the main axis straight segment Ls1 (endpoints P01 and P11) and the branch segment Ls2 (endpoints P02 and P12), and marks the included angle θ between them.
[0098] See Figure 10 As shown, Figure 10 The figure shows a schematic diagram of a road arrow width sampling method provided in Embodiment 1 of this application. The figure shows the main axis straight line segment Ls1 of the straight arrow. Three sampling vertical line segments for width measurement are marked in the tip area of the arrow, namely Lsp1, Lsp2 and Lsp3. Three sampling vertical line segments are also marked in the tail area of the arrow, namely Lep1, Lep2 and Lep3.
[0099] In an optional implementation, after determining the semantic category and direction of travel of the road surface arrow mark based on the main axis straight segment and the at least one branch segment, the method further includes: Based on the semantic category, the direction of travel, and the minimum bounding rectangle, a vectorized representation of the road surface arrow mark is generated.
[0100] Specifically, firstly, based on the direction of travel and the direction of the main axis line segment, the image coordinate system is rotated by an angle β (β: the rotation angle of the coordinate system, uniquely corresponding to the rotation angle value that adapts to the direction of the arrow), so that the minimum bounding rectangle R1 (the original minimum bounding rectangle) is transformed into a new bounding rectangle (denoted as R2, where R2: the bounding rectangle that adapts to the direction of the arrow, uniquely corresponding to the vectorized boundary) with "long side along the main axis line segment and consistent with the direction of travel"; then, the semantic category information (such as "right turn" or "straight + left turn", uniquely corresponding to the driving guidance meaning of the arrow), the direction of travel (such as "along the positive x-axis direction", uniquely corresponding to the direction of the arrow) and the coordinate information of R2 (such as the pixel coordinates of the upper left and lower right corners, uniquely corresponding to the spatial position of R2) are associated, and finally a vectorized result with semantic attributes is generated—this result can be directly used in the lane-level positioning and planning control module of intelligent driving, and the data volume is small and easy to store and transmit.
[0101] Example 2 See Figure 11 As shown, Figure 11 This illustration shows a schematic diagram of a road arrow recognition device according to Embodiment 2 of this application, wherein the device includes: The road scene data acquisition module 1101 is used to acquire road scene data containing road surface arrow markings; Binary image determination module 1102 is used to determine the orthophoto binary image of the road surface arrow mark based on the road scene data; The skeleton line extraction module 1103 is used to extract the skeleton lines of the road arrow markings from the orthophoto binary image; The skeleton line analysis module 1104 is used to determine the main axis straight line segment and at least one branch line segment of the road surface arrow mark based on the skeleton line. The category direction determination module 1105 is used to determine the semantic category and forward direction of the road surface arrow mark based on the geometric topological relationship between the main axis straight segment and the at least one branch segment.
[0102] In one optional implementation, the road scene data is image data or point cloud data; The process of acquiring road scene data containing road surface arrow markings includes: Acquire image data containing the road surface arrow markings captured by the vehicle-mounted camera; or, Acquire point cloud data containing the road surface arrow markings collected by the vehicle-mounted lidar.
[0103] In an optional implementation, determining the orthophoto binary image of the road surface arrow markings based on the road scene data includes: If the road scene data is image data, then the image data is projected onto a plane parallel to the vehicle chassis according to the camera posture to obtain an orthographic projection image; The orthophoto image is subjected to grayscale and binarization processing to obtain the orthophoto binary image; or, If the road scene data is point cloud data, then the point cloud of the road surface arrow mark is separated by high-pass filtering based on the point cloud intensity value; Principal component analysis is performed on the point cloud to obtain the fitting plane and the major axis. The point cloud is orthorectified onto the fitting plane, and a minimum bounding rectangle is constructed with the major axis and the minor axis. The region within the rectangle is rasterized into the orthorectified binary image.
[0104] In an optional implementation, constructing the minimum bounding rectangle of the road surface arrow mark using the major and minor axes includes: Principal component analysis was performed on the road surface arrow markings; Based on the results of the principal component analysis, the major and minor axes of the road surface arrow markings on the fitted plane were determined; Using the major and minor axes as references, construct an initial bounding rectangle aligned with the coordinate axes; The minimum bounding rectangle is generated based on the extreme coordinates of the road surface arrow marks in the initial bounding rectangle.
[0105] In an optional implementation, determining the main axis straight segment and at least one branch segment of the road surface arrow mark based on the skeleton line includes: Multiple straight line segments are extracted from the skeleton line using the LSD straight line segment detection algorithm; The longest straight segment is designated as the main axis straight segment, and the remaining straight segments are designated as branch segments.
[0106] In an optional implementation, determining the semantic category and direction of travel of the road surface arrow mark based on the geometric topological relationship between the main axis straight segment and the at least one branch segment includes: Calculate the vector angle between each of the branch segments and the main axis line segment; Based on at least one of the following: the absolute value and sign of the included vector angle, the positional relationship of the intersection point of the branch segment and the main axis line segment, the distance between the endpoint of the branch segment and the endpoint of the main axis line segment, and the marker width variation feature at the endpoint of the main axis line segment, a preset category discrimination rule is matched to determine the semantic category. The forward direction is determined based on the endpoints of the main axis line segment corresponding to the semantic category and the mark width variation characteristics at the endpoints of the main axis line segment.
[0107] In an optional implementation, the apparatus further includes a vectorized representation data determination module, for: After determining the semantic category and direction of travel of the road arrow mark based on the main axis straight line segment and the at least one branch line segment, vectorized representation data of the road arrow mark is generated according to the semantic category, the direction of travel and the minimum bounding rectangle.
[0108] Example 3 Based on the same application concept, see [link / reference] Figure 12 As shown, Figure 12 This illustration shows a structural schematic diagram of a computer device provided in Embodiment 3 of this application, wherein, as shown... Figure 12 As shown, the computer device 1200 provided in Embodiment 3 of this application includes: The system includes a processor 1201, a memory 1202, and a bus 1203. The memory 1202 stores machine-readable instructions executable by the processor 1201. When the computer device 1200 is running, the processor 1201 and the memory 1202 communicate via the bus 1203. The machine-readable instructions are executed by the processor 1201 to perform the steps of the road arrow recognition method shown in Embodiment 1 above.
[0109] Example 4 Based on the same concept, this application also provides a computer-readable storage medium storing a computer program, which, when run by a processor, executes the steps of the road arrow recognition method described in any of the above embodiments.
[0110] Those skilled in the art will clearly understand that, for the sake of convenience and brevity, the specific working process of the system and apparatus described above can be referred to the corresponding process in the foregoing method embodiments, and will not be repeated here.
[0111] The computer program product for road arrow recognition provided in this application includes a computer-readable storage medium storing program code. The instructions included in the program code can be used to execute the methods described in the preceding method embodiments. For specific implementation details, please refer to the method embodiments, which will not be repeated here.
[0112] The road arrow recognition device provided in this application embodiment can be specific hardware on a device or software or firmware installed on the device. The implementation principle and technical effects of the device provided in this application embodiment are the same as those in the foregoing method embodiments. For the sake of brevity, any parts not mentioned in the device embodiment can be referred to the corresponding content in the foregoing method embodiments. Those skilled in the art will clearly understand that, for the sake of convenience and brevity, the specific working processes of the systems, devices, and units described above can all be referred to the corresponding processes in the above method embodiments, and will not be repeated here.
[0113] In the embodiments provided in this application, it should be understood that the disclosed apparatus and methods can be implemented in other ways. The apparatus embodiments described above are merely illustrative. For example, the division of units is only a logical functional division, and in actual implementation, there may be other division methods. Furthermore, multiple units or components may be combined or integrated into another system, or some features may be ignored or not executed. Additionally, the displayed or discussed mutual couplings, direct couplings, or communication connections may be through some communication interfaces; indirect couplings or communication connections between devices or units may be electrical, mechanical, or other forms.
[0114] The units described as separate components may or may not be physically separate. The components shown as units may or may not be physical units; that is, they may be located in one place or distributed across multiple network units. Some or all of the units can be selected to achieve the purpose of this embodiment according to actual needs.
[0115] In addition, the functional units in the embodiments provided in this application can be integrated into one processing unit, or each unit can exist physically separately, or two or more units can be integrated into one unit.
[0116] If the aforementioned functions are implemented as software functional units and sold or used as independent products, they can be stored in a computer-readable storage medium. Based on this understanding, the technical solution of this application, in essence, or the part that contributes to the prior art, or a portion of the technical solution, can be embodied in the form of a software product. This computer software product is stored in a storage medium and includes several instructions to cause a computer device (which may be a personal computer, server, or network device, etc.) to execute all or part of the steps of the methods described in the various embodiments of this application. The aforementioned storage medium includes various media capable of storing program code, such as USB flash drives, portable hard drives, read-only memory (ROM), random access memory (RAM), magnetic disks, or optical disks.
[0117] It should be noted that similar labels and letters in the following figures indicate similar items. Therefore, once an item is defined in one figure, it does not need to be further defined and explained in subsequent figures. In addition, the terms "first", "second", "third", etc. are used only to distinguish descriptions and should not be construed as indicating or implying relative importance.
[0118] Finally, it should be noted that the above-described embodiments are merely specific implementations of this application, used to illustrate the technical solutions of this application, and not to limit them. The protection scope of this application is not limited thereto. Although this application has been described in detail with reference to the foregoing embodiments, those skilled in the art should understand that any person skilled in the art can still modify or easily conceive of changes to the technical solutions described in the foregoing embodiments, or make equivalent substitutions for some of the technical features, within the scope of the technology disclosed in this application; and these modifications, changes, or substitutions do not cause the essence of the corresponding technical solutions to deviate from the spirit and scope of the technical solutions of the embodiments of this application. All should be covered within the protection scope of this application. Therefore, the protection scope of this application should be determined by the protection scope of the claims.
Claims
1. A method for recognizing road arrows, characterized in that, The method includes: Obtain road scene data containing road surface arrow markers; Based on the road scene data, an orthophoto projection binary image of the road surface arrow mark is determined; Extract the skeleton lines of the road surface arrow marks from the orthophoto binary image; Based on the skeleton line, the main axis straight segment and at least one branch line segment of the road surface arrow mark are determined; Based on the geometric topological relationship between the main axis straight segment and the at least one branch segment, the semantic category and direction of travel of the road surface arrow mark are determined.
2. The method according to claim 1, characterized in that, The road scene data is either image data or point cloud data; The process of acquiring road scene data containing road surface arrow markings includes: Acquire image data containing the road surface arrow markings captured by the vehicle-mounted camera; or, Acquire point cloud data containing the road surface arrow markings collected by the vehicle-mounted lidar.
3. The method according to claim 1, characterized in that, The process of determining the orthophoto projection binary image of the road surface arrow mark based on the road scene data includes: If the road scene data is image data, then the image data is projected onto a plane parallel to the vehicle chassis according to the camera posture to obtain an orthographic projection image; The orthophoto image is subjected to grayscale and binarization processing to obtain the orthophoto binary image; or, If the road scene data is point cloud data, then the point cloud of the road surface arrow mark is separated by high-pass filtering based on the point cloud intensity value; Principal component analysis is performed on the point cloud to obtain the fitting plane and the major axis. The point cloud is orthorectified onto the fitting plane, and a minimum bounding rectangle is constructed with the major axis and the minor axis. The region within the rectangle is rasterized into the orthorectified binary image.
4. The method according to claim 3, characterized in that, The construction of the minimum bounding rectangle of the road surface arrow mark using the major and minor axes includes: Principal component analysis was performed on the road surface arrow markings; Based on the results of the principal component analysis, the major and minor axes of the road surface arrow markings on the fitted plane were determined; Using the major and minor axes as references, construct an initial bounding rectangle aligned with the coordinate axes; The minimum bounding rectangle is generated based on the extreme coordinates of the road surface arrow marks in the initial bounding rectangle.
5. The method according to claim 1, characterized in that, The determination of the main axis straight segment and at least one branch segment of the road surface arrow mark based on the skeleton line includes: Multiple straight line segments are extracted from the skeleton line using the LSD straight line segment detection algorithm; The longest straight segment is designated as the main axis straight segment, and the remaining straight segments are designated as branch segments.
6. The method according to claim 1, characterized in that, The determination of the semantic category and direction of travel of the road surface arrow marking based on the geometric topological relationship between the main axis straight segment and the at least one branch segment includes: Calculate the vector angle between each of the branch segments and the main axis line segment; Based on at least one of the following: the absolute value and sign of the included vector angle, the positional relationship of the intersection point of the branch segment and the main axis line segment, the distance between the endpoint of the branch segment and the endpoint of the main axis line segment, and the marker width variation feature at the endpoint of the main axis line segment, a preset category discrimination rule is matched to determine the semantic category. The forward direction is determined based on the endpoints of the main axis line segment corresponding to the semantic category and the mark width variation characteristics at the endpoints of the main axis line segment.
7. The method according to claim 3 or 4, characterized in that, After determining the semantic category and direction of travel of the road surface arrow mark based on the main axis straight segment and the at least one branch segment, the method further includes: Based on the semantic category, the direction of travel, and the minimum bounding rectangle, a vectorized representation of the road surface arrow mark is generated.
8. A road arrow recognition device, characterized in that, The device includes: The road scene data acquisition module is used to acquire road scene data containing road surface arrow markings; The binary image determination module is used to determine the orthophoto binary image of the road surface arrow mark based on the road scene data; The skeleton line extraction module is used to extract the skeleton lines of the road arrow markings from the orthophoto binary image; The skeleton line analysis module is used to determine the main axis straight line segment and at least one branch line segment of the road surface arrow mark based on the skeleton line. The category direction determination module is used to determine the semantic category and forward direction of the road surface arrow mark based on the geometric topological relationship between the main axis straight segment and the at least one branch segment.
9. A computer device, characterized in that, include: The computer device includes a processor, a memory, and a bus. The memory stores machine-readable instructions executable by the processor. When the computer device is running, the processor communicates with the memory via the bus. When the machine-readable instructions are executed by the processor, they perform the steps of the road arrow recognition method as described in any one of claims 1 to 7.
10. A computer-readable storage medium, characterized in that, The computer-readable storage medium stores a computer program that, when executed by a processor, performs the steps of the road arrow recognition method as described in any one of claims 1 to 7.