3D Path Display Method, Device, Readable Storage Medium, and Electronic Device

By determining the sampling point set in three-dimensional space and generating a three-dimensional path curve, combining the mapping relationship between the path area and the two-dimensional picture, the problem of low three-dimensional path display efficiency in the prior art is solved, and the dynamic generation and display of three-dimensional paths are realized, and efficiency and accuracy are improved.

CN114170381BActive Publication Date: 2025-06-13BEIKE TECH CO LTD
View PDF 1 Cites 0 Cited by

Patent Information

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

AI Technical Summary

Technical Problem

The lack of mature solutions for drawing three-dimensional path shapes in the prior art leads to low efficiency in the three-dimensional path display and the inability to realize real-time dynamic path display.

Method used

By determining the first set of sampling points from the target three-dimensional space, a curve representing the three-dimensional path to be generated, and a three-dimensional path composed of the set of path areas is generated based on the curve. Then, the mapping relationship between the vertices of the path areas in the path area set and the pixel points in the preset two-dimensional picture is determined, and corresponding pixels are inserted into the path areas in the path area set according to the mapping relationship to show the three-dimensional path after the pixel is inserted.

Benefits of technology

It realizes dynamic generation and display of three-dimensional paths in a three-dimensional scene, improves the efficiency of generating three-dimensional paths, can display three-dimensional paths to users in real time, and improves the efficiency and accuracy of path display.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN114170381B_ABST
    Figure CN114170381B_ABST
Patent Text Reader

Abstract

An embodiment of the present disclosure discloses a three-dimensional path display method, apparatus, computer-readable storage medium, electronic device, and computer program product. Among them, the method includes: determining a first set of sampling points representing points passed by a to-be-generated three-dimensional path from a target three-dimensional space; generating a curve representing the to-be-generated three-dimensional path based on the first set of sampling points; generating a three-dimensional path composed of a set of path regions based on the curve; determining a mapping relationship between the vertices of each path region in the set of path regions and the pixel points in a preset two-dimensional picture; inserting corresponding pixels into the path regions in the set of path regions according to the mapping relationship, and displaying the three-dimensional path after inserting the pixels. The embodiments of the present disclosure greatly improve the efficiency of generating a three-dimensional path, can display the three-dimensional path to the user in real time, and improve the efficiency and accuracy of path display.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present disclosure relates to the field of computer technologies, and in particular, to a three-dimensional path display method, apparatus, computer-readable storage medium, computer program product, and electronic device. Background Art

[0002] Dynamic path display refers to a technology that visualizes a path passing through given starting point information, ending point information, waypoint information, etc. on an electronic map.

[0003] In existing technical solutions, to draw a dynamic path, generally, SVG (Scalable Vector Graphics) graphics are used. For example, after describing a line path with a Bezier curve and setting the line width, a two-dimensional path shape can be drawn. However, in three-dimensional path display, there is currently no mature solution for drawing shapes, and usually, graphics need to be drawn manually. Summary of the Invention

[0004] Embodiments of the present disclosure provide a three-dimensional path display method, apparatus, computer-readable storage medium, electronic device, and computer program product.

[0005] Embodiments of the present disclosure provide a three-dimensional path display method, which includes: determining a first set of sampling points representing points passed by a to-be-generated three-dimensional path from a target three-dimensional space; generating a curve representing the to-be-generated three-dimensional path based on the first set of sampling points; generating a three-dimensional path composed of a set of path regions based on the curve; determining a mapping relationship between vertices of each path region in the set of path regions and pixel points in a preset two-dimensional picture; and inserting pixels included in corresponding regions of the preset two-dimensional picture into the path regions in the set of path regions according to the mapping relationship, and displaying the three-dimensional path after inserting the pixels.

[0006] In some embodiments, generating a three-dimensional path composed of a set of path regions based on the curve includes: determining a second set of sampling points from the curve; for a sampling point in the second set of sampling points, determining the normal direction of the second sampling point; determining the position of a path boundary point corresponding to the second sampling point based on the normal direction; and generating a three-dimensional path composed of a set of path regions based on the obtained path boundary points.

[0007] In some embodiments, generating a three-dimensional path composed of a set of path regions based on the obtained path boundary points includes: generating a triangular mesh as a path region based on the obtained path boundary points, and obtaining a three-dimensional path composed of a set of triangular meshes, where a region between two adjacent second sampling points in the three-dimensional path is composed of two triangular meshes having a common vertex.

[0008] In some embodiments, determining the position of the path boundary point corresponding to the second sampling point based on the normal direction includes: determining the path width corresponding to the second sampling point based on the aspect ratio of the preset two-dimensional picture and the distance between adjacent second sampling points in the second sampling point set; and determining the position of the path boundary point corresponding to the second sampling point based on the path width and the normal direction.

[0009] In some embodiments, determining the position of the path boundary point corresponding to the second sampling point based on the path width and the normal direction includes: determining two path boundary points with equal distances from the second sampling point in the normal direction and the opposite direction of the normal of the second sampling point respectively based on the path width.

[0010] In some embodiments, generating a three-dimensional path composed of a set of path regions based on a curve includes: generating a three-dimensional path composed of a set of path regions on the curve based on the aspect ratio of the preset two-dimensional picture, where the path regions in the set of path regions are quadrilateral regions.

[0011] In some embodiments, determining the mapping relationship between the vertices of each path region in the set of path regions and the pixel points in the preset two-dimensional picture includes: determining the mapping relationship between the corresponding pixel points of the four vertices of each path region with a quadrilateral shape in the set of path regions and the four vertices of the preset two-dimensional picture according to the trend of the curve.

[0012] In some embodiments, inserting corresponding pixels into the path regions in the set of path regions according to the mapping relationship includes: for the path regions in the set of path regions, mapping the vertices of the path region to the vertices of the preset two-dimensional picture respectively; determining the color value of the pixels inserted at the points in the path region based on the corresponding relationship between the vertices of the path region and the vertices of the preset two-dimensional picture; and inserting the corresponding pixels into the path region based on the determined color value.

[0013] According to another aspect of the embodiments of the present disclosure, there is provided a three-dimensional path display device, which includes: a first determination module for determining a first sampling point set representing the points passed by the three-dimensional path to be generated from the target three-dimensional space; a first generation module for generating a curve representing the three-dimensional path to be generated based on the first sampling point set; a second generation module for generating a three-dimensional path composed of a set of path regions based on the curve; a second determination module for determining the mapping relationship between the vertices of each path region in the set of path regions and the pixel points in the preset two-dimensional picture; and a display module for inserting the pixels included in the corresponding region of the preset two-dimensional picture into the path regions in the set of path regions according to the mapping relationship and displaying the three-dimensional path after inserting the pixels.

[0014] According to another aspect of the embodiments of the present disclosure, there is provided a computer-readable storage medium storing a computer program for executing the above-described three-dimensional path display method.

[0015] According to another aspect of the embodiments of the present disclosure, there is provided an electronic device including: a processor; a memory for storing executable instructions executable by the processor; and the processor for reading the executable instructions from the memory and executing the instructions to implement the above-described three-dimensional path display method.

[0016] According to another aspect of the embodiments of the present disclosure, there is provided a computer program product including a computer program / instructions which, when executed by a processor, implement the steps of the above-described three-dimensional path display method.

[0017] Based on the three-dimensional path display method, apparatus, computer-readable storage medium, electronic device, and computer program product provided in the above embodiments of the present disclosure, by determining a first set of sampling points from a target three-dimensional space, generating a curve representing the three-dimensional path to be generated based on the first set of sampling points, then generating a three-dimensional path composed of a set of path regions based on the curve, then determining the mapping relationship between the vertices included in each path region and the pixel points in a preset two-dimensional picture, and finally inserting corresponding pixels into the path regions in the set of path regions according to the mapping relationship and displaying the three-dimensional path after inserting the pixels, the dynamic generation and display of a three-dimensional path in a three-dimensional scene are realized. Compared with the prior art that requires manual drawing of a three-dimensional path, the embodiments of the present disclosure can greatly improve the efficiency of generating a three-dimensional path, can display the three-dimensional path to the user in real time, and improve the efficiency and accuracy of path display.

[0018] The technical solutions of the present disclosure will be further described in detail below with reference to the accompanying drawings and embodiments. Description of the Drawings

[0019] By describing the embodiments of the present disclosure in more detail in conjunction with the accompanying drawings, the above and other objects, features, and advantages of the present disclosure will become more apparent. The drawings are used to provide a further understanding of the embodiments of the present disclosure, and constitute a part of the specification. Together with the embodiments of the present disclosure, they are used to explain the present disclosure and do not constitute a limitation to the present disclosure. In the drawings, the same reference numerals generally represent the same components or steps.

[0020] Figure 1 It is a system diagram applicable to the present disclosure.

[0021] Figure 2 It is a flowchart of a three-dimensional path display method provided by an exemplary embodiment of the present disclosure.

[0022] Figure 3It is a schematic flowchart of a three-dimensional path display method provided by another exemplary embodiment of the present disclosure.

[0023] Figure 4 It is an exemplary schematic diagram of a three-dimensional path composed of triangular meshes provided by another exemplary embodiment of the present disclosure.

[0024] Figure 5A It is an exemplary schematic diagram of a preset two-dimensional picture provided by another exemplary embodiment of the present disclosure.

[0025] Figure 5B It is an exemplary schematic diagram of a three-dimensional path display screen provided by another exemplary embodiment of the present disclosure.

[0026] Figure 6 It is a schematic flowchart of a three-dimensional path display method provided by another exemplary embodiment of the present disclosure.

[0027] Figure 7 It is a schematic structural diagram of a three-dimensional path display device provided by an exemplary embodiment of the present disclosure.

[0028] Figure 8 It is a schematic structural diagram of a three-dimensional path display device provided by another exemplary embodiment of the present disclosure.

[0029] Figure 9 It is a structural diagram of an electronic device provided by an exemplary embodiment of the present disclosure. Detailed implementation manners

[0030] Next, exemplary embodiments according to the present disclosure will be described in detail with reference to the accompanying drawings. Obviously, the described embodiments are only a part of the embodiments of the present disclosure, rather than all the embodiments of the present disclosure. It should be understood that the present disclosure is not limited by the exemplary embodiments described herein.

[0031] It should be noted that: Unless otherwise specifically stated, the relative arrangements, numerical expressions and values of the components and steps set forth in these embodiments do not limit the scope of the present disclosure.

[0032] Those skilled in the art can understand that the terms "first", "second", etc. in the embodiments of the present disclosure are only used to distinguish different steps, devices or modules, etc., and neither represent any specific technical meaning nor indicate an inevitable logical order between them.

[0033] It should also be understood that in the embodiments of the present disclosure, "a plurality of" may refer to two or more, and "at least one" may refer to one, two or more.

[0034] It should also be understood that for any component, data or structure mentioned in the embodiments of the present disclosure, without clear limitation or contrary indication in the context, it can generally be understood as one or more.

[0035] In addition, the term "and / or" in the present disclosure is merely a description of the association relationship of associated objects, indicating that there can be three relationships. For example, A and / or B can represent: A exists alone, A and B exist simultaneously, and B exists alone. In addition, the character " / " in the present disclosure generally represents an "or" relationship between the associated objects before and after.

[0036] It should also be understood that the descriptions of the various embodiments in the present disclosure emphasize the differences between the various embodiments, and their similarities or similarities can be referred to each other. For the sake of brevity, they will not be elaborated one by one.

[0037] At the same time, it should be understood that for the convenience of description, the sizes of the various parts shown in the drawings are not drawn according to the actual proportional relationship.

[0038] The following description of at least one exemplary embodiment is actually merely illustrative and in no way limits the present disclosure or its application or use.

[0039] Well-known technologies, methods, and devices for those of ordinary skill in the relevant art may not be discussed in detail, but where appropriate, the said technologies, methods, and devices should be regarded as part of the specification.

[0040] It should be noted that like reference numerals and letters indicate similar items in the following drawings. Therefore, once an item is defined in one drawing, it does not need to be further discussed in subsequent drawings.

[0041] The embodiments of the present disclosure can be applied to electronic devices such as terminal devices, computer systems, servers, etc., which can operate together with many other general-purpose or special-purpose computing system environments or configurations. Examples of well-known terminal devices, computing systems, environments, and / or configurations suitable for use with electronic devices such as terminal devices, computer systems, servers, etc. include, but are not limited to: personal computer systems, server computer systems, thin clients, thick clients, handheld or laptop devices, microprocessor-based systems, set-top boxes, programmable consumer electronics, network personal computers, small computer systems, large computer systems, and distributed cloud computing technology environments including any of the above systems, and so on.

[0042] Electronic devices such as terminal devices, computer systems, and servers can be described in the general context of computer system-executable instructions (such as program modules) executed by a computer system. Generally, program modules can include routines, programs, target programs, components, logics, data structures, etc., which perform specific tasks or implement specific abstract data types. The computer system / server can be implemented in a distributed cloud computing environment where tasks are executed by remote processing devices linked through a communication network. In a distributed cloud computing environment, program modules can be located on local or remote computing system storage media including storage devices.

[0043] Overview of the Application

[0044] Currently, in the field of three-dimensional path display, there is no mature solution for drawing shapes, and graphics must be drawn manually. This results in low efficiency of three-dimensional path display and cannot achieve real-time and dynamic path display. The embodiments of the present disclosure aim to solve this problem, that is, a three-dimensional path passing through these points can be dynamically drawn based on several three-dimensional points.

[0045] Exemplary System

[0046] Figure 1 An exemplary system architecture 100 of a three-dimensional path display method or a three-dimensional path display device to which the embodiments of the present disclosure can be applied is shown.

[0047] As Figure 1 shown, the system architecture 100 can include a terminal device 101, a network 102, and a server 103. The network 102 is used to provide a medium for a communication link between the terminal device 101 and the server 103. The network 102 can include various connection types, such as wired, wireless communication links, or fiber optic cables, etc.

[0048] Users can use the terminal device 101 to interact with the server 103 through the network 102 to receive or send messages, etc. Various communication client applications can be installed on the terminal device 101, such as navigation applications, electronic map applications, virtual reality applications, augmented reality applications, web browser applications, instant messaging tools, etc.

[0049] The terminal device 101 can be various electronic devices, including but not limited to mobile terminals such as mobile phones, laptop computers, digital broadcast receivers, PDAs (Personal Digital Assistants), PADs (Tablet Computers), PMPs (Portable Multimedia Players), in-vehicle terminals (such as in-vehicle navigation terminals), etc., and fixed terminals such as digital TVs, desktop computers, etc.

[0050] Server 103 may be a server that provides various services. For example, it is a background server that supports a three-dimensional scene displayed on the terminal device 101. The background server may generate a three-dimensional path using the first set of sampling points and send the three-dimensional path to the terminal device 101, and the terminal device 101 displays the three-dimensional path in the current real three-dimensional scene.

[0051] It should be noted that the three-dimensional path display method provided by the embodiments of the present disclosure may be executed by the server 103 or by the terminal device 101. Correspondingly, the three-dimensional path display device may be set in the server 103 or in the terminal device 101; the three-dimensional path display method may also be jointly executed by the terminal device 101 and the server 103. Correspondingly, each module included in the three-dimensional path display device may be respectively set in the terminal device 101 and the server 103.

[0052] It should be understood that Figure 1 the numbers of terminal devices, networks, and servers in

[0053] Exemplary Method

[0054] Figure 2 is a schematic flowchart of a three-dimensional path display method provided by an exemplary embodiment of the present disclosure. This embodiment can be applied to an electronic device (such as Figure 1 the terminal device 101 or the server 103 shown) and, as Figure 2 shown, the method includes the following steps:

[0055] Step 201, determine a first set of sampling points representing the points through which the to-be-generated three-dimensional path passes from the target three-dimensional space.

[0056] In this embodiment, the electronic device may determine a first set of sampling points representing the points through which the to-be-generated three-dimensional path passes from the target three-dimensional space. Among them, the target three-dimensional space may be a three-dimensional space simulated in the above-mentioned electronic device, and this three-dimensional space may correspond to a real three-dimensional space, such as the space in a room, the space corresponding to a certain road section, the interior space of a vehicle, a ship, an airplane, or other means of transportation; the target three-dimensional space may also not correspond to a real three-dimensional space, that is, a virtual space. The target three-dimensional space is usually represented by a corresponding three-dimensional coordinate system, and the coordinates of each point in the first set of sampling points can be determined from within this three-dimensional coordinate system.

[0057] The points in the first sampling point set can be points specified by the user, or can be points automatically determined by the electronic device according to the specified starting point and ending point. As an example, in the scenario of VR (Virtual Reality) house viewing, the target three-dimensional space may include points representing the living room, points representing the bedroom, points representing the bathroom, etc., which are pre-set or specified by the user. The electronic device needs to generate a three-dimensional path from the living room to the bedroom and then to the bathroom based on these points.

[0058] Step 202: Generate a curve representing the three-dimensional path to be generated based on the first sampling point set.

[0059] In this embodiment, the electronic device can generate a curve representing the three-dimensional path to be generated based on the first sampling point set. Specifically, the electronic device can fit a curve based on the first sampling points included in the first sampling point set as the curve representing the three-dimensional path to be generated. As an example, the electronic device can use the method CatmullRomCurve3 provided in the existing three-dimensional scene creation engine THREE.js to fit a curve representing the three-dimensional path to be generated.

[0060] Step 203: Generate a three-dimensional path composed of a set of path regions based on the curve.

[0061] In this embodiment, the electronic device can generate a three-dimensional path composed of a set of path regions based on the curve.

[0062] As an example, the electronic device can expand the curve by a set width to both sides or one side along the horizontal plane to obtain a three-dimensional path, and divide the three-dimensional path into multiple grids or multiple road segments according to a set rule. Each grid or road segment is a path region.

[0063] Optionally, the electronic device can generate a three-dimensional path composed of a set of path regions on the curve based on the aspect ratio of the preset two-dimensional picture. Wherein, the path regions in the set of path regions are quadrilateral regions.

[0064] Specifically, the preset quadrilateral width (i.e., the path width, such as 1 meter) can be multiplied by the aspect ratio of the preset two-dimensional picture to obtain the length of each quadrilateral region (corresponding to the height of the two-dimensional picture). Then, the above curve is divided into multiple line segments of the same length, and then the endpoints of each line segment are moved a distance equal to the above path width to one side along the normal direction, or are respectively moved half of the above path width to both sides along the normal direction and the opposite direction of the normal direction. Finally, the moved endpoints are connected to obtain a three-dimensional path composed of multiple quadrilateral regions.

[0065] By generating a three-dimensional path composed of multiple quadrilateral regions, and the aspect ratio of each quadrilateral region being the same as the aspect ratio of a preset two-dimensional picture, it is possible to quickly determine the mapping relationship between the quadrilateral region and the preset two-dimensional picture when inserting an image into the quadrilateral region subsequently, improving the efficiency of inserting pictures into the quadrilateral region. At the same time, when inserting a picture into the quadrilateral region, the original ratio of the picture is maintained, making the display effect of the three-dimensional path closer to the real scene.

[0066] Step 204: Determine the mapping relationship between the vertices of each path region in the path region set and the pixel points in the preset two-dimensional picture.

[0067] In this embodiment, the electronic device can determine the mapping relationship between the vertices of each path region in the path region set and the pixel points in the preset two-dimensional picture.

[0068] For another example, multiple path regions (such as two) can respectively correspond to a region in the preset two-dimensional picture (for example, dividing the preset two-dimensional picture into two equal parts, and each path region corresponds to one part of the preset two-dimensional picture). According to the positional relationship of the multiple path regions, the part corresponding to each path region can be determined in the preset two-dimensional picture, and then the mapping relationship between the vertices of each path region and the pixel points in the preset two-dimensional picture can be determined.

[0069] Optionally, when the path regions in the path region set are quadrilaterals, the electronic device can determine the mapping relationship between the four vertices of each path region in the path region set and the corresponding pixel points of the four vertices of the preset two-dimensional picture according to the trend of the curve.

[0070] Among them, the trend of the curve can be determined according to the starting point and the ending point in the first sampling point set. As an example, the path regions in the path region set can be rectangular regions on a plane, and the aspect ratio of the rectangular region is the same as the aspect ratio of the preset two-dimensional picture. According to the trend of the curve (i.e., the trend of the three-dimensional path), the corresponding relationship between the four vertices of the rectangular region and the corresponding pixel points of the four vertices of the preset two-dimensional picture can be determined. For example, according to the extension direction of the curve, determine the front side and the back side in the rectangular region. The front side corresponds to the upper side of the preset two-dimensional picture, and the back side corresponds to the lower side of the preset two-dimensional picture, and then determine the corresponding relationship between the vertices of the rectangular region and the corresponding pixel points of the vertices of the preset two-dimensional picture.

[0071] Subsequently, when inserting pixels into each quadrilateral region, the corresponding relationship between each point in the quadrilateral region and the pixel points in the preset two-dimensional picture can be determined according to the mapping relationship between the vertices of the quadrilateral and the vertices of the preset two-dimensional picture, thereby completing the insertion of the two-dimensional picture into the quadrilateral region.

[0072] By determining the mapping relationship between the four vertices of the quadrilateral region and the corresponding pixel points of the four vertices of the preset two-dimensional picture, when inserting the preset two-dimensional picture into the quadrilateral region, the pixels of each point in the quadrilateral region can be quickly determined, improving the efficiency of displaying the three-dimensional path.

[0073] Step 205, according to the mapping relationship, insert the pixels included in the corresponding region of the preset two-dimensional picture into the path region in the path region set, and display the three-dimensional path after inserting the pixels.

[0074] In this embodiment, the electronic device can insert the pixels included in the corresponding region of the preset two-dimensional picture into the path region in the path region set according to the mapping relationship, and display the three-dimensional path after inserting the pixels.

[0075] Specifically, after determining the pixel points corresponding to the vertices of the path region, the picture region corresponding to the path region can be determined in the preset two-dimensional picture. The picture region can be the entire region of the preset two-dimensional picture or a partial region. Furthermore, the picture region can be scaled and the pixels included in the scaled picture region can be inserted into the path region. For the method of determining the correspondence between the path region and the picture region, reference can be made to the optional embodiments of the present disclosure.

[0076] The three-dimensional path display method provided in the above embodiments of the present disclosure determines the first sampling point set from the target three-dimensional space, generates a curve representing the three-dimensional path to be generated based on the first sampling point set, then generates a three-dimensional path composed of a path region set based on the curve, then determines the mapping relationship between the vertices included in each path region and the pixel points in the preset two-dimensional picture, and finally inserts the corresponding pixels into the path regions in the path region set according to the mapping relationship, and displays the three-dimensional path after inserting the pixels, thereby realizing the dynamic generation and display of the three-dimensional path in the three-dimensional scene. Compared with the prior art that requires manual drawing of the three-dimensional path, the embodiments of the present disclosure can greatly improve the efficiency of generating the three-dimensional path, can display the three-dimensional path to the user in real time, and improve the efficiency and accuracy of path display.

[0077] In some optional implementation manners, as Figure 3 shown, step 203 may include the following sub-steps:

[0078] Step 2031, determine a second sampling point set from the curve.

[0079] Generally, the second sampling point set can be determined from the curve at a preset sampling interval (for example, 1 meter).

[0080] Step 2032, for the sampling points in the second sampling point set, determine the normal direction of the second sampling point; based on the normal direction, determine the position of the path boundary point corresponding to the second sampling point.

[0081] Among them, the method of determining the normal direction is the current prior art and will not be elaborated here. The number of path boundary points corresponding to the second sampling point can be one or two. Generally, the positions of the path boundary points can be determined according to the set path width. For example, when the second sampling point corresponds to one path boundary point, a point at a distance equal to the above path width from the second sampling point can be determined in the normal direction of the second sampling point as the path boundary point.

[0082] When the second sampling point corresponds to two path boundary points, one boundary point can be determined in each of the normal direction and the opposite direction of the normal of the second sampling point, and the distance between the two boundary points is the above path width. Generally, the distances from the two boundary points to the second sampling point can be set to be equal. As Figure 4 shown, the second sampling points include P0, P1, P2,.... The path boundary points include I0, I1, I2, I3,.... l represents the generated curve. The second sampling point P0 corresponds to the path boundary points I0 and I1, and I0 and I1 are respectively located in the normal direction and the opposite direction of the normal of P0. The relationships between other second sampling points and path boundary points are as shown in the figure.

[0083] Step 2033: Generate a three-dimensional path composed of a set of path regions based on the obtained path boundary points.

[0084] As an example, the path boundary points can be connected in the manner as Figure 4 shown, and the generated path region is a triangle, so as to obtain a three-dimensional path composed of a triangular mesh. For another example, the path boundary points located on both sides of the second sampling point as Figure 4 shown can be connected to obtain a three-dimensional path composed of a rectangular mesh.

[0085] In this implementation manner, by determining the path boundary points corresponding to each second sampling point based on the normal direction of each second sampling point and generating a three-dimensional path according to the path boundary points, the generated three-dimensional path is closer to the real path. At the same time, according to the path boundary points, the corresponding relationship between the obtained path region and the preset two-dimensional picture can be made more clear, which helps to improve the efficiency and accuracy of texturing the path region.

[0086] In some alternative implementation manners, the above step 2033 can be executed as follows:

[0087] Generate a triangular mesh as the path region based on the obtained path boundary points to obtain a three-dimensional path composed of a set of triangular meshes.

[0088] Among them, the region between adjacent second sampling points in the three-dimensional path is composed of two triangular meshes with a common vertex. As Figure 4As shown in the figure, P0 and P1 are adjacent second sampling points. The rectangular area between P0 and P1 is composed of triangle A (vertices I0, I1, I3) and triangle B (vertices I2, I3, I0), and points I0 and I3 are the common vertices. Let i be the index of the second sampling point. For example, the index of P0 is 0 and the index of P1 is 1. Then the two triangles between adjacent second sampling points can be represented as i*2 + 0, i*2 + 1, i*2 + 3, and i*2 + 2, i*2 + 3, i*2 + 0. For N triangles, due to the existence of common vertices, only 2N points are needed to describe them.

[0089] In the existing method of texturing based on triangle meshes, usually 3N points are required to describe N triangles. Therefore, this implementation method can use fewer points to describe triangles, saving the storage space occupied by the points required to describe triangles. In addition, since the three vertices included in the triangle mesh must be in the same plane, when representing a three-dimensional path through a triangle mesh, the correspondence between the vertices of the triangle mesh and the pixels in the preset two-dimensional picture can be determined more accurately when texturing the triangle mesh, improving the efficiency of displaying the three-dimensional path.

[0090] In some optional implementation methods, in step 2032 above, for the sampling points in the second sampling point set, the electronic device can determine the position of the path boundary point corresponding to the second sampling point according to the following steps:

[0091] First, based on the aspect ratio of the preset two-dimensional picture and the distance between adjacent second sampling points in the second sampling point set, determine the path width corresponding to the second sampling point.

[0092] Wherein, the above preset two-dimensional picture is the same picture as the preset two-dimensional picture in step 204. As an example, the aspect ratio of the preset two-dimensional picture is r, and the distance between adjacent second sampling points is D, then the path width is r*D.

[0093] Then, based on the path width and the normal direction, determine the position of the path boundary point corresponding to the second sampling point.

[0094] As an example, a path boundary point can be determined in the normal direction, and the distance between the path boundary point and the second sampling point is the above path width.

[0095] This implementation method determines the path width based on the aspect ratio of the preset two-dimensional image, so that the rectangular area between two adjacent second sampling points is proportional to the preset two-dimensional image. Therefore, when pasting the preset two-dimensional image into the path area, the inserted preset two-dimensional image maintains its original ratio, making the display effect of the three-dimensional path more consistent with the real three-dimensional scene. It should be noted that the rectangular area is in three-dimensional space, and the proportionality between the rectangular area and the preset two-dimensional image is also an effect in three-dimensional space. When displaying the three-dimensional path, since the display window is two-dimensional, the appearance of the texture map displayed when the three-dimensional path is mapped to the display window is not proportional to the preset two-dimensional image. As Figure 5A shown, it shows a preset two-dimensional image in the shape of a square. In the three-dimensional path display screen as Figure 5B shown, the preset two-dimensional image inserted in the three-dimensional path has a three-dimensional display effect.

[0096] In some alternative implementation methods, for the sampling points in the second sampling point set, the electronic device can determine the positions of the path boundary points corresponding to the second sampling points according to the following steps based on the path width and the normal direction:

[0097] Based on the path width, two path boundary points with equal distances from the second sampling point are determined in the normal direction and the opposite direction of the normal of the second sampling point respectively. As Figure 4 shown, W represents the path width. The path boundary point I0 is located in the normal direction of P0, and the path boundary point I1 is located in the opposite direction of the normal of P0. For the path boundary points I0 and I1, the distances from the second sampling point P0 are both W / 2.

[0098] This implementation method sets path boundary points with equal distances from the second sampling point in the normal direction and the opposite direction of the normal of the second sampling point respectively, which can make the three-dimensional path better match the generated curve and improve the accuracy of generating the three-dimensional path.

[0099] In some alternative implementation methods, as Figure 6 shown, step 205 may include the following sub-steps:

[0100] Step 2051, for the path areas in the path area set, map the vertices of the path area to the vertices of the preset two-dimensional image respectively.

[0101] As an example, as Figure 4 shown, for the triangular path area A, when determining its mapping relationship with the preset two-dimensional image, it is necessary to describe it with the uv attributes of the two-dimensional image. The uv attributes mean that the horizontal direction of the preset two-dimensional image is represented by the u coordinate and the vertical direction is represented by the v coordinate. As Figure 5AAs shown, when the uv coordinates are (0, 0), it is mapped to the lower left corner of the preset two-dimensional picture. Similarly, when uv is (1, 1), it will be mapped to the upper right corner of the preset two-dimensional picture. In the case of a three-dimensional path composed of multiple triangles, the distance between each second sampling point and the starting point of the three-dimensional path can be modulo-operated with the distance D between two adjacent second sampling points, so as to determine the u coordinate of the corresponding vertex.

[0102] For example, for Figure 4 the second sampling point P0 in, the distance between this point and the starting point is 0, and taking the modulo with D gives 0 / D = 0. Then the uv coordinates corresponding to vertices I0, I1, and I3 are (0, 1), (0, 0), and (1, 0) respectively, and the uv coordinates corresponding to vertices I2, I3, and I0 are (1, 1), (1, 0), and (0, 1) respectively.

[0103] For the second sampling point P1, the distance between this point and the starting point is D, and taking the modulo with D gives D / D = 1. Then the uv coordinates corresponding to vertices I2, I3, and I5 are (0, 1), (0, 0), and (1, 0) respectively, and the uv coordinates corresponding to vertices I4, I5, and I2 are (1, 1), (1, 0), and (0, 1) respectively. By analogy, the corresponding relationship between the vertices in other triangular path regions and the vertices of the preset two-dimensional picture can be determined.

[0104] Step 2052, based on the corresponding relationship between the vertices of the path region and the vertices of the preset two-dimensional picture, determine the color values of the pixels inserted at the points in the path region.

[0105] Specifically, after determining the corresponding relationship between the vertices of the path region and the vertices of the preset two-dimensional picture, the corresponding regions in the path region and the preset two-dimensional picture can be determined, so that pixels can be inserted into the path region.

[0106] Step 2053, based on the determined color values, insert the corresponding pixels in the path region.

[0107] This implementation method realizes accurately filling a two-dimensional picture into a three-dimensional path by determining the corresponding relationship between the vertices of the path region and the vertices of the preset two-dimensional picture, and inserting the corresponding pixels in the preset two-dimensional picture according to the corresponding relationship, thereby improving the accuracy of displaying the three-dimensional path.

[0108] Exemplary Apparatus

[0109] Figure 7 is a schematic structural diagram of a three-dimensional path display device provided by an exemplary embodiment of the present disclosure. This embodiment can be applied to an electronic device, such as Figure 7As shown in the figure, the three-dimensional path display device includes: a first determination module 701, configured to determine a first set of sampling points representing points passed by a to-be-generated three-dimensional path from a target three-dimensional space; a first generation module 702, configured to generate a curve representing the to-be-generated three-dimensional path based on the first set of sampling points; a second generation module 703, configured to generate a three-dimensional path composed of a set of path regions based on the curve; a second determination module 704, configured to determine a mapping relationship between vertices of each path region in the set of path regions and pixel points in a preset two-dimensional picture; and a display module 705, configured to insert pixels included in a corresponding region in the preset two-dimensional picture into the path regions in the set of path regions according to the mapping relationship, and display the three-dimensional path after the pixels are inserted.

[0110] In this embodiment, the first determination module 701 may determine a first set of sampling points representing points passed by a to-be-generated three-dimensional path from a target three-dimensional space. Among them, the target three-dimensional space may be a three-dimensional space simulated in the above device, and this three-dimensional space may correspond to a real three-dimensional space, such as the space in a room, the space corresponding to a certain section of road, the internal space of a vehicle, a ship, an airplane, or other means of transportation; the target three-dimensional space may also not correspond to a real three-dimensional space, that is, a virtual space. The target three-dimensional space is usually represented by a corresponding three-dimensional coordinate system, and the coordinates of each point in the first set of sampling points can be determined from within this three-dimensional coordinate system.

[0111] The points in the first set of sampling points may be points specified by the user, or may be points automatically determined by the first determination module 701 according to the specified starting point and ending point. As an example, in the scenario of VR (Virtual Reality) house viewing, the target three-dimensional space may include points representing a living room, a bedroom, a bathroom, etc. that are pre-set or specified by the user. The first determination module 701 needs to generate a three-dimensional path from the living room to the bedroom and then to the bathroom based on these points.

[0112] In this embodiment, the first generation module 702 may generate a curve representing the to-be-generated three-dimensional path based on the first set of sampling points. Specifically, the first generation module 702 may fit a curve as the curve representing the to-be-generated three-dimensional path according to the first sampling points included in the first set of sampling points. As an example, the first generation module 702 may use the method CatmullRomCurve3 for generating a smooth curve provided in the existing three-dimensional scene creation engine THREE.js to fit a curve representing the to-be-generated three-dimensional path.

[0113] In this embodiment, the second generation module 703 may generate a three-dimensional path composed of a set of path regions based on a curve. As an example, the second generation module 703 may expand the curve by a set width on both sides or one side along the horizontal plane to obtain a three-dimensional path, and divide the three-dimensional path into multiple grids or multiple road segments according to a set rule, and each grid or road segment is a path region.

[0114] In this embodiment, the second determination module 704 may determine the mapping relationship between the vertices of each path region in the set of path regions and the pixel points in a preset two-dimensional picture.

[0115] As an example, the path regions in the set of path regions may be rectangular regions on a plane, and the aspect ratio of the rectangular region is the same as the aspect ratio of the preset two-dimensional picture. According to the trend of the three-dimensional path, the corresponding relationship between the four vertices of the rectangular region and the corresponding pixel points of the four vertices of the preset two-dimensional picture can be determined. For example, according to the trend of the three-dimensional path, the front and the back in the rectangular region are determined, the front corresponds to the upper side of the preset two-dimensional picture, and the back corresponds to the lower side of the preset two-dimensional picture, and then the corresponding relationship between the vertices of the rectangular region and the corresponding pixel points of the vertices of the preset three-dimensional picture is determined.

[0116] For another example, multiple path regions (such as two) may respectively correspond to a region in a preset two-dimensional picture (for example, dividing the preset two-dimensional picture into two parts, and each path region corresponds to a part of the preset two-dimensional picture). According to the positional relationship of the multiple path regions, the part corresponding to each path region can be determined in the preset two-dimensional picture, and then the mapping relationship between the vertices of each path region and the pixel points in the preset two-dimensional picture can be determined.

[0117] In this embodiment, the display module 705 may insert the pixels included in the corresponding region in the preset two-dimensional picture into the path regions in the set of path regions according to the mapping relationship, and display the three-dimensional path after inserting the pixels.

[0118] Specifically, after determining the pixel points corresponding to the vertices of the path region, the picture region corresponding to the path region can be determined in the preset two-dimensional picture. The picture region may be the entire region of the preset two-dimensional picture or a partial region. Furthermore, the picture region can be scaled and the pixels included in the scaled picture region can be inserted into the path region. For the method of determining the corresponding relationship between the path region and the picture region, reference may be made to the optional embodiments of the present disclosure.

[0119] Refer to Figure 8 , Figure 8 which is a schematic structural diagram of a three-dimensional path display device provided by another exemplary embodiment of the present disclosure.

[0120] In some alternative implementations, the second generation module 703 includes: a first determination unit 7031, configured to determine a second set of sampling points from the curve; a second determination unit 7032, configured to, for the sampling points in the second set of sampling points, determine the normal direction of the second sampling point; based on the normal direction, determine the position of the path boundary point corresponding to the second sampling point; and a generation unit 7033, configured to generate a three-dimensional path composed of a set of path regions based on the obtained path boundary points.

[0121] In some alternative implementations, the generation unit 7033 is further configured to: generate a triangular mesh as a path region based on the obtained path boundary points, and obtain a three-dimensional path composed of a set of triangular meshes, where the region between two adjacent second sampling points in the three-dimensional path is composed of two triangular meshes having a common vertex.

[0122] In some alternative implementations, the second determination unit 7032 includes: a first determination subunit 70321, configured to determine the path width corresponding to the second sampling point based on the aspect ratio of the preset two-dimensional picture and the distance between two adjacent second sampling points in the second set of sampling points; and a second determination subunit 70322, configured to determine the position of the path boundary point corresponding to the second sampling point based on the path width and the normal direction.

[0123] In some alternative implementations, the second determination subunit 70322 is further configured to: determine two path boundary points at equal distances from the second sampling point in the normal direction and the opposite direction of the normal of the second sampling point respectively based on the path width.

[0124] In some alternative implementations, the second generation module 703 may be further configured to: generate a three-dimensional path composed of a set of path regions on the curve based on the aspect ratio of the preset two-dimensional picture, where the path regions in the set of path regions are quadrilateral regions.

[0125] In some alternative implementations, the second determination module 704 may be further configured to: determine the mapping relationship between the corresponding pixel points of the four vertices of each path region with a quadrilateral shape in the set of path regions and the four vertices of the preset two-dimensional picture according to the trend of the curve.

[0126] In some alternative implementations, the display module 705 includes: a mapping unit 7051, configured to map the vertices of the path region to the vertices of the preset two-dimensional picture for the path regions in the set of path regions; a third determination unit 7052, configured to determine the color value of the pixel inserted at the point in the path region based on the corresponding relationship between the vertices of the path region and the vertices of the preset two-dimensional picture; and an insertion unit 7053, configured to insert the corresponding pixel in the path region based on the determined color value.

[0127] The three-dimensional path display device provided in the above embodiments of the present disclosure determines a first set of sampling points from a target three-dimensional space, generates a curve representing the three-dimensional path to be generated based on the first set of sampling points, then generates a three-dimensional path composed of a set of path regions based on the curve, then determines the mapping relationship between the vertices included in each path region and the pixel points in a preset two-dimensional picture, and finally inserts corresponding pixels into the path regions in the set of path regions according to the mapping relationship and displays the three-dimensional path after inserting the pixels, thereby realizing the dynamic generation and display of a three-dimensional path in a three-dimensional scene. Compared with the prior art that requires manual drawing of a three-dimensional path, the embodiments of the present disclosure can greatly improve the efficiency of generating a three-dimensional path, can display the three-dimensional path to the user in real time, and improve the efficiency and accuracy of path display.

[0128] Exemplary Electronic Device

[0129] Next, refer to Figure 9 to describe an electronic device according to an embodiment of the present disclosure. The electronic device may be any one or both of the terminal device 101 and the server 103 as shown in Figure 1 or a stand-alone device independent of them, and the stand-alone device may communicate with the terminal device 101 and the server 103 to receive the input signals collected from them.

[0130] Figure 9 The block diagram of an electronic device according to an embodiment of the present disclosure is illustrated.

[0131] As Figure 9 shown, the electronic device 900 includes one or more processors 901 and a memory 902.

[0132] The processor 901 may be a central processing unit (CPU) or other forms of processing units with data processing capabilities and / or instruction execution capabilities, and may control other components in the electronic device 900 to perform desired functions.

[0133] The memory 902 may include one or more computer program products, and the computer program products may include various forms of computer-readable storage media, such as volatile memory and / or non-volatile memory. The volatile memory may include, for example, random access memory (RAM) and / or cache memory, etc. The non-volatile memory may include, for example, read-only memory (ROM), hard disk, flash memory, etc. One or more computer program instructions may be stored on the computer-readable storage media, and the processor 901 may run the program instructions to implement the three-dimensional path display method of each embodiment of the present disclosure above and / or other desired functions. Various contents such as the first set of sampling points and the second set of sampling points may also be stored in the computer-readable storage media.

[0134] In one example, the electronic device 900 may further include: an input device 903 and an output device 904, and these components are interconnected through a bus system and / or other forms of connection mechanisms (not shown).

[0135] For example, when the electronic device is the terminal device 101 or the server 103, the input device 903 may be devices such as a camera, a mouse, a keyboard, etc., for inputting three-dimensional space data, a set of sampling points, etc. When the electronic device is a stand-alone device, the input device 903 may be a communication network connector for receiving the input three-dimensional space data, a set of sampling points, etc. from the terminal device 101 and the server 103.

[0136] The output device 904 may output various information to the outside, including the three-dimensional path. The output device 904 may include, for example, a display, a speaker, a printer, and a communication network and its connected remote output devices, etc.

[0137] Of course, for simplicity, Figure 9 only some of the components related to the present disclosure in the electronic device 900 are shown, and components such as a bus, an input / output interface, etc. are omitted. In addition, according to specific application scenarios, the electronic device 900 may further include any other appropriate components.

[0138] Exemplary Computer Program Product and Computer Readable Storage Medium

[0139] In addition to the above methods and devices, an embodiment of the present disclosure may also be a computer program product, which includes computer program instructions, and the computer program instructions, when run by a processor, cause the processor to execute the steps in the three-dimensional path display method according to various embodiments of the present disclosure described in the "Exemplary Method" section above of this specification.

[0140] The computer program product may be written in any combination of one or more programming languages for executing the program code of the operations of the embodiments of the present disclosure. The programming languages include object-oriented programming languages such as Java, C++, etc., and also include conventional procedural programming languages such as the "C" language or similar programming languages. The program code may be executed entirely on the user's computing device, partially on the user's device, executed as an independent software package, partially on the user's computing device and partially on a remote computing device, or entirely on a remote computing device or server.

[0141] In addition, an embodiment of the present disclosure may also be a computer-readable storage medium storing computer program instructions, which when run by a processor cause the processor to execute the steps in the three-dimensional path display method according to various embodiments of the present disclosure described in the "Exemplary Method" section above of this specification.

[0142] The computer-readable storage medium may adopt any combination of one or more readable media. The readable media may be a readable signal medium or a readable storage medium. The readable storage medium may, for example, include but is not limited to an electrical, magnetic, optical, electromagnetic, infrared, or semiconductor system, apparatus, or device, or any combination of the above. More specific examples (non-exhaustive list) of the readable storage medium include: an electrical connection with one or more wires, a portable disk, a hard disk, a random access memory (RAM), a read-only memory (ROM), an erasable programmable read-only memory (EPROM or flash memory), an optical fiber, a portable compact disk read-only memory (CD-ROM), an optical storage device, a magnetic storage device, or any suitable combination of the above.

[0143] Exemplary Computer Program

[0144] The embodiments of the present disclosure also provide a computer program product including computer programs / instructions, which when executed by a processor can implement the three-dimensional path display method in any of the above possible implementation manners.

[0145] The computer program product may be specifically implemented in a manner of hardware, software, or a combination thereof. In an alternative example, the computer program product is specifically embodied as a computer storage medium. In another alternative example, the computer program product is specifically embodied as a software product, such as a software development kit (SDK), etc.

[0146] The basic principles of the present disclosure have been described in conjunction with specific embodiments. However, it should be noted that the advantages, benefits, effects, etc. mentioned in the present disclosure are only examples and not limitations. It cannot be considered that these advantages, benefits, effects, etc. are essential for each embodiment of the present disclosure. Additionally, the specific details disclosed above are only for illustrative and easy-to-understand purposes and not limitations. These details do not limit the present disclosure to necessarily adopting the above specific details for implementation.

[0147] Each embodiment in this specification is described in a progressive manner. The key point of each embodiment is to illustrate the differences from other embodiments. For the same or similar parts among the embodiments, reference can be made to each other. For system embodiments, since they basically correspond to method embodiments, they are described relatively simply. For the relevant parts, reference can be made to the partial description of the method embodiments.

[0148] The block diagrams of the devices, apparatuses, equipment, and systems involved in the present disclosure are only illustrative examples and do not intend to require or imply that they must be connected, arranged, and configured in the manner shown in the block diagrams. As those skilled in the art will recognize, these devices, apparatuses, equipment, and systems can be connected, arranged, and configured in any manner. Words such as "including", "comprising", "having", etc. are open-ended terms, meaning "including but not limited to", and can be used interchangeably with each other. The word "or" and "and" used herein refer to the word "and / or" and can be used interchangeably with each other, unless the context clearly indicates otherwise. The word "such as" used herein refers to the phrase "such as but not limited to" and can be used interchangeably with each other.

[0149] The methods and apparatuses of the present disclosure can be implemented in many ways. For example, the methods and apparatuses of the present disclosure can be implemented through software, hardware, firmware, or any combination of software, hardware, and firmware. The above order of the steps for the method is only for illustration, and the steps of the method of the present disclosure are not limited to the above specific order described, unless otherwise specifically stated. In addition, in some embodiments, the present disclosure can also be implemented as a program recorded in a recording medium, and these programs include machine-readable instructions for implementing the methods according to the present disclosure. Therefore, the present disclosure also covers a recording medium storing a program for executing the method according to the present disclosure.

[0150] It should also be noted that in the apparatuses, equipment, and methods of the present disclosure, each component or each step can be decomposed and / or recombined. These decompositions and / or recombinations should be regarded as equivalent solutions of the present disclosure.

[0151] The foregoing description of the disclosed aspects is provided to enable any person skilled in the art to make or use the present disclosure. Various modifications to these aspects will be readily apparent to those skilled in the art, and the general principles defined herein may be applied to other aspects without departing from the scope of the present disclosure. Thus, the present disclosure is not intended to be limited to the aspects shown herein, but is to be accorded the widest scope consistent with the principles and novel features disclosed herein.

[0152] The foregoing description has been presented for purposes of illustration and description. Furthermore, this description is not intended to limit the embodiments of the present disclosure to the form disclosed herein. Although several example aspects and embodiments have been discussed above, those skilled in the art will recognize some of their variations, modifications, alterations, additions, and subcombinations.

Claims

1. A three-dimensional path display method, including: determining a first set of sampling points in a target three-dimensional space, which represent points passed by a to-be-generated three-dimensional path; generating a curve representing the to-be-generated three-dimensional path based on the first set of sampling points; generating a three-dimensional path composed of a set of path regions based on the curve, where the path regions in the set of path regions include: grids or road segments obtained by dividing the three-dimensional path according to a set rule, the three-dimensional path is obtained by expanding the curve to both sides or one side along the horizontal plane, and the three-dimensional path is generated on the curve based on the aspect ratio of a preset two-dimensional picture; determining the mapping relationship between the vertices of each path region in the set of path regions and the pixel points in the preset two-dimensional picture; inserting the pixels included in the corresponding regions in the preset two-dimensional picture into the path regions in the set of path regions according to the mapping relationship, and displaying the three-dimensional path after inserting the pixels.

2. The method according to claim 1, wherein, the generating a three-dimensional path composed of a set of path regions based on the curve includes: determining a second set of sampling points from the curve; for the sampling points in the second set of sampling points, determining the normal direction of the second sampling point; based on the normal direction, determining the position of the path boundary point corresponding to the second sampling point; generating a three-dimensional path composed of a set of path regions based on the obtained path boundary points.

3. The method according to claim 2, wherein, the generating a three-dimensional path composed of a set of path regions based on the obtained path boundary points includes: generating a triangular mesh as a path region based on the obtained path boundary points, and obtaining a three-dimensional path composed of a set of triangular meshes, wherein the region between adjacent second sampling points in the three-dimensional path is composed of two triangular meshes with a common vertex.

4. The method according to claim 2, wherein, the determining the position of the path boundary point corresponding to the second sampling point based on the normal direction includes: determining the path width corresponding to the second sampling point based on the aspect ratio of the preset two-dimensional picture and the distance between adjacent second sampling points in the second set of sampling points; determining the position of the path boundary point corresponding to the second sampling point based on the path width and the normal direction.

5. The method according to claim 4, wherein, the determining the position of the path boundary point corresponding to the second sampling point based on the path width and the normal direction includes: determining two path boundary points with equal distances from the second sampling point in the normal direction and the opposite direction of the normal respectively based on the path width.

6. The method according to claim 1, wherein, the generating a three-dimensional path composed of a set of path regions based on the curve includes: generating a three-dimensional path composed of a set of path regions on the curve based on the aspect ratio of the preset two-dimensional picture, wherein the path regions in the set of path regions are quadrilateral regions.

7. The method according to claim 6, wherein, Determining the mapping relationship between the vertices of each path region in the set of path regions and the pixel points in a preset two-dimensional picture includes: According to the trend of the curve, determining the mapping relationship between the corresponding pixel points of the four vertices of each path region with a quadrilateral shape in the set of path regions and the four vertices of the preset two-dimensional picture.

8. The method according to any one of claims 1-7, wherein, Inserting corresponding pixels in the path regions in the set of path regions according to the mapping relationship includes: For the path regions in the set of path regions, mapping the vertices of the path region to the vertices of the preset two-dimensional picture respectively; Based on the corresponding relationship between the vertices of the path region and the vertices of the preset two-dimensional picture, determining the color value of the pixels inserted at the points in the path region; Based on the determined color value, inserting corresponding pixels in the path region.

9. A three-dimensional path display device, comprising: A first determination module, configured to determine a first sampling point set representing the points passed by the to-be-generated three-dimensional path from a target three-dimensional space; A first generation module, configured to generate a curve representing the to-be-generated three-dimensional path based on the first sampling point set; A second generation module, configured to generate a three-dimensional path composed of a set of path regions based on the curve, where the path regions in the set of path regions include: grids or road segments obtained by dividing the three-dimensional path according to a set rule, the three-dimensional path is obtained by expanding the curve to both sides or one side along the horizontal plane, and the three-dimensional path is generated on the curve based on the aspect ratio of the preset two-dimensional picture; A second determination module, configured to determine the mapping relationship between the vertices of each path region in the set of path regions and the pixel points in the preset two-dimensional picture; A display module, configured to insert the pixels included in the corresponding region in the preset two-dimensional picture in the path regions in the set of path regions according to the mapping relationship, and display the three-dimensional path after inserting the pixels.

10. A computer-readable storage medium, where the storage medium stores a computer program, and the computer program is used to execute the method according to any one of claims 1-8 above.

Citation Information

Patent Citations

  • Electronic apparatus and control method thereof

    US20150363934A1