Navigation Image Rendering Method, Apparatus, Electronic Device, and Readable Storage Medium
By obtaining the distance information of navigation objects and rendering the navigation images related to transparency, the user interference caused by inaccurate vehicle positioning information is solved, ensuring the user experience and navigation image consistency.
Patent Information
- Application Number
- CN202211085804.7
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2022-09-06
- Publication Date
- 2025-07-22
- Estimated Expiration
- 2042-09-06
AI Technical Summary
Since the navigation data may not be lane level, the accuracy of vehicle positioning information is poor, and users are prone to being interfered by incorrect positioning information when viewing navigation images, affecting the user experience.
By obtaining the distance information of the navigation object corresponding to the target pixel, obtaining the transparency of the target pixel based on the distance information, and rendering the navigation image based on the transparency, the transparency of the lane element is negatively correlated with the distance, ensuring that the user cannot accurately estimate the relative position between the lane element and the navigated object.
When the accuracy of vehicle positioning information is poor, avoid interference with user behavior by navigation images, improve user experience, and maintain consistent presentation effects of lane elements in navigation images.
Smart Images

Figure CN115326088B_ABST
Abstract
Description
Technical Field
[0001] The present disclosure relates to the field of image processing technologies, and particularly to a navigation image rendering method, apparatus, electronic device, and readable storage medium. Background Art
[0002] In recent years, with the evolution of navigation technology from road-level navigation to lane-level navigation, the navigation images obtained based on navigation data express roads more richly and precisely, enabling users to know the relative position relationship between the object to be navigated and the corresponding lane lines, such as the real-time lane where the object to be navigated is located, or the distance between the object to be navigated and the adjacent lanes.
[0003] However, in some scenarios, since the navigation data may not be lane-level navigation data, the accuracy of the vehicle positioning information obtained based on the navigation data may be poor in these scenarios, resulting in the navigation image rendered according to the vehicle positioning information may not accurately reflect the relative position relationship between the object to be navigated and the lane elements. The inventors of the present disclosure found that when the accuracy of the vehicle positioning information is poor, when users view the navigation image to know their lane position, they are easily interfered by the wrong positioning information, thus damaging the user experience. Summary of the Invention
[0004] To solve the problems in the related technologies, embodiments of the present disclosure provide a navigation image rendering method, apparatus, electronic device, and readable storage medium.
[0005] In a first aspect, an embodiment of the present disclosure provides a navigation image rendering method, including:
[0006] Obtaining the distance information of the object to be navigated corresponding to the target pixel, the target pixel corresponding to the target lane element, and the distance information of the object to be navigated being used to indicate the target distance between the target pixel and the object to be navigated;
[0007] Obtaining the transparency of the target pixel according to the distance information of the object to be navigated, the transparency of the target pixel being negatively correlated with the target distance;
[0008] Rendering the navigation image according to the transparency of the target pixel.
[0009] In an implementation manner of the present disclosure, the distance information of the object to be navigated includes the square of the semi-minor axis length of the target ellipse, the center of the target ellipse coinciding with the position of the object to be navigated, the semi-major axis of the target ellipse coinciding with the moving direction of the object to be navigated, and the target ellipse passing through the target pixel.
[0010] In an implementation of the present disclosure, when the target pixel is located in the first quadrant of the navigation coordinate system, the second quadrant of the navigation coordinate system, coincides with the horizontal axis of the navigation coordinate system, coincides with the positive semi-axis of the vertical axis of the navigation coordinate system, or coincides with the origin of the navigation coordinate system, the eccentricity of the target ellipse is the first eccentricity;
[0011] When the target pixel is located in the third quadrant of the navigation coordinate system, the fourth quadrant of the navigation coordinate system, or coincides with the negative semi-axis of the vertical axis of the navigation coordinate system, the eccentricity of the target ellipse is the second eccentricity, and the second eccentricity is less than the first eccentricity;
[0012] Wherein, the navigation coordinate system is a plane rectangular coordinate system, the origin of the navigation coordinate system coincides with the position of the navigated object, and the positive semi-axis of the vertical axis of the navigation coordinate system coincides with the moving direction of the navigated object.
[0013] In an implementation of the present disclosure, before obtaining the distance information of the navigated object corresponding to the target pixel, the method further includes:
[0014] Obtaining the vertex coordinates of the triangular grid vertices corresponding to at least one road surface element, the position coordinates of the navigated object, and the movement direction indication information for indicating the movement direction of the navigated object;
[0015] Obtaining the target vertex coordinates of the corresponding triangular grid vertex in the navigation coordinate system according to the vertex coordinates, the position coordinates, and the movement direction indication information;
[0016] Obtaining the pixel coordinates of the pixels in the corresponding triangular grid according to the target vertex coordinates;
[0017] Obtaining the distance information of the navigated object corresponding to the target pixel includes:
[0018] Obtaining the distance information of the navigated object corresponding to the target pixel according to the pixel coordinates.
[0019] In an implementation of the present disclosure, obtaining the target vertex coordinates of the corresponding triangular grid vertex in the navigation coordinate system according to the vertex coordinates, the position coordinates, and the movement direction indication information includes:
[0020] Obtaining the navigated object vector from the position of the navigated object to the vertex of the corresponding triangular grid according to the vertex coordinates and the position coordinates;
[0021] Performing vector decomposition according to the navigated object vector and the movement direction indication information to obtain the basis vectors corresponding to the horizontal axis and the vertical axis in the navigation coordinate system respectively;
[0022] Obtaining the target vertex coordinates according to the basis vectors.
[0023] In one implementation of the present disclosure, before obtaining the distance information of the object to be navigated corresponding to the target pixel, the method further includes:
[0024] Obtaining the road surface element category information corresponding to the triangular mesh vertices, where the road surface element category information is used to indicate the category of the road surface element corresponding to the triangular mesh where the triangular mesh vertices are located;
[0025] Obtaining the distance information of the object to be navigated corresponding to the target pixel according to the pixel coordinates includes:
[0026] In response to determining that the road surface element corresponding to the triangular mesh where the target pixel is located is a lane element according to the road surface element category information, obtaining the distance information of the object to be navigated corresponding to the target pixel according to the pixel coordinates.
[0027] In one implementation of the present disclosure, before obtaining the distance information of the object to be navigated corresponding to the target pixel, the method further includes:
[0028] Obtaining the positioning data indication information;
[0029] Obtaining the distance information of the object to be navigated corresponding to the target pixel according to the pixel coordinates includes:
[0030] In response to determining that at least one of the vertex coordinates, position coordinates, and movement direction indication information is obtained according to non-lane-level positioning data according to the positioning data indication information, obtaining the distance information of the object to be navigated corresponding to the target pixel according to the pixel coordinates.
[0031] In a second aspect, an embodiment of the present disclosure provides a navigation image rendering device, which includes:
[0032] A distance obtaining module, configured to obtain the distance information of the object to be navigated corresponding to the target pixel, where the target pixel corresponds to the target lane element, and the distance information of the object to be navigated is used to indicate the target distance between the target pixel and the object to be navigated;
[0033] A transparency obtaining module, configured to obtain the transparency of the target pixel according to the distance information of the object to be navigated, where the transparency of the target pixel is negatively correlated with the target distance;
[0034] An image rendering module, configured to render a navigation image according to the transparency of the target pixel.
[0035] In a third aspect, an embodiment of the present disclosure provides an electronic device, including a memory and a processor, where the memory is used to store one or more computer instructions, and the one or more computer instructions are executed by the processor to implement the method described in any item of the first aspect or any implementation manner of the first aspect.
[0036] Fourthly, an embodiment of the present disclosure provides a computer-readable storage medium, on which computer instructions are stored. When the computer instructions are executed by a processor, the method described in the first aspect or any implementation manner of the first aspect is implemented.
[0037] In the technical solution of the present disclosure, by obtaining the distance information of the navigated object corresponding to the target pixel, that is, the information indicating the target distance between the target pixel corresponding to the target pixel and the navigated object, and obtaining the transparency of the target pixel corresponding to the target lane element according to the distance information of the navigated object, the transparency of the target pixel is negatively correlated with the target distance, and the navigation image is rendered according to the transparency of the target pixel. Among them, in the rendered navigation image, if a lane element is closer to the navigated object, the transparency of the pixel used to display the lane element is higher, and if a lane element is farther from the navigated object, the transparency of the pixel used to display the lane element is lower. Therefore, the user cannot estimate the relative position between the navigated object and the lane element based on the lane element closer to the navigated object in the navigation image. Therefore, the technical solution of the present disclosure can achieve blurring of the lane lines around the vehicle, ensuring that even when the accuracy of the vehicle positioning information is poor, the user cannot know their lane position by viewing the navigation screen, and the user will not be interfered by incorrect positioning information, thus improving the user experience.
[0038] In the technical solution of the present disclosure, by defining that the distance information of the navigated object includes the square of the semi-minor axis length of the target ellipse, where the center of the target ellipse coincides with the position of the navigated object, the semi-major axis of the target ellipse coincides with the moving direction of the navigated object, and the target ellipse passes through the target pixel, the lane elements in front of the navigated object in the navigation image can start to gradually change to transparent when they are far from the navigated object, while the lane elements on both sides of the navigated object in the navigation image only start to gradually change to transparent when they are close to the navigated object. Therefore, when the viewing angle of the navigation image is located behind and above the navigated object, the presentation effect of the lane elements in front of the navigated object is similar to the presentation effect of the lane elements on both sides of the navigated object, which helps to maintain the consistency of the presentation effect of the lane elements in the navigation image and improves the user experience.
[0039] In the technical solution of the present disclosure, by defining that when the target pixel is in the first quadrant of the navigation coordinate system, the target pixel is in the second quadrant of the navigation coordinate system, the target pixel coincides with the horizontal axis of the navigation coordinate system, the target pixel coincides with the positive semi-axis of the vertical axis of the navigation coordinate system, or the target pixel coincides with the origin of the navigation coordinate system, the eccentricity of the target ellipse is the first eccentricity, and by defining that when the target pixel is in the third quadrant of the navigation coordinate system, the target pixel is in the fourth quadrant of the navigation coordinate system, or the target pixel coincides with the negative semi-axis of the vertical axis of the navigation coordinate system, the eccentricity of the target ellipse is the second eccentricity, and the second eccentricity is less than the first eccentricity; the navigation coordinate system is a plane rectangular coordinate system, the origin of the navigation coordinate system coincides with the position of the navigation object, and the positive semi-axis of the vertical axis of the navigation coordinate system coincides with the moving direction of the navigation object, it is possible to make the rendering effect of the lane elements in front of the navigation object similar to the rendering effects of the lane elements on both sides of the navigation object and the lane elements behind the navigation object when the viewing angle of the navigation image is located behind and above the navigation object, which helps to maintain the consistency of the rendering effects of the lane elements in the navigation image and improves the user experience.
[0040] In the technical solution of the present disclosure, by obtaining the vertex coordinates of the triangular mesh vertices corresponding to at least one road surface element, the position coordinates of the navigation object, and the movement direction indication information for indicating the movement direction of the navigation object; obtaining the target vertex coordinates of the corresponding triangular mesh vertices in the navigation coordinate system according to the vertex coordinates, the position coordinates, and the movement direction indication information; obtaining the pixel coordinates of the pixels in the corresponding triangular mesh according to the target vertex coordinates; and obtaining the navigation object distance information corresponding to the target pixel according to the pixel coordinates, the accuracy of the obtained navigation object distance information can be improved.
[0041] In the technical solution of the present disclosure, by obtaining the navigation object vector from the position of the navigation object to the vertex of the corresponding triangular mesh according to the vertex coordinates and the position coordinates; performing vector decomposition according to the navigation object vector and the movement direction indication information to obtain the basis vectors corresponding to the horizontal axis and the vertical axis in the navigation coordinate system respectively; and obtaining the target vertex coordinates according to the basis vectors, the operation steps for obtaining the target vertex coordinates can be simplified, the amount of calculation can be reduced, and the processing efficiency can be improved.
[0042] In the technical solution of the present disclosure, by obtaining the road surface element category information corresponding to the triangular mesh vertices, where the road surface element category information is used to indicate the category of the road surface element corresponding to the triangular mesh where the triangular mesh vertices are located, and in response to determining that the road surface element corresponding to the triangular mesh where the target pixel is located is a lane element according to the road surface element category information, obtaining the distance information of the object to be navigated corresponding to the target pixel according to the pixel coordinates, it is possible to make the target pixels for obtaining transparency subsequently only be the pixels corresponding to the road surface elements that are lane elements, so as to ensure that only the content corresponding to the lane elements in the rendered navigation image is transparently processed, thus not affecting the rendering effect of other elements in the navigation image and ensuring a better user experience.
[0043] In the technical solution of the present disclosure, by obtaining the positioning data indication information, and in response to determining that at least one of the vertex coordinates, position coordinates, and movement direction indication information is obtained according to non-lane-level positioning data according to the positioning data indication information, obtaining the distance information of the object to be navigated corresponding to the target pixel according to the pixel coordinates, it is possible to ensure that the lane elements in the navigation image are transparently processed only when the reliability of at least one of the vertex coordinates, position coordinates, and movement direction indication information cannot support presenting the relative position relationship between the object to be navigated and the lane elements in the navigation image, so as to ensure that the user can only know the relatively accurate relative position relationship between the object to be navigated and the lane elements through the navigation image, improving the user experience.
[0044] It should be understood that the above general description and the following detailed description are only exemplary and explanatory, and cannot limit the present disclosure. BRIEF DESCRIPTION OF THE DRAWINGS
[0045] In conjunction with the drawings, through the following detailed description of non-limiting embodiments, other features, objects, and advantages of the present disclosure will become more apparent. In the drawings:
[0046] Figure 1 A flowchart showing a navigation image rendering method according to an embodiment of the present disclosure is shown.
[0047] Figure 2 A schematic diagram of a navigation image according to an embodiment of the present disclosure is shown.
[0048] Figure 3 A schematic diagram of a navigation image according to an embodiment of the present disclosure is shown.
[0049] Figure 4 A flowchart showing a navigation image rendering method according to an embodiment of the present disclosure is shown.
[0050] Figure 5 A block diagram showing the structure of a navigation image rendering device according to an embodiment of the present disclosure is shown.
[0051] Figure 6 A structural block diagram of an electronic device according to an embodiment of the present disclosure is shown.
[0052] Figure 7 A schematic structural diagram of a computer system suitable for implementing the method according to an embodiment of the present disclosure is shown. Detailed implementation manners
[0053] Hereinafter, exemplary embodiments of the present disclosure will be described in detail with reference to the accompanying drawings so that those skilled in the art can easily implement them. In addition, for clarity, parts irrelevant to the description of the exemplary embodiments are omitted in the drawings.
[0054] In the present disclosure, it should be understood that terms such as "including" or "having" are intended to indicate the existence of features, numbers, steps, actions, components, parts, or combinations thereof disclosed in this specification, and are not intended to exclude the possibility of the existence or addition of one or more other features, numbers, steps, actions, components, parts, or combinations thereof.
[0055] In addition, it should be noted that, without conflict, the embodiments in the present disclosure and the features in the embodiments can be combined with each other. The present disclosure will be described in detail below with reference to the accompanying drawings and in combination with the embodiments.
[0056] In the present disclosure, if it involves operations of obtaining user information or user data or operations of presenting user information or user data to others, such operations are all operations authorized, confirmed by the user, or actively selected by the user.
[0057] In recent years, with the evolution of navigation technology from road-level navigation to lane-level navigation, the navigation images obtained based on navigation data express roads more richly and precisely, enabling users to know the relative position relationship between the object to be navigated and the corresponding lane lines, such as the real-time lane where the object to be navigated is located, or the distance between the object to be navigated and adjacent lanes, etc.
[0058] However, in some scenarios, since the navigation data may not be lane-level navigation data, the navigation images obtained based on the navigation data in these scenarios may not accurately reflect the relative position between the object to be navigated and the lane elements. For example, in the navigation image, the object to be navigated may be in the wrong lane. Therefore, lane elements in the navigation image, such as lane lines, may affect the user's judgment of the location where the object to be navigated is located, thereby interfering with the user's actions, such as driving actions, and damaging the user experience.
[0059] In a technical solution, in order to avoid the lanes in the navigation image from interfering with the user, when rendering the navigation image, the coordinates of the vertices of the triangular meshes corresponding to the lane elements can be obtained, and the distance from each vertex of the triangular mesh to the position where the object to be navigated is located can be calculated according to the obtained coordinates. When the distance is less than or equal to a pre-set distance threshold, it is determined that the distance between the object to be navigated and the lane element is relatively close, and the transparency of the vertices of the triangular mesh can be set according to this distance, so that the transparency is negatively correlated with this distance. Thus, in the rendered navigation image, the closer the triangular mesh corresponding to the lane element is to the object to be navigated, the higher the transparency of the pixels in the triangular mesh, avoiding the user from estimating the relative position between the object to be navigated and the lane element based on the lane element that is relatively close to the object to be navigated in the navigation image.
[0060] In the above solution, although it can ensure to a certain extent that the lane elements in the navigation image will not affect the user's judgment of the position where the object to be navigated is located, in some scenarios (such as in a scenario where the road surface is relatively flat), the triangular meshes corresponding to the lane elements are relatively large. In such a scenario, since the transparency of the pixels in the triangular mesh is obtained according to the distance from the vertices of the triangular mesh to the position where the object to be navigated is located, when the object to be navigated is located in the triangular mesh and the distance between the object to be navigated and any vertex of the triangular mesh is relatively large, the transparency of the pixels in the triangular mesh may be relatively low, resulting in the lane element corresponding to the triangular mesh that is relatively close to the object to be navigated in the navigation image not being transparent. In this case, it is easy for the user to estimate the relative position between the object to be navigated and the lane element based on the lane element corresponding to the triangular mesh, so that it still cannot be ensured that the lane elements in the navigation image will not affect the user's judgment of the position where the object to be navigated is located, and the navigation image will interfere with the user's behaviors such as driving actions, damaging the user experience.
[0061] To solve the above problems, in the technical solution of the present disclosure, by obtaining the distance information of the object to be navigated corresponding to the target pixel, that is, the information indicating the target distance between the target pixel corresponding to the target pixel and the object to be navigated, and obtaining the transparency of the target pixel corresponding to the target lane element according to the distance information of the object to be navigated, making the transparency of the target pixel negatively correlated with the target distance, and rendering the navigation image according to the transparency of the target pixel. Among them, in the rendered navigation image, if a lane element is closer to the object to be navigated, the transparency of the pixel used to display the lane element is higher, and if a lane element is farther from the object to be navigated, the transparency of the pixel used to display the lane element is lower. Thus, the user cannot estimate the relative position between the object to be navigated and the lane element based on the lane element closer to the object to be navigated in the navigation image, ensuring that the lane elements in the navigation image do not affect the user's judgment of the position where the object to be navigated is located, avoiding interference of the navigation image on the user's actions such as driving actions, etc., and improving the user experience.
[0062] Figure 1 The flowchart showing the navigation image rendering method according to an embodiment of the present disclosure is as follows. Figure 1 As shown, the navigation image rendering method includes the following steps:
[0063] In step S101, obtain the distance information of the object to be navigated corresponding to the target pixel.
[0064] Among them, the target pixel corresponds to the target lane element, and the distance information of the object to be navigated is used to indicate the target distance between the target pixel and the object to be navigated.
[0065] In step S102, obtain the transparency of the target pixel according to the distance information of the object to be navigated, and the transparency of the target pixel is negatively correlated with the target distance.
[0066] In step S103, render the navigation image according to the transparency of the target pixel.
[0067] In an embodiment of the present disclosure, the target lane element can be understood as a part of the lane marking, where the lane marking can be understood as a marking set on the road surface for indicating the corresponding information of the driving lane or the carriageway. The lane marking can include solid line markings, double solid line markings, dashed line markings, solid and dashed combined markings, sawtooth lane lines, deceleration markings, anamorphic markings, diversion line markings, stop lines, no parking lines, guiding signs, digital signs, diamond signs, inverted triangle signs, etc.
[0068] In an embodiment of the present disclosure, the target pixel corresponding to the target lane element can be understood as that the target pixel is used to display the target lane element.
[0069] In one embodiment of the present disclosure, the object to be navigated can be understood as a mobile communication terminal corresponding to the user, or can be understood as a vehicle driven by the user, such as a bicycle, motorcycle, car, truck, bus, etc.
[0070] In one embodiment of the present disclosure, obtaining the distance information of the object to be navigated corresponding to the target pixel can be understood as reading the pre-stored distance information of the object to be navigated, or can be understood as obtaining it from other devices or systems, or can be understood as calculating according to a pre-set algorithm to obtain the distance information of the object to be navigated corresponding to the target pixel.
[0071] In one embodiment of the present disclosure, the distance information of the object to be navigated can be understood as including the distance value of the target distance between the target pixel and the object to be navigated, or can be understood as including values positively correlated with the target distance between the target pixel and the object to be navigated, etc.
[0072] In one embodiment of the present disclosure, the transparency of the target pixel can be understood as being used to reflect the transparency or visibility of the target pixel itself. When the target pixel is completely transparent, the image content below it can be displayed through the pixel; when the target pixel is semi-transparent, the occlusion situation of the target pixel to the image below it can be determined according to the transparency of the target pixel. The value range of the transparency of the pixel is 0% - 100%. Among them, a transparency of 100% means that the pixel is completely transparent, a transparency of 0% means that the pixel is completely opaque, and a transparency between the two means that the pixel is semi-transparent.
[0073] In one embodiment of the present disclosure, obtaining the transparency of the target pixel according to the distance information of the object to be navigated can be understood as substituting the distance information of the object to be navigated into the transparency algorithm according to the pre-obtained transparency algorithm for calculation to obtain the transparency of the target pixel; or can be understood as obtaining a pre-trained transparency model, taking the distance information of the object to be navigated as input and inputting it into the transparency model to obtain the transparency of the target pixel output by the transparency model; or can be understood as querying in a pre-obtained transparency database according to the distance information of the object to be navigated to obtain the transparency of the target pixel corresponding to the distance information of the object to be navigated.
[0074] In the technical solution of the present disclosure, by obtaining the distance information of the object to be navigated corresponding to the target pixel, that is, the information for indicating the target distance between the target pixel corresponding to the target pixel and the object to be navigated, and obtaining the transparency of the target pixel corresponding to the target lane element according to the distance information of the object to be navigated, making the transparency of the target pixel negatively correlated with the target distance, and rendering the navigation image according to the transparency of the target pixel. Among them, in the rendered navigation image, if a certain lane element is closer to the object to be navigated, the transparency of the pixel used to display the lane element is higher, and if a certain lane element is farther from the object to be navigated, the transparency of the pixel used to display the lane element is lower. Thus, the user cannot estimate the relative position between the object to be navigated and the lane element based on the lane element closer to the object to be navigated in the navigation image. Therefore, the technical solution of the present disclosure can achieve blurring of the lane lines around the vehicle, ensuring that even when the accuracy of the vehicle positioning information is poor, the user cannot know their own lane position by viewing the navigation screen, and the user will not be interfered by incorrect positioning information, thereby improving the user experience. In one implementation manner of the present disclosure, the distance information of the object to be navigated includes the square of the length of the semi-minor axis of the target ellipse, the center of the target ellipse coincides with the position of the object to be navigated, the semi-major axis of the target ellipse coincides with the moving direction of the object to be navigated, and the target ellipse passes through the target pixel.
[0075] In one embodiment of the present disclosure, the target ellipse can be understood as an ellipse with an eccentricity greater than 0 and less than 1.
[0076] Exemplarily, Figure 2 A schematic diagram showing a navigation image according to an embodiment of the present disclosure. As Figure 2 shown, the target ellipse 201 passes through the target pixel 202, the center 211 of the target ellipse 201 coincides with the position of the object to be navigated 203, the semi-major axis 221 of the target ellipse 201 coincides with the moving direction 213 of the object to be navigated 203, and the distance information of the object to be navigated includes the square of the length of the semi-minor axis 231 of the target ellipse 201.
[0077] In the technical solution of the present disclosure, by defining that the distance information of the object to be navigated includes the square of the length of the semi-minor axis of the target ellipse, where the center of the target ellipse coincides with the position of the object to be navigated, the semi-major axis of the target ellipse coincides with the moving direction of the object to be navigated, and the target ellipse passes through the target pixel, it can be ensured that the lane elements in front of the object to be navigated in the navigation image gradually change to transparency when they are far from the object to be navigated, while the lane elements on both sides of the object to be navigated in the navigation image only start to gradually change to transparency when they are close to the object to be navigated. Thus, when the viewing angle of the navigation image is located at the upper rear of the object to be navigated, the rendering effect of the lane elements in front of the object to be navigated is similar to the rendering effect of the lane elements on both sides of the object to be navigated, which helps to maintain the consistency of the rendering effect of the lane elements in the navigation image and improves the user experience.
[0078] In an implementation manner of the present disclosure, when the target pixel is located in the first quadrant of the coordinate system to be navigated, the target pixel is located in the second quadrant of the coordinate system to be navigated, the target pixel coincides with the horizontal axis of the coordinate system to be navigated, the target pixel coincides with the positive semi-axis of the vertical axis of the coordinate system to be navigated, or the target pixel coincides with the origin of the coordinate system to be navigated, the eccentricity of the target ellipse is the first eccentricity;
[0079] When the target pixel is located in the third quadrant of the coordinate system to be navigated, the target pixel is located in the fourth quadrant of the coordinate system to be navigated, or the target pixel coincides with the negative semi-axis of the vertical axis of the coordinate system to be navigated, the eccentricity of the target ellipse is the second eccentricity, and the second eccentricity is less than the first eccentricity;
[0080] Wherein, the coordinate system to be navigated is a rectangular coordinate system, the origin of the coordinate system to be navigated coincides with the position of the object to be navigated, and the positive semi-axis of the vertical axis of the coordinate system to be navigated coincides with the moving direction of the object to be navigated.
[0081] In an embodiment of the present disclosure, the coordinate system to be navigated can be established by a vertex shader.
[0082] In an embodiment of the present disclosure, the first eccentricity can be 0.5, and the second eccentricity can be 0.25.
[0083] Exemplarily, Figure 3 A schematic diagram showing a navigation image according to an embodiment of the present disclosure. As Figure 3As shown, when the target pixel is located in the first quadrant 301 of the navigation coordinate system, the target pixel is located in the second quadrant 302 of the navigation coordinate system, the target pixel coincides with the horizontal axis 303 of the navigation coordinate system, the target pixel coincides with the positive semi-axis 304 of the vertical axis of the navigation coordinate system, or the target pixel coincides with the origin 305 of the navigation coordinate system, the eccentricity of the target ellipse 310 is the first eccentricity; when the target pixel is located in the third quadrant 306 of the navigation coordinate system, the target pixel is located in the fourth quadrant 307 of the navigation coordinate system, or the target pixel coincides with the negative semi-axis 308 of the vertical axis of the navigation coordinate system, the eccentricity of the target ellipse 310 is the second eccentricity, where the second eccentricity is less than the first eccentricity.
[0084] In the technical solution of the present disclosure, by defining that when the target pixel is located in the first quadrant of the navigation coordinate system, the target pixel is located in the second quadrant of the navigation coordinate system, the target pixel coincides with the horizontal axis of the navigation coordinate system, the target pixel coincides with the positive semi-axis of the vertical axis of the navigation coordinate system, or the target pixel coincides with the origin of the navigation coordinate system, the eccentricity of the target ellipse is the first eccentricity, and by defining that when the target pixel is located in the third quadrant of the navigation coordinate system, the target pixel is located in the fourth quadrant of the navigation coordinate system, or the target pixel coincides with the negative semi-axis of the vertical axis of the navigation coordinate system, the eccentricity of the target ellipse is the second eccentricity, and the second eccentricity is less than the first eccentricity; the navigation coordinate system is a rectangular coordinate system in a plane, the origin of the navigation coordinate system coincides with the position of the navigation object, and the positive semi-axis of the vertical axis of the navigation coordinate system coincides with the moving direction of the navigation object, so that when the viewing angle of the navigation image is located behind and above the navigation object, the rendering effect of the lane elements in front of the navigation object can be similar to the rendering effects of the lane elements on both sides of the navigation object and the lane elements behind the navigation object, which helps to maintain the consistency of the rendering effects of the lane elements in the navigation image and improves the user experience.
[0085] In an implementation manner of the present disclosure, before obtaining the distance information of the navigation object corresponding to the target pixel, the method further includes:
[0086] Obtaining the vertex coordinates of the triangular mesh vertices corresponding to at least one road surface element, the position coordinates of the navigation object, and the moving direction indication information for indicating the moving direction of the navigation object;
[0087] Obtaining the target vertex coordinates of the corresponding triangular mesh vertices in the navigation coordinate system according to the vertex coordinates, the position coordinates, and the moving direction indication information;
[0088] Obtaining the pixel coordinates of the pixels in the corresponding triangular mesh according to the target vertex coordinates;
[0089] Obtaining the distance information of the navigation object corresponding to the target pixel includes:
[0090] Obtain the distance information of the navigated object corresponding to the target pixel according to the pixel coordinates.
[0091] In an implementation manner of the present disclosure, the triangular mesh corresponding to the road surface element can be understood as the triangular mesh used to display the corresponding road surface element.
[0092] In an implementation manner of the present disclosure, the vertex coordinates and the position coordinates can be understood as obtained according to the rendering data, and the movement direction indication information can be understood as obtained according to the positioning data.
[0093] In an implementation manner of the present disclosure, the vertex coordinates and the position coordinates of the navigated object can be understood as coordinates in the same coordinate system. Exemplarily, this coordinate system can be the rendering coordinate system.
[0094] In an implementation manner of the present disclosure, obtaining the vertex coordinates, the position coordinates, and the movement direction indication information can be understood as reading the pre-stored vertex coordinates, the position coordinates, and the movement direction indication information, or can be understood as obtaining the positioning data and processing the positioning data to obtain the above-mentioned vertex coordinates, the position coordinates, and the movement direction indication information. Among them, the positioning data can include non-lane-level positioning data, where the non-lane-level positioning data can be understood as the positioning data other than the lane-level positioning data, and the lane-level positioning data can include real-time kinematic (RTK) positioning data and visual-level lane-level positioning data, and the visual-level lane-level positioning data can be obtained by processing the images collected by the camera on the navigated object.
[0095] In an implementation manner of the present disclosure, obtaining the target vertex coordinates of the corresponding triangular mesh vertex in the navigated coordinate system according to the vertex coordinates, the position coordinates, and the movement direction indication information can be understood as substituting the vertex coordinates, the position coordinates, and the movement direction indication information into the operation according to the pre-set algorithm to obtain the target vertex coordinates of the corresponding triangular mesh vertex in the navigated coordinate system. It can also be understood as sending the vertex coordinates, the position coordinates, and the movement direction indication information and receiving the target vertex coordinates of the corresponding triangular mesh vertex in the navigated coordinate system sent by other devices or systems. Exemplarily, the vertex coordinates, the position coordinates, and the movement direction indication information can be passed into the vertex shader, and the vertex shader establishes the navigated coordinate system and obtains the target vertex coordinates of the corresponding triangular mesh vertex output by the vertex shader.
[0096] In an implementation of the present disclosure, obtaining the pixel coordinates of the pixels in the corresponding triangular mesh according to the target vertex coordinates can be understood as substituting the target vertex coordinates into an operation according to a preset algorithm to obtain the pixel coordinates of the pixels in the corresponding triangular mesh; it can also be understood as sending the target vertex coordinates and receiving the pixel coordinates of the pixels in the corresponding triangular mesh sent by other devices or systems. Exemplarily, the target vertex coordinates can be passed into a pixel shader to obtain the pixel coordinates of the pixels in the corresponding triangular mesh output by the pixel shader.
[0097] In the technical solution of the present disclosure, by obtaining the vertex coordinates of the vertices of the triangular mesh corresponding to at least one road surface element, the position coordinates of the object to be navigated, and the movement direction indication information for indicating the movement direction of the object to be navigated; obtaining the target vertex coordinates of the corresponding triangular mesh vertices in the navigation coordinate system according to the vertex coordinates, position coordinates, and movement direction indication information; obtaining the pixel coordinates of the pixels in the corresponding triangular mesh according to the target vertex coordinates; and obtaining the distance information of the object to be navigated corresponding to the target pixel according to the pixel coordinates, the accuracy of the obtained distance information of the object to be navigated can be improved.
[0098] In an implementation of the present disclosure, obtaining the target vertex coordinates of the corresponding triangular mesh vertices in the navigation coordinate system according to the vertex coordinates, position coordinates, and movement direction indication information includes:
[0099] Obtaining the object vector from the position of the object to be navigated to the vertex of the corresponding triangular mesh according to the vertex coordinates and position coordinates;
[0100] Performing vector decomposition according to the object vector and the movement direction indication information to obtain the basis vectors corresponding to the horizontal axis and the vertical axis in the navigation coordinate system respectively;
[0101] Obtaining the target vertex coordinates according to the basis vectors.
[0102] In the technical solution of the present disclosure, by obtaining the object vector from the position of the object to be navigated to the vertex of the corresponding triangular mesh according to the vertex coordinates and position coordinates; performing vector decomposition according to the object vector and the movement direction indication information to obtain the basis vectors corresponding to the horizontal axis and the vertical axis in the navigation coordinate system respectively; and obtaining the target vertex coordinates according to the basis vectors, the operation steps for obtaining the target vertex coordinates can be simplified, the amount of calculation can be reduced, and the processing efficiency can be improved.
[0103] In an implementation of the present disclosure, before obtaining the distance information of the object to be navigated corresponding to the target pixel, the method further includes:
[0104] Obtain road surface element category information corresponding to the vertices of the triangular mesh, where the road surface element category information is used to indicate the category of the road surface element corresponding to the triangular mesh where the triangular mesh vertex is located;
[0105] Obtain the distance information of the object to be navigated corresponding to the target pixel according to the pixel coordinates, including:
[0106] In response to determining that the road surface element corresponding to the triangular mesh where the target pixel is located is a lane element according to the road surface element category information, obtain the distance information of the object to be navigated corresponding to the target pixel according to the pixel coordinates.
[0107] In an implementation manner of the present disclosure, the category of the road surface element can be understood as indicating whether the road surface element is a lane element, that is, a lane mark, or can also be understood as specifically indicating the category of the road surface element, where the category of the road surface element can include lane marks, pedestrians, vehicles, trees, buildings, traffic lights, road signs, etc.
[0108] In an implementation manner of the present disclosure, obtaining the road surface element category information corresponding to the triangular mesh vertex can be understood as reading the pre-stored road surface element category information corresponding to the triangular mesh vertex, or can also be understood as obtaining the road surface element category information corresponding to the triangular mesh vertex from other devices or systems.
[0109] In an implementation manner of the present disclosure, the pixel shader can obtain the distance information of the object to be navigated corresponding to the target pixel according to the pixel coordinates in response to determining that the road surface element corresponding to the triangular mesh where the target pixel is located is a lane element according to the road surface element category information.
[0110] In the technical solution of the present disclosure, by obtaining the road surface element category information corresponding to the triangular mesh vertex, where the road surface element category information is used to indicate the category of the road surface element corresponding to the triangular mesh where the triangular mesh vertex is located, and in response to determining that the road surface element corresponding to the triangular mesh where the target pixel is located is a lane element according to the road surface element category information, obtaining the distance information of the object to be navigated corresponding to the target pixel according to the pixel coordinates, it can be ensured that the target pixels for obtaining transparency subsequently are only the pixels corresponding to the road surface elements that are lane elements, so as to ensure that only the content corresponding to the lane elements in the rendered navigation image is transparently processed, thereby not affecting the presentation effect of other elements in the navigation image and ensuring a better user experience.
[0111] In an implementation manner of the present disclosure, before obtaining the distance information of the object to be navigated corresponding to the target pixel, the method further includes:
[0112] Obtain positioning data indication information;
[0113] Obtain the distance information of the object to be navigated corresponding to the target pixel according to the pixel coordinates, including:
[0114] In response to determining that at least one of the vertex coordinates, position coordinates, and movement direction indication information is obtained based on non-lane-level positioning data according to the positioning data indication information, obtain the distance information of the navigated object corresponding to the target pixel according to the pixel coordinates.
[0115] In an implementation manner of the present disclosure, obtaining the positioning data indication information can be understood as reading the pre-stored positioning data indication information, or can be understood as obtaining the positioning data indication information from other devices or systems.
[0116] In an implementation manner of the present disclosure, it can be the pixel shader that, in response to determining that at least one of the vertex coordinates, position coordinates, and movement direction indication information is obtained based on non-lane-level positioning data according to the positioning data indication information, obtains the distance information of the navigated object corresponding to the target pixel according to the pixel coordinates.
[0117] In the technical solution of the present disclosure, by obtaining the positioning data indication information, and in response to determining that at least one of the vertex coordinates, position coordinates, and movement direction indication information is obtained based on non-lane-level positioning data according to the positioning data indication information, obtaining the distance information of the navigated object corresponding to the target pixel according to the pixel coordinates, it can be ensured that only when the reliability of at least one of the vertex coordinates, position coordinates, and movement direction indication information cannot support presenting the relative position relationship between the navigated object and the lane elements in the navigation image, the lane elements in the navigation image are transparently processed, so as to ensure that the user can only know the relatively accurate relative position relationship between the navigated object and the lane elements through the navigation image, improving the user experience.
[0118] Figure 4 The flowchart showing the navigation image rendering method according to an embodiment of the present disclosure is as follows Figure 4 As shown, the navigation image rendering method includes the following steps:
[0119] In step S401, obtain the vertex coordinates of the triangular mesh vertices corresponding to at least one road surface element, the position coordinates of the navigated object, and the road surface element category information corresponding to the triangular mesh vertices according to the rendering data;
[0120] In step S402, obtain the movement direction indication information for indicating the movement direction of the navigated object according to the positioning data.
[0121] In step S403, input the vertex coordinates, road surface element category information, position coordinates, and movement direction indication information into the vertex shader, and establish a navigation coordinate system by the vertex shader.
[0122] In step S404, the vertex shader obtains the vector of the object to be navigated from the position of the object to be navigated to the vertex of the corresponding triangular mesh according to the vertex coordinates and the position coordinates, decomposes the vector according to the vector of the object to be navigated and the movement direction indication information to obtain the basis vectors corresponding to the horizontal axis and the vertical axis in the coordinate system of the object to be navigated, and obtains the target vertex coordinates according to the basis vectors.
[0123] In step S405, the vertex shader passes the road surface element category information and the target vertex coordinates to the pixel shader.
[0124] In step S406, the pixel shader obtains the positioning data indication information.
[0125] In step S407, the pixel shader determines whether at least one of the vertex coordinates, the position coordinates, and the movement direction indication information is obtained according to the non-lane-level positioning data according to the positioning data indication information.
[0126] In step S408, in response to determining that at least one of the vertex coordinates, the position coordinates, and the movement direction indication information is obtained according to the non-lane-level positioning data according to the positioning data indication information, the pixel shader determines whether the road surface element corresponding to the triangular mesh where the target pixel is located is a lane element according to the road surface element category information.
[0127] In step S409, in response to determining that the road surface element corresponding to the triangular mesh where the target pixel is located is a lane element according to the road surface element category information, the corresponding pixel coordinates of the pixels in the triangular mesh are obtained according to the target vertex coordinates, and the distance information of the object to be navigated corresponding to the target pixel is obtained according to the pixel coordinates.
[0128] Wherein, the distance information of the object to be navigated includes the square of the semi-minor axis length of the target ellipse, the center of the target ellipse coincides with the position of the object to be navigated, the semi-major axis of the target ellipse coincides with the movement direction of the object to be navigated, and the target ellipse passes through the target pixel.
[0129] When the target pixel is in the first quadrant of the coordinate system of the object to be navigated, the target pixel is in the second quadrant of the coordinate system of the object to be navigated, the target pixel coincides with the horizontal axis of the coordinate system of the object to be navigated, the target pixel coincides with the positive semi-axis of the vertical axis of the coordinate system of the object to be navigated, or the target pixel coincides with the origin of the coordinate system of the object to be navigated, the eccentricity of the target ellipse is the first eccentricity;
[0130] When the target pixel is in the third quadrant of the coordinate system of the object to be navigated, the target pixel is in the fourth quadrant of the coordinate system of the object to be navigated, or the target pixel coincides with the negative semi-axis of the vertical axis of the coordinate system of the object to be navigated, the eccentricity of the target ellipse is the second eccentricity, and the second eccentricity is less than the first eccentricity;
[0131] The navigated coordinate system is a plane rectangular coordinate system. The origin of the navigated coordinate system coincides with the position of the navigated object, and the positive semi-axis of the vertical axis of the navigated coordinate system coincides with the moving direction of the navigated object.
[0132] In step S410, a linear transformation is performed according to the square of the semi-minor axis length of the target ellipse in the navigated object distance information to obtain the transparency of the target pixel.
[0133] In step S411, the navigation image is rendered according to the transparency of the target pixel.
[0134] Figure 5 The structural block diagram of a navigation image rendering device according to an embodiment of the present disclosure is shown. Among them, the device can be implemented as part or all of an electronic device through software, hardware, or a combination of both.
[0135] As Figure 5 shown, the navigation image rendering device 500 includes:
[0136] A distance acquisition module 501, configured to acquire navigated object distance information corresponding to a target pixel. The target pixel corresponds to a target lane element, and the navigated object distance information is used to indicate the target distance between the target pixel and the navigated object;
[0137] A transparency acquisition module 502, configured to acquire the transparency of the target pixel according to the navigated object distance information. The transparency of the target pixel is negatively correlated with the target distance;
[0138] An image rendering module 503, configured to render a navigation image according to the transparency of the target pixel.
[0139] In the technical solution of the present disclosure, by acquiring the navigated object distance information corresponding to the target pixel, that is, the information used to indicate the target distance between the target pixel corresponding to the target pixel and the navigated object, and acquiring the transparency of the target pixel corresponding to the target lane element according to the navigated object distance information, making the transparency of the target pixel negatively correlated with the target distance, and rendering the navigation image according to the transparency of the target pixel. Among them, in the rendered navigation image, if a certain lane element is closer to the navigated object, the transparency of the pixel used to display the lane element is higher, and if a certain lane element is farther from the navigated object, the transparency of the pixel used to display the lane element is lower. Thus, the user cannot estimate the relative position between the navigated object and the lane element based on the lane element closer to the navigated object in the navigation image. Therefore, the technical solution of the present disclosure can achieve blurring of the lane lines around the vehicle, ensuring that even when the accuracy of the vehicle positioning information is poor, the user cannot know their own lane position by viewing the navigation screen, and the user will not be interfered by incorrect positioning information, thereby improving the user experience.
[0140] The present disclosure also discloses an electronic device. Figure 6 The block diagram of the electronic device according to an embodiment of the present disclosure is shown.
[0141] As Figure 6 shown, the electronic device includes a memory and a processor. Among them, the memory is used to store one or more computer instructions, and the one or more computer instructions are executed by the processor to implement the method according to the embodiment of the present disclosure.
[0142] An embodiment of the present disclosure provides a navigation image rendering method, including:
[0143] Obtain the distance information of the object to be navigated corresponding to the target pixel. The target pixel corresponds to the target lane element, and the distance information of the object to be navigated is used to indicate the target distance between the target pixel and the object to be navigated;
[0144] Obtain the transparency of the target pixel according to the distance information of the object to be navigated. The transparency of the target pixel is negatively correlated with the target distance;
[0145] Render the navigation image according to the transparency of the target pixel.
[0146] In an implementation manner of the present disclosure, the distance information of the object to be navigated includes the square of the semi-minor axis length of the target ellipse. The center of the target ellipse coincides with the position of the object to be navigated, the semi-major axis of the target ellipse coincides with the moving direction of the object to be navigated, and the target ellipse passes through the target pixel.
[0147] In an implementation manner of the present disclosure, when the target pixel is located in the first quadrant of the navigation coordinate system, the target pixel is located in the second quadrant of the navigation coordinate system, the target pixel coincides with the horizontal axis of the navigation coordinate system, the target pixel coincides with the positive semi-axis of the vertical axis of the navigation coordinate system, or the target pixel coincides with the origin of the navigation coordinate system, the eccentricity of the target ellipse is the first eccentricity;
[0148] When the target pixel is located in the third quadrant of the navigation coordinate system, the target pixel is located in the fourth quadrant of the navigation coordinate system, or the target pixel coincides with the negative semi-axis of the vertical axis of the navigation coordinate system, the eccentricity of the target ellipse is the second eccentricity, and the second eccentricity is less than the first eccentricity;
[0149] Among them, the navigation coordinate system is a plane rectangular coordinate system. The origin of the navigation coordinate system coincides with the position of the object to be navigated, and the positive semi-axis of the vertical axis of the navigation coordinate system coincides with the moving direction of the object to be navigated.
[0150] In an implementation manner of the present disclosure, before obtaining the distance information of the object to be navigated corresponding to the target pixel, the method further includes:
[0151] Obtain the vertex coordinates of the triangular mesh vertices corresponding to at least one road surface element, the position coordinates of the object to be navigated, and the movement direction indication information for indicating the movement direction of the object to be navigated;
[0152] Obtain the target vertex coordinates of the corresponding triangular mesh vertex in the coordinate system of the object to be navigated according to the vertex coordinates, position coordinates, and movement direction indication information;
[0153] Obtain the pixel coordinates of the pixels in the corresponding triangular mesh according to the target vertex coordinates;
[0154] Obtain the distance information of the object to be navigated corresponding to the target pixel, including:
[0155] Obtain the distance information of the object to be navigated corresponding to the target pixel according to the pixel coordinates.
[0156] In an implementation manner of the present disclosure, obtaining the target vertex coordinates of the corresponding triangular mesh vertex in the coordinate system of the object to be navigated according to the vertex coordinates, position coordinates, and movement direction indication information includes:
[0157] Obtain the object vector of the object to be navigated from the position of the object to be navigated to the vertex of the corresponding triangular mesh according to the vertex coordinates and position coordinates;
[0158] Perform vector decomposition according to the object vector and the movement direction indication information to obtain the basis vectors corresponding to the horizontal axis and the vertical axis in the coordinate system of the object to be navigated;
[0159] Obtain the target vertex coordinates according to the basis vectors.
[0160] In an implementation manner of the present disclosure, before obtaining the distance information of the object to be navigated corresponding to the target pixel, the method further includes:
[0161] Obtain the road surface element category information corresponding to the triangular mesh vertex, where the road surface element category information is used to indicate the category of the road surface element corresponding to the triangular mesh where the triangular mesh vertex is located;
[0162] Obtain the distance information of the object to be navigated corresponding to the target pixel according to the pixel coordinates, including:
[0163] In response to determining that the road surface element corresponding to the triangular mesh where the target pixel is located is a lane element according to the road surface element category information, obtain the distance information of the object to be navigated corresponding to the target pixel according to the pixel coordinates.
[0164] In an implementation manner of the present disclosure, before obtaining the distance information of the object to be navigated corresponding to the target pixel, the method further includes:
[0165] Obtain the positioning data indication information;
[0166] Obtaining distance information of a navigated object corresponding to a target pixel according to pixel coordinates, including:
[0167] In response to determining that at least one of the vertex coordinates, position coordinates, and movement direction indication information is obtained according to non-lane-level positioning data based on the positioning data indication information, obtaining distance information of a navigated object corresponding to a target pixel according to pixel coordinates.
[0168] Figure 7 A schematic structural diagram of a computer system suitable for implementing the method according to an embodiment of the present disclosure is shown.
[0169] As Figure 7 shown, the computer system includes a processing unit, which can execute various methods in the above embodiments according to a program stored in a read-only memory (ROM) or a program loaded from a storage section into a random access memory (RAM). In the RAM, various programs and data required for the operation of the computer system are also stored. The processing unit, ROM, and RAM are connected to each other via a bus. An input / output (I / O) interface is also connected to the bus.
[0170] The following components are connected to the I / O interface: an input part including a keyboard, a mouse, etc.; an output part including a cathode ray tube (CRT), a liquid crystal display (LCD), etc. and a speaker, etc.; a storage part including a hard disk, etc.; and a communication part including a network interface card such as a LAN card, a modem, etc. The communication part performs a communication process via a network such as the Internet. A drive is also connected to the I / O interface as needed. A removable medium, such as a magnetic disk, an optical disk, a magneto-optical disk, a semiconductor memory, etc., is installed on the drive as needed, so that a computer program read from it can be installed into the storage part as needed. Among them, the processing unit can be implemented as a processing unit such as a CPU, a GPU, a TPU, an FPGA, an NPU, etc.
[0171] Specifically, according to an embodiment of the present disclosure, the above-described method can be implemented as a computer software program. For example, an embodiment of the present disclosure includes a computer program product, which includes a computer program tangibly contained on a machine-readable medium, and the computer program includes program code for executing the above method. In such an embodiment, the computer program can be downloaded and installed from the network through the communication part, and / or installed from a removable medium.
[0172] The flowcharts and block diagrams in the accompanying drawings illustrate the possible architectures, functions, and operations of systems, methods, and computer program products according to various embodiments of the present disclosure. In this regard, each block in the flowchart or block diagram may represent a module, a segment of a program, or a part of code, which contains one or more executable instructions for implementing the specified logical function. It should also be noted that in some alternative implementations, the functions marked in the blocks may occur in a different order than that marked in the accompanying drawings. For example, two consecutive blocks shown may actually be executed substantially in parallel, and they may sometimes be executed in the reverse order, depending on the functions involved. It should also be noted that each block in the block diagram and / or flowchart, as well as combinations of blocks in the block diagram and / or flowchart, can be implemented by a dedicated hardware-based system that performs the specified functions or operations, or can be implemented by a combination of dedicated hardware and computer instructions.
[0173] The units or modules described in the embodiments of the present disclosure can be implemented in software or in programmable hardware. The described units or modules can also be provided in a processor, and the names of these units or modules do not, in some cases, constitute a limitation to the units or modules themselves.
[0174] On the other hand, the present disclosure also provides a computer-readable storage medium, which can be the computer-readable storage medium included in the electronic device or computer system in the above embodiments; or it can exist separately and be a computer-readable storage medium not assembled into the device. The computer-readable storage medium stores one or more programs, and the programs are used by one or more processors to execute the methods described in the present disclosure.
[0175] The above description is only a preferred embodiment of the present disclosure and an explanation of the applied technical principles. Those skilled in the art should understand that the scope of the invention involved in the present disclosure is not limited to the technical solutions formed by the specific combination of the above technical features, but should also cover other technical solutions formed by any combination of the above technical features or their equivalent features without departing from the inventive concept. For example, the technical solutions formed by mutually replacing the above features with the technical features (but not limited to) having similar functions disclosed in the present disclosure.
Claims
1. A method for rendering navigation images, wherein, Including: Obtaining distance information of a navigated object corresponding to a target pixel, where the target pixel corresponds to a target lane element, and the distance information of the navigated object is used to indicate a target distance between the target pixel and the navigated object; Obtaining transparency of the target pixel according to the distance information of the navigated object, where the transparency of the target pixel is negatively correlated with the target distance; Rendering a navigation image according to the transparency of the target pixel.
2. The navigation image rendering method according to claim 1, wherein, The distance information of the navigated object includes the square of the semi-minor axis length of a target ellipse, the center of the target ellipse coincides with the position of the navigated object, the semi-major axis of the target ellipse coincides with the moving direction of the navigated object, and the target ellipse passes through the target pixel.
3. The navigation image rendering method according to claim 2, wherein, When the target pixel is located in the first quadrant of the navigated coordinate system, the target pixel is located in the second quadrant of the navigated coordinate system, the target pixel coincides with the horizontal axis of the navigated coordinate system, the target pixel coincides with the positive semi-axis of the vertical axis of the navigated coordinate system, or the target pixel coincides with the origin of the navigated coordinate system, the eccentricity of the target ellipse is a first eccentricity; When the target pixel is located in the third quadrant of the navigated coordinate system, the target pixel is located in the fourth quadrant of the navigated coordinate system, or the target pixel coincides with the negative semi-axis of the vertical axis of the navigated coordinate system, the eccentricity of the target ellipse is a second eccentricity, and the second eccentricity is less than the first eccentricity; Wherein, the navigated coordinate system is a plane rectangular coordinate system, the origin of the navigated coordinate system coincides with the position of the navigated object, and the positive semi-axis of the vertical axis of the navigated coordinate system coincides with the moving direction of the navigated object.
4. The navigation image rendering method according to any one of claims 1-3, wherein, Before obtaining the distance information of the navigated object corresponding to the target pixel, the method further includes: Obtaining vertex coordinates of triangular mesh vertices corresponding to at least one road surface element, position coordinates of the navigated object, and movement direction indication information for indicating the moving direction of the navigated object; Obtaining target vertex coordinates of the corresponding triangular mesh vertices in the navigated coordinate system according to the vertex coordinates, the position coordinates, and the movement direction indication information; Obtaining pixel coordinates of pixels in the corresponding triangular mesh according to the target vertex coordinates; The obtaining the distance information of the navigated object corresponding to the target pixel includes: Obtaining the distance information of the navigated object corresponding to the target pixel according to the pixel coordinates.
5. The navigation image rendering method according to claim 4, wherein, The obtaining the target vertex coordinates of the corresponding triangular mesh vertices in the navigated coordinate system according to the vertex coordinates, the position coordinates, and the movement direction indication information includes: Obtaining a navigated object vector from the position of the navigated object to the vertex of the corresponding triangular mesh according to the vertex coordinates and the position coordinates; Performing vector decomposition according to the navigated object vector and the movement direction indication information to obtain basis vectors corresponding to the horizontal axis and the vertical axis in the navigated coordinate system respectively; Obtaining the target vertex coordinates according to the basis vectors.
6. The navigation image rendering method according to claim 4, wherein, Before obtaining the distance information of the navigated object corresponding to the target pixel, the method further includes: Obtain road surface element category information corresponding to the vertices of the triangular mesh, where the road surface element category information is used to indicate the category of the road surface element corresponding to the triangular mesh where the vertices of the triangular mesh are located; The obtaining of the distance information of the object to be navigated corresponding to the target pixel according to the pixel coordinates includes: In response to determining that the road surface element corresponding to the triangular mesh where the target pixel is located is a lane element according to the road surface element category information, obtaining the distance information of the object to be navigated corresponding to the target pixel according to the pixel coordinates.
7. The navigation image rendering method according to claim 4, wherein, Before the obtaining of the distance information of the object to be navigated corresponding to the target pixel, the method further includes: Obtain positioning data indication information; The obtaining of the distance information of the object to be navigated corresponding to the target pixel according to the pixel coordinates includes: In response to determining that at least one of the vertex coordinates, the position coordinates, and the movement direction indication information is obtained according to non-lane-level positioning data according to the positioning data indication information, obtaining the distance information of the object to be navigated corresponding to the target pixel according to the pixel coordinates.
8. A navigation image rendering device, wherein, Includes: A distance acquisition module configured to acquire distance information of an object to be navigated corresponding to a target pixel, the target pixel corresponding to a target lane element, and the distance information of the object to be navigated being used to indicate a target distance between the target pixel and the object to be navigated; A transparency acquisition module configured to acquire the transparency of the target pixel according to the distance information of the object to be navigated, and the transparency of the target pixel is negatively correlated with the target distance; An image rendering module configured to render a navigation image according to the transparency of the target pixel.
9. An electronic device, wherein, Includes a memory and a processor; the memory is used to store one or more computer instructions, and the one or more computer instructions are executed by the processor to implement the method steps described in any one of claims 1-7.
10. A computer-readable storage medium having computer instructions stored thereon, wherein, When the computer instructions are executed by the processor, the method steps described in any one of claims 1-7 are implemented.
Citation Information
Patent Citations
Apparatus and methods of displaying navigation instructions
CN105765344A
Map rendering method and device, terminal device and storage medium
CN111121794A