Virtual intersection generation method, device, electronic device and storage medium

By clustering and extending the road lines, the center point and outer contour lines of the virtual intersection are generated, which solves the problem of high manual modeling cost in the prior art, and realizes efficient and automatic generation of virtual intersections.

CN114419264BActive Publication Date: 2025-08-08NETEASE (HANGZHOU) NETWORK CO LTD
View PDF 2 Cites 0 Cited by

Patent Information

Application Number
CN202111629153.9
Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
Filing Date
2021-12-28
Publication Date
2025-08-08
Estimated Expiration
2041-12-28

AI Technical Summary

Technical Problem

The existing technology is costly when building virtual intersection models in three-dimensional space, and mainly relies on manual modeling, resulting in higher labor costs.

Method used

By obtaining the end points of the road line for clustering, the center point of the virtual intersection is generated, and the road line is extended at the center point to generate some outer contour lines, and finally forming a closed virtual intersection model.

Benefits of technology

It realizes automatic generation of virtual intersections in three-dimensional space, reducing labor costs and improving efficiency.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN114419264B_ABST
    Figure CN114419264B_ABST
Patent Text Reader

Abstract

The present disclosure provides a method, device, electronic device, and storage medium for generating a virtual intersection. The method comprises: obtaining a plurality of road lines representing roads; clustering the endpoints of the road lines to obtain an endpoint set, fusing the endpoints belonging to the same endpoint set into one endpoint as the center point of the virtual intersection, and extending the road lines containing the endpoints belonging to the same endpoint set to the center point to obtain extended road lines; generating partial outer contour lines of the virtual intersection between adjacent extended road lines connected to the same center point, and connecting the partial outer contour lines to form a closed surface as the virtual intersection. By determining the intersections between different roads, the present disclosure can automatically generate virtual intersections in three-dimensional space, eliminating the need for manual modeling, thereby reducing costs and improving efficiency.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present disclosure relates to the field of computer animation technology, and in particular to a method, device, electronic device, and storage medium for generating a virtual intersection. Background Art

[0002] This section is intended to provide a background or context to the embodiments of the application that are recited in the claims. No statement herein is admitted to be prior art by virtue of its inclusion in this section.

[0003] In the field of computer animation, especially in the production of game scenes, roads are common elements in the scene. When multiple roads overlap, intersections are formed. Among them, constructing a model with intersections in three-dimensional space is a difficult point in road modeling.

[0004] In the prior art, when constructing a model of an intersection, an art engineer usually manually models it using 3D modeling software, which is very costly. Summary of the Invention

[0005] In view of this, the purpose of the present disclosure is to provide a method, device, electronic device and storage medium for generating a virtual intersection.

[0006] Based on the above objectives, an exemplary embodiment of the present disclosure provides a method for generating a virtual intersection, including:

[0007] Obtain a number of road lines representing roads;

[0008] Clustering the endpoints of the road lines to obtain an endpoint set, fusing the endpoints belonging to the same endpoint set into one endpoint as the center point of the virtual intersection, and extending the road lines where the endpoints belonging to the same endpoint set are located to the center point to obtain an extended road line;

[0009] Partial outer contour lines of the virtual intersection are generated between adjacent extended road lines connected to the same center point, and the partial outer contour lines are connected to form a closed surface as the virtual intersection.

[0010] In some exemplary embodiments, clustering the endpoints of the road lines to obtain an endpoint set specifically includes:

[0011] For any endpoint of the road line, other endpoints whose distances to the endpoint are less than a distance threshold are added to the same endpoint set as the endpoint.

[0012] In some exemplary embodiments, extending the road lines where the endpoints belonging to the same endpoint set are located to the center point to obtain the extended road lines specifically includes:

[0013] A reference cylinder is generated at the center point, an intersection point between the road line and a surface of the reference cylinder is determined, and the intersection point and the center point are connected to obtain the extended road line.

[0014] In some exemplary embodiments, for any endpoint of the road line, adding other endpoints whose distances to the endpoint are less than a distance threshold to the endpoint and the endpoint to the same endpoint set specifically includes:

[0015] Taking any endpoint of the road line as an initial endpoint, calculating the distance between the initial endpoint and the endpoints of other road lines, and adding the endpoints whose distance to the initial endpoint is less than a distance threshold and the initial endpoint to a set of standby endpoints;

[0016] Calculate the distances between other backup endpoints in the backup endpoint set except the initial endpoint and the endpoints of the other road lines respectively, and add the endpoints whose distances to the other backup endpoints are less than a distance threshold to the backup endpoint set; repeat the above operation until there are no endpoints whose distances to the backup endpoint in the backup endpoint set are less than the distance threshold, and use the backup endpoint set as the endpoint set.

[0017] In some exemplary embodiments, after connecting the intersection point and the center point, the method further includes:

[0018] subdividing the line connecting the intersection point and the center point into a broken line including a plurality of line segments as the subdivided line connecting the intersection point and the center point;

[0019] The subdivided line connecting the intersection point and the center point is projected onto the road line to obtain a projected line connecting the intersection point and the center point.

[0020] In some exemplary embodiments, generating a partial outer contour line of the virtual intersection between adjacent extended road lines connected to the same center point specifically includes:

[0021] A partial outer contour line of the intersection is generated according to adjacent lines connecting the intersection points and the center point.

[0022] In some exemplary embodiments, generating a partial outer contour line of the intersection according to adjacent lines connecting the intersection points and the center point specifically includes:

[0023] The middle point of the partial outer contour line is generated according to the line segment close to the center point in the line connecting the intersection point and the center point after the adjacent projection, and the endpoints of the partial outer contour line are generated according to the line segment far from the center point in the line connecting the intersection point and the center point after the adjacent projection. The middle point of the partial outer contour line and the endpoints of the partial outer contour line are connected to obtain the partial outer contour line.

[0024] In some exemplary embodiments, generating the middle point of the partial outer contour line according to a line segment close to the center point in a line connecting the intersection point and the center point after adjacent projection specifically includes:

[0025] Based on the preset width of the virtual intersection, the middle point of the partial outer contour line is generated on the midline of the angle between the line segments close to the center point in the adjacent projected lines connecting the intersection point and the center point.

[0026] In some exemplary embodiments, generating the endpoints of the partial outer contour lines based on line segments away from the center point in the line connecting the intersection point and the center point after adjacent projection specifically includes:

[0027] Based on a preset width of the road, endpoints of the partial outer contour lines are generated in a perpendicular direction of a line segment away from the center point in the line connecting the intersection point and the center point after the projection.

[0028] In some exemplary embodiments, connecting the portions of the outer contour lines to form a closed surface as the virtual intersection specifically includes:

[0029] For the partial outer contour lines, curve subdivision is performed based on a preset curvature to obtain the partial outer contour lines after curve subdivision.

[0030] In some exemplary embodiments, after connecting the portions of the outer contour lines to form a closed surface as the virtual intersection, the method further includes:

[0031] The endpoints of the line segments in the line connecting the intersection point and the center point after the subdivision and the endpoints of the line segments in the partial outer contour line after the subdivision of the curve are connected to form a topological structure.

[0032] In some exemplary embodiments, after forming a topological structure by connecting the endpoints of the line segments in the line connecting the intersection point and the center point after the subdivision and the endpoints of the line segments in the partial outer contour line after the subdivision of the curve, the method further includes:

[0033] For an internal endpoint of the topological structure, the endpoint is moved to a central position between two adjacent endpoints.

[0034] In some exemplary embodiments, obtaining a plurality of road lines representing roads specifically includes:

[0035] The road line is a broken line including a plurality of line segments.

[0036] Based on the same inventive concept, the exemplary embodiment of the present disclosure further provides a virtual intersection generating device, comprising:

[0037] A road line acquisition module is configured to acquire a plurality of road lines representing roads;

[0038] a road line clustering module configured to cluster the endpoints of the road lines to obtain an endpoint set, merge the endpoints belonging to the same endpoint set into one endpoint as the center point of the virtual intersection, and extend the road lines where the endpoints belonging to the same endpoint set are located to the center point to obtain an extended road line;

[0039] The intersection generation module is configured to generate partial outer contour lines of the virtual intersection between adjacent extended road lines connected to the same center point, and connect the partial outer contour lines to form a closed surface as the virtual intersection.

[0040] Based on the same inventive concept, an exemplary embodiment of the present disclosure further provides an electronic device, including a memory, a processor, and a computer program stored in the memory and executable on the processor, wherein the processor implements any of the above methods when executing the program.

[0041] Based on the same inventive concept, an exemplary embodiment of the present disclosure further provides a non-transitory computer-readable storage medium, wherein the non-transitory computer-readable storage medium stores computer instructions, and the computer instructions are used to enable a computer to execute any of the above methods.

[0042] As can be seen from the above, the virtual intersection generation method, device, electronic device and storage medium provided by the embodiments of the present disclosure include: obtaining a number of road lines representing roads; clustering the endpoints of the road lines to obtain an endpoint set, fusing the endpoints belonging to the same endpoint set into one endpoint as the center point of the virtual intersection, and extending the road lines where the endpoints belonging to the same endpoint set are located to the center point to obtain extended road lines; generating partial outer contour lines of the virtual intersection between adjacent extended road lines connected to the same center point, and connecting the partial outer contour lines to form a closed surface as the virtual intersection. By determining the intersections between different roads, the present disclosure can automatically generate virtual intersections in three-dimensional space without the need for manual modeling, thereby reducing labor costs and improving efficiency. BRIEF DESCRIPTION OF THE DRAWINGS

[0043] In order to more clearly illustrate the technical solutions in the present disclosure or related technologies, the following briefly introduces the drawings required for use in the embodiments or related technical descriptions. Obviously, the drawings described below are only embodiments of the present disclosure. For ordinary technicians in this field, other drawings can be obtained based on these drawings without paying any creative work.

[0044] Figure 1 A schematic diagram of an application scenario provided according to an embodiment of the present disclosure;

[0045] Figure 2 A schematic diagram of a flow chart of a method for generating a virtual intersection according to an embodiment of the present disclosure;

[0046] Figure 3 This is a first schematic diagram of a road line provided according to an embodiment of the present disclosure;

[0047] Figure 4 This is a second schematic diagram of road lines provided according to an embodiment of the present disclosure;

[0048] Figure 5 A schematic diagram of an endpoint set provided according to an embodiment of the present disclosure;

[0049] Figure 6 A schematic diagram of a center point of a virtual intersection provided according to an embodiment of the present disclosure;

[0050] Figure 7 A schematic diagram of a reference cylinder provided according to an embodiment of the present disclosure;

[0051] Figure 8 A schematic diagram of the intersection of a road line and a reference cylindrical surface provided according to an embodiment of the present disclosure;

[0052] Figure 9 A schematic diagram of a line connecting an intersection point and a center point according to an embodiment of the present disclosure;

[0053] Figure 10 A schematic diagram of lines connecting intersection points and center points after subdivision according to an embodiment of the present disclosure;

[0054] Figure 11 A schematic diagram of a line connecting an intersection point and a center point after projection according to an embodiment of the present disclosure;

[0055] Figure 12 A schematic diagram of lines connecting adjacent intersection points and a center point according to an embodiment of the present disclosure;

[0056] Figure 13A schematic diagram of a portion of outer contour lines provided according to an embodiment of the present disclosure;

[0057] Figure 14 A schematic diagram of a portion of the outer contour lines after subdivision according to an embodiment of the present disclosure;

[0058] Figure 15 A schematic diagram of a partial topological structure provided according to an embodiment of the present disclosure;

[0059] Figure 16 A schematic diagram of a topological structure provided according to an embodiment of the present disclosure;

[0060] Figure 17 A schematic diagram of an internal endpoint of a topology structure provided according to an embodiment of the present disclosure;

[0061] Figure 18 A schematic diagram of a smoothed topological structure provided according to an embodiment of the present disclosure;

[0062] Figure 19 A schematic diagram of a virtual intersection provided according to an embodiment of the present disclosure;

[0063] Figure 20 This is a first schematic diagram of a virtual road network with intersections provided according to an embodiment of the present disclosure;

[0064] Figure 21 This is a second schematic diagram of a virtual road network with intersections provided according to an embodiment of the present disclosure;

[0065] Figure 22 A schematic diagram of the structure of a virtual intersection generation device provided in an embodiment of the present disclosure;

[0066] Figure 23 A schematic diagram of an electronic device provided in accordance with an embodiment of the present disclosure. DETAILED DESCRIPTION

[0067] To make the objectives, technical solutions, and advantages of the present disclosure more clearly understood, the principles and spirit of the present application will be described below with reference to several exemplary embodiments. It should be understood that these embodiments are provided solely to enable those skilled in the art to better understand and implement the present disclosure, and are not intended to limit the scope of the present application in any way. On the contrary, these embodiments are provided to make the present disclosure more thorough and complete, and to fully convey the scope of the present disclosure to those skilled in the art.

[0068] According to an embodiment of the present disclosure, a method, device, electronic device, and storage medium for generating a virtual intersection are proposed.

[0069] It should be understood herein that any number of elements in the drawings is for illustration only and not for limitation, and any naming is only for distinction and does not have any limiting meaning.

[0070] It should be noted that, unless otherwise defined, the technical terms or scientific terms used in the embodiments of the present disclosure should have the usual meanings understood by people with ordinary skills in the field to which the present disclosure belongs. The "first", "second" and similar words used in the embodiments of the present disclosure do not indicate any order, quantity or importance, but are only used to distinguish different components. "Include" or "comprise" and similar words mean that the elements or objects appearing before the word include the elements or objects listed after the word and their equivalents, without excluding other elements or objects. "Connect" or "connected" and similar words are not limited to physical or mechanical connections, but may include electrical connections, whether direct or indirect. "Up", "down", "left", "right" and the like are only used to indicate relative position relationships. When the absolute position of the described object changes, the relative position relationship may also change accordingly.

[0071] The principles and spirit of the present application are explained in detail below with reference to several representative implementations of the present application.

[0072] In related technologies, the cost of constructing a virtual intersection is relatively high.

[0073] The inventors of the present disclosure discovered that the reason for the high cost of constructing virtual intersections in the above-mentioned related technologies is that in a scene with multiple roads, when multiple roads overlap, an intersection will be formed. Constructing a model with an intersection in three-dimensional space is a difficulty in road modeling. When constructing a model of an intersection in the related technology, it is usually manually modeled by an art engineer using three-dimensional modeling software, that is, the points and lines are carefully adjusted in the three-dimensional software. Roads are common elements in the scene. When faced with a large number of intersections, the labor cost is high.

[0074] To address the above-mentioned issues, the present application provides a virtual intersection generation scheme, specifically comprising: obtaining a number of road lines representing roads; clustering the endpoints of the road lines to obtain an endpoint set, fusing the endpoints belonging to the same endpoint set into one endpoint as the center point of the virtual intersection, and extending the road lines containing the endpoints belonging to the same endpoint set to the center point to obtain extended road lines; generating partial outer contour lines of the virtual intersection between adjacent extended road lines connected to the same center point, and connecting the partial outer contour lines to form a closed surface as the virtual intersection. By determining the intersections between different roads, the present disclosure can automatically generate virtual intersections in three-dimensional space, eliminating the need for manual modeling and reducing labor costs.

[0075] After introducing the basic principles of the present application, various non-limiting implementation methods of the present application are described in detail below.

[0076] refer to Figure 1 , which is a schematic diagram of an application scenario of the virtual intersection generation method provided by an embodiment of the present disclosure. The application scenario includes a terminal device 101, a server 102 and a data storage system 103. Among them, the terminal device 101, the server 102 and the data storage system 103 can be connected through a wired or wireless communication network. The terminal device 101 includes but is not limited to a desktop computer, a mobile phone, a mobile computer, a tablet computer, a media player, a smart wearable device, a personal digital assistant (PDA) or other electronic devices that can realize the above functions. The server 102 and the data storage system 103 can be independent physical servers, or a server cluster or distributed system composed of multiple physical servers, or a cloud server that provides basic cloud computing services such as cloud services, cloud databases, cloud computing, cloud functions, cloud storage, network services, cloud communications, middleware services, domain name services, security services, CDN, and big data and artificial intelligence platforms.

[0077] The server 102 is used to provide a virtual intersection generation service to the user of the terminal device 101. The terminal device 101 is installed with a client that communicates with the server 102. The user can input a number of road lines through the client. After clicking the OK button, the client sends the road lines to the server 102. The server 102 generates a virtual intersection based on the road lines and sends the virtual intersection to the client. The client displays the virtual intersection to the user, and the user can apply the virtual intersection in project development.

[0078] The data storage system 103 is used to store data.

[0079] The following combination Figure 1 The virtual intersection generation scheme according to the exemplary embodiment of the present disclosure is described using an application scenario. It should be noted that the above application scenario is only provided to facilitate understanding of the spirit and principles of the present disclosure, and the embodiments of the present disclosure are not limited in this respect. On the contrary, the embodiments of the present disclosure can be applied to any applicable scenario.

[0080] refer to Figure 2 , which is a flow chart of the virtual intersection generation method provided by an embodiment of the present disclosure.

[0081] The virtual intersection generation method includes the following steps:

[0082] Step S210: Acquire a number of road lines representing roads.

[0083] refer to Figure 3 , which is a first schematic diagram of road lines provided according to an embodiment of the present disclosure. Curved, continuous lines are used to represent the ups and downs of roads in three-dimensional space, wherein a curved, continuous line represents a road. Figure 3 For example, there are five curved, continuous lines, representing Road 1, Road 2, Road 3, Road 4, and Road 5 respectively.

[0084] In some exemplary embodiments, the source of the road lines includes, but is not limited to, an existing database, data crawled from the internet, or data uploaded by a user when using a client. The data uploaded by a user when using a client may be road lines drawn by the user in three-dimensional space using the client.

[0085] refer to Figure 4 , which is a second schematic diagram of road lines provided according to an embodiment of the present disclosure.

[0086] In some exemplary embodiments, the road line is a polyline including several line segments.

[0087] like Figure 4 As shown in FIG, a polyline consisting of several line segments has the characteristics of being tortuous and continuous, and can be used to represent an undulating road in three-dimensional space. The more line segments a polyline contains, the richer its tortuous characteristics.

[0088] Step S220: Cluster the endpoints of the road lines to obtain an endpoint set, merge the endpoints belonging to the same endpoint set into one endpoint as the center point of the virtual intersection, and extend the road lines where the endpoints belonging to the same endpoint set are located to the center point to obtain extended road lines.

[0089] refer to Figure 5 , which is a schematic diagram of an endpoint set provided according to an embodiment of the present disclosure.

[0090] Road lines to which endpoints in the same endpoint set belong can be used to form an intersection.

[0091] In some exemplary embodiments, clustering the endpoints of road lines to obtain an endpoint set specifically includes:

[0092] For any endpoint of a road line, other endpoints whose distances to the endpoint are less than a distance threshold are added to the same endpoint set as the endpoint.

[0093] In some exemplary embodiments, for any endpoint of a road line, adding other endpoints whose distances to the endpoint are less than a distance threshold to the endpoint and the endpoint to the same endpoint set specifically includes:

[0094] Take any endpoint of a road line as the initial endpoint, calculate the distance between the initial endpoint and the endpoints of other road lines, and add the endpoints whose distance to the initial endpoint is less than the distance threshold to the backup endpoint set together with the initial endpoint;

[0095] Calculate the distances between the other backup endpoints in the backup endpoint set except the initial endpoint and the endpoints of other road lines respectively, and add the endpoints whose distances to other backup endpoints are less than the distance threshold to the backup endpoint set; repeat the above operation until there are no endpoints whose distances to the backup endpoints in the backup endpoint set are less than the distance threshold, and use the backup endpoint set as the endpoint set.

[0096] refer to Figure 6 , which is a schematic diagram of the center point of a virtual intersection provided according to an embodiment of the present disclosure.

[0097] By fusing endpoints in the same endpoint set into one endpoint as the center point of the virtual intersection, connections can be established between the road lines to which the endpoints in the same endpoint set respectively belong.

[0098] In some exemplary embodiments, extending the road lines where the endpoints belonging to the same endpoint set are located to the center point to obtain the extended road lines specifically includes:

[0099] A reference cylinder is generated at the center point, an intersection point between the road line and the surface of the reference cylinder is determined, and the intersection point and the center point are connected to obtain the extended road line.

[0100] refer to Figure 7 , which is a schematic diagram of a reference cylinder provided according to an embodiment of the present disclosure.

[0101] A reference cylinder is generated at the center point, which defines the scope of the intersection.

[0102] refer to Figure 8 , which is a schematic diagram of the intersection of a road line and a reference cylinder surface provided according to an embodiment of the present disclosure.

[0103] The intersection of the road line and the reference cylinder surface is the connection point between the road and the intersection.

[0104] refer to Figure 9 , which is a schematic diagram of lines connecting intersections and center points provided according to an embodiment of the present disclosure.

[0105] The intersection point of the road line with the surface of the reference cylinder is connected to the center point, and the line connecting the intersection point and the center point is used as the component of the road line within the scope of the cylinder.

[0106] In some exemplary embodiments, after connecting the intersection point and the center point, the method further includes:

[0107] Subdivide the line connecting the intersection point and the center point into a polyline including a plurality of line segments, and use the polylines as the subdivided lines connecting the intersection point and the center point;

[0108] The lines connecting the subdivided intersection points and the center points are projected onto the road lines to obtain the projected lines connecting the intersection points and the center points.

[0109] refer to Figure 10 , which is a schematic diagram of the lines connecting the intersection points and the center points after subdivision provided according to an embodiment of the present disclosure.

[0110] refer to Figure 11 , which is a schematic diagram of the lines connecting the intersection points and the center points after projection according to an embodiment of the present disclosure.

[0111] In this case, the road lines after extension are more closely matched with the road lines before extension.

[0112] Step S230: Generate partial outer contour lines of the intersection between adjacent extended road lines connected to the same center point, and connect the partial outer contour lines to form a closed surface as a virtual intersection.

[0113] In some exemplary embodiments, generating a partial outer contour line of an intersection between adjacent extended road lines connected to the same center point specifically includes:

[0114] Generate partial outer contour lines of the intersection based on the lines connecting adjacent intersection points and the center point.

[0115] refer to Figure 12 , which is a schematic diagram of lines connecting adjacent connecting intersections and a center point provided according to an embodiment of the present disclosure.

[0116] In some exemplary embodiments, generating a partial outer contour line of the intersection according to the lines connecting adjacent intersection points and the center point specifically includes:

[0117] The middle point of the partial outer contour line is generated according to the line segment close to the center point in the line connecting the adjacent intersection points after projection and the center point, the end point of the partial outer contour line is generated according to the line segment far from the center point in the line connecting the adjacent intersection points after projection and the center point, and the middle point of the partial outer contour line and the end point of the partial outer contour line are connected to obtain the partial outer contour line.

[0118] refer to Figure 13 , which is a schematic diagram of part of the outer contour lines provided according to an embodiment of the present disclosure.

[0119] In some exemplary embodiments, generating the middle point of a portion of the outer contour line according to a line segment close to the center point in a line connecting adjacent projected intersection points and the center point specifically includes:

[0120] Based on the preset width of the virtual intersection, the middle point of the partial outer contour line is generated on the midline of the angle between the line segments close to the center point in the lines connecting the adjacent projected intersection points and the center point.

[0121] In some exemplary embodiments, generating endpoints of a portion of the outer contour lines based on line segments away from the center point in lines connecting adjacent projected intersection points and the center point specifically includes:

[0122] Based on the preset width of the road, the endpoints of some outer contour lines are generated in the perpendicular direction of the line segment away from the center point in the line connecting the intersection point and the center point after projection.

[0123] refer to Figure 14 , which is a schematic diagram of a portion of the outer contour lines after subdivision provided according to an embodiment of the present disclosure.

[0124] In some exemplary embodiments, connecting portions of outer contour lines to form a virtual intersection specifically includes:

[0125] For some outer contour lines, curve subdivision is performed based on a preset radian to obtain some outer contour lines after curve subdivision.

[0126] Perform curve subdivision on some outer contour lines to make the effect of some outer contour lines more natural.

[0127] refer to Figure 15 , which is a schematic diagram of a partial topological structure provided according to an embodiment of the present disclosure.

[0128] In some exemplary embodiments, after connecting some outer contour lines to form a virtual intersection, the method further includes:

[0129] The endpoints of the line segments in the line connecting the intersection point and the center point after the subdivision and the endpoints of the line segments in the partial outer contour line after the curve subdivision are connected to form a topological structure.

[0130] refer to Figure 16 , which is a schematic diagram of a topological structure provided according to an embodiment of the present disclosure.

[0131] Complete the topology of all line covers, endpoint intersections.

[0132] In some exemplary embodiments, after forming a topological structure by connecting the endpoints of the line segments in the line connecting the intersection point and the center point after subdivision and the endpoints of the line segments in the partial outer contour line after subdivision of the curve, the method further includes:

[0133] For an internal endpoint of the topology structure, the endpoint is moved to the center between the two adjacent endpoints.

[0134] refer to Figure 17 , which is a schematic diagram of the internal endpoints of the topology structure provided according to an embodiment of the present disclosure.

[0135] refer to Figure 18 , which is a schematic diagram of the smoothed topological structure provided according to an embodiment of the present disclosure.

[0136] For an internal endpoint of a topological structure, the endpoint is moved to the center position between two adjacent endpoints. This operation is essentially a smoothing operation on the internal endpoint of the topological structure, and through iteration, the topological structure is made more smooth.

[0137] refer to Figure 19 , which is a schematic diagram of a virtual intersection provided according to an embodiment of the present disclosure.

[0138] According to the obtained road lines, a number of endpoint sets are constructed, and the above-mentioned virtual intersection generation operation is performed on each endpoint set to obtain a number of virtual intersections.

[0139] refer to Figure 20 , which is a first schematic diagram of a virtual road network with intersections provided according to an embodiment of the present disclosure.

[0140] By combining virtual intersections with virtual roads, road lines can be given a width that matches the size of the intersection, thus obtaining a virtual road network with intersections.

[0141] refer to Figure 21 , which is a second schematic diagram of a virtual road network with intersections provided according to an embodiment of the present disclosure.

[0142] By hiding the topological structure lines, we can see that the transition at the intersection is more natural and has an undulating visual effect.

[0143] As can be seen from the above, the virtual intersection generation method provided by the embodiment of the present disclosure includes: obtaining a number of road lines representing roads; clustering the endpoints of the road lines to obtain an endpoint set, fusing the endpoints belonging to the same endpoint set into one endpoint as the center point of the virtual intersection, and extending the road lines where the endpoints belonging to the same endpoint set are located to the center point to obtain extended road lines; generating partial outer contour lines of the virtual intersection between adjacent extended road lines connected to the same center point, and connecting the partial outer contour lines to form a closed surface as the virtual intersection. By determining the intersections between different roads, the present disclosure can automatically generate virtual intersections in three-dimensional space without the need for manual modeling, thereby reducing labor costs and improving efficiency.

[0144] The present invention can automatically generate virtual intersections and road networks with height differences and undulations at intersections, and has a sense of reality and credibility. Furthermore, the present invention can generate the topological structure of virtual intersections and road networks, which is convenient for subsequent applications of virtual intersections and road networks.

[0145] It should be noted that the method of the embodiments of the present disclosure can be performed by a single device, such as a computer or server. The method of the embodiments of the present disclosure can also be applied in a distributed scenario, where multiple devices cooperate to perform the method. In such a distributed scenario, one of the multiple devices may only perform one or more steps of the method of the embodiments of the present disclosure, and the multiple devices will interact with each other to complete the method.

[0146] It should be noted that the above description is limited to some embodiments of the present disclosure. Other embodiments are within the scope of the appended claims. In some cases, the actions or steps recited in the claims may be performed in an order different from that described in the above embodiments and still achieve the desired results. Furthermore, the processes depicted in the accompanying drawings do not necessarily require the specific order or sequential order shown to achieve the desired results. In certain embodiments, multitasking and parallel processing are also possible or may be advantageous.

[0147] Based on the same inventive concept, corresponding to any of the above-mentioned embodiments and methods, the present disclosure further provides a virtual intersection generation device.

[0148] refer to Figure 22 , the virtual intersection generating device comprises:

[0149] The road line acquisition module 2210 is configured to acquire a number of road lines representing roads.

[0150] The road line clustering module 2220 is configured to cluster the endpoints of the road lines to obtain an endpoint set, merge the endpoints belonging to the same endpoint set into one endpoint as the center point of the virtual intersection, and extend the road lines where the endpoints belonging to the same endpoint set are located to the center point to obtain the extended road lines.

[0151] The intersection generation module 2230 is configured to generate partial outer contour lines of a virtual intersection between adjacent extended road lines connected to the same center point, and connect the partial outer contour lines to form a closed surface as the virtual intersection.

[0152] In some exemplary embodiments, the road line clustering module 2220 is specifically configured to:

[0153] For any endpoint of a road line, other endpoints whose distances to the endpoint are less than a distance threshold are added to the same endpoint set as the endpoint.

[0154] In some exemplary embodiments, the road line clustering module 2220 is specifically configured to:

[0155] A reference cylinder is generated at the center point, an intersection point between the road line and the surface of the reference cylinder is determined, and the intersection point and the center point are connected to obtain the extended road line.

[0156] In some exemplary embodiments, the road line clustering module 2220 is specifically configured to:

[0157] Take any endpoint of a road line as the initial endpoint, calculate the distance between the initial endpoint and the endpoints of other road lines, and add the endpoints whose distance to the initial endpoint is less than the distance threshold to the backup endpoint set together with the initial endpoint;

[0158] Calculate the distances between the other backup endpoints in the backup endpoint set except the initial endpoint and the endpoints of other road lines respectively, and add the endpoints whose distances to other backup endpoints are less than the distance threshold to the backup endpoint set; repeat the above operation until there are no endpoints whose distances to the backup endpoints in the backup endpoint set are less than the distance threshold, and use the backup endpoint set as the endpoint set.

[0159] In some exemplary embodiments, the road line clustering module 2220 is specifically configured to:

[0160] Subdivide the line connecting the intersection point and the center point into a polyline including a plurality of line segments, and use the polylines as the subdivided lines connecting the intersection point and the center point;

[0161] The lines connecting the subdivided intersection points and the center points are projected onto the road lines to obtain the projected lines connecting the intersection points and the center points.

[0162] In some exemplary embodiments, the intersection generation module 2230 is specifically configured to:

[0163] Generate partial outer contour lines of the intersection based on the lines connecting adjacent intersection points and the center point.

[0164] In some exemplary embodiments, the intersection generation module 2230 is specifically configured to:

[0165] The middle point of the partial outer contour line is generated according to the line segment close to the center point in the line connecting the adjacent intersection points after projection and the center point, the end point of the partial outer contour line is generated according to the line segment far from the center point in the line connecting the adjacent intersection points after projection and the center point, and the middle point of the partial outer contour line and the end point of the partial outer contour line are connected to obtain the partial outer contour line.

[0166] In some exemplary embodiments, the intersection generation module 2230 is specifically configured to:

[0167] Based on the preset width of the virtual intersection, the middle point of the partial outer contour line is generated on the midline of the angle between the line segments close to the center point in the lines connecting the adjacent projected intersection points and the center point.

[0168] In some exemplary embodiments, the intersection generation module 2230 is specifically configured to:

[0169] Based on the preset width of the road, the endpoints of some outer contour lines are generated in the perpendicular direction of the line segment away from the center point in the line connecting the intersection point and the center point after projection.

[0170] In some exemplary embodiments, the intersection generation module 2230 is specifically configured to:

[0171] For some outer contour lines, curve subdivision is performed based on a preset radian to obtain some outer contour lines after curve subdivision.

[0172] In some exemplary embodiments, the intersection generation module 2230 is specifically configured to:

[0173] The endpoints of the line segments in the line connecting the intersection point and the center point after the subdivision and the endpoints of the line segments in the partial outer contour line after the curve subdivision are connected to form a topological structure.

[0174] In some exemplary embodiments, the intersection generation module 2230 is specifically configured to:

[0175] For an internal endpoint of the topology structure, the endpoint is moved to the center between the two adjacent endpoints.

[0176] For the convenience of description, the above devices are described as being functionally divided into various modules. Of course, when implementing the present disclosure, the functions of each module can be implemented in the same or multiple software and / or hardware.

[0177] The apparatus of the above embodiment is used to implement the corresponding virtual intersection generation method in any of the above embodiments, and has the beneficial effects of the corresponding method embodiment, which will not be described in detail here.

[0178] Based on the same inventive concept, corresponding to any of the above-mentioned embodiments and methods, the present disclosure also provides an electronic device, including a memory, a processor, and a computer program stored in the memory and executable on the processor, wherein when the processor executes the program, the virtual intersection generation method described in any of the above embodiments is implemented.

[0179] Figure 23 A more specific hardware structure diagram of an electronic device provided in this embodiment is shown. The device may include: a processor 2310, a memory 2320, an input / output interface 2330, a communication interface 2340, and a bus 2350. The processor 2310, the memory 2320, the input / output interface 2330, and the communication interface 2340 are connected to each other within the device via the bus 2350.

[0180] The processor 2310 can be implemented using a general-purpose CPU (Central Processing Unit), a microprocessor, an application-specific integrated circuit (ASIC), or one or more integrated circuits, and is used to execute relevant programs to implement the technical solutions provided in the embodiments of this specification.

[0181] The memory 2320 can be implemented in the form of ROM (Read Only Memory), RAM (Random Access Memory), static storage devices, dynamic storage devices, etc. The memory 2320 can store an operating system and other application programs. When the technical solutions provided in the embodiments of this specification are implemented through software or firmware, the relevant program code is stored in the memory 2320 and is called and executed by the processor 2310.

[0182] The input / output interface 2330 is used to connect an input / output module to implement information input and output. The input / output module can be configured as a component in the device (not shown in the figure) or can be externally connected to the device to provide corresponding functions. Input devices may include a keyboard, mouse, touch screen, microphone, various sensors, etc., and output devices may include a display, speaker, vibrator, indicator light, etc.

[0183] The communication interface 2340 is used to connect to a communication module (not shown) to enable communication between the device and other devices. The communication module can communicate via a wired method (such as USB, network cable, etc.) or a wireless method (such as mobile network, WiFi, Bluetooth, etc.).

[0184] The bus 2350 comprises a pathway for transmitting information between the various components of the device (eg, the processor 2310 , the memory 2320 , the input / output interface 2330 , and the communication interface 2340 ).

[0185] It should be noted that although the above device only shows the processor 2310, the memory 2320, the input / output interface 2330, the communication interface 2340, and the bus 2350, in a specific implementation, the device may also include other components necessary for normal operation. In addition, it will be understood by those skilled in the art that the above device may only include the components necessary to implement the embodiments of this specification, and does not necessarily include all the components shown in the figure.

[0186] The electronic device of the above embodiment is used to implement the corresponding virtual intersection generation method in any of the above embodiments, and has the beneficial effects of the corresponding method embodiment, which will not be repeated here.

[0187] Based on the same inventive concept, corresponding to any of the above-mentioned embodiment methods, the present disclosure also provides a non-transitory computer-readable storage medium, which stores computer instructions, and the computer instructions are used to enable the computer to execute the virtual intersection generation method described in any of the above embodiments.

[0188] The above-mentioned non-transitory computer-readable storage medium can be any available medium or data storage device that can be accessed by a computer, including but not limited to magnetic storage (such as floppy disks, hard disks, magnetic tapes, magneto-optical disks (MO)), optical storage (such as CDs, DVDs, BDs, HVDs, etc.), and semiconductor storage (such as ROMs, EPROMs, EEPROMs, non-volatile memories (NAND FLASH), solid-state drives (SSDs)), etc.

[0189] The computer instructions stored in the storage medium of the above embodiment are used to enable the computer to execute the virtual intersection generation method described in any embodiment in the above exemplary method part, and have the beneficial effects of the corresponding method embodiment, which will not be repeated here.

[0190] Those skilled in the art will appreciate that embodiments of the present invention may be implemented as a system, method, or computer program product. Therefore, the present disclosure may be implemented in the following forms: entirely in hardware, entirely in software (including firmware, resident software, microcode, etc.), or in a combination of hardware and software, generally referred to herein as a "circuit," "module," or "system." Furthermore, in some embodiments, the present invention may also be implemented in the form of a computer program product in one or more computer-readable media containing computer-readable program code.

[0191] Any combination of one or more computer-readable media can be used. A computer-readable medium can be a computer-readable signal medium or a computer-readable storage medium. A computer-readable storage medium can be, for example, but not limited to, an electrical, magnetic, optical, electromagnetic, infrared, or semiconductor system, device or component, or any combination thereof. More specific examples (non-exhaustive examples) of computer-readable storage media can include, for example: an electrical connection with one or more wires, a portable computer disk, a hard disk, a random access memory (RAM), a read-only memory (ROM), an erasable programmable read-only memory (EPROM or flash memory), an optical fiber, a portable compact disk read-only memory (CD-ROM), an optical storage device, a magnetic storage device, or any suitable combination thereof. In this document, a computer-readable storage medium can be any tangible medium containing or storing a program that can be used by or in combination with an instruction execution system, device or device.

[0192] A computer-readable signal medium may include a data signal propagated in baseband or as part of a carrier wave, which carries computer-readable program code. Such propagated data signals may take various forms, including but not limited to electromagnetic signals, optical signals, or any suitable combination thereof. A computer-readable signal medium may also be any computer-readable medium other than a computer-readable storage medium that can transmit, propagate, or transport a program for use by or in conjunction with an instruction execution system, apparatus, or device.

[0193] Program code embodied on a computer readable medium may be transmitted using any appropriate medium, including but not limited to wireless, wireline, optical fiber cable, RF, etc., or any suitable combination of the foregoing.

[0194] The computer program code for performing the operations of the present invention can be written in one or more programming languages, or a combination thereof, including object-oriented programming languages such as Java, Smalltalk, C++, and conventional procedural programming languages such as "C" or similar programming languages. The program code can be executed entirely on the user's computer, partially on the user's computer, as a stand-alone software package, partially on the user's computer and partially on a remote computer, or entirely on a remote computer or server. In cases involving a remote computer, the remote computer can be connected to the user's computer through any type of network, including a local area network (LAN) or a wide area network (WAN), or can be connected to an external computer (e.g., through the Internet using an Internet service provider).

[0195] It should be understood that each block in the flowchart and / or block diagram, and combinations of blocks in the flowchart and / or block diagram, can be implemented by computer program instructions. These computer program instructions can be provided to a processor of a general-purpose computer, a special-purpose computer, or other programmable data processing device to produce a machine. These computer program instructions are executed by the computer or other programmable data processing device to produce a device that implements the functions / operations specified in the blocks in the flowchart and / or block diagram.

[0196] These computer program instructions can also be stored in a computer-readable medium that enables a computer or other programmable data processing device to operate in a specific manner. In this way, the instructions stored in the computer-readable medium produce a product that includes an instruction device that implements the functions / operations specified in the blocks in the flowchart and / or block diagram.

[0197] Computer program instructions may also be loaded onto a computer, other programmable data processing apparatus, or other device so that a series of operational steps are performed on the computer, other programmable data processing apparatus, or other device to produce a computer-implemented process, such that the instructions executed on the computer or other programmable apparatus provide a process that implements the functions / operations specified in the blocks in the flowchart and / or block diagram.

[0198] Furthermore, although the operations of the present method are described in a particular order in the accompanying drawings, this does not require or imply that the operations must be performed in that particular order, or that all of the operations shown must be performed to achieve the desired results. Rather, the steps depicted in the flowcharts may be performed in a different order. Additionally or alternatively, certain steps may be omitted, multiple steps may be combined into a single step, and / or a single step may be broken down into multiple steps.

[0199] The use of the verbs "comprise", "include" and their conjugations in the application documents does not exclude the presence of elements or steps other than those stated in the application documents. The article "a" or "an" preceding an element does not exclude the presence of a plurality of such elements.

[0200] Although the spirit and principles of the present invention have been described with reference to several specific embodiments, it should be understood that the present invention is not limited to the specific embodiments disclosed, and the division into various aspects does not mean that the features of these aspects cannot be combined to benefit. Such division is merely for the convenience of expression. The present invention is intended to cover various modifications and equivalent arrangements included within the spirit and scope of the appended claims. The scope of the appended claims is to be accorded the broadest interpretation so as to encompass all such modifications and equivalent structures and functions.

Claims

1. A method for generating a virtual intersection, comprising: Obtain a number of road lines representing roads; Taking any endpoint of the road line as an initial endpoint, calculating the distance between the initial endpoint and the endpoints of the other road lines, adding the endpoint whose distance to the initial endpoint is less than a distance threshold and the initial endpoint to a set of standby endpoints, respectively calculating the distance between other standby endpoints in the set of standby endpoints other than the initial endpoint and the endpoints of the other road lines, and adding the endpoint whose distance to the other standby endpoints is less than the distance threshold to the set of standby endpoints; Repeat the above operation until no endpoint exists whose distance from the backup endpoint in the backup endpoint set is less than the distance threshold, taking the backup endpoint set as the endpoint set, merging the endpoints belonging to the same endpoint set into one endpoint as the center point of the virtual intersection, and extending the road lines on which the endpoints belonging to the same endpoint set are located to the center point to obtain the extended road lines; Partial outer contour lines of the virtual intersection are generated between adjacent extended road lines connected to the same center point, and the partial outer contour lines are connected to form a closed surface as the virtual intersection.

2. The method according to claim 1, wherein The step of extending the road lines where the endpoints belonging to the same endpoint set are located to the center point to obtain the extended road lines specifically includes: A reference cylinder is generated at the center point, an intersection point between the road line and a surface of the reference cylinder is determined, and the intersection point and the center point are connected to obtain the extended road line.

3. The method according to claim 2, wherein: After connecting the intersection point and the center point, the method further includes: subdividing the line connecting the intersection point and the center point into a broken line including a plurality of line segments as the subdivided line connecting the intersection point and the center point; The subdivided line connecting the intersection point and the center point is projected onto the road line to obtain a projected line connecting the intersection point and the center point.

4. The method according to claim 3, wherein: Generating a portion of the outer contour line of the virtual intersection between adjacent extended road lines connected to the same center point specifically includes: A partial outer contour line of the intersection is generated according to adjacent lines connecting the intersection points and the center point.

5. The method according to claim 4, wherein Generating a portion of the outer contour line of the intersection according to adjacent lines connecting the intersection points and the center point specifically includes: The middle point of the partial outer contour line is generated according to the line segment close to the center point in the line connecting the intersection point and the center point after the adjacent projection, and the endpoints of the partial outer contour line are generated according to the line segment far from the center point in the line connecting the intersection point and the center point after the adjacent projection. The middle point of the partial outer contour line and the endpoints of the partial outer contour line are connected to obtain the partial outer contour line.

6. The method according to claim 5, wherein: Generating the middle point of the partial outer contour line according to the line segment close to the center point in the line connecting the adjacent projected intersection point and the center point specifically includes: Based on the preset width of the virtual intersection, the middle point of the partial outer contour line is generated on the midline of the angle between the line segments close to the center point in the adjacent projected lines connecting the intersection point and the center point.

7. The method according to claim 5, wherein: Generating the endpoints of the partial outer contour lines based on the line segments away from the center point in the line connecting the adjacent projected intersection points and the center point specifically includes: Based on a preset width of the road, endpoints of the partial outer contour lines are generated in a perpendicular direction of a line segment away from the center point in the line connecting the intersection point and the center point after the projection.

8. The method according to claim 3, wherein: The connecting of the parts of the outer contour lines to form a closed surface as the virtual intersection specifically includes: For the partial outer contour lines, curve subdivision is performed based on a preset curvature to obtain the partial outer contour lines after curve subdivision.

9. The method according to claim 8, wherein After connecting the parts of the outer contour lines to form a closed surface as the virtual intersection, the method further includes: The endpoints of the line segments in the line connecting the intersection point and the center point after the subdivision and the endpoints of the line segments in the partial outer contour line after the subdivision of the curve are connected to form a topological structure.

10. The method according to claim 9, wherein: After forming a topological structure by connecting the endpoints of the line segments in the line connecting the intersection point and the center point after the subdivision and the endpoints of the line segments in the partial outer contour line after the subdivision of the curve, the method further includes: For an internal endpoint of the topological structure, the endpoint is moved to a central position between two adjacent endpoints.

11. The method according to claim 1, wherein The obtaining of a plurality of road lines representing the roads specifically includes: The road line is a broken line including a plurality of line segments.

12. A virtual intersection generation device, comprising: A road line acquisition module is configured to acquire a plurality of road lines representing roads; a road line clustering module configured to take any endpoint of the road line as an initial endpoint, calculate the distance between the initial endpoint and the endpoints of the other road lines, add the endpoints whose distance from the initial endpoint is less than a distance threshold and the initial endpoint to a set of standby endpoints, respectively calculate the distance between other standby endpoints in the set of standby endpoints other than the initial endpoint and the endpoints of the other road lines, and add the endpoints whose distance from the other standby endpoints is less than the distance threshold to the set of standby endpoints; Repeat the above operation until no endpoint exists whose distance from the backup endpoint in the backup endpoint set is less than the distance threshold, taking the backup endpoint set as the endpoint set, merging the endpoints belonging to the same endpoint set into one endpoint as the center point of the virtual intersection, and extending the road lines on which the endpoints belonging to the same endpoint set are located to the center point to obtain the extended road lines; The intersection generation module is configured to generate partial outer contour lines of the virtual intersection between adjacent extended road lines connected to the same center point, and connect the partial outer contour lines to form a closed surface as the virtual intersection.

13. An electronic device comprising a memory, a processor, and a computer program stored in the memory and executable on the processor, wherein the processor implements the method according to any one of claims 1 to 11 when executing the program. 14 . A non-transitory computer-readable storage medium storing computer instructions, wherein the computer instructions are configured to cause a computer to execute the method according to claim 1 .

Citation Information

Patent Citations

  • Modeling method and device of three-dimensional road intersection

    CN101930624A

  • Multi-surface mark fusion-based lane level locating method

    CN106778593A