Method and device for extracting center line of double-lane road-like line and computer equipment

By constructing a target quadrilateral and calculating its centerline points using a multi-round centerline extraction method, the problem of poor road display accuracy during map zooming is solved, achieving higher precision centerline display and data analysis accuracy.

CN117392203BActive Publication Date: 2026-05-19BEIJING INSTITUTE OF SURVEYING AND MAPPING
View PDF 2 Cites 0 Cited by

Patent Information

Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
BEIJING INSTITUTE OF SURVEYING AND MAPPING
Filing Date
2023-11-07
Publication Date
2026-05-19

AI Technical Summary

Technical Problem

Existing technologies, when zooming in on maps, use one of the edges of two road lines as the centerline for fitting, resulting in poor display accuracy of roads that are not perfectly parallel, which affects the accuracy of subsequent data statistical analysis.

Method used

A multi-round centerline extraction method is adopted. By constructing a target quadrilateral, the centerline point is determined based on the diagonal length. The centerline point is calculated round by round until there is no next target point. The centerline of the double road is determined by combining the coordinates of each centerline point.

Benefits of technology

It improves the accuracy of road display when zooming in on the map, reduces the bias in data statistical analysis, and achieves a more accurate centerline display effect.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN117392203B_ABST
    Figure CN117392203B_ABST
Patent Text Reader

Abstract

The application relates to a kind of road-like double-line midline extraction method, device, computer equipment, storage medium and computer program product.The method comprises: carrying out multiple rounds of midline extraction processing to the road-like double line to be processed, according to the coordinates of the two target points corresponding to the target diagonal line in the previous round processing process, and the coordinates of each next target point of the two target points in the previous round processing process, construct the target quadrilateral in the current round processing process, according to the midpoint of the target diagonal line in the current round processing process as the midline point in the current round processing process, enter the next round processing process, until the two target points corresponding to the target diagonal line in the mth round processing process do not exist each next target point;According to the coordinates of each midline point in the m rounds of processing process, determine the midline of the road-like double line.Using the method, the display precision of the road on the map when the map is scaled is improved.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] This application relates to the field of computer information technology, and in particular to a method, apparatus, computer equipment, storage medium and computer program product for extracting the centerline of a double road. Background Technology

[0002] With the development of computer information technology, the data collection in electronic maps of various cities has become quite comprehensive. In navigation electronic maps or large-scale electronic maps, the total amount of map road data is extremely large, and the main roads on the map are represented as double lines.

[0003] In existing technologies, when zooming in on a map, in order to improve display efficiency and display effect, double road lines are often fitted into one line as the zoomed road line for display. For example, one of the two road lines is randomly selected as the center line for display.

[0004] However, existing technologies, by arbitrarily selecting one of the two sides of a road as the centerline, can lead to poor display accuracy on the map when the two sides are not perfectly parallel. This can also result in significant deviations in subsequent data statistical analysis and other implementation processes. Summary of the Invention

[0005] Therefore, it is necessary to provide a method, apparatus, computer equipment, computer-readable storage medium, and computer program product for extracting the centerline of a road double line in a map, which can determine the centerline corresponding to the road double line in the map.

[0006] Firstly, this application provides a method for extracting the centerline of dual-lane roads, including:

[0007] In the target map, identify the dual-line road type to be processed;

[0008] The centerline extraction process is performed on the dual-line road of the aforementioned type. If both target points corresponding to the target diagonal in the previous round of processing have a next target point, then a target quadrilateral is constructed in the current round of processing based on the coordinates of the two target points corresponding to the target diagonal in the previous round of processing and the coordinates of the next target points of each of the two target points in the previous round of processing. The target diagonal in the current round of processing is determined based on the length of the first diagonal and the length of the second diagonal in the target quadrilateral in the current round of processing. The midpoint of the target diagonal in the current round of processing is taken as the centerline point in the current round of processing, and the process proceeds to the next round of processing until neither target point corresponding to the target diagonal in the m-th round of processing has a next target point.

[0009] Based on the coordinates of each centerline point during the m-round processing, the centerline of the dual-track road is determined;

[0010] Where m is a positive integer, in the first round of the multi-round centerline extraction process, the two target points corresponding to the target diagonal in the previous round of processing are the starting points of the double lines of the road type, and each target point and the next target point of the target point are located on the edge line of the same road type.

[0011] In one embodiment, the method further includes:

[0012] If, in the previous round of processing, there is only one next target point among the two target points corresponding to the target diagonal, the midpoint of the line connecting the target point that did not have a next target point in the previous round of processing and the next target point is taken as the midline point in the current round of processing, and the process proceeds to the next round of processing, until in the m-th round of processing, there are no next target points among the two target points corresponding to the target diagonal.

[0013] In one embodiment, determining the target diagonal in the current processing round based on the lengths of the first and second diagonals of the target quadrilateral in the current processing round includes:

[0014] The lengths of the first and second diagonals of the target quadrilateral in the current processing round are compared, and the diagonal with the shorter length is determined as the target diagonal in the current processing round.

[0015] In one embodiment, determining the centerline of the dual-lane road based on the coordinates of each centerline point during the m-round processing includes:

[0016] Based on the coordinates of each centerline point in the m-round processing, the centerlines of the road-like double lines are connected to obtain the centerlines of each centerline point.

[0017] In one embodiment, determining the dual-line road class to be processed in the target map includes:

[0018] In the target map, obtain the first type of road edge lines and the second type of road edge lines to be processed;

[0019] Determine the distance between the starting points and the ending points of the first type of road edge line to be processed and the second type of road edge line to be processed;

[0020] Based on the first type of road edge line to be processed, the second type of road edge line to be processed, the distance between the starting points, and the distance between the ending points, the dual-line road type to be processed is determined.

[0021] In one embodiment, determining the dual-line road type to be processed based on the first type of road edge line to be processed, the second type of road edge line to be processed, the distance between the starting points, and the distance between the ending points includes:

[0022] If the distance between the starting points and / or the distance between the ending points meets the edge line trimming conditions, the longer edge line in the same direction among the first-class road edge lines and the second-class road edge lines to be processed is trimmed. Based on the trimming results, the double-line road type to be processed is determined; or,

[0023] If neither the distance between the starting points nor the distance between the ending points satisfies the edge line cutting condition, the first type of road edge line to be processed and the second type of road edge line to be processed are treated as dual road lines to be processed.

[0024] In one embodiment, the method further includes:

[0025] If the distance between the starting points and / or the distance between the ending points is greater than a preset distance threshold, then the distance between the starting points and / or the distance between the ending points is determined to satisfy the edge trimming condition; or...

[0026] If the distance between the starting points and / or the distance between the ending points is less than or equal to the preset distance threshold, it is determined that the distance between the starting points and / or the distance between the ending points does not meet the edge trimming condition.

[0027] Secondly, this application also provides a centerline extraction device for dual-lane roads, comprising:

[0028] The first determination module is used to determine the dual-line road class to be processed in the target map;

[0029] The first processing module is used to perform multi-round centerline extraction processing on the dual-line road. If both target points corresponding to the target diagonal in the previous round of processing have a next target point, then based on the coordinates of the two target points corresponding to the target diagonal in the previous round of processing and the coordinates of the next target points of the two target points in the previous round of processing, a target quadrilateral in the current round of processing is constructed. Based on the length of the first diagonal and the length of the second diagonal in the target quadrilateral in the current round of processing, the target diagonal in the current round of processing is determined. The midpoint of the target diagonal in the current round of processing is taken as the centerline point in the current round of processing, and the process proceeds to the next round of processing until neither target point corresponding to the target diagonal in the m-th round of processing has a next target point.

[0030] The second determining module is used to determine the centerline of the double-line road class based on the coordinates of each centerline point in the m-round processing process, where m is a positive integer. In the first round of the multi-round centerline extraction process, the two target points corresponding to the target diagonal in the previous round of processing are the starting points of the double-line road class, and each target point and the next target point of the target point are located on the edge line of the same type of road.

[0031] In one embodiment, the device further includes:

[0032] The second processing module is used to take the target point that did not have a next target point in the previous processing round, and the midpoint of the line connecting the target point and the next target point as the midline point in the current processing round, and enter the next processing round, until neither of the two target points corresponding to the target diagonal in the m-th processing round has a next target point.

[0033] In one embodiment, the first processing module is specifically used for:

[0034] The lengths of the first and second diagonals of the target quadrilateral in the current processing round are compared, and the diagonal with the shorter length is determined as the target diagonal in the current processing round.

[0035] In one embodiment, the second determining module is specifically used for:

[0036] Based on the coordinates of each centerline point in the m-round processing, the centerlines of the road-like double lines are connected to obtain the centerlines of each centerline point.

[0037] In one embodiment, the first determining module is specifically used for:

[0038] In the target map, obtain the first type of road edge lines and the second type of road edge lines to be processed;

[0039] Determine the distance between the starting points and the ending points of the first type of road edge line to be processed and the second type of road edge line to be processed;

[0040] Based on the first type of road edge line to be processed, the second type of road edge line to be processed, the distance between the starting points, and the distance between the ending points, the dual-line road type to be processed is determined.

[0041] In one embodiment, the first determining module is specifically used for:

[0042] If the distance between the starting points and / or the distance between the ending points meets the edge line trimming conditions, the longer edge line in the same direction among the first-class road edge lines and the second-class road edge lines to be processed is trimmed. Based on the trimming results, the double-line road type to be processed is determined; or,

[0043] If neither the distance between the starting points nor the distance between the ending points satisfies the edge line cutting condition, the first type of road edge line to be processed and the second type of road edge line to be processed are treated as dual road lines to be processed.

[0044] In one embodiment, the device further includes:

[0045] The third determining module is used to determine that the distance between the starting points and / or the distance between the ending points satisfies the edge trimming condition when the distance between the starting points and / or the distance between the ending points is greater than a preset distance threshold.

[0046] The fourth determining module is used to determine that the distance between the starting points and / or the distance between the ending points does not meet the edge trimming condition when the distance between the starting points and / or the distance between the ending points is less than or equal to the preset distance threshold.

[0047] Thirdly, this application also provides a computer device, including a memory and a processor, wherein the memory stores a computer program, and the processor executes the computer program to perform the following steps:

[0048] In the target map, identify the dual-line road type to be processed;

[0049] The centerline extraction process is performed on the dual-line road of the aforementioned type. If both target points corresponding to the target diagonal in the previous round of processing have a next target point, then a target quadrilateral is constructed in the current round of processing based on the coordinates of the two target points corresponding to the target diagonal in the previous round of processing and the coordinates of the next target points of each of the two target points in the previous round of processing. The target diagonal in the current round of processing is determined based on the length of the first diagonal and the length of the second diagonal in the target quadrilateral in the current round of processing. The midpoint of the target diagonal in the current round of processing is taken as the centerline point in the current round of processing, and the process proceeds to the next round of processing until neither target point corresponding to the target diagonal in the m-th round of processing has a next target point.

[0050] Based on the coordinates of each centerline point during the m-round processing, the centerline of the dual-track road is determined;

[0051] Where m is a positive integer, in the first round of the multi-round centerline extraction process, the two target points corresponding to the target diagonal in the previous round of processing are the starting points of the double lines of the road type, and each target point and the next target point of the target point are located on the edge line of the same road type.

[0052] Fourthly, this application also provides a computer-readable storage medium having a computer program stored thereon, which, when executed by a processor, performs the following steps:

[0053] In the target map, identify the dual-line road type to be processed;

[0054] The centerline extraction process is performed on the dual-line road of the aforementioned type. If both target points corresponding to the target diagonal in the previous round of processing have a next target point, then a target quadrilateral is constructed in the current round of processing based on the coordinates of the two target points corresponding to the target diagonal in the previous round of processing and the coordinates of the next target points of each of the two target points in the previous round of processing. The target diagonal in the current round of processing is determined based on the length of the first diagonal and the length of the second diagonal in the target quadrilateral in the current round of processing. The midpoint of the target diagonal in the current round of processing is taken as the centerline point in the current round of processing, and the process proceeds to the next round of processing until neither target point corresponding to the target diagonal in the m-th round of processing has a next target point.

[0055] Based on the coordinates of each centerline point during the m-round processing, the centerline of the dual-track road is determined;

[0056] Where m is a positive integer, in the first round of the multi-round centerline extraction process, the two target points corresponding to the target diagonal in the previous round of processing are the starting points of the double lines of the road type, and each target point and the next target point of the target point are located on the edge line of the same road type.

[0057] Fifthly, this application also provides a computer program product, including a computer program that, when executed by a processor, performs the following steps:

[0058] In the target map, identify the dual-line road type to be processed;

[0059] The centerline extraction process is performed on the dual-line road of the aforementioned type. If both target points corresponding to the target diagonal in the previous round of processing have a next target point, then a target quadrilateral is constructed in the current round of processing based on the coordinates of the two target points corresponding to the target diagonal in the previous round of processing and the coordinates of the next target points of each of the two target points in the previous round of processing. The target diagonal in the current round of processing is determined based on the length of the first diagonal and the length of the second diagonal in the target quadrilateral in the current round of processing. The midpoint of the target diagonal in the current round of processing is taken as the centerline point in the current round of processing, and the process proceeds to the next round of processing until neither target point corresponding to the target diagonal in the m-th round of processing has a next target point.

[0060] Based on the coordinates of each centerline point during the m-round processing, the centerline of the dual-track road is determined;

[0061] Where m is a positive integer, in the first round of the multi-round centerline extraction process, the two target points corresponding to the target diagonal in the previous round of processing are the starting points of the double lines of the road type, and each target point and the next target point of the target point are located on the edge line of the same road type.

[0062] The aforementioned method, apparatus, computer equipment, storage medium, and computer program product for extracting the centerline of dual-lane roads determine the dual-lane roads to be processed in the target map; perform multiple rounds of centerline extraction processing on the dual-lane roads; if both target points corresponding to the target diagonal in the previous round of processing have subsequent target points, then based on the coordinates of the two target points corresponding to the target diagonal in the previous round of processing, and the coordinates of each subsequent target point of the two target points in the previous round of processing, construct a target quadrilateral for the current round of processing; and determine the centerline extraction based on the lengths of the first and second diagonals of the target quadrilateral in the current round of processing. In the current round of processing, the midpoint of the target diagonal is used as the centerline point in the current round of processing, and this process continues until neither of the two target points corresponding to the target diagonal in the m-th round has a next target point. Based on the coordinates of the centerline points in each of the m rounds, the centerline of the double-line road is determined. Here, m is a positive integer. In the first round of multi-round centerline extraction, the two target points corresponding to the target diagonal in the previous round are the starting points of the double-line road, and each target point and its next target point are located on the same road edge. This method can obtain a centerline that reflects the true situation of the double-line road to be processed, achieving the effect of using the centerline of the double-line road when scaling non-perfectly parallel double-line road, improving the display accuracy of roads on the map when scaling, and reducing deviations in subsequent data statistical analysis and other implementation processes. Attached Figure Description

[0063] To more clearly illustrate the technical solutions in the embodiments or related technologies of this application, the accompanying drawings used in the description of the embodiments or related technologies will be briefly introduced below. Obviously, the accompanying drawings described below are only some embodiments of this application. For those skilled in the art, other drawings can be obtained based on these drawings without creative effort.

[0064] Figure 1 This is a flowchart illustrating a method for extracting the centerline of a dual road in one embodiment.

[0065] Figure 2 This is a schematic diagram illustrating the processing steps of a method for extracting the centerline of a type of road with two lanes in one embodiment;

[0066] Figure 3 This is a flowchart illustrating the process of determining the dual-track road type to be processed in one embodiment;

[0067] Figure 4 This is a flowchart illustrating the process for determining the dual-track road type to be processed in another embodiment;

[0068] Figure 5 This is a flowchart illustrating the process of determining the cutting result in one embodiment;

[0069] Figure 6 This is a flowchart illustrating a method for determining whether the distance between starting points and / or the distance between ending points satisfies the edge trimming condition in one embodiment.

[0070] Figure 7 This is a flowchart illustrating the processing procedure of a method for extracting the centerline of a type of road with two lanes in one embodiment.

[0071] Figure 8 This is a schematic diagram illustrating the processing result of dual-lane roads in one embodiment;

[0072] Figure 9 This is a structural block diagram of a centerline extraction device for dual-lane roads in one embodiment;

[0073] Figure 10 This is an internal structural diagram of a computer device in one embodiment. Detailed Implementation

[0074] To make the objectives, technical solutions, and advantages of this application clearer, the following detailed description is provided in conjunction with the accompanying drawings and embodiments. It should be understood that the specific embodiments described herein are merely illustrative and not intended to limit the scope of this application.

[0075] In one embodiment, such as Figure 1 As shown, a method for extracting the centerline of dual roads is provided. This embodiment uses the application of this method to a terminal as an example for illustration. It can be understood that this method can also be applied to a server, and can also be applied to a system including a terminal and a server, and can be implemented through the interaction between the terminal and the server.

[0076] This embodiment uses the example of a double-line road quasi-road corresponding to an actual road. The double-line road quasi-road to be processed can include, but is not limited to, two road edges corresponding to an actual road, two river edges corresponding to an actual river, two adjacent contour lines, and two adjacent isolines in the target map. During map data collection, technicians can mark the double-line road quasi-road information points based on the curvature and actual turning direction of the road / river / contour line / isoline in the real world, and store the double-line road quasi-road information points corresponding to each type of road edge line and the corresponding actual data in the map data source for representation in the electronic map. In this embodiment, the method includes the following steps:

[0077] Step 102: In the target map, identify the dual-line road class to be processed.

[0078] The target map can be an electronic map from any manufacturer or of any type. The approximate road double lines are two double lines in the map from which the centerline extraction is to be performed.

[0079] In this embodiment, the terminal obtains the data source corresponding to the target map and determines the road-like edges of each road within that data source. Then, the terminal traverses the road-like edges of each road to determine two road-like edges that meet the preset double-line condition.

[0080] Specifically, the terminal can determine that two road edge lines meet the preset double-line conditions when the storage directions of any two road edge lines are consistent, the distance between the start and end points of the two lines is less than a preset distance threshold, and they belong to the same road.

[0081] For example, the terminal traverses the road-like edges of each road and determines two road-like edges that have the same storage direction, the distance between the start and end points of the two lines is less than a preset distance threshold, and they belong to the same road as a group of road-like double lines to be processed for centerline extraction.

[0082] It is understandable that the shape of the two road-like edges in the double road-like lines corresponds to the actual geographical situation in the real world. When collecting data on double road-like lines, the collected double road-like line information points are line segments, and the double road-like lines are composed of a string of points corresponding to multiple double road-like line information points.

[0083] Because the information points of dual-line road categorization are relatively dense, dual-line road categorization can be represented in electronic maps as approximately parallel curves / straight lines, or not completely parallel curves / straight lines, etc. This application does not limit the shape of dual-line road categorization. Taking dual-line road categorization as a type of road categorization as an example, the shape of the two edge lines of each road categorization conforms to the shape of the actual road. This application's embodiments do not limit the shape of the two edge lines of the two road categorization.

[0084] Step 104: Perform multi-round centerline extraction processing on the dual-line road. If both target points corresponding to the target diagonal in the previous round of processing have a next target point, construct the target quadrilateral in the current round of processing based on the coordinates of the two target points corresponding to the target diagonal in the previous round of processing and the coordinates of the next target points of the two target points in the previous round of processing. Determine the target diagonal in the current round of processing based on the lengths of the first and second diagonals of the target quadrilateral in the current round of processing. Take the midpoint of the target diagonal in the current round of processing as the centerline point in the current round of processing and proceed to the next round of processing until neither target point corresponding to the target diagonal in the m-th round of processing has a next target point.

[0085] Where m is a positive integer, in the first round of the multi-round centerline extraction process, the two target points corresponding to the target diagonal in the previous round of processing are the starting points of the double lines of the road class, and each target point and the next target point of the target point are located on the edge line of the same type of road.

[0086] In this embodiment of the application, for each group of dual-line road types to be processed, the terminal determines the road type information points corresponding to the two road type edge lines in the dual-line road type, and uses the road type information point corresponding to each road type edge line as the target point on the road type edge line.

[0087] The terminal performs multiple rounds of centerline extraction processing on this type of road with dual lanes, specifically:

[0088] The terminal performs the first round of processing on the dual-line road of this type, connecting the starting points of the two road edges, using the midpoint of the connection as the midline point in the first round of processing, and using the connection of the starting points as the target diagonal in the first round of processing, thus ending the first round of processing and entering the second round of processing.

[0089] The starting point of a dual-lane road can be the first road information point in the actual direction of the road corresponding to the dual-lane road; the actual direction of the road corresponding to the dual-lane road can be the traffic flow direction on the road corresponding to the dual-lane road. The starting point of a dual-lane road can also be a map information point starting from either end of the dual-lane road, and this application does not limit the orientation of the starting point of the dual-lane road.

[0090] After the terminal finishes the first round of centerline extraction for this type of road dual-lane road, in any subsequent round of processing, the terminal determines whether both target points corresponding to the target diagonal in the previous round of processing have a next target point. If both target points corresponding to the target diagonal in the previous round of processing have a next target point, the terminal constructs the target quadrilateral in the current round of processing based on the coordinates of the two target points corresponding to the target diagonal in the previous round of processing, and the coordinates of each next target point of the two target points in the previous round of processing, and determines the first and second diagonals corresponding to the target quadrilateral in the current round of processing.

[0091] Then, based on the lengths of the first and second diagonals in the current processing round, the terminal determines the target diagonal in the current processing round from among the first and second diagonals. The terminal takes the midpoint of the target diagonal in the current processing round as the center point in the current processing round, ends the current processing round, and proceeds to the next processing round, until neither of the two target points corresponding to the target diagonal in the m-th processing round has a next target point, at which point the terminal ends the multi-round center point extraction process.

[0092] For example, refer to Figure 2 As shown, the terminal obtains a double road-like line. The road-like edge line L1 in the double road-like line contains multiple target points A[1], A[2], A[3], ... and A[n], and the road-like edge line L2 contains multiple target points B[1], B[2], B[3], ... and B[m].

[0093] The terminal performs the first round of processing on the road edge lines L1 and L2, connects the starting point A[1] in road edge line L1 and the starting point B[1] in road edge line L2, and takes the midpoint C[1] of the connection A[1]-B[1] as the midline point in the current round of processing, ends the first round of processing, and enters the second round of processing.

[0094] The terminal performs a second round of processing on the road edge line L1 and the road edge line L2. The terminal determines that the two target points A[1] and B[1] corresponding to the line A[1]-B[1] in the first round of processing both have next target points A[2] and B[2]. Then, based on the coordinates of the target points A[1] and B[1], and the coordinates of the next target points A[1] and B[1] of the target points A[1] and B[1], the terminal constructs the target quadrilateral A[1]-A[2]-B[2]-B[1]-A[1] in the second round of processing, and determines the first diagonal A[1]-B[2] and the second diagonal B[1]-A[2] corresponding to the target quadrilateral A[1]-A[2]-B[2]-B[1]-A[1] in the second round of processing.

[0095] Then, based on the lengths of the first diagonal A[1]-B[2] and the second diagonal B[1]-A[2] in the second round of processing, the terminal determines the target diagonal as A[1]-B[2]. The terminal takes the midpoint C[2] of the target diagonal A[1]-B[2] as the midline point in the second round of processing, ends the second round of processing, and enters the third round of processing.

[0096] The terminal performs a third round of processing on the road edge lines L1 and L2. The terminal determines that the two target points A[1] and B[2] corresponding to the line A[1]-B[2] in the second round of processing both have next target points A[2] and B[3]. Then, based on the coordinates of target points A[1] and B[2], and the coordinates of the next target points A[2] and B[2] of A[1] and B[3] of B[2], the terminal constructs the target quadrilateral A[1]-A[2]-B[3]-B[2]-A[1] in the third round of processing, and determines the first diagonal A[1]-B[3] and the second diagonal A[2]-B[2] corresponding to the target quadrilateral A[1]-A[2]-B[3]-B[2]-A[1] in the third round of processing.

[0097] Then, based on the lengths of the first diagonal A[1]-B[3] and the second diagonal A[2]-B[2] in the third round of processing, the terminal determines the target diagonal as A[2]-B[2]. The terminal takes the midpoint C[3] of the target diagonal A[2]-B[2] as the midline point in the third round of processing, ends the second round of processing, and enters the fourth round of processing. This process continues until, in the m-th round of processing, neither of the two target points A[x] and B[y] corresponding to the target diagonal A[x]-B[y] has a next target point, and the terminal ends the multi-round midline extraction process.

[0098] Step 106: Determine the centerline of the double-line road based on the coordinates of each centerline point during the m-round processing.

[0099] In this embodiment of the application, the terminal determines the centerline of the dual-lane road based on the coordinates of each centerline point in the m-round processing process (i.e., the multi-round centerline extraction processing process).

[0100] After determining the centerline of each type of dual road to be processed, the terminal can display the road annotations corresponding to each type of dual road on the centerline when zooming in on the target map. This achieves the function of centering the annotations and displaying them perfectly, thus improving the user experience of using electronic maps. Furthermore, since the terminal can extract the centerlines of various types of dual roads in the map, the embodiments of this application also have good universality.

[0101] In the above-mentioned method for extracting the centerline of double-line road types, the double-line road types to be processed are identified in the target map. Multiple rounds of centerline extraction are performed on these double-line road types. If, in the previous round of processing, both target points corresponding to the target diagonal have subsequent target points, then based on the coordinates of the two target points corresponding to the target diagonal in the previous round, and the coordinates of each subsequent target point of the two target points in the previous round, a target quadrilateral for the current round of processing is constructed. Based on the lengths of the first and second diagonals of the target quadrilateral in the current round of processing, the centerline extraction time for the current round is determined. In the process of centerline extraction, the midpoint of the target diagonal in the current round of processing is taken as the centerline point for the current round of processing, and this process continues until, in the m-th round, neither of the two target points corresponding to the target diagonal has a next target point. Based on the coordinates of each centerline point in the m rounds of processing, the centerline of the double-line road is determined. Here, m is a positive integer. In the first round of multi-round centerline extraction, the two target points corresponding to the target diagonal in the previous round are the starting points of the double-line road, and each target point and its next target point are located on the same edge. Using this method, the centerline reflecting the true situation of the double-line road to be processed can be obtained. This achieves the effect of using the centerline of the double-line road for display when scaling the map, improving the display accuracy of roads on the map during scaling and reducing deviations in subsequent data statistical analysis and other implementation processes.

[0102] In one exemplary embodiment, the method further includes:

[0103] If, in the previous round of processing, there is only one next target point among the two target points corresponding to the target diagonal, the midpoint of the line connecting the target point that did not have a next target point in the previous round of processing and the next target point is taken as the midline point in the current round of processing, and the process continues until, in the m-th round of processing, there is no next target point among the two target points corresponding to the target diagonal.

[0104] In this embodiment of the application, after the terminal performs the first round of centerline extraction for any set of double-line roads, when performing multiple rounds of centerline extraction for any set of double-line roads, if in any round of processing the terminal determines that there is only one next target point among the two target points corresponding to the target diagonal in the previous round of processing, then the terminal connects the target point that did not have a next target point in the previous round of processing with the next target point based on the coordinates of the target point that did not have a next target point in the previous round of processing and the coordinates of the next target point.

[0105] Then, the terminal takes the midpoint of the line as the midline point in the current round of processing, ends the current round of processing, and enters the next round of processing, until neither of the two target points corresponding to the diagonal of the target in the m-th round of processing has a next target point.

[0106] For example, the terminal obtains a double road line, in which the road edge line L1 contains multiple target points A[1], A[2], A[3], ... and A[n], and the road edge line L2 contains multiple target points B[1], B[2], B[3], ... and B[m].

[0107] When the terminal performs a multi-round centerline extraction process, after the terminal performs the first round of centerline extraction for any set of double-line road types, if in any round of processing, the terminal determines that there are two target points A[i] and B[j] corresponding to the target diagonal A[i]-B[j] in the previous round of processing, and only A[i] has a next target point A[i+1], and the target point B[j] is the termination point of the road type edge line L2 (i.e., the last target point), then the terminal connects the target point B[j] and the next target point A[i+1] according to the coordinates of the target point B[j] in the previous round of processing and the coordinates of the next target point A[i+1]. Then, the terminal takes the midpoint C[i+1] of the line A[i+1]-B[j] as the midline point in the current round of processing, ends the current round of processing, and enters the next round of processing. This process continues until, in the m-th round of processing, neither of the two target points A[x] and B[y] corresponding to the target diagonal A[x]-B[y] has a next target point. At this point, the terminal ends the multi-round midline extraction process.

[0108] In this embodiment, during any round of processing, if only one of the two target points corresponding to the target diagonal in the previous round of processing has a next target point, the terminal can use the target point that did not have a next target point in the previous round of processing, and the midpoint of the line connecting it to the next target point, as the centerline point in the current round of processing. This facilitates traversing all target points on the two road edges in a double-line road system, obtaining multiple centerline points, and the terminal can determine the centerline of the double-line road system based on these multiple centerline points.

[0109] In one exemplary embodiment, step 104 includes:

[0110] The lengths of the first and second diagonals of the target quadrilateral in the current processing round are compared, and the shorter diagonal is determined as the target diagonal in the current processing round.

[0111] In this embodiment, the terminal can compare the lengths of the first and second diagonals of the target quadrilateral in the current processing round to determine the shorter diagonal. The terminal then identifies the shorter diagonal as the target diagonal in the current processing round.

[0112] In this embodiment, the shorter diagonal is selected as the target diagonal in the current processing round, and its midpoint is taken as the centerline point. This allows us to obtain a midpoint that is equidistant from both sides and is relatively close to them. Using the midpoint that is equidistant from both sides as the centerline point improves the accuracy of centerline interpolation for bi-lane roads, while reducing computational complexity and increasing the efficiency of centerline extraction for bi-lane roads.

[0113] In one exemplary embodiment, step 106 includes:

[0114] Based on the coordinates of each centerline point during the m-round processing, connect the centerline points to obtain the centerline of the double-line road.

[0115] In this embodiment of the application, the terminal determines the centerline of the dual-lane road based on the coordinates of each centerline point in the m-round processing process (i.e., the multi-round centerline extraction processing process).

[0116] Among the methods for determining the centerline of a dual-lane road based on the coordinates of each centerline point, this can be achieved by fitting a function to multiple centerline points, directly connecting multiple centerline points, or smoothing the curve obtained after directly connecting multiple centerline points. Any algorithm capable of determining the centerline of a dual-lane road based on the coordinates of each centerline point can be used in this application, and the embodiments of this application do not specifically limit it.

[0117] In this embodiment, the terminal can determine the centerline of the dual-lane road based on the coordinates of the centerline point obtained during the multi-round centerline extraction process.

[0118] In one exemplary embodiment, such as Figure 3 As shown, step 102 includes steps 302 to 306.

[0119] in:

[0120] Step 302: In the target map, obtain the first type of road edge lines to be processed and the second type of road edge lines to be processed.

[0121] In this embodiment, the terminal obtains the data source corresponding to the target map and determines the road-like edges of each road in the data source. Then, the terminal traverses the road-like edges of each road. For any two road-like edges, the terminal determines whether the storage direction of the two road-like edges is consistent with the actual direction of the road. If the storage direction of any road-like edge is inconsistent with the actual direction of the road, the terminal modifies the storage direction of the road-like edge to be consistent with the actual direction of the road.

[0122] Then, the terminal determines whether the storage directions of the two road-like edges are consistent. If the storage directions of the two road-like edges are inconsistent, the terminal determines that the two edges cannot be treated as a pair of road-like double lines to be processed.

[0123] When the storage directions of the two road edge lines are consistent, the terminal determines whether any part of the two road edge lines belongs to the same road. If no part of the two road edge lines belongs to the same road, the terminal determines that the two edge lines cannot be treated as a pair of road edge lines to be processed.

[0124] When any part of the two road edge lines belongs to the same road, the terminal will treat the two road edge lines as the first type of road edge line to be processed and the second type of road edge line to be processed, respectively.

[0125] Step 304: Determine the distance between the starting points and the ending points of the first type of road edge line to be processed and the second type of road edge line to be processed.

[0126] In this embodiment of the application, the terminal determines the starting point and ending point of the first type of road edge line to be processed and the second type of road edge line to be processed.

[0127] Then, the starting and ending points of the first type of road edge line and the second type of road edge line to be processed by the terminal are determined, as well as the distance between the starting points of the first type of road edge line and the second type of road edge line to be processed and the distance between the ending points of the first type of road edge line and the second type of road edge line to be processed.

[0128] In one implementation, the terminal can determine the distance between the starting points of the first type of road edge to be processed and the distance between the ending points of the second type of road edge to be processed in the target map, based on the coordinates of the starting points of the first type of road edge to be processed and the second type of road edge to be processed in the target map, and the coordinates of the ending points of the first type of road edge to be processed and the second type of road edge to be processed in the target map.

[0129] In another implementation, the terminal can determine the actual distance between the starting points of the first type of road edge line and the second type of road edge line to be processed, and the actual distance between the ending points of the first type of road edge line and the second type of road edge line to be processed, based on the actual location information corresponding to the starting points of the first type of road edge line and the second type of road edge line to be processed, and the actual location information corresponding to the ending points of the first type of road edge line and the second type of road edge line to be processed.

[0130] This application does not specify the exact form of the distance between the starting points and the distance between the ending points.

[0131] Step 306: Determine the dual-line road type to be processed based on the first type of road edge line to be processed, the second type of road edge line to be processed, the distance between the starting points, and the distance between the ending points.

[0132] In this embodiment of the application, the terminal processes the first type of road edge line to be processed and / or the second type of road edge line to be processed based on the first type of road edge line to be processed, the second type of road edge line to be processed, the distance between the starting points, and the distance between the ending points, and determines the processed first type of road edge line and the second type of road edge line.

[0133] The terminal determines the dual-line of the road category to be processed based on the processed first-class road edge lines and second-class road edge lines.

[0134] In this embodiment, the terminal can determine the first type of road edge line and the second type of road edge line to be processed from the data source corresponding to the target map, and determine the double road lines to be processed based on the first type of road edge line, the second type of road edge line, the distance between the starting points, and the distance between the ending points. This achieves the filtering of various types of road edge lines in the data source to obtain the double road lines to be processed. This facilitates subsequent centerline extraction based on the double road lines to be processed.

[0135] In one exemplary embodiment, such as Figure 4 As shown, step 306 includes steps 402 to 404.

[0136] in:

[0137] Step 402: If the distance between the starting points and / or the distance between the ending points meets the edge line trimming conditions, trim the longer edge line in the same direction of the first type of road edge line and the second type of road edge line to be processed. Based on the trimming results, determine the double road type to be processed.

[0138] Among them, the distance between the starting points and / or the distance between the ending points satisfies the edge trimming condition, indicating that the distance between the starting points and / or the distance between the ending points is relatively large. Therefore, the part of the longer road-like edge line in the same direction that is longer than the shorter edge line may not belong to the same road as the shorter road-like edge line, and the longer road-like edge line needs to be trimmed.

[0139] In this embodiment of the application, when the distance between the starting points meets the edge line trimming condition, the terminal determines the shortest distance from the starting point of the shorter road edge line in the same direction to the longer road edge line in the same direction among the first type of road edge lines to be processed and the second type of road edge lines to be processed.

[0140] Based on the shortest distance and the length of the longer road edge in the same direction, the terminal cuts the road edge with the shortest distance from the starting point of the longer road edge in the same direction, and uses the resulting starting point as the new starting point to obtain the cutting result.

[0141] If the distance between the terminal points meets the edge line trimming condition, determine the shortest distance from the terminal point of the shorter road edge line in the same direction to the longer road edge line in the same direction among the first type of road edge lines to be processed and the second type of road edge lines to be processed.

[0142] Based on the shortest distance and the length of the longer roadside line in the same direction, the terminal cuts the roadside line with the shortest distance from the end point of the longer roadside line in the same direction, and takes the end point obtained after cutting as the new end point to obtain the cutting result.

[0143] For example, such as Figure 5 As shown, the terminal, using the starting point direction (direction A) of both the first and second type road edge lines to be processed as a reference, determines the shorter road edge line in the same direction as the second type road edge line and the longer road edge line in the same direction as the first type road edge line. The shortest distance from the starting point b of the shorter road edge line to the longer road edge line in the same direction is d1. At the starting point a of the longer road edge line in the same direction, the terminal cuts off a portion of length ae, and uses the resulting starting point as the new starting point to obtain the cutting result.

[0144] Then, the terminal, using the direction of the termination points (direction B) of the first and second type of road edges to be processed as a reference, determines the shorter road edge in the same direction as the first type of road edge to be processed, and the longer road edge in the same direction as the second type of road edge to be processed. The shortest distance from the termination point a of the shorter road edge in the same direction to the longer road edge in the same direction is d2. At the termination point b of the longer road edge in the same direction, the terminal cuts off a portion of length bf, and uses the resulting starting point as the new starting point to obtain the cutting result.

[0145] Then, the terminal determines the dual-line of the road class to be processed based on the cutting results of the first-class road edge line and the second-class road edge line to be processed.

[0146] Step 404: If the distance between the starting points and the distance between the ending points do not meet the edge line cutting conditions, the first type of road edge line and the second type of road edge line to be processed are treated as double road lines to be processed.

[0147] In this embodiment of the application, when the distance between the starting point and the distance between the ending point do not meet the edge line trimming conditions, the first type of road edge line to be processed and the second type of road edge line to be processed are directly treated as the double road lines to be processed.

[0148] In this embodiment, when the distance between the starting points and / or ending points of the first type of road edge line and the second type of road edge line to be processed is large, the portion of the longer road edge line that is longer than the shorter edge line may not belong to the same road as the shorter road edge line. Therefore, it is necessary to trim the longer road edge line. The terminal can trim the longer road edge line, thereby ensuring that both road edge lines of the double road edge line belong to the same road, improving the accuracy of subsequent centerline extraction based on the double road edge lines to be processed.

[0149] In one exemplary embodiment, such as Figure 6 As shown, the above method further includes steps 602 to 604. Wherein:

[0150] Step 602: If the distance between the starting points and / or the distance between the ending points is greater than a preset distance threshold, determine that the distance between the starting points and / or the distance between the ending points meets the edge trimming condition.

[0151] In this embodiment of the application, if the distance between the starting points of the first type of road edge line to be processed and the second type of road edge line to be processed is greater than a preset distance threshold, the terminal determines that the distance between the starting points of the first type of road edge line to be processed and the second type of road edge line to be processed meets the edge line trimming condition.

[0152] Among them, the distance between two points being greater than a preset distance threshold indicates that the distance from the endpoint (starting or ending point) of the longer roadside line to the endpoint (starting or ending point) of the shorter roadside line is greater than the length of the perpendicular line from the endpoint of the shorter roadside line to the longer roadside line.

[0153] If the distance between the terminal points is greater than a preset distance threshold, the distance between the terminal points is determined to meet the edge trimming condition.

[0154] Step 604: If the distance between the starting points and / or the distance between the ending points is less than or equal to a preset distance threshold, determine that the distance between the starting points and / or the distance between the ending points does not meet the edge trimming condition.

[0155] In this embodiment of the application, if the distance between the starting points of the first type of road edge line to be processed and the second type of road edge line to be processed is less than or equal to a preset distance threshold, the terminal determines that the distance between the starting points of the first type of road edge line to be processed and the second type of road edge line to be processed does not meet the edge line trimming condition.

[0156] If the distance between the terminal points is less than or equal to a preset distance threshold, it is determined that the distance between the terminal points does not meet the edge trimming condition.

[0157] In this embodiment, the terminal can determine whether the first-class road edge line and the second-class road edge line to be processed meet the preset trimming conditions based on the distance between the starting points and / or the ending points. This facilitates the subsequent trimming of the first-class road edge line and the second-class road edge line to be processed according to the preset trimming conditions, thereby obtaining the double-line road of the first-class road edge line to be processed.

[0158] In one embodiment, such as Figure 7 As shown, an example of a method for extracting the centerline of dual-lane roads applied to the terminal processing is also provided, including:

[0159] Step A2: In the target map, determine the road edge line L1 and road edge line L2 in the double road type.

[0160] Among them, road edge line L1 contains m target points (A[1], A[2], ...A[i], ...A[m]), and road edge line L2 contains n target points (B[1], B[2], ...B[j], ...B[n]).

[0161] Step A2: Determine whether the storage direction of road edge line L1 and road edge line L2 is consistent with the actual road direction.

[0162] Step A3: When the storage direction of the road edge line L2 is inconsistent with the actual road direction, reverse the storage direction of the road edge line L2 so that the storage direction of the road edge line L2 is consistent with the actual road direction, and the storage direction of the road edge line L2 is consistent with the storage direction of the road edge line L1.

[0163] Step A4: When the storage direction of road edge line L2 is consistent with the storage direction of road edge line L1, perform multiple rounds of centerline extraction processing on road edge line L1 and road edge line L2.

[0164] The terminal performs multiple rounds of centerline extraction on the dual-lane road to obtain multiple centerline points (M[1], M[2], ...M[k], ...M[s]). The method for performing multiple rounds of centerline extraction on the dual-lane road has been described in the aforementioned embodiments and will not be repeated here.

[0165] Step A5: Determine the centerline of the double-line road based on the coordinates of each centerline point in the multi-round processing.

[0166] Among them, the centerline L (M[1], M[2], ...M[k], ...M[s]) of the double-line road is determined based on the coordinates of each centerline point (M[1], M[2], ...M[k], ...M[s]) in the multi-round processing.

[0167] For example, the processing results for dual-lane roads can be referred to... Figure 8 As shown.

[0168] It should be understood that although the steps in the flowcharts of the embodiments described above are shown sequentially according to the arrows, these steps are not necessarily executed in the order indicated by the arrows. Unless explicitly stated herein, there is no strict order restriction on the execution of these steps, and they can be executed in other orders. Moreover, at least some steps in the flowcharts of the embodiments described above may include multiple steps or multiple stages. These steps or stages are not necessarily completed at the same time, but can be executed at different times. The execution order of these steps or stages is not necessarily sequential, but can be performed alternately or in turn with other steps or at least some of the steps or stages of other steps.

[0169] Based on the same inventive concept, this application also provides a centerline extraction device for implementing the above-described method for extracting the centerline of double-lane roads. The solution provided by this device is similar to the solution described in the above method. Therefore, the specific limitations of the one or more centerline extraction device embodiments for double-lane roads provided below can be found in the limitations of the centerline extraction method for double-lane roads described above, and will not be repeated here.

[0170] In one exemplary embodiment, such as Figure 9 As shown, a centerline extraction device 900 for dual-lane roads is provided, comprising: a first determining module 902, a first processing module 904, and a second determining module 906, wherein:

[0171] The first determining module 902 is used to determine the dual-line road class to be processed in the target map.

[0172] The first processing module 904 is used to perform multi-round centerline extraction processing on the dual-line road. If both target points corresponding to the target diagonal in the previous round of processing have a next target point, then based on the coordinates of the two target points corresponding to the target diagonal in the previous round of processing and the coordinates of the next target points of the two target points in the previous round of processing, a target quadrilateral in the current round of processing is constructed. Based on the length of the first diagonal and the second diagonal in the target quadrilateral in the current round of processing, the target diagonal in the current round of processing is determined. The midpoint of the target diagonal in the current round of processing is taken as the centerline point in the current round of processing, and the process proceeds to the next round of processing until neither target point corresponding to the target diagonal in the m-th round of processing has a next target point.

[0173] The second determining module 906 is used to determine the centerline of the double-line road class based on the coordinates of each centerline point in the m-round processing process, where m is a positive integer. In the first round of the multi-round centerline extraction process, the two target points corresponding to the target diagonal in the previous round of processing are the starting points of the double-line road class, and each target point and the next target point of the target point are located on the edge line of the same type of road.

[0174] The centerline extraction device for double-lane roads provided in this application can obtain the centerline that reflects the true situation of the double-lane roads to be processed. This achieves the effect of using the centerline of the double-lane roads to display when scaling up non-parallel double-lane roads, improving the display accuracy of roads on the map when scaling up the map and reducing deviations in subsequent data statistical analysis and other implementation processes.

[0175] In one embodiment, the apparatus further includes:

[0176] The second processing module is used to take the target point that did not have a next target point in the previous processing round, and the midpoint of the line connecting the target point and the next target point as the midline point in the current processing round, and enter the next processing round, until neither of the two target points corresponding to the target diagonal in the m-th processing round has a next target point.

[0177] In one embodiment, the first processing module 904 is specifically used for:

[0178] The lengths of the first and second diagonals of the target quadrilateral in the current processing round are compared, and the diagonal with the shorter length is determined as the target diagonal in the current processing round.

[0179] In one embodiment, the second determining module 906 is specifically used for:

[0180] Based on the coordinates of each centerline point in the m-round processing, the centerlines of the road-like double lines are connected to obtain the centerlines of each centerline point.

[0181] In one embodiment, the first determining module 902 is specifically used for:

[0182] In the target map, obtain the first type of road edge lines and the second type of road edge lines to be processed;

[0183] Determine the distance between the starting points and the ending points of the first type of road edge line to be processed and the second type of road edge line to be processed;

[0184] Based on the first type of road edge line to be processed, the second type of road edge line to be processed, the distance between the starting points, and the distance between the ending points, the dual-line road type to be processed is determined.

[0185] In one embodiment, the first determining module 902 is specifically used for:

[0186] If the distance between the starting points and / or the distance between the ending points meets the edge line trimming conditions, the longer edge line in the same direction among the first-class road edge lines and the second-class road edge lines to be processed is trimmed. Based on the trimming results, the double-line road type to be processed is determined; or,

[0187] If neither the distance between the starting points nor the distance between the ending points satisfies the edge line cutting condition, the first type of road edge line to be processed and the second type of road edge line to be processed are treated as dual road lines to be processed.

[0188] In one embodiment, the apparatus further includes:

[0189] The third determining module is used to determine that the distance between the starting points and / or the distance between the ending points satisfies the edge trimming condition when the distance between the starting points and / or the distance between the ending points is greater than a preset distance threshold.

[0190] The fourth determining module is used to determine that the distance between the starting points and / or the distance between the ending points does not meet the edge trimming condition when the distance between the starting points and / or the distance between the ending points is less than or equal to the preset distance threshold.

[0191] Each module in the aforementioned centerline extraction device for dual-lane roads can be implemented entirely or partially through software, hardware, or a combination thereof. These modules can be embedded in or independent of the processor in a computer device, or stored in the memory of a computer device as software, so that the processor can call and execute the corresponding operations of each module.

[0192] In one exemplary embodiment, a computer device is provided, which may be a terminal, and its internal structure diagram may be as follows: Figure 10As shown, the computer device includes a processor, memory, input / output interface, communication interface, display unit, and input device. The processor, memory, and input / output interface are connected via a system bus, and the communication interface, display unit, and input device are also connected to the system bus via the input / output interface. The processor provides computing and control capabilities. The memory includes non-volatile storage media and internal memory. The non-volatile storage media stores the operating system and computer programs. The internal memory provides an environment for the operation of the operating system and computer programs in the non-volatile storage media. The input / output interface is used for exchanging information between the processor and external devices. The communication interface is used for wired or wireless communication with external terminals; wireless communication can be achieved through Wi-Fi, mobile cellular networks, NFC (Near Field Communication), or other technologies. When executed by the processor, the computer program implements a method for extracting the centerline of dual-lane roads. The display unit is used to form a visually visible image and can be a display screen, projection device, or virtual reality imaging device. The display screen can be an LCD screen or an e-ink screen. The input device of the computer device can be a touch layer covering the display screen, or buttons, trackballs, or touchpads set on the casing of the computer device, or external keyboards, touchpads, or mice, etc.

[0193] Those skilled in the art will understand that Figure 10 The structure shown is merely a block diagram of a portion of the structure related to the present application and does not constitute a limitation on the computer device to which the present application is applied. Specific computer devices may include more or fewer components than those shown in the figure, or combine certain components, or have different component arrangements.

[0194] In one exemplary embodiment, a computer device is provided, including a memory and a processor, wherein the memory stores a computer program, and the processor executes the computer program to implement the steps in the above-described method embodiments.

[0195] In one embodiment, a computer-readable storage medium is provided having a computer program stored thereon, which, when executed by a processor, implements the steps in the above method embodiments.

[0196] In one embodiment, a computer program product is provided, including a computer program that, when executed by a processor, implements the steps in the above method embodiments.

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

[0198] Those skilled in the art will understand that all or part of the processes in the methods of the above embodiments can be implemented by a computer program instructing related hardware. The computer program can be stored in a non-volatile computer-readable storage medium, and when executed, it can include the processes of the embodiments of the above methods. Any references to memory, databases, or other media used in the embodiments provided in this application can include at least one of non-volatile and volatile memory. Non-volatile memory can include read-only memory (ROM), magnetic tape, floppy disk, flash memory, optical memory, high-density embedded non-volatile memory, resistive random access memory (ReRAM), magnetic random access memory (MRAM), ferroelectric random access memory (FRAM), phase change memory (PCM), graphene memory, etc. Volatile memory can include random access memory (RAM) or external cache memory, etc. By way of illustration and not limitation, RAM can take many forms, such as Static Random Access Memory (SRAM) or Dynamic Random Access Memory (DRAM). The databases involved in the embodiments provided in this application may include at least one type of relational database and non-relational database. Non-relational databases may include, but are not limited to, blockchain-based distributed databases. The processors involved in the embodiments provided in this application may be general-purpose processors, central processing units, graphics processing units, digital signal processors, programmable logic devices, quantum computing-based data processing logic devices, etc., and are not limited to these.

[0199] The technical features of the above embodiments can be combined in any way. For the sake of brevity, not all possible combinations of the technical features in the above embodiments are described. However, as long as there is no contradiction in the combination of these technical features, they should be considered to be within the scope of this specification.

[0200] The embodiments described above are merely illustrative of several implementation methods of this application, and while the descriptions are specific and detailed, they should not be construed as limiting the scope of this patent application. It should be noted that those skilled in the art can make various modifications and improvements without departing from the concept of this application, and these all fall within the protection scope of this application. Therefore, the protection scope of this application should be determined by the appended claims.

Claims

1. A method for extracting the centerline of a dual-lane road, characterized in that, The method includes: In the target map, identify the dual-line road type to be processed; The centerline extraction process is performed on the dual-line road of the aforementioned type. If both target points corresponding to the target diagonal in the previous round of processing have a next target point, then a target quadrilateral is constructed in the current round of processing based on the coordinates of the two target points corresponding to the target diagonal in the previous round of processing and the coordinates of the next target points of each of the two target points in the previous round of processing. The target diagonal in the current round of processing is determined based on the length of the first diagonal and the length of the second diagonal in the target quadrilateral in the current round of processing. The midpoint of the target diagonal in the current round of processing is taken as the centerline point in the current round of processing, and the process proceeds to the next round of processing until neither target point corresponding to the target diagonal in the m-th round of processing has a next target point. Based on the coordinates of each centerline point during the m-round processing, the centerline of the dual-track road is determined; Where m is a positive integer, in the first round of the multi-round centerline extraction process, the two target points corresponding to the target diagonal in the previous round of processing are the starting points of the double lines of the road type, and each target point and the next target point of the target point are located on the edge line of the same road type.

2. The method according to claim 1, characterized in that, The method further includes: If, in the previous round of processing, there is only one next target point among the two target points corresponding to the target diagonal, the midpoint of the line connecting the target point that did not have a next target point in the previous round of processing and the next target point is taken as the midline point in the current round of processing, and the process proceeds to the next round of processing, until in the m-th round of processing, there are no next target points among the two target points corresponding to the target diagonal.

3. The method according to claim 1 or 2, characterized in that, Determining the target diagonal in the current processing round based on the lengths of the first and second diagonals of the target quadrilateral includes: The lengths of the first and second diagonals of the target quadrilateral in the current processing round are compared, and the diagonal with the shorter length is determined as the target diagonal in the current processing round.

4. The method according to claim 1, characterized in that, Determining the centerline of the dual-lane road based on the coordinates of each centerline point during the m-round processing includes: Based on the coordinates of each centerline point in the m-round processing, the centerlines of the road-like double lines are connected to obtain the centerlines of each centerline point.

5. The method according to claim 1, characterized in that, The step of identifying the dual-line road class to be processed in the target map includes: In the target map, obtain the first type of road edge lines and the second type of road edge lines to be processed; Determine the distance between the starting points and the ending points of the first type of road edge line to be processed and the second type of road edge line to be processed; Based on the first type of road edge line to be processed, the second type of road edge line to be processed, the distance between the starting points, and the distance between the ending points, the dual-line road type to be processed is determined.

6. The method according to claim 5, characterized in that, The step of determining the dual-line road type to be processed based on the first type of road edge line to be processed, the second type of road edge line to be processed, the distance between the starting points, and the distance between the ending points includes: If the distance between the starting points and / or the distance between the ending points meets the edge line trimming conditions, the longer edge line in the same direction among the first-class road edge lines and the second-class road edge lines to be processed is trimmed. Based on the trimming results, the double-line road type to be processed is determined; or, If neither the distance between the starting points nor the distance between the ending points satisfies the edge line cutting condition, the first type of road edge line to be processed and the second type of road edge line to be processed are treated as dual road lines to be processed.

7. The method according to claim 6, characterized in that, The method further includes: If the distance between the starting points and / or the distance between the ending points is greater than a preset distance threshold, then the distance between the starting points and / or the distance between the ending points is determined to satisfy the edge trimming condition; or... If the distance between the starting points and / or the distance between the ending points is less than or equal to the preset distance threshold, it is determined that the distance between the starting points and / or the distance between the ending points does not meet the edge trimming condition.

8. A centerline extraction device for a type of dual-lane road, characterized in that, The device includes: The first determination module is used to determine the dual-line road class to be processed in the target map; The first processing module is used to perform multi-round centerline extraction processing on the dual-line road. If both target points corresponding to the target diagonal in the previous round of processing have a next target point, then based on the coordinates of the two target points corresponding to the target diagonal in the previous round of processing and the coordinates of the next target points of the two target points in the previous round of processing, a target quadrilateral in the current round of processing is constructed. Based on the length of the first diagonal and the length of the second diagonal in the target quadrilateral in the current round of processing, the target diagonal in the current round of processing is determined. The midpoint of the target diagonal in the current round of processing is taken as the centerline point in the current round of processing, and the process proceeds to the next round of processing until neither target point corresponding to the target diagonal in the m-th round of processing has a next target point. The second determining module is used to determine the centerline of the double-line road class based on the coordinates of each centerline point in the m-round processing process, where m is a positive integer. In the first round of the multi-round centerline extraction process, the two target points corresponding to the target diagonal in the previous round of processing are the starting points of the double-line road class, and each target point and the next target point of the target point are located on the edge line of the same type of road.

9. A computer device comprising a memory and a processor, wherein the memory stores a computer program, characterized in that, When the processor executes the computer program, it implements the steps of the method according to any one of claims 1 to 7.

10. A computer-readable storage medium having a computer program stored thereon, characterized in that, When the computer program is executed by a processor, it implements the steps of the method according to any one of claims 1 to 7.