Stylized map generation method, device and equipment and readable storage medium

By identifying and adjusting control points in the map to be converted, the problem of low efficiency in traditional stylized map generation is solved, and stylized maps adapted to the target scene are generated efficiently.

CN121007544AInactive Publication Date: 2025-11-25SHENYANG MXNAVI CO LTD
View PDF 6 Cites 0 Cited by

Patent Information

Application Number
CN202410654952.9
Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Filing Date
2024-05-24
Publication Date
2025-11-25
Estimated Expiration
Not applicable · inactive patent

AI Technical Summary

Technical Problem

Traditional techniques for generating stylized maps are inefficient and fail to meet the needs of different application scenarios.

Method used

By acquiring the line elements to be converted in the map to be converted, determining their control points, and adjusting the line elements to be converted based on the control points, a stylized map that meets the requirements of the target scene is generated.

Benefits of technology

It improves the efficiency and adaptability of stylized map generation, enabling the generated stylized maps to better meet the needs of the target scene.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN121007544A_ABST
    Figure CN121007544A_ABST
Patent Text Reader

Abstract

The invention relates to a stylized map generation method and device, equipment and a readable storage medium. The method comprises the following steps: acquiring to-be-converted map elements in a to-be-converted map; wherein the to-be-converted map elements comprise to-be-converted line elements; determining at least two control points in the to-be-converted line element according to the line type of the to-be-converted line element; and according to the at least two control points, adjusting the to-be-converted line element so as to convert the to-be-converted map into a stylized map meeting the requirements of the target scene. By adopting the method, the stylized map adaptive to different application scenes can be automatically generated, and the generation efficiency of the stylized map is improved.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] This application relates to the field of geographic information technology, and in particular to a stylized map generation method, apparatus, device, and readable storage medium. Background Technology

[0002] With the development of geographic information technology, an increasing number of map types have emerged to facilitate users' understanding of geographic information. For example, map types can be categorized by geographical area (world maps, hemispherical maps, and national maps); by subject matter (natural maps, population maps, and cultural maps); and by application (educational maps, topographic maps, and astronomical maps). Different types of maps can be applied to different scenarios.

[0003] However, traditional techniques typically rely on manual methods to create different stylized maps during the map building phase, which is inefficient. Therefore, there is an urgent need for a method that can automatically generate stylized maps based on reference maps, thereby improving the efficiency of stylized map generation. Summary of the Invention

[0004] Therefore, it is necessary to provide a stylized map generation method, apparatus, device, and readable storage medium to address the aforementioned technical problems, which can automatically generate stylized maps adapted to different application scenarios and improve the efficiency of stylized map generation.

[0005] Firstly, this application provides a method for generating stylized maps, including:

[0006] Retrieve the map elements to be converted from the map to be converted; the map elements to be converted include the line elements to be converted.

[0007] Based on the line type of the line element to be converted, determine at least two control points in the line element to be converted;

[0008] Adjust the elements of the line to be transformed based on at least two control points to convert the map into a stylized map that meets the requirements of the target scene.

[0009] In one embodiment, if the line type of the line element to be converted is a zigzag line, then at least two control points in the line element to be converted are determined according to the line type of the line element to be converted, including: determining continuous zigzag line segments in the line element to be converted whose deviation is less than a preset amplitude threshold, and taking the endpoints corresponding to the determination results as control points in the line element to be converted.

[0010] In one embodiment, determining continuous deflection segments in the line element to be converted whose deviation is less than a preset threshold, and using the endpoints corresponding to the determination results as control points in the line element to be converted, includes: obtaining at least two deflection segments obtained by dividing the line element to be converted based on the deflection points in the line element to be converted; determining continuous deflection segments with smaller deviations based on the included angle between adjacent deflection segments; and using the endpoints corresponding to the continuous deflection segments as control points in the line element to be converted.

[0011] In one embodiment, if the line type of the line element to be converted is a corner line, then at least two control points in the line element to be converted are determined according to the line type of the line element to be converted, including: obtaining the reference point corresponding to the corner position in the line element to be converted; obtaining the reference distance corresponding to different corner extension directions under the target scene requirements; and taking the points in the line element to be converted that are at a preset distance from the reference point under different corner extension directions as control points in the line element to be converted.

[0012] In one embodiment, the line element to be converted is adjusted based on at least two control points, including: if the line type of the line element to be converted is a zigzag line, then the control points in the line element to be converted are connected according to the extension direction of the line element to be converted, so as to convert the line element to be converted into a stylized element that meets the requirements of the target scene; if the line type of the line element to be converted is a corner line, then the line element to be converted is curve-fitted based on the control points in the line element to be converted and the reference point corresponding to the corner position in the line element to be converted, so as to convert the line element to be converted into a stylized element that meets the requirements of the target scene.

[0013] In one embodiment, if the line element to be converted has height information, the method further includes: obtaining reference points located between different control points in the line element to be converted, and the reference height corresponding to each reference point; mapping each reference point to the adjusted line element to be converted according to the position distribution of each reference point in the line element to be converted, to obtain the mapping point of the corresponding reference point; and using the reference height corresponding to each reference point as the height information of the corresponding mapping point.

[0014] In one embodiment, if the line element to be converted is a deflection line, then obtaining reference points located between different control points in the line element to be converted includes: using deflection points located between different control points in the line element to be converted as reference points; correspondingly, mapping each reference point to the adjusted line element to be converted according to the position distribution of each reference point in the line element to be converted, to obtain the mapping point of the corresponding reference point, including: for any reference point in the adjusted continuous deflection line segment in the line element to be converted, using the proportion of the deflection line length between the reference point and the reference control point in the total length of the deflection line of the corresponding continuous deflection line segment as the mapping proportion of the reference point; wherein, the reference control point is one of the two control points in the corresponding continuous deflection line segment; and obtaining the corresponding mapping point of the reference point in the corresponding adjustment result of the continuous deflection line segment according to the mapping proportion and the reference control point.

[0015] Secondly, this application also provides a stylized map generation apparatus, comprising:

[0016] The acquisition module is used to acquire map elements to be converted from the map to be converted; among which, the map elements to be converted include line elements to be converted;

[0017] The determination module is used to determine at least two control points in the line element to be converted based on the line type of the line element to be converted;

[0018] The adjustment module is used to adjust the elements of the line to be transformed based on at least two control points, so as to transform the map to be transformed into a stylized map that meets the requirements of the target scene.

[0019] 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:

[0020] Retrieve the map elements to be converted from the map to be converted; the map elements to be converted include the line elements to be converted.

[0021] Based on the line type of the line element to be converted, determine at least two control points in the line element to be converted;

[0022] Adjust the elements of the line to be transformed based on at least two control points to convert the map into a stylized map that meets the requirements of the target scene.

[0023] 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:

[0024] Retrieve the map elements to be converted from the map to be converted; the map elements to be converted include the line elements to be converted.

[0025] Based on the line type of the line element to be converted, determine at least two control points in the line element to be converted;

[0026] Adjust the elements of the line to be transformed based on at least two control points to convert the map into a stylized map that meets the requirements of the target scene.

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

[0028] Retrieve the map elements to be converted from the map to be converted; the map elements to be converted include the line elements to be converted.

[0029] Based on the line type of the line element to be converted, determine at least two control points in the line element to be converted;

[0030] Adjust the elements of the line to be transformed based on at least two control points to convert the map into a stylized map that meets the requirements of the target scene.

[0031] The aforementioned stylized map generation method, apparatus, device, and readable storage medium, when there is a need for stylized map generation, acquire map elements to be converted from the map to be converted, and, if the map elements to be converted are line elements to be converted, determine at least two control points within the line elements to be converted. Then, based on these at least two control points, the line elements to be converted are adjusted, thereby converting the map to be converted into a stylized map that meets the requirements of the target scene. This technical solution, for the line elements to be converted in the map to be converted, only requires determining at least two control points during the adjustment process, making the adjustment process simpler and more convenient. It requires no additional data support and allows for on-demand adjustments to local areas to achieve overall style transformation, improving the efficiency of stylized map generation. During the adjustment of at least two control points within the line elements to be converted, the adjustment method corresponds to the requirements of the target scene, making the adjusted line elements to be converted more compatible with the target scene. This ensures that the final generated stylized map meets the requirements of the target scene, thus improving both the efficiency of stylized map generation and the adaptability of the stylized map to the target scene. Attached Figure Description

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

[0033] Figure 1 This is a flowchart illustrating a stylized map generation method in one embodiment;

[0034] Figure 2 This is a flowchart illustrating the process of determining control points in a line element to be converted in one embodiment.

[0035] Figure 3 This is a flowchart illustrating the process of determining control points in a line element to be converted in another embodiment.

[0036] Figure 4 This is a schematic diagram of a continuous deflection line in one embodiment;

[0037] Figure 5 This is a schematic diagram of a continuous deflection line in another embodiment;

[0038] Figure 6 This is a flowchart illustrating the process of determining control points in a line element to be converted in another embodiment.

[0039] Figure 7 This is a schematic diagram of the corner line in one embodiment;

[0040] Figure 8 This is a flowchart illustrating the process of adjusting the line element to be converted in one embodiment;

[0041] Figure 9 This is a schematic diagram of the adjusted continuous deflection line in one embodiment;

[0042] Figure 10 This is a schematic diagram of the adjusted corner line in one embodiment;

[0043] Figure 11 A flowchart illustrating the process of determining the height information of a mapping point in a given example;

[0044] Figure 12 This is a schematic diagram showing the position of the mapped points in the adjusted continuous deflection line in one embodiment;

[0045] Figure 13 This is a flowchart illustrating a stylized map generation method in another embodiment;

[0046] Figure 14 This is a structural block diagram of a stylized map generation device in one embodiment;

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

[0048] 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.

[0049] Before introducing the embodiments of this application, it should be noted that map types can be classified according to dimensions such as regional scope, subject matter, application, presentation format, and content. Classified by regional scope, maps can include world maps, hemispherical maps, continental maps, ocean maps, sea maps, national (regional) maps, provincial maps, and city / county maps, etc. Classified by subject matter, maps can include natural maps, population maps, economic maps, cultural maps, and historical maps, etc. Classified by application, maps can include reference maps, teaching maps, topographic maps, aeronautical charts, nautical charts, coastal charts, astronomical charts, transportation maps, and tourist maps, etc. Classified by presentation format, maps can include micromaps, digital maps, electronic maps, and impact maps, etc. Classified by map content, maps can include... Topographic maps and There are three types. Maps can be classified according to their dimension, such as two-dimensional maps (planar maps) and three-dimensional maps (stereoscopic maps). Although there are many types of maps currently available, stylized maps for different application scenarios (e.g., cartoon maps and fun maps specifically for children, and tourist maps specifically for tourism scenarios) still need to be manually constructed, which suffers from high construction costs, low efficiency, and low accuracy. Based on the shortcomings of manually generating stylized maps, this application provides a method for generating stylized maps that can improve the efficiency and accuracy of stylized map generation and enable the generated stylized maps to adapt to diverse map needs.

[0050] In one embodiment, such as Figure 1 As shown, a stylized map generation method is provided. This embodiment illustrates the method's application to a terminal. It is understood that this method can also be applied to a server, or to a system including both a terminal and a server, and implemented through interaction between the terminal and the server. In this embodiment, the method includes the following steps:

[0051] S110, retrieve the map elements to be converted from the map to be converted.

[0052] The map to be converted can be a common map type, such as a world map, hemispherical map, continental map, ocean map, etc. Maps can be categorized into national (regional) maps, provincial maps, and city / county maps, etc. The map to be converted can be a 2D map or a 3D map; there is no limitation on this. The map to be converted may include various map elements, such as ground elements, road elements, and vegetation elements. In this embodiment, all map elements in the map to be converted can be considered as map elements to be converted.

[0053] To facilitate the conversion of the map to be converted, in this embodiment, the map elements to be converted may include at least one of the following: point elements, line elements, and polygon elements. For example, point elements may include marked locations with fixed attributes on the map, such as canteens, gas stations, and supermarkets. Line elements may include roads of various levels, rail transit lines, waterways, tunnels, and area boundary lines. Polygon elements may include natural green space areas, public green space areas, building outlines, and outlines and areas for special purposes. It is understood that the number of elements contained in a given map to be converted is not unique.

[0054] There are many ways to obtain the map to be converted. In one optional implementation, the map to be converted can be pre-stored in a map library on a server. When there is a need to generate a stylized map, the corresponding map to be converted can be retrieved from this map library. In another optional implementation, the map to be converted can also be parsed from a stylized map generation request upon receipt. The sender of the stylized map generation request can be a user or another device; there is no limitation on this.

[0055] After obtaining the map to be converted, feature extraction can be performed on the map. For example, the map to be converted can be input into a pre-trained image feature extraction model to obtain the map elements to be converted.

[0056] It should be noted that the embodiments of this application do not impose any limitations on the construction method and training process of the image feature extraction model.

[0057] S120, determine at least two control points in the line element to be converted according to the line type of the line element to be converted.

[0058] The line elements to be converted can be of various types. For example, based on line attributes, they can include curve types, polyline types, and straight line types; based on line length, they can include long line types and short line types. Control points can be points in the line elements to be converted that can be used to adjust the line elements to be converted. For example, they can be at least two endpoints of each line segment in the line elements to be converted.

[0059] To facilitate adjustment of the line element to be converted, in this embodiment, the type of the line element to be converted may include a zigzag line and a corner line. A zigzag line can be a straight line that forms an angle with a horizontal line. For example, the zigzag line has a 20-degree angle with the horizontal line. A corner line can consist of at least two continuous straight lines, and the angle between the two intersecting lines meets a preset requirement. For example, the angle between the two straight lines in a corner line is less than or equal to 90 degrees.

[0060] In one optional implementation, after obtaining the map element to be converted, the type of the map element to be converted can be determined based on its element information. If the map element to be converted is a line element, the line type is determined based on the positional relationships between the line segments it contains; and at least two control points in the line element to be converted are determined based on the corresponding control point determination method.

[0061] For example, the control points for the line element to be converted of the zigzag line type can be determined as follows: if there is a continuous zigzag line composed of at least two zigzag lines, then the two endpoints of the continuous zigzag line are taken as its corresponding control points. The control points for the corner line can be determined as follows: points at preset positions on the corner line are taken as its corresponding control points. The preset positions can be determined based on human experience or according to the requirements of the target scenario, and are not limited thereto.

[0062] S130, based on at least two control points, adjust the elements of the line to be transformed to convert the map into a stylized map that meets the requirements of the target scene.

[0063] The target scenario requirements can be determined based on experience. For example, the target scenario can be a child's usage scenario, and the corresponding stylized map can be a fun map or a cartoon map, etc.

[0064] For example, this embodiment can divide the line elements to be converted into multiple elements, each element corresponding to at least two control points. In one optional implementation, for any element, a new line segment is obtained by fitting a line segment to its corresponding at least two control points, thereby adjusting the line elements to be converted. In another optional implementation, for any element, a new line segment can be obtained by connecting its corresponding at least two control points, thereby adjusting the line elements to be converted. After adjusting all the map elements to be converted, the conversion of the map to be converted is completed, resulting in a stylized map that meets the requirements of the target scene.

[0065] It should be noted that the method for adjusting the elements to be transformed can be determined based on the requirements of the target scenario.

[0066] In the aforementioned stylized map generation method, when there is a need for stylized map generation, the map elements to be converted are obtained from the map to be converted. If the map elements to be converted are line elements, at least two control points are determined within these line elements. Then, the line elements are adjusted based on these two control points, thereby converting the map to be converted into a stylized map that meets the requirements of the target scene. This technical solution, for the line elements to be converted in the map to be converted, only requires determining at least two control points during the adjustment process, making the adjustment process simpler and more convenient. It requires no additional data support and allows for local adjustments as needed to achieve overall style transformation, thus improving the efficiency of stylized map generation. The adjustment method used during the adjustment of at least two control points within the line elements to be converted corresponds to the requirements of the target scene, making the adjusted line elements more compatible with the target scene. This ensures that the final generated stylized map meets the requirements of the target scene, improving both the efficiency of stylized map generation and the adaptability of the stylized map to the target scene.

[0067] Based on the above embodiments, if the line type of the line element to be converted may include zigzag lines and angled lines, then in the process of determining at least two control points, in order to improve the adjustment effect of the line element to be converted, and thus improve the adaptability of the stylized map to the target scene, in one embodiment, different determination methods are needed to determine the control points for different line types. Specifically, such as... Figure 2 As shown, if the line type of the line element to be converted is a zigzag line, then determining at least two control points in the line element to be converted includes the following steps:

[0068] S210, determine the continuous deflection line segments in the line element to be converted whose deviation is less than the preset amplitude threshold, and take the endpoints corresponding to the determination results as control points in the line element to be converted.

[0069] The preset amplitude threshold can be used to determine the deflection line. This threshold can be determined based on human experience, through extensive experimentation, or according to the requirements of the target scenario; this application does not impose any limitations on this. A continuous deflection line segment can consist of at least two sequentially connected deflection lines. Among continuous deflection line segments with a deviation amplitude less than the preset amplitude threshold, if two deflection lines share a common endpoint, the angle between the extension of one deflection line and the other deflection line must meet a preset requirement, for example, an angle greater than 145 degrees.

[0070] For example, for all continuous deflection line segments, the deviation between the straight lines contained therein can be determined, and continuous deflection line segments with deviations less than a preset threshold (hereinafter referred to as target deflection lines) can be selected for subsequent processing. That is, the endpoints corresponding to the target deflection lines are used as control points in the line elements to be converted.

[0071] There are many ways to determine the target deflection line. In one alternative implementation, all continuous deflection line segments can be input into a pre-trained target deflection line extraction model, and the continuous deflection line output by the target deflection line extraction model can be used as the target deflection line.

[0072] Furthermore, after determining the target deflection line, the endpoints corresponding to the target deflection line can be used as control points in the elements to be converted.

[0073] It should be noted that the target deflection line extraction model in this embodiment can be constructed based on common neural meshes, which will not be elaborated here. Furthermore, during the training of the target deflection line extraction model, at least two sample deflection lines can be input into the model, and the model output can be compared with the sample label (i.e., the target deflection line among the at least two deflection lines). Based on the comparison result, the model is trained to improve its extraction accuracy.

[0074] Based on the above embodiments, and further, to make the methods for determining control points in the element to be converted more diverse, in one embodiment, when the line type of the line element to be converted is a zigzag line, a method for determining control points in the line element to be converted is also provided, such as... Figure 3 As shown, it includes the following steps:

[0075] S310, obtain at least two deflection segments obtained by dividing the line element to be converted based on the deflection point in the line element to be converted.

[0076] The deflection points can be all endpoints of the line element to be converted. It can be understood that since the line element to be converted can include multiple consecutive deflection segments, the deflection points can include the aforementioned control points. The deflection segments can be straight lines that make up the consecutive deflection segments.

[0077] For example, in this embodiment, endpoint identification can be performed on the line element to be converted, and all endpoints can be used as deflection points in the line element to be converted. Further, the line segment formed by two deflection points that are connected is used as a deflection segment, thereby determining at least two deflection segments corresponding to the element to be converted.

[0078] S320, determine the continuous deflection segments with smaller deviations based on the included angle between adjacent deflection segments.

[0079] Adjacent bends can be two bends that intersect. Continuous bends consist of at least one set of adjacent bends.

[0080] For example, a line consisting of at least two deflection lines can be used as a continuous deflection line segment. Then, for any continuous deflection line segment, the included angle between each group of adjacent deflection line segments is determined. Based on the relationship between each included angle and the first included angle threshold, it is determined whether the deviation of the continuous deflection line segment is small, that is, whether the continuous deflection line segment is the target deflection line.

[0081] In one optional implementation, for any continuous deflection line segment, if the included angles of all adjacent deflection line segments in the continuous deflection line segment exceed a first included angle threshold, then the continuous deflection line segment is determined to be the target deflection line. In another optional implementation, for any continuous deflection line segment, one of the adjacent deflection line segments can be extended along the intersection direction. If the included angles between the other adjacent deflection line segment and the extended line are all less than a second included angle threshold, then the continuous deflection line segment is determined to be the target deflection line. The values ​​of the first and second included angle thresholds can be determined based on human experience, through extensive experimentation, or based on the requirements of the target scenario; there are no limitations on these values. For example, the first and second included angle thresholds can be complementary angles; that is, if the first included angle threshold is 135 degrees, then the second included angle threshold is 45 degrees.

[0082] S330 uses the endpoints of the continuous deflection line segments as control points in the line element to be converted.

[0083] To facilitate understanding of this solution by those skilled in the art, combined with Figure 4 The first method for determining the target deflection line provided in this embodiment will be described. For example... Figure 4 As shown, deflection segments AB and BC form a pair of adjacent deflection segments. The angle ∠a between deflection segments AB and BC is greater than the first included angle threshold, therefore, the continuous deflection segment l1 is determined to be the target deflection line. Deflection segments DE and EF form a pair of adjacent deflection segments, and deflection segments EF and FG form a pair of adjacent deflection segments. The angle ∠b between deflection segments DE and EF, and the angle ∠c between deflection segments EF and FG, are both greater than the first included angle threshold, therefore, the continuous deflection segment l2 is determined to be the target deflection line. Deflection segments HI and IJ form a pair of adjacent deflection segments. The angle ∠d between deflection segments HI and IJ does not exceed the first included angle threshold, therefore, the continuous deflection segment l3 is determined not to be the target deflection line.

[0084] Among them, the control points corresponding to the target deflection line l1 are points A and C; the control points corresponding to the target deflection line l2 are points D and G.

[0085] To facilitate understanding of this solution by those skilled in the art, combined with Figure 5 The second method for determining the target deflection line provided in this embodiment will be described. For example... Figure 5 As shown, deflection segments AB and BC form a pair of adjacent deflection segments. The angle ∠a' between the extension of deflection segment AB and deflection segment BC is less than the second included angle threshold. Therefore, continuous deflection segment l4 is determined to be the target deflection line. Deflection segments DE and EF form a pair of adjacent deflection segments, and deflection segments EF and FG form a pair of adjacent deflection segments. The angle ∠b' between the extension of deflection segment DE and deflection segment EF, and the angle ∠c' between the extension of deflection segment EF and deflection segment FG are both less than the second included angle threshold. Therefore, continuous deflection segment l5 is determined to be the target deflection line. Deflection segments HI and IJ form a pair of adjacent deflection segments. The angle ∠d' between the extension of deflection segment IJ and deflection segment HI is greater than the second included angle threshold. Therefore, continuous deflection segment l6 is determined not to be the target deflection line.

[0086] Among them, the control points corresponding to the target deflection line l4 are points A and C; the control points corresponding to the target deflection line l5 are points D and G.

[0087] Based on the above embodiments, the method for determining at least two control points in the line element to be converted when the line type of the line element to be converted is a corner line is further described, such as... Figure 6 As shown, it includes the following steps:

[0088] S610, obtain the reference point corresponding to the corner position in the line element to be converted.

[0089] The corner point can be the intersection of two straight lines that form the corner line. In this embodiment, the point at the corner position can be used as the reference point.

[0090] S620, obtain the reference distance corresponding to different corner extension directions under the target scenario requirements.

[0091] For any given target scene, the corresponding reference distance can be determined based on the requirements of that scene, and its value can be pre-determined according to the smoothness requirements of the stylized map's theme. There are no restrictions on this. For example, if the overall style is children's and the stylized map is filled with lollipops, then there are relatively high requirements for the smoothness of other shapes appearing in the stylized map; in this case, the preset distance will be relatively long. It should be noted that under the same target scene requirements, the preset distances corresponding to different corner extension directions can be the same or different.

[0092] For example, in this embodiment, the reference distances corresponding to different target scene requirements can be pre-stored in the corresponding database. When there is a requirement to determine the control points in the corner line, the reference distances corresponding to different corner extension directions under the target scene requirements can be obtained from the corresponding database.

[0093] S630, the points in the line element to be converted, which are at the corresponding reference distances from the reference point under different angle extension directions, are used as control points in the line element to be converted.

[0094] Specifically, in this embodiment, for any extension direction, a point in that extension direction whose distance from the reference point is the corresponding reference distance can be used as a control point in that extension direction.

[0095] To facilitate understanding of this solution by those skilled in the art, combined with Figure 7 The method for determining control points provided in this embodiment will be explained. For example... Figure 7 As shown, point B is the reference point corresponding to the corner position in the line element to be converted. In the first extension direction corresponding to reference point B, point A, which is a first preset distance from reference point B, is taken as one of the control points; in the second extension direction corresponding to reference point B, point C, which is a second preset distance from reference point B, is taken as another control point.

[0096] After identifying at least two control points in the line elements to be transformed, further adjustments are needed based on these control points to ensure the stylized map matches the target scene requirements. In one embodiment, to simplify the adjustment process, an adjustment method is provided, such as... Figure 8 As shown, it includes the following steps:

[0097] S810, Determine the line type of the line element to be converted.

[0098] S820, if the line type of the line element to be converted is a zigzag line, then connect the control points in the line element to be converted according to the extension direction of the line element to be converted, so as to convert the line element to be converted into a stylized element that meets the requirements of the target scene.

[0099] The line element to be converted may have an extension direction. For example, if the line element to be converted is a lane marking, then it has an extension direction.

[0100] In one optional embodiment, if the line element to be converted is a zigzag line, its corresponding extension direction is obtained, and if it has an extension, the control points in the line element to be converted are connected according to the extension direction of the line element to be converted. If the line element to be converted does not have an extension direction, the control points in the line element to be converted can be directly connected.

[0101] Furthermore, the line segments formed by connecting control points are transformed according to the requirements of the target scene, so as to transform the line elements to be transformed into stylized elements that meet the requirements of the target scene. For example, the line segments formed by connecting control points are transformed into preset colors, preset shapes, or preset patterns.

[0102] To facilitate understanding of this solution by those skilled in the art, combined with Figure 9 This embodiment will be described. For example... Figure 9 The zigzag line shown connects points A and D, and then the line segment AD is used as the adjustment result of the line element to be converted corresponding to this zigzag line, thus avoiding abnormally frequent line bends. It should be noted that if this zigzag line is not adjusted, the actual line drawn is ABCD, which is the dashed line part, but this effect does not meet the requirements of the target scene.

[0103] In another alternative implementation, line segment ABCD or line segment AD can be curve fitted to obtain curve AD, and curve AD can be used as the adjustment result of the line element to be converted corresponding to the deflection line to improve the smoothness of the gridded map.

[0104] S830, if the line type of the line element to be converted is a corner line, then based on the control points in the line element to be converted and the reference points corresponding to the corner positions in the line element to be converted, curve fitting is performed on the line element to be converted to transform it into a stylized element that meets the requirements of the target scene.

[0105] For example, in this embodiment, an arc can be fitted to the line segment formed by connecting two control points in the line element to be converted, with the arc curvature pointing towards the reference point corresponding to the contact position, and the fitted arc is used as the adjusted line element to be converted. For example, the control points in the line element to be converted can be processed based on a Bézier curve to obtain the adjusted line element to be converted.

[0106] To facilitate understanding of this solution by those skilled in the art, combined with Figure 10 This embodiment will be described. For example... Figure 10 The corner line shown can be used as the adjusted line element to be converted, with the arc AC as the reference. If this bend is not adjusted, the actual drawn line is ABC, which is the dashed part, but this effect does not meet the requirements of the target scene.

[0107] The above embodiments provide specific methods for adjusting line elements of the deflection type and the corner line type to be converted, making the whole process clearer, but should not be construed as a specific limitation on the above content.

[0108] Based on the above embodiments, the line element to be converted can be two-dimensional or three-dimensional. The adjustment methods for two-dimensional line elements to be converted have been given in the above embodiments. Furthermore, if the line element to be converted has height information, then based on the above adjustments, such as... Figure 11 As shown, the following steps also need to be performed:

[0109] S1110, obtain the reference points located between different control points in the line element to be converted, and the reference height corresponding to each reference point.

[0110] The reference point can be any corner point other than the control point in the line element to be converted. Each reference point has a corresponding reference height, and the height information of each reference point can be stored in the identification information of the line element to be converted.

[0111] Specifically, in this embodiment, when the line element to be converted has height information, the line element to be converted is parsed to obtain reference points located between different control points in the line element to be converted, and the reference height corresponding to each reference point is obtained from its corresponding identification information.

[0112] For example, if the line type of the line element to be converted is a corner line, the corresponding reference point is determined by using the reference point corresponding to the corner position in the line element to be converted as the reference point. If the line type of the line element to be converted is a bend line, the corresponding reference point is determined by using the bend point in the line element to be converted located between different control points as the reference point.

[0113] S1120, based on the positional distribution of each reference point in the line element to be converted, map each reference point to the adjusted line element to be converted, and obtain the mapping point of the corresponding reference point.

[0114] In one optional embodiment, the position information of each reference point in the line element to be converted can be obtained, and the mapping point of the corresponding reference point can be determined based on the position information of each reference point and the adjusted line element to be converted. For example, the position information of each reference point and the adjusted line element to be converted can be input into a pre-trained mapping point determination model to overlap the mapping points of the corresponding reference points.

[0115] It should be noted that the mapping point determination model in this embodiment can be constructed based on common neural meshes, which will not be elaborated here. Furthermore, during the training of the mapping point determination model, sample reference points can be input into the target deflection line extraction model to obtain sample prediction results. The preset sample results are then compared with the sample labels (i.e., the mapping points corresponding to the sample reference points). Based on the comparison results, the mapping point determination model is trained to improve its accuracy.

[0116] In another alternative embodiment, the mapping point of each reference point can be determined based on the line type of the line element to be converted and the positional distribution of each reference point within the line element. For example, when the line type of the line element to be converted is a corner line, the reference point can be vertically mapped onto the adjusted line element to obtain the mapping point of the corresponding reference point.

[0117] When the line element to be converted is a beveled line, two methods are provided for determining the mapping points. The first method involves vertically mapping each reference point to the adjusted line element to obtain the corresponding mapping point. To improve the accuracy of the mapping points and make the adjustment results more precise, the second method involves: for any reference point in the adjusted continuous beveled line segment of the line element to be converted, the proportion of the beveled line length between the reference point and the reference control point to the total length of the beveled line in the corresponding continuous beveled line segment is used as the mapping proportion of the reference point; based on the mapping proportion and the reference control point, the corresponding mapping point of the reference point in the corresponding adjustment result of the continuous beveled line segment is obtained. Here, the reference control point is one of the two control points in the corresponding continuous beveled line segment; the mapping proportion can be the ratio of the length between the mapping point and the corresponding reference control point to the length of the adjusted continuous beveled line segment.

[0118] For example, the sum of the lengths of each deflection line in a continuous deflection line, the length of each deflection line, and the length of the line segment of the adjustment result can be obtained, thereby determining the corresponding mapping point of each reference point in the adjustment result corresponding to the continuous deflection line segment. To facilitate understanding of this solution by those skilled in the art, combined with... Figure 12 This embodiment will be described as follows: The length of the deflection line AB is l. AB The length of the deflection line BC is l BC The length of the deflection line CD is l CD The length of line segment AD is l AD Starting from point A, let the distance between point A and point B be... Point B' is used as the mapping point of reference point B; or, the point B' is located at a distance of 0 from point D. Point B' is used as the mapping point of reference point B. Correspondingly, the distance from point D is... Point C' is used as the mapping point of reference point C; or, the point C' is located at a distance of 0 from point A. Point C' is used as the mapping point of reference point C.

[0119] S1130, the reference height corresponding to each reference point is used as the height information of the corresponding mapping point.

[0120] It should be noted that since the control points are the endpoints of the continuous deflection lines, in a 3D scene, the original height information can be directly maintained, without the need for point mapping and height information assignment.

[0121] In this embodiment, after determining the mapping point position of the reference point, the reference height corresponding to each reference point is used as the height information of the corresponding mapping point, thereby determining the height information of each point in the line element to be converted. Furthermore, this makes the adjusted line element to be converted a 3D map, which makes the stylized map more accurate and better matches the requirements of the target scene.

[0122] The above embodiments describe the process of adjusting the line elements to be transformed. Further, this embodiment also provides a process of adjusting the point elements to be transformed. For example, the point elements to be transformed can be converted into target shapes required by the target scene, thereby converting the map to be transformed into a stylized map that meets the requirements of the target scene. And / or, the point elements to be transformed can be converted into texture maps required by the target scene, thereby converting the map to be transformed into a stylized map that meets the requirements of the target scene. The color of the texture map is determined based on the spatial position of the point elements to be transformed, and the style of the texture map is preset according to the requirements of the target scene. For example, for a map aimed at children, a cartoon-style texture map needs to be provided. The target shape is set according to the requirements of the target scene and can be a circle, a rectangle, or a triangle; there is no limitation on this.

[0123] In this embodiment, the target shape and texture map corresponding to various types of point elements to be converted under different scene requirements are predetermined. After obtaining the point elements to be converted, each point element to be converted can be adjusted to the target shape required by the target scene; or each point element to be converted can be adjusted to the texture map required by the target scene; or some point elements to be converted can be adjusted to the target shape required by the target scene, and the remaining point elements to be converted can be adjusted to the texture map required by the target scene. There is no limitation on this.

[0124] Furthermore, after adjusting the elements to be converted in the map to be converted, a stylized map corresponding to the map to be converted can be obtained for subsequent use.

[0125] To facilitate understanding of this solution by those skilled in the art, a detailed description of the stylized map generation method provided in this application is given in one embodiment, such as... Figure 13 As shown, it includes the following steps:

[0126] S1301, retrieve the map elements to be converted from the map to be converted.

[0127] The map elements to be converted include line elements and point elements.

[0128] S1302, when the map element to be converted is a line element to be converted, determine the line type of the line element to be converted.

[0129] S1303, when the line type of the line element to be converted is a zigzag line, obtain at least two zigzag line segments obtained by dividing the line element to be converted based on the zigzag point in the line element to be converted.

[0130] The line element to be converted contains height information.

[0131] S1304, determine the continuous deflection segments with smaller deviations based on the included angle between adjacent deflection segments.

[0132] S1305 uses the endpoints of the continuous deflection line segments as control points in the line element to be converted.

[0133] S1306, Connect the control points in the line elements to be converted according to the extension direction of the line elements to be converted.

[0134] S1307, use the deflection points between different control points in the line element to be converted as reference points.

[0135] S1308, for any reference point in the continuous deflection line segment to be adjusted in the line element to be converted, the proportion of the deflection line length between the reference point and the reference control point in the total length of the deflection line of the corresponding continuous deflection line segment is used as the mapping proportion of the reference point.

[0136] The reference control point is one of the two control points in the corresponding continuous deflection line segment.

[0137] S1309, Based on the mapping ratio and the reference control point, obtain the corresponding mapping point of the reference point in the adjustment result of the continuous deflection line segment.

[0138] S1310, the reference heights corresponding to each reference point are used as the height information of the corresponding mapping points, so as to transform the line elements to be converted into stylized elements that meet the requirements of the target scene.

[0139] S1311, when the line type of the line element to be converted is a corner line, obtain the reference point corresponding to the corner position in the line element to be converted.

[0140] S1312, obtain the reference distance corresponding to different corner extension directions under the target scenario requirements.

[0141] S1313, points at preset distances from the reference point under different angle extension directions in the line element to be converted are used as control points in the line element to be converted.

[0142] S1314. Based on the control points in the line element to be converted and the reference points corresponding to the corner positions in the line element to be converted, perform curve fitting on the line element to be converted to transform it into a stylized element that meets the requirements of the target scene.

[0143] It should be noted that if the line element to be converted has height information, then the reference points located between different control points in the line element to be converted, as well as the reference heights corresponding to each reference point, are obtained; based on the positional distribution of each reference point in the line element to be converted, each reference point is mapped to the adjusted line element to be converted, and the mapping point of the corresponding reference point is obtained; the reference heights corresponding to each reference point are used as the height information of the corresponding mapping point.

[0144] S1315, when the map element to be converted is a point element to be converted, the point element to be converted is converted into a target shape required by the target scene, and / or, the point element to be converted is converted into a texture map required by the target scene, so as to convert the map to be converted into a stylized map that meets the requirements of the target scene.

[0145] The color of the texture map is determined based on the spatial position of the element to be converted.

[0146] 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.

[0147] Based on the same inventive concept, this application also provides a stylized map generation apparatus for implementing the stylized map generation method described above. The solution provided by this apparatus is similar to the implementation described in the above method; therefore, the specific limitations in one or more stylized map generation apparatus embodiments provided below can be found in the limitations of the stylized map generation method described above, and will not be repeated here.

[0148] In one exemplary embodiment, such as Figure 14 As shown, a stylized map generation apparatus is provided, comprising: an acquisition module 1410, a determination module 1420, and an adjustment module 1430, wherein:

[0149] The acquisition module 1410 is used to acquire map elements to be converted from the map to be converted.

[0150] The map elements to be converted include line elements to be converted.

[0151] The determination module 1420 is used to determine at least two control points in the line element to be converted based on the line type of the line element to be converted.

[0152] The adjustment module 1430 is used to adjust the line elements to be converted based on the at least two control points, so as to convert the map to be converted into a stylized map that meets the requirements of the target scene.

[0153] The modules in the aforementioned stylized map generation device 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.

[0154] In one exemplary embodiment, a computer device is provided, which may be a terminal, and its internal structure diagram may be as follows: Figure 15 As shown, the computer device includes a processor, memory, input / output interfaces, a communication interface, a display unit, and an input device. The processor, memory, and input / output interfaces 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 interfaces. The processor provides computational 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 stored in the non-volatile storage media. The input / output interfaces are 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, Near Field Communication (NFC), or other technologies. When executed by the processor, the computer program implements a stylized map generation method.

[0155] Those skilled in the art will understand that Figure 15 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.

[0156] 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 any of the steps in the above method embodiments.

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

[0158] In one embodiment, a computer program product is provided, including a computer program that, when executed by a processor, implements any step in the above method embodiments. 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 memory 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 may 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), etc. 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, etc. 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, artificial intelligence (AI) processors, etc., etc., and are not limited to these.

[0159] 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 application.

[0160] 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 generating stylized maps, characterized in that, include: Obtain the map elements to be converted from the map to be converted; wherein, the map elements to be converted include the line elements to be converted; Based on the line type of the line element to be converted, determine at least two control points in the line element to be converted; Based on the at least two control points, the line elements to be converted are adjusted to transform the map to be converted into a stylized map that meets the requirements of the target scene.

2. The method according to claim 1, characterized in that, If the line type of the line element to be converted is a beveled line, then determining at least two control points in the line element to be converted based on its line type includes: Identify continuous deflection segments in the line element to be converted whose deviation is less than a preset amplitude threshold, and use the endpoints corresponding to the identification results as control points in the line element to be converted.

3. The method according to claim 2, characterized in that, The step of determining continuous deflection segments in the line element to be converted whose deviation is less than a preset threshold, and using the endpoints corresponding to the determination results as control points in the line element to be converted, includes: Obtain at least two deflection line segments by dividing the line element to be converted based on the deflection point in the line element to be converted; Based on the included angle between adjacent deflection segments, determine the continuous deflection segments with smaller deviations; The endpoints corresponding to the continuous deflection line segments are used as control points in the line elements to be converted.

4. The method according to claim 1, characterized in that, If the line type of the line element to be converted is a corner line, then determining at least two control points in the line element to be converted based on its line type includes: Obtain the reference point corresponding to the corner position in the line element to be converted; Obtain the reference distances corresponding to different corner extension directions under the target scenario requirements; Points that are at corresponding reference distances from the reference point under different angle extension directions in the line element to be converted are used as control points in the line element to be converted.

5. The method according to any one of claims 1-4, characterized in that, The step of adjusting the line element to be converted based on the at least two control points includes: If the line type of the line element to be converted is a zigzag line, then the control points in the line element to be converted are connected according to the extension direction of the line element to be converted, so as to convert the line element to be converted into a stylized element that meets the requirements of the target scene. If the line type of the line element to be converted is a corner line, then the line element to be converted is curve-fitted according to the control points in the line element to be converted and the reference points corresponding to the corner positions in the line element to be converted, so as to convert the line element to be converted into a stylized element that meets the requirements of the target scene.

6. The method according to any one of claims 1-4, characterized in that, If the line element to be converted has height information, the method further includes: Obtain the reference points located between different control points in the line element to be converted, and the reference height corresponding to each reference point; Based on the positional distribution of each reference point in the line element to be converted, each reference point is mapped to the adjusted line element to be converted, thus obtaining the mapping point of the corresponding reference point; The reference height corresponding to each of the aforementioned reference points is used as the height information of the corresponding mapping point.

7. The method according to claim 6, characterized in that, If the line element to be converted is a deflected line, then obtain the reference points located between different control points in the line element to be converted, including: The deflection points between different control points in the line element to be converted are used as the reference points; Accordingly, the step of mapping each reference point to the adjusted line element to obtain the mapping point of the corresponding reference point based on the positional distribution of each reference point in the line element to be converted includes: For any reference point in the continuous deflection line segment adjusted in the line element to be converted, the proportion of the deflection line length between the reference point and the reference control point in the total deflection line length of the corresponding continuous deflection line segment is used as the mapping proportion of the reference point; wherein, the reference control point is one of the two control points in the corresponding continuous deflection line segment. Based on the mapping ratio and the reference control point, the corresponding mapping point of the reference point in the adjustment result of the continuous deflection line segment is obtained.

8. A stylized map generation device, characterized in that, include: The acquisition module is used to acquire map elements to be converted from the map to be converted; wherein, the map elements to be converted include line elements to be converted; The determination module is used to determine at least two control points in the line element to be converted based on the line type of the line element to be converted; An adjustment module is used to adjust the line elements to be converted based on the at least two control points, so as to convert the map to be converted into a stylized map that meets the requirements of the target scene.

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-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 described in any one of claims 1-7.

Citation Information

Patent Citations

  • Unmanned aerial vehicle inspection route construction method

    CN111091622A

  • Map information processing method and device, electronic equipment and storage medium

    CN112700464A

  • Robot continuous path optimization method based on second-order Bezier curve

    CN114137991A

  • Irregular fillet polygon drawing method

    CN115457166A

  • Generalization of Features in a Digital Map Using Round Number Coordinates

    US20090040229A1