Longitudinal deceleration strip generation method and device, vehicle, storage medium and program product
By identifying map data and perceptual data to generate triangle data and performing texture mapping, the problem of lack of universality and robustness of longitudinal speed bump drawing schemes in the prior art is solved, and a more realistic and dynamic visual effect is achieved, enhancing the driver's immersion.
Patent Information
- Application Number
- CN202510074973.8
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2025-01-17
- Publication Date
- 2025-04-25
AI Technical Summary
The software drawing scheme of longitudinal speed bumps in the prior art lacks versatility, robustness, and poor real-time performance.
The point set is obtained by identifying map data and perceived data of the longitudinal speed bump, and the triangle data is generated, and the true appearance of the longitudinal speed bump is restored through texture coordinate calculation and texture mapping to achieve dynamic visual effects.
It improves the visual authenticity of the longitudinal speed bump, enhances the driver's immersion and realism, and improves the versatility and robustness of the system.
Smart Images

Figure CN119872568A_ABST
Abstract
Description
Technical Field
[0001] The present invention relates to the field of vehicle technology, and in particular to a method, device, vehicle, storage medium and program product for generating a longitudinal speed bump. Background Art
[0002] With the continuous diversification of in-vehicle entertainment systems, the use of sensors such as cameras and radars to digitally reconstruct the environment around the vehicle body has gradually become a necessary means of providing visualization services. On the company's existing cockpit platform, applications such as 360-degree panoramic view and scene reconstruction provide effective technical support for this. The 360 application mainly serves scenes such as parking and parking, and the scene reconstruction is positioned to reconstruct driving scenes. It uses radar perception, visual recognition and camera visualization data, and through graphics, it restores various elements (lane lines, vehicles, obstacles, etc.) in a digital three-dimensional way and displays them on the central control screen of the car computer, so that it can reflect the surrounding environment of the car body in real time, provide environmental visualization services, optimize the functionality of the in-vehicle entertainment system, improve its rationality, and enhance user satisfaction and usage experience.
[0003] Longitudinal deceleration signs are white fishbone-like signs set up at toll booths, exit ramps or other sections where vehicles are required to decelerate. They are usually a group of diamond-shaped virtual blocks parallel to the two sides of the lane line. By visually narrowing the lane, a sense of oppression is created, causing the driver to automatically decelerate at bends, slopes and other locations where deceleration is required.
[0004] The related art provides a cockpit-based, longitudinal speed bump software drawing solution. However, from the perspective of software and graphics, this solution lacks versatility and robustness, and has poor real-time performance. Summary of the invention
[0005] One of the objects of the present invention is to provide a method for generating longitudinal speed bumps to solve the problem of poor versatility and robustness of drawing schemes in related technologies; the second object is to provide a device for generating longitudinal speed bumps; the third object is to provide a vehicle; the fourth object is to provide a computer-readable storage medium; and the fifth object is to provide a computer program product.
[0006] In order to achieve the above object, the technical solution adopted by the present invention is as follows:
[0007] A method for generating a longitudinal speed bump comprises the following steps: identifying map data and perception data of the longitudinal speed bump to obtain a point set of the longitudinal speed bump; using the point set of the longitudinal speed bump to generate triangle data of the longitudinal speed bump; calculating the texture coordinates of the longitudinal speed bump based on the triangle data, performing texture mapping on the texture coordinates of the longitudinal speed bump to obtain a texture map of the longitudinal speed bump; performing animation rendering according to the texture map of the longitudinal speed bump to obtain a display animation of the longitudinal speed bump.
[0008] According to the above technical means, map data and perception data of longitudinal speed bumps can be identified to obtain point sets of longitudinal speed bumps, and point sets can be used to generate triangle data of longitudinal speed bumps. Simple geometric data is used to reduce special geometric calculations, and the form is more general and more robust. By performing texture coordinate calculation and texture mapping on the triangle data, the true appearance of the longitudinal speed bumps can be restored and the realism of the visual effects can be improved. By performing animation rendering through texture mapping, dynamic visual effects can be achieved, making the longitudinal speed bumps look like they are moving backwards as the vehicle moves forward, thereby enhancing the driver's sense of immersion and reality.
[0009] Furthermore, before texture mapping the texture coordinates of the longitudinal speed bump to obtain the texture map of the longitudinal speed bump, it also includes: obtaining the vehicle speed and the frame interval of the perception data; calculating the texture offset according to the vehicle speed and the frame interval; and correcting the texture coordinates of the longitudinal speed bump according to the texture offset.
[0010] According to the above technical means, the texture offset can be calculated according to the vehicle speed and frame interval, and the texture coordinates of the longitudinal speed bump can be corrected according to the texture offset, so that the texture presents a dynamic speed bump effect, making the longitudinal speed bump look like it is moving backwards as the vehicle moves forward, so as to simulate real road conditions and enhance the driver's immersion and sense of reality.
[0011] Furthermore, the point set of the longitudinal speed bump is used to generate the triangular data of the longitudinal speed bump, including: identifying the center line of the lane line according to the speed bumps on both sides of the longitudinal speed bump; traversing the point set of the longitudinal speed bump, offsetting each point to the center of the speed bumps on both sides of the lane line center line, and expanding the point on at least one side according to the center of the speed bump on each side to obtain the point set of at least one side of the speed bump on each side; and performing triangular enclosing based on the point set expanded on at least one side to obtain the triangular data of the speed bump on each side.
[0012] According to the above technical means, by identifying the center line of the lane and offsetting and expanding the points, more accurate triangular data can be generated to ensure that the geometric shape of the longitudinal speed bump is consistent with the actual situation. By traversing the point set and expanding it, triangular data can be generated efficiently, reducing calculation complexity and improving data processing speed. The generated triangular data can more accurately describe the shape of the longitudinal speed bump and improve the visual effect after rendering.
[0013] Furthermore, a point set of at least one side extension of the speed bump on each side is obtained by expanding the points at least on one side according to the center of the speed bump on each side, including: obtaining the width of the speed bump on each side; determining at least one side extension boundary according to the center and width of the speed bump on each side; and expanding the points on the center of the speed bump on each side to the corresponding at least one side extension boundary.
[0014] According to the above technical means, by obtaining the width of the speed bump on each side and determining the extension boundary, the point set extended on at least one side can be generated more accurately to ensure the accuracy of the triangle data. The consistency of the extension boundary can ensure the continuity and consistency of the generated triangle data between different speed bumps, avoiding geometric breaks.
[0015] Furthermore, texture mapping is performed on the texture coordinates of the longitudinal speed bump to obtain the texture map of the longitudinal speed bump, including: obtaining the texture mapping relationship between the texture coordinates and the texture map; and determining the texture map of the longitudinal speed bump according to the texture coordinates and the texture mapping relationship of the longitudinal speed bump.
[0016] According to the above technical means, by obtaining the texture mapping relationship, the texture coordinates can be accurately mapped to the texture map to ensure the accuracy and quality of the texture, and through the texture mapping relationship, different texture maps can be flexibly replaced to adapt to different visual needs and styles.
[0017] Furthermore, the texture coordinates of the longitudinal speed bump are calculated based on the triangle data, including: establishing a vehicle coordinate system; identifying each vertex in the triangle data, and calculating the texture coordinates of each vertex in the vehicle coordinate system.
[0018] According to the above technical means, by establishing a vehicle coordinate system, it can be ensured that the texture coordinates of all vertices are calculated in the same reference system to ensure the consistency and accuracy of the coordinates. Calculating the texture coordinates in the vehicle coordinate system can simplify the calculation process and improve the calculation efficiency.
[0019] A longitudinal speed bump generating device comprises: an identification module for identifying map data and perception data of the longitudinal speed bump to obtain a point set of the longitudinal speed bump; a generation module for generating triangle data of the longitudinal speed bump using the point set of the longitudinal speed bump; a calculation module for calculating the texture coordinates of the longitudinal speed bump based on the triangle data, and performing texture mapping on the texture coordinates of the longitudinal speed bump to obtain a texture map of the longitudinal speed bump; and a rendering module for performing animation rendering according to the texture map of the longitudinal speed bump to obtain a display animation of the longitudinal speed bump.
[0020] Furthermore, it also includes: a correction module, which is used to obtain the vehicle speed and frame interval of perception data before texture mapping the texture coordinates of the longitudinal speed bump to obtain the texture map of the longitudinal speed bump; calculate the texture offset according to the vehicle speed and the frame interval; and correct the texture coordinates of the longitudinal speed bump according to the texture offset.
[0021] Furthermore, the generation module is further used to: identify the center line of the lane line based on the speed bumps on both sides of the longitudinal speed bump; traverse the point set of the longitudinal speed bump, offset each point to the center of at least one side of the speed bump of the lane line center line, and expand the point on at least one side of the center of the speed bump on each side to obtain the point set expanded on at least one side of the speed bump on each side; perform triangular enclosing based on the point set expanded on at least one side to obtain the triangular data of the speed bump on each side.
[0022] Furthermore, the generation module is further used to: obtain the width of the speed bump on each side; determine at least one side extension boundary according to the center and width of the speed bump on each side; and expand the point on the center of the speed bump on each side to the corresponding at least one side extension boundary.
[0023] Furthermore, the calculation module is further used to: obtain a texture mapping relationship between texture coordinates and texture mapping; and determine the texture mapping of the longitudinal speed bump according to the texture coordinates and texture mapping relationship of the longitudinal speed bump.
[0024] Furthermore, the calculation module is further used to: calculate the texture coordinates of the longitudinal speed bump based on the triangle data, including: establishing a vehicle coordinate system; identifying each vertex in the triangle data, and calculating the texture coordinates of each vertex in the vehicle coordinate system.
[0025] A vehicle comprises: a memory, a processor and a computer program stored in the memory and executable on the processor, wherein the processor executes the program to implement the longitudinal speed bump generating method as described in the above embodiment.
[0026] A computer-readable storage medium stores a computer program or instruction thereon, and the computer program or instruction is executed by a processor to implement the longitudinal speed bump generation method as described in the above embodiment.
[0027] A computer program product includes a computer program or instructions. When the computer program or instructions are executed, the method for generating a longitudinal speed bump as described in the above embodiment is implemented.
[0028] Beneficial effects of the present invention:
[0029] (1) The map data and the perception data of the longitudinal speed bump can be identified to obtain the point set of the longitudinal speed bump, and the point set can be used to generate the triangle data of the longitudinal speed bump. Simple geometric data is used to reduce the calculation of special geometry, and the form is more general and more robust. In addition, by performing texture coordinate calculation and texture mapping on the triangle data, the real appearance of the longitudinal speed bump can be restored, and the realism of the visual effect can be improved. By performing animation rendering through texture mapping, dynamic visual effects can be achieved, making the longitudinal speed bump look like it is moving backward as the vehicle moves forward, thereby enhancing the driver's immersion and sense of reality.
[0030] (2) The texture offset can be calculated according to the vehicle speed and frame interval, and the texture coordinates of the longitudinal speed bump can be corrected according to the texture offset, so that the texture presents a dynamic speed bump effect, making the longitudinal speed bump look like it moves backward as the vehicle moves forward, so as to simulate the real road conditions and enhance the driver's immersion and sense of reality.
[0031] (3) By identifying the center line of the lane and performing point offset and expansion, more accurate triangle data can be generated to ensure that the geometric shape of the longitudinal speed bump is consistent with the actual situation. By traversing the point set and expanding it, triangle data can be generated efficiently, reducing computational complexity and improving data processing speed. The generated triangle data can more accurately describe the shape of the longitudinal speed bump and improve the visual effect after rendering.
[0032] (4) By obtaining the width of the speed bump on each side and determining the extension boundary, the point set extended on at least one side can be generated more accurately to ensure the accuracy of the triangle data. The consistency of the extension boundary can ensure the continuity and consistency of the generated triangle data between different speed bumps and avoid geometric breaks.
[0033] (5) By obtaining the texture mapping relationship, the texture coordinates can be accurately mapped to the texture map to ensure the accuracy and quality of the texture. Moreover, through the texture mapping relationship, different texture maps can be flexibly replaced to adapt to different visual needs and styles.
[0034] (6) By establishing a vehicle coordinate system, the texture coordinates of all vertices can be calculated in the same reference system to ensure the consistency and accuracy of the coordinates. Calculating texture coordinates in the vehicle coordinate system can simplify the calculation process and improve calculation efficiency. BRIEF DESCRIPTION OF THE DRAWINGS
[0035] Figure 1 A flow chart of a method for generating a longitudinal speed bump provided by an embodiment of the present invention;
[0036] Figure 2 A schematic diagram of the expansion of the triangular surface of a longitudinal speed bump provided by an embodiment of the present invention;
[0037] Figure 3 A schematic diagram of calculating texture coordinates provided by an embodiment of the present invention;
[0038] Figure 4 A schematic diagram of original map and texture loop mapping provided by an embodiment of the present invention;
[0039] Figure 5 A data flow chart of a method for generating a longitudinal speed bump provided by an embodiment of the present invention;
[0040] Figure 6 A schematic diagram of a longitudinal speed bump generating device provided by an embodiment of the present invention;
[0041] Figure 7 A schematic structural diagram of a vehicle provided in an embodiment of the present invention. DETAILED DESCRIPTION
[0042] The following will describe the embodiments of the present invention with reference to the accompanying drawings and preferred embodiments. Those skilled in the art can easily understand other advantages and effects of the present invention from the contents disclosed in this specification. The present invention can also be implemented or applied through other different specific embodiments, and the details in this specification can also be modified or changed in various ways based on different viewpoints and applications without departing from the spirit of the present invention. It should be understood that the preferred embodiments are only for illustrating the present invention, not for limiting the scope of protection of the present invention.
[0043] Specifically, Figure 1 A schematic flow chart of a method for generating a longitudinal speed bump provided in an embodiment of the present invention.
[0044] like Figure 1 As shown, the longitudinal speed bump generation method comprises the following steps:
[0045] In step S101, map data and perception data of the longitudinal speed bump are identified to obtain a point set of the longitudinal speed bump.
[0046] The map data may be the data of the map accessed by the vehicle, and the perception data may come from the data perceived by the vehicle's camera or radar. For example, the camera can perceive lane lines and distinguish the line types (longitudinal speed bumps are a type of lane lines).
[0047] It is understandable that the embodiment of the present invention can identify map data and perception data of the longitudinal speed bump, thereby obtaining a point set of the longitudinal speed bump, wherein the point set is a lane line point set.
[0048] It should be noted that perception data and map data only carry lane line point sets and do not carry other additional physical information.
[0049] In step S102, triangle data of the longitudinal speed bump is generated using the point set of the longitudinal speed bump.
[0050] It is understandable that the embodiment of the present invention can generate triangle data of the longitudinal speed bump using the point set of the longitudinal speed bump, so as to subsequently calculate the texture coordinates of the longitudinal speed bump.
[0051] In an embodiment of the present invention, the point set of the longitudinal speed bump is used to generate the triangular data of the longitudinal speed bump, including: identifying the center line of the lane line according to the speed bumps on both sides of the longitudinal speed bump; traversing the point set of the longitudinal speed bump, offsetting each point to the center of the speed bumps on both sides of the lane line center line, and expanding the point on at least one side according to the center of the speed bump on each side to obtain the point set of at least one side of the speed bump on each side; and triangulating the surface according to the point set expanded on at least one side to obtain the triangular data of the speed bump on each side.
[0052] It can be understood that the embodiment of the present invention can identify the center line of the lane line according to the speed bumps on both sides of the longitudinal speed bump, traverse the motor, offset each point to the left and right sides of the center of the lane line as the center of the longitudinal speed bump representation on both sides, and expand the point on at least one side according to the center of the speed bump on each side to obtain a point set of at least one side of the speed bump on each side, and then perform triangular enclosing based on the point set expanded on at least one side to obtain the triangular data of the speed bump on each side.
[0053] In an embodiment of the present invention, a point set of at least one side extension of the speed bump on each side is obtained by expanding the points on at least one side according to the center of the speed bump on each side, including: obtaining the width of the speed bump on each side; determining at least one side extension boundary according to the center and width of the speed bump on each side; and expanding the points on the center of the speed bump on each side to the corresponding at least one side extension boundary.
[0054] It can be understood that the embodiment of the present invention can determine at least one side extension boundary according to the width of the speed bump on each side and the center and width of the speed bump on each side, and then expand the point on the center of the speed bump on each side to the corresponding at least one side extension boundary.
[0055] Specifically, the embodiment of the present invention does not generate diamond data, but generates general lane line / surface data, such as Figure 2 As shown in the figure, the specific steps are: traverse the point set, offset each point to the left and right sides of the lane line center as the center of the longitudinal deceleration signs on both sides; in the center of the longitudinal deceleration sign on one side, expand the points to the left and right according to the width of the sign; through the ear cutting method, use the point sets on the left and right sides to enclose the surface and create triangle data. Compared with diamond data, geometric data generation is simpler and more universal, which reduces the number of drawcalls submitted to the GPU and improves the running efficiency of the software.
[0056] In step S103, the texture coordinates of the longitudinal speed bump are calculated based on the triangle data, and texture mapping is performed on the texture coordinates of the longitudinal speed bump to obtain a texture map of the longitudinal speed bump.
[0057] It is understandable that the embodiment of the present invention can calculate the texture coordinates of the longitudinal speed bump based on the triangle data, and then perform texture mapping on the texture coordinates of the longitudinal speed bump to obtain the texture map of the longitudinal speed bump, thereby restoring the appearance of the longitudinal speed bump.
[0058] In an embodiment of the present invention, the texture coordinates of the longitudinal speed bump are calculated based on the triangle data, including: establishing a vehicle coordinate system; identifying each vertex in the triangle data, and calculating the texture coordinates of each vertex in the vehicle coordinate system.
[0059] It is understandable that the embodiments of the present invention can establish a vehicle coordinate system, identify each fixed point in the triangle data, and then calculate the texture coordinates of each vertex in the vehicle coordinate system.
[0060] It should be noted that texture coordinates are two-dimensional, but they need to be converted to normalized coordinates in the end, so they are limited to [0,1], where x represents the horizontal coordinate and y represents the vertical coordinate. The texture coordinates are calculated as follows: Figure 3 shown.
[0061] The x-coordinate can only be 0 or 1, depending on whether the point is on the left or right side of the center point. The y-coordinate is the longitudinal distance from the point to the starting point divided by the actual interval of a single speed bump, as shown below:
[0062]
[0063] The denominator is the sum of the distances between each vertex.
[0064] In addition, on the GPU side, with the use of the vertical loop texture mapping mode, you can use one element map to draw the entire vertical speed bump. Loop mapping means that the part of the texture coordinate that exceeds 1 is remapped according to the truncated decimal part, such as Figure 4 shown.
[0065] In an embodiment of the present invention, texture mapping is performed on the texture coordinates of the longitudinal speed bump to obtain the texture map of the longitudinal speed bump, including: obtaining the texture mapping relationship between the texture coordinates and the texture map; and determining the texture map of the longitudinal speed bump according to the texture coordinates of the longitudinal speed bump and the texture mapping relationship.
[0066] It can be understood that the embodiments of the present invention can determine the texture map of the longitudinal speed bump according to the texture coordinates and texture mapping relationship of the longitudinal speed bump to flexibly meet different visual needs and styles, and when the user wants to adjust the style or style, he only needs to change the corresponding texture map. It is simple and efficient, and the display effect of the texture map is better, the resource usage is less, and the software memory usage is effectively reduced.
[0067] In an embodiment of the present invention, before texture mapping is performed on the texture coordinates of the longitudinal speed bump to obtain the texture map of the longitudinal speed bump, it also includes: obtaining the vehicle speed and the frame interval of the perception data; calculating the texture offset according to the vehicle speed and the frame interval; and correcting the texture coordinates of the longitudinal speed bump according to the texture offset.
[0068] It can be understood that the embodiments of the present invention can calculate the texture offset based on the frame interval of the vehicle speed and the perception data, and then correct the texture coordinates of the longitudinal speed bump according to the texture offset to achieve a dynamic visual effect, making the longitudinal speed bump look like it is moving backward as the vehicle moves forward, which can help the driver better understand the vehicle speed and the surrounding environment.
[0069] In step S104, animation rendering is performed according to the texture map of the longitudinal speed bump to obtain a display animation of the longitudinal speed bump.
[0070] It can be understood that the embodiment of the present invention can perform animation rendering based on the texture map of the longitudinal speed bump to obtain a display animation of the longitudinal speed bump, which can more accurately restore the environmental scene around the vehicle body, improve the realism of scene reconstruction, and provide accurate and real-time road information for drivers and passengers.
[0071] The following describes the method for generating a longitudinal speed bump according to a specific embodiment of the present invention. The data execution process is as follows: Figure 5 As shown, including:
[0072] 1. Receive the original lane line data from perception, identify the data type, and extract the original point set data of the longitudinal speed bump.
[0073] The raw data of the longitudinal deceleration sign comes from camera perception and map data. The camera can perceive lane lines and distinguish line types. Among them, longitudinal speed bumps are a type of lane line. Perception data and map data only carry lane line point sets and do not carry other additional physical information. Therefore, we need to subjectively make the point set into geometric information that can be used for drawing for scene restoration.
[0074] The autonomous driving system publishes the collected lane line data through the DDS protocol. The cockpit system subscribes to the message and obtains the data from the data bus. After the data reaches the cockpit system, it is transmitted again within the system and published to the applications in the system that have subscribed to the data service, such as the scene reconstruction application.
[0075] Second, the original center point data set is expanded into a triangular point set describing ordinary lane lines as geometric data for drawing.
[0076] 3. According to the distance from the current point to the starting point, the texture coordinates are calculated for the points in the triangle point set. After extracting the lane line data of the longitudinal speed bump type through the scene reconstruction application provided by the artist, the data production thread begins to prepare the drawing data. In this stage, no diamond data is produced, but general lane line / surface data is produced. The whole process is as follows: Figure 2 As shown below:
[0077] Traverse the point set and offset each point to the left and right sides of the lane line center as the center of the longitudinal deceleration signs on both sides;
[0078] At the center of the longitudinal deceleration sign on one side, expand the points to the left and right according to the width of the sign;
[0079] Through the ear cutting method, the point sets on the left and right sides are used to enclose the surface and create triangle data for drawing.
[0080] Next, the texture coordinates are calculated for each triangle vertex for texture mapping, and then the art resources can be used for mapping.
[0081] Texture coordinates are two-dimensional and are ultimately converted to normalized coordinates between [0,1], where x represents the horizontal coordinate and y represents the vertical coordinate.
[0082] The x-coordinate can only be 0 or 1, depending on whether the point is on the left or right side of the center point. The y-coordinate is the longitudinal distance from the point to the starting point divided by the actual interval of a single speed bump, as shown below:
[0083]
[0084] The denominator is the sum of the distances between each vertex. Figure 3 .
[0085] On the GPU side, with the use of the vertical loop texture mapping mode, you can use one element map to draw the entire vertical speed bump. Loop mapping means that the part of the texture coordinate that exceeds 1 is remapped according to the truncated decimal part. The process is as follows Figure 4 shown.
[0086] 4. Calculate the texture offset based on the gear position and vehicle speed, and use the texture offset animation to move the longitudinal speed bump toward the rear of the vehicle, creating the illusion that the vehicle is moving forward and the road is moving backward.
[0087] The texture offset is calculated by the vehicle speed and frame interval. Usually, the offset is:
[0088] Δd=v×Δt;
[0089] Therefore, the texture ordinate of each triangle vertex should be:
[0090]
[0091] In summary, the above-produced geometric data is uploaded to the GPU through the graphics API, and the drawing interface is called to complete the drawing of the longitudinal speed bump, and the animation effect of its moving backwards is achieved according to the speed of the vehicle.
[0092] Therefore, the scheme of the embodiment of the present invention uses the perception data (raw data) as the input source, assembles the raw data into the depiction data (triangle structure) by using the basic theory of graphics, cooperates with the resources provided by the artists, and finally restores the longitudinal deceleration mark in the in-vehicle entertainment system through the universal graphics rendering pipeline of the in-vehicle system. Optimization is performed on the rendering end, so that the digital modeling of the longitudinal speed bump can be displayed more quickly, accurately, and visually better. Without increasing the material cost, at the software level, the environmental scene around the vehicle body can be restored more accurately, the realism of the scene reconstruction can be improved, and the running animation that performs differently due to different vehicle speeds can be calmly handled. It adapts to different central control themes, and provides real-time feedback on the road conditions during driving, providing accurate and real-time road information for drivers and passengers. And through the universal triangle face production algorithm, the calculation of special geometry is reduced, and the number of DrawCall submissions is reduced; the texture offset is used to efficiently complete the animation effect; when the style or theme needs to be adjusted, only one original picture needs to be changed.
[0093] According to the longitudinal speed bump generation method proposed in the embodiment of the present invention, map data and perception data of the longitudinal speed bump can be identified to obtain the point set of the longitudinal speed bump, and the point set can be used to generate the triangle data of the longitudinal speed bump. Simple geometric data is used to reduce the calculation of special geometry, and the form is more general and more robust. By performing texture coordinate calculation and texture mapping on the triangle data, the true appearance of the longitudinal speed bump can be restored and the realism of the visual effect can be improved. By performing animation rendering through texture mapping, dynamic visual effects can be achieved, making the longitudinal speed bump look like it is moving backward as the vehicle moves forward, thereby enhancing the driver's immersion and sense of reality.
[0094] Next, the longitudinal speed bump generating device according to the embodiment of the present invention will be described with reference to the accompanying drawings.
[0095] Figure 6 It is a block diagram of a device for generating a longitudinal speed bump according to an embodiment of the present invention.
[0096] like Figure 6 As shown, the longitudinal speed bump generating device 10 includes: a recognition module 100 , a generating module 200 , a calculating module 300 and a rendering module 400 .
[0097] Among them, the recognition module 100 is used to identify map data and perception data of the longitudinal speed bump to obtain the point set of the longitudinal speed bump; the generation module 200 is used to generate triangle data of the longitudinal speed bump using the point set of the longitudinal speed bump; the calculation module 300 is used to calculate the texture coordinates of the longitudinal speed bump based on the triangle data, and perform texture mapping on the texture coordinates of the longitudinal speed bump to obtain the texture map of the longitudinal speed bump; the rendering module 400 is used to perform animation rendering according to the texture map of the longitudinal speed bump to obtain the display animation of the longitudinal speed bump.
[0098] In the embodiment of the present invention, the device 10 of the embodiment of the present invention further includes: a correction module.
[0099] Among them, the correction module is used to obtain the vehicle speed and frame interval of the perception data before texture mapping the texture coordinates of the longitudinal speed bump to obtain the texture map of the longitudinal speed bump; calculate the texture offset according to the vehicle speed and the frame interval; and correct the texture coordinates of the longitudinal speed bump according to the texture offset.
[0100] In an embodiment of the present invention, the generation module 200 is further used to: identify the center line of the lane line based on the speed bumps on both sides of the longitudinal speed bump; traverse the point set of the longitudinal speed bump, offset each point to the center of the speed bumps on both sides of the lane line center line, and expand the points on at least one side of the center of the speed bump on each side to obtain the point set of at least one side of the speed bump on each side; perform triangular enclosing based on the point set expanded on at least one side to obtain the triangular data of the speed bump on each side.
[0101] In an embodiment of the present invention, the generation module 200 is further used to: obtain the width of the speed bump on each side and determine at least one side extension boundary according to the center and width of the speed bump on each side; and expand the point on the center of the speed bump on each side to the corresponding at least one side extension boundary.
[0102] In the embodiment of the present invention, the calculation module 300 is further used to: obtain a texture mapping relationship between texture coordinates and texture mapping; and determine the texture mapping of the longitudinal speed bump according to the texture coordinates and texture mapping relationship of the longitudinal speed bump.
[0103] In the embodiment of the present invention, the calculation module 300 is further used to calculate the texture coordinates of the longitudinal speed bump based on the triangle data, including: establishing a vehicle coordinate system; identifying each vertex in the triangle data, and calculating the texture coordinates of each vertex in the vehicle coordinate system.
[0104] It should be noted that the above explanations of the embodiment of the longitudinal speed bump generation method are also applicable to the longitudinal speed bump generation device of this embodiment, and will not be repeated here.
[0105] The longitudinal speed bump generating device proposed in the embodiment of the present invention can identify map data and perception data of the longitudinal speed bump to obtain the point set of the longitudinal speed bump, and use the point set to generate triangle data of the longitudinal speed bump. It uses simple geometric data and reduces the calculation of special geometry. The form is more general and more robust. By performing texture coordinate calculation and texture mapping on the triangle data, the real appearance of the longitudinal speed bump can be restored and the realism of the visual effect can be improved. By performing animation rendering through texture mapping, dynamic visual effects can be achieved, making the longitudinal speed bump look like it is moving backward as the vehicle moves forward, thereby enhancing the driver's immersion and sense of reality.
[0106] Figure 7 A schematic diagram of the structure of a vehicle provided by an embodiment of the present invention. The vehicle includes:
[0107] A memory 701 , a processor 702 , and a computer program stored in the memory 701 and executable on the processor 702 .
[0108] When the processor 702 executes the program, the longitudinal speed bump generation method provided in the above embodiment is implemented.
[0109] Furthermore, the vehicle also includes:
[0110] The communication interface 703 is used for communication between the memory 701 and the processor 702 .
[0111] The memory 701 is used to store computer programs that can be executed on the processor 702 .
[0112] The memory 701 may include a high-speed RAM memory, and may also include a non-volatile memory (non-volatile memory), such as at least one disk memory.
[0113] If the memory 701, the processor 702 and the communication interface 703 are implemented independently, the communication interface 703, the memory 701 and the processor 702 can be connected to each other through a bus and communicate with each other. The bus can be an Industry Standard Architecture (ISA) bus, a Peripheral Component Interconnect (PCI) bus or an Extended Industry Standard Architecture (EISA) bus. The bus can be divided into an address bus, a data bus, a control bus, etc. For ease of representation, Figure 7 Only one thick line is used in the diagram, but this does not mean that there is only one bus or only one type of bus.
[0114] Optionally, in a specific implementation, if the memory 701, the processor 702 and the communication interface 703 are integrated on a chip, the memory 701, the processor 702 and the communication interface 703 can communicate with each other through an internal interface.
[0115] The processor 702 may be a central processing unit (CPU), or an application specific integrated circuit (ASIC), or one or more integrated circuits configured to implement the embodiments of the present invention.
[0116] An embodiment of the present invention further provides a computer-readable storage medium on which a computer program or instruction is stored. When the computer program or instruction is executed by a processor, the longitudinal speed bump generating method as described above is implemented.
[0117] An embodiment of the present invention further provides a computer program product, including a computer program or instructions, and when the computer program or instructions are executed, the above longitudinal speed bump generation method is implemented.
[0118] In the description of this specification, the description with reference to the terms "one embodiment", "some embodiments", "example", "specific example", or "some examples" etc. means that the specific features, structures, materials or characteristics described in conjunction with the embodiment or example are included in at least one embodiment or example of the present invention. In this specification, the schematic representations of the above terms do not necessarily refer to the same embodiment or example. Moreover, the specific features, structures, materials or characteristics described may be combined in any one or N embodiments or examples in a suitable manner. In addition, those skilled in the art may combine and combine the different embodiments or examples described in this specification and the features of the different embodiments or examples, without contradiction.
[0119] In addition, the terms "first" and "second" are used for descriptive purposes only and should not be understood as indicating or implying relative importance or implicitly indicating the number of the indicated technical features. Therefore, the features defined as "first" and "second" may explicitly or implicitly include at least one of the features. In the description of the present invention, the meaning of "N" is at least two, such as two, three, etc., unless otherwise clearly and specifically defined.
[0120] Any process or method description in a flowchart or otherwise described herein may be understood to represent a module, fragment or portion of code comprising one or N executable instructions for implementing the steps of a custom logical function or process, and the scope of the preferred embodiments of the present invention includes alternative implementations in which functions may not be performed in the order shown or discussed, including performing functions in a substantially simultaneous manner or in reverse order depending on the functions involved, which should be understood by technicians in the technical field to which the embodiments of the present invention belong.
[0121] It should be understood that the various parts of the present invention can be implemented by hardware, software, firmware or a combination thereof. In the above embodiment, the N steps or methods can be implemented by software or firmware stored in a memory and executed by a suitable instruction execution system. For example, if implemented by hardware, as in another embodiment, it can be implemented by any one or a combination of multiple of the following technologies known in the art: a discrete logic circuit having a logic gate circuit for implementing a logic function for a data signal, a dedicated integrated circuit having a suitable combination of logic gate circuits, a programmable gate array (PGA), a field programmable gate array (FPGA), etc.
[0122] A person skilled in the art may understand that all or part of the steps in the method for implementing the above-mentioned embodiment may be completed by instructing related hardware through a program, and the program may be stored in a computer-readable storage medium, which, when executed, includes one or a combination of the steps of the method embodiment.
Claims
1. A method for generating a longitudinal speed bump, characterized in that: The following steps are involved: Identify the map data and the perception data of the longitudinal speed bump to obtain a point set of the longitudinal speed bump; Generate triangle data of the longitudinal speed bump using the point set of the longitudinal speed bump; Calculating the texture coordinates of the longitudinal speed bump based on the triangle data, and performing texture mapping on the texture coordinates of the longitudinal speed bump to obtain a texture map of the longitudinal speed bump; Animation rendering is performed according to the texture map of the longitudinal speed bump to obtain a display animation of the longitudinal speed bump.
2. The method for generating a longitudinal speed bump according to claim 1, characterized in that: Before texture mapping is performed on the texture coordinates of the longitudinal speed bump to obtain the texture map of the longitudinal speed bump, the method further includes: Acquiring the vehicle speed and the frame interval of the sensing data; Calculating a texture offset according to the vehicle speed and the frame interval; The texture coordinates of the longitudinal speed bump are corrected according to the texture offset.
3. The method for generating a longitudinal speed bump according to claim 1, characterized in that: The step of generating triangle data of the longitudinal speed bump using the point set of the longitudinal speed bump comprises: Identify the center line of the lane according to the speed bumps on both sides of the longitudinal speed bump; Traversing the point set of the longitudinal speed bump, offsetting each point to the center of the speed bumps on both sides of the lane centerline, and expanding at least one side of the point according to the center of the speed bump on each side to obtain a point set of at least one side of the speed bump on each side; Triangle data of the speed bump on each side are obtained by performing triangular enclosing according to the point set extended on at least one side.
4. The method for generating a longitudinal speed bump according to claim 3, characterized in that: The step of expanding at least one side of the points according to the center of the speed bump on each side to obtain a point set of at least one side of the speed bump on each side includes: Get the width of the speed bump on each side; Determine at least one side expansion boundary according to the center of each side speed bump and the width; The point on the center of the speed bump on each side is expanded to correspond to the at least one side expansion boundary.
5. The method for generating a longitudinal speed bump according to claim 1, characterized in that: The step of performing texture mapping on the texture coordinates of the longitudinal speed bump to obtain the texture map of the longitudinal speed bump includes: Get the texture mapping relationship between texture coordinates and texture maps; The texture map of the longitudinal speed bump is determined according to the texture coordinates of the longitudinal speed bump and the texture mapping relationship.
6. The method for generating a longitudinal speed bump according to claim 1, characterized in that: The calculating of the texture coordinates of the longitudinal speed bump based on the triangle data comprises: Establish vehicle coordinate system; Each vertex in the triangle data is identified, and a texture coordinate of each vertex is calculated in the vehicle coordinate system.
7. A longitudinal speed bump generating device, characterized in that: include: A recognition module, used for recognizing map data and perception data of the longitudinal speed bump to obtain a point set of the longitudinal speed bump; A generating module, used for generating triangle data of the longitudinal speed bump using the point set of the longitudinal speed bump; A calculation module, used for calculating the texture coordinates of the longitudinal speed bump based on the triangle data, and performing texture mapping on the texture coordinates of the longitudinal speed bump to obtain a texture map of the longitudinal speed bump; A rendering module is used to perform animation rendering according to the texture map of the longitudinal speed bump to obtain a display animation of the longitudinal speed bump.
8. A vehicle, characterized in that: include: A memory, a processor, and a computer program stored in the memory and executable on the processor, wherein the processor executes the program to implement the method for generating a longitudinal speed bump as described in any one of claims 1 to 6.
9. A computer-readable storage medium having a computer program or instruction stored thereon, characterized in that: The computer program or instruction is executed by a processor to implement the method for generating a longitudinal speed bump according to any one of claims 1 to 6.
10. A computer program product comprising a computer program or instructions, characterized in that When the computer program or instruction is executed, the method for generating a longitudinal speed bump as described in any one of claims 1 to 6 is implemented.