Guideline line rendering method, device, processing device and storage medium

CN122820952APending Publication Date: 2026-09-25CHONGQING CHANGAN AUTOMOBILE CO LTD
View PDF 0 Cites 0 Cited by

Patent Information

Application Number
CN202611312338.X
Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Filing Date
2026-08-27
Publication Date
2026-09-25

AI Technical Summary

Technical Problem

[0003]本申请主要解决的技术问题是提供一种引导线渲染方法、装置、处理装置和存储介质,有利于降低因引导线突然出现或突然消失带来的视觉冲击导致的用户注意力分散的问题,进而有利于保障行车安全

Benefits of technology

[0020]上述方案,在引导线功能开启或关闭阶段,按照引导线在当前时刻的可见进度值,对引导线的绘制区域沿长度方向进行遮蔽处理,并按照基础渲染参数对遮蔽处理后的绘制区域进行渲染,得到当前时刻的引导线;其中,由于遮蔽后绘制区域的可见长度和可见进度值相关,且多个时刻渲染得到引导线的可见长度呈单调变化,故在引导线功能开启或关闭阶段,用户视觉上看到的是引导线的可见长度是逐渐变化的,并非突然出现或消失,因此,能够有效降低因引导线突然出现或突然消失带来的视觉冲击导致的用户注意力分散的问题,有利于行车安全。

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN122820952A_ABST
    Figure CN122820952A_ABST
Patent Text Reader

Abstract

The application discloses a guide line rendering method and device, a processing device and a storage medium. The method comprises the following steps: in the guide line function opening or closing stage, a drawing area of the guide line at a current time and a visible progress value are acquired, the visible progress value represents a visible length proportion of the drawing area, and the visible length proportion is a ratio between a visible length in the drawing area and a total length of the drawing area; the drawing area is shielded along a length direction according to the visible progress value, and a visible length of the drawing area after the shielding processing is related to the visible progress value; the drawing area after the shielding processing is rendered by using a basic rendering parameter of the drawing area, so as to obtain the guide line at the current time, the guide line is used for display on a vehicle, and visible lengths corresponding to the guide lines rendered at continuous multiple time points change monotonously. Through the above method, the visual impact caused by the sudden appearance or disappearance of the guide line can be reduced, and the driving safety can be ensured.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] This application relates to the field of image rendering technology, and in particular to a guide line rendering method, apparatus, processing device, and storage medium. Background Technology

[0002] With the development of intelligent cockpits in automobiles, augmented reality head-up displays (AR-HUDs) have become an important human-machine interface. In AR-HUDs, dynamic guide lines (such as lane guidance and route arrows) are used to enhance the driver's path perception. Currently, dynamic guide lines are loaded in a flashing manner, which can easily create a strong visual impact and distract the driver's attention from the road, thus compromising driving safety. Summary of the Invention

[0003] The main technical problem addressed by this application is to provide a method, apparatus, processing device, and storage medium for rendering guide lines, which helps to reduce the visual impact caused by the sudden appearance or disappearance of guide lines, thereby helping to ensure driving safety.

[0004] To address the aforementioned technical problems, this application provides a guide line rendering method. This method includes: during the guide line function's on / off phase, obtaining the drawing area and visible progress value of the guide line at the current moment, where the visible progress value represents the proportion of the visible length of the drawing area, and the visible length proportion is the ratio between the visible length of the drawing area and the total length of the drawing area; occluding the drawing area along its length direction according to the visible progress value, wherein the remaining visible length of the drawing area after occlusion is related to the visible progress value; and rendering the occluded drawing area using the basic rendering parameters of the drawing area to obtain the guide line at the current moment, wherein the guide line is used to display on the vehicle, and the visible length corresponding to the guide line rendered at multiple consecutive moments changes monotonically.

[0005] The basic rendering parameters of the drawing area include the basic pixel values ​​of each position point in the drawing area. According to the visible progress value, the drawing area is occluded along its length, including: using the visible progress value to determine the target visible boundary of the drawing area in the length direction, where the target visible boundary is used to divide the drawing area into visible sub-regions and occluded sub-regions; using the positional relationship between each position point in the drawing area and the target visible boundary, a first occlusion weight is generated for each position point in the drawing area; where the first occlusion weight indicates whether a position point is occluded, and the first occlusion weight corresponding to a position point located within an occluded sub-region indicates that the position point is occluded; using the basic rendering parameters of the drawing area, the occluded drawing area is rendered to obtain the guide line at the current moment, including: using the basic pixel values ​​of each position point and the occlusion weight corresponding to each position point to determine the rendered pixel value of each position point; the occlusion weight corresponding to each position point is either the first occlusion weight or the second occlusion weight, where the second occlusion weight is generated based on the first occlusion weight.

[0006] The basic rendering parameters also include basic transparency parameters. The generation step of the second occlusion weight of the position point includes: fusing the first occlusion weight of the position point with the basic transparency parameter of the position point as the second occlusion weight of the position point. The basic transparency parameter includes at least one of the following: feather transparency and texture transparency. The texture transparency includes at least one of the main texture map transparency and the edge texture map transparency.

[0007] The first occlusion weight of each location point is within a preset transparency range. The basic transparency parameters include feather transparency and texture transparency. Texture transparency includes the transparency of the main texture map and the transparency of the edge texture map. The first occlusion weight of the location point is fused with the basic transparency parameters of the location point to form the second occlusion weight of the location point. This includes: obtaining the first product between the transparency of the main texture map of the location point and the fill intensity; summing the first product with the transparency of the edge texture map of the location point to form the total texture transparency of the location point; and multiplying the total texture transparency, feather transparency, and first occlusion weight of the location point to form the second occlusion weight of the location point.

[0008] The drawing area has two ends along its length, namely the start end and the end end. The target visible boundary of the drawing area along its length is determined using the visible progress value, including: obtaining the second product between the length of the drawing area and the visible length ratio represented by the visible progress value; and taking the location point in the drawing area whose distance from the start end is the distance of the second product as the target visible boundary. The sub-region between the start end and the target visible boundary is the visible sub-region, and the sub-region between the target visible boundary and the end end is the occluded sub-region.

[0009] The method involves generating a first occlusion weight for each location point in the drawing area by utilizing the positional relationship between each location point and the visible boundary of the target. This includes: for each location point, obtaining the first difference between the texture ordinate of the location point and the texture ordinate of the visible boundary of the target; limiting the first difference or third product corresponding to each location point to a preset transparency range to obtain the first occlusion weight corresponding to each location point. The third product is the product between the first difference corresponding to the location point and a preset magnification factor. The first occlusion weight corresponding to a location point located within the occlusion sub-region is one of the boundary values ​​of the preset transparency range, where one of the boundary values ​​represents complete transparency.

[0010] The steps for obtaining the basic pixel values ​​of each location point include: obtaining the gradient position parameters, starting guide color, and ending guide color of the drawing area, wherein the gradient position parameters are parameters used to control the position of the gradient range of the guide line color; for each location point, the gradient weight of the location point is determined using the texture ordinate and gradient position parameters; and the starting guide color and ending guide color are interpolated using the gradient weight to determine the basic pixel value of the location point.

[0011] The process of determining the gradient weight of a location point by using its texture ordinate and gradient position parameters includes limiting the sum of the texture ordinate and gradient position parameters of the location point to a preset value range and using it as the gradient weight of the location point.

[0012] Before determining the rendered pixel value of each position point using the base pixel value and the occlusion weight corresponding to each position point, the process includes: obtaining the pixel data and corresponding transparency data of at least one scan light at the current moment, wherein the scan light at the current moment is located within the visible sub-region of the drawing area at the current moment, the pixel data of each scan light includes the scan pixel values ​​of several position points belonging to the scan light within the drawing area, and the transparency data of each scan light includes the scan transparency corresponding to several position points; determining the rendered pixel value of each position point using the base pixel value and the occlusion weight corresponding to each position point includes: adjusting the base pixel value of each position point using the occlusion weight corresponding to each position point to obtain the occluded pixel value of each position point; and blending the occluded pixel value of each position point, the scan pixel values ​​and scan transparency of several position points belonging to the scan light according to the corresponding position point to obtain the rendered pixel value of each position point.

[0013] The scanning light includes at least one of a first scanning light and a second scanning light. The first scanning light is determined using a first offset at the current moment, wherein the first offset is determined using the scanning progress value at the current moment, and the first offset is different at different moments. The movement of the first scanning light at multiple consecutive moments is synchronized with the movement of the visible sub-region in the drawing area. The second scanning light is determined using a second offset at the current moment. The second offset is determined using the current moment, and the second scanning light can move periodically with the change of time.

[0014] Specifically, for each scanning beam, the transparency data of the scanning beam at the current moment is obtained, including: for each position point, the sum of the offset of the scanning beam at the current moment and the texture ordinate of the position point is obtained and used as the longitudinal sampling coordinate of the corresponding scanning beam; wherein, the offset corresponding to the first scanning beam is the first offset, and the offset corresponding to the second scanning beam is the second offset; a sine function is calculated using the longitudinal sampling coordinate of the scanning beam to determine the target sine value of the scanning beam at the position point; the second difference between the target sine value of the position point and the peak filtering threshold is obtained, and the scanning beam transparency of the corresponding scanning beam at the position point is determined using the second difference of the position point; the transparency data of the scanning beam includes the scanning beam transparency of each position point.

[0015] Wherein, the third difference between the peak filtering threshold and the peak value of the sine is less than a preset threshold; and / or, using the longitudinal sampling coordinates of the scanning light to calculate the sine function and determine the target sine value of the scanning light at the position point, including: obtaining the fourth product between the longitudinal sampling coordinates and the preset coefficient; the preset coefficient is the product of the first target constant and π; performing a sine function calculation on the fourth product to obtain the target sine value of the position point; and / or, using the second difference of the position point to determine the scanning light transparency of the scanning light corresponding to the position point, including: using the second difference of the position point to obtain the initial transparency of the scanning light corresponding to the position point; using the product between the initial transparency and the transparency associated with at least one scanning light as the scanning light transparency of the scanning light corresponding to the position point; wherein, the transparency associated with at least one scanning light includes at least one of the following transparencys corresponding to the scanning light: texture transparency, color transparency, and feathering transparency.

[0016] The first scanning light includes at least one of a first sub-scanning light and a second sub-scanning light. The first scanning light is determined using a first sub-offset, and the second sub-scanning light is determined using a second sub-offset. The second sub-offset is less than the first sub-offset, and the fourth difference between the second sub-offset and the first sub-offset is a second target constant. The first sub-offset at the current moment is the product of the scanning progress value at the current moment and the third target constant. And / or, using the second difference of the position point, the initial transparency of the scanning light corresponding to the position point is obtained, including: obtaining the fifth product of the second difference and the fourth target constant, where the fourth target constant is used to amplify the second difference; limiting the fifth product to a preset numerical range, and using the limited result as the initial transparency of the position point.

[0017] To address the aforementioned technical problems, another technical solution adopted in this application is to provide a guide line rendering device, comprising an acquisition module, a occlusion processing module, and a rendering module. The acquisition module is used to acquire the drawing area and visible progress value of the guide line at the current moment during the guide line function's on or off phase. The visible progress value represents the visible length percentage of the drawing area, which is the ratio between the visible length in the drawing area and the total length of the drawing area. The occlusion processing module is used to perform occlusion processing on the drawing area along its length direction according to the visible progress value, wherein the remaining visible length of the drawing area after occlusion processing is related to the visible progress value. The rendering module is used to render the occluded drawing area using the basic rendering parameters of the drawing area to obtain the guide line at the current moment. The guide line is used to be displayed on the vehicle, and the visible length of the guide line rendered at multiple consecutive moments changes monotonically.

[0018] To solve the above-mentioned technical problems, another technical solution adopted in this application is: to provide a processing device, including a memory and a processor coupled to each other, wherein the memory stores program instructions; and the processor is used to execute the program instructions stored in the memory to implement the above-mentioned method.

[0019] To solve the above-mentioned technical problems, another technical solution adopted in this application is to provide a computer-readable storage medium for storing program instructions that can be executed to implement the above-mentioned method.

[0020] The above solution, during the activation or deactivation of the guide line function, occludes the drawing area of ​​the guide line along its length according to the visible progress value of the guide line at the current moment, and renders the occluded drawing area according to the basic rendering parameters to obtain the guide line at the current moment. Since the visible length of the occluded drawing area is related to the visible progress value, and the visible length of the guide line rendered at multiple moments changes monotonically, the visible length of the guide line seen by the user gradually changes during the activation or deactivation of the guide line function, rather than appearing or disappearing suddenly. Therefore, it can effectively reduce the visual impact caused by the sudden appearance or disappearance of the guide line, which leads to user attention distraction and is beneficial to driving safety. Attached Figure Description

[0021] Figure 1 This is a flowchart illustrating an embodiment of the guide line rendering method provided in this application; Figure 2 yes Figure 1 The flowchart of step S12 shown is a schematic diagram of one embodiment; Figure 3 This is a flowchart illustrating an embodiment of obtaining the basic pixel values ​​of each location point provided in this application; Figure 4a This is a schematic diagram of an embodiment of the configuration rendering parameters provided in this application; Figure 4b This is a rendering of an embodiment of the guide line provided in this application; Figure 5 This is a flowchart illustrating an embodiment of determining the rendered pixel values ​​at each location point provided in this application; Figure 6 This is a schematic flowchart of an embodiment of obtaining the transparency data of the scanned light at the current moment, provided in this application. Figure 7 This is a schematic diagram of the framework of an embodiment of the guide line rendering apparatus provided in this application; Figure 8 This is a schematic diagram of the framework of an embodiment of the processing apparatus provided in this application; Figure 9 This is a schematic diagram of the framework of the computer-readable storage medium provided in this application. Detailed Implementation

[0022] To make the purpose, technical solution and effects of this application clearer and more explicit, the following describes this application in further detail with reference to the accompanying drawings and embodiments.

[0023] Furthermore, if the embodiments of this application involve descriptions such as "first" or "second," these descriptions are for descriptive purposes only and should not be construed as indicating or implying their relative importance or implicitly specifying the number of technical features indicated. Therefore, features defined with "first" or "second" may explicitly or implicitly include at least one of those features. Additionally, the technical solutions of various embodiments can be combined with each other, but this must be based on the ability of those skilled in the art to implement them. If the combination of technical solutions is contradictory or impossible to implement, it should be considered that such a combination of technical solutions does not exist and is not within the scope of protection claimed in this application.

[0024] Please see Figure 1 , Figure 1 This is a schematic flowchart of an embodiment of the guide line rendering method provided in this application. It should be noted that if substantially the same result is achieved, this embodiment does not necessarily reflect that result. Figure 1 The illustrated process sequence is limited. For example... Figure 1 As shown, this embodiment includes: S11: During the phase when the guide line function is enabled or disabled, obtain the drawing area and visible progress value of the guide line at the current moment. The visible progress value represents the visible length ratio of the drawing area, and the visible length ratio is the ratio between the visible length in the drawing area and the total length of the drawing area.

[0025] This embodiment controls the visible length of the guide line (navigation guide line) drawing area by utilizing the visible progress value at each moment during a short time period corresponding to the guide line function's on / off phase. This results in a monotonically changing visible length of the drawing area, creating the visual effect of the guide line gradually appearing (the light carpet gradually unfolds) or gradually disappearing (the light carpet gradually retracts). The guide line function's on / off phase can be understood as the on / off phase of the guide line display function. When the guide line display is on, the user sees the guide line gradually appearing; when the guide line display is off, the user sees the guide line gradually disappearing.

[0026] The drawing area refers to the geometric range of the guide line to be rendered in the head-up display (HUD) imaging field of view. During the guide line rendering process, the imaging length of the guide line drawing area remains constant, and the outline shape and extension direction of the drawing area follow the navigation road and real-time traffic conditions. In the guide line rendering process, the vehicle equipment acquires driving environment perception data and road navigation data in real time, and dynamically adjusts the geometric shape and path direction of the guide line based on the two types of data to generate a guide line model that adapts to the current driving scenario, and then carries out guide line rendering output.

[0027] The window inside the guide line drawing area relies on the constructed mesh to complete the mapping between the spatial coordinates and texture coordinates (UV) of the drawing area. Each texture map provides basic texture material for the mesh. The transparency of the texture map is adjusted, and the mesh texture is masked in combination with the visible progress value at each time. Finally, a navigation guide line (or light carpet) of corresponding visible length is generated in the imaging area of ​​the augmented reality head-up display (AR-HUD). The light carpet is the visualized navigation guide line presented by rendering the drawing area.

[0028] Taking a road with a total physical length of 60 meters corresponding to the guide line as an example, the mapping process between the spatial coordinates and texture coordinates (UV) of the drawing area is actually to normalize and map the physical road range of 0 to 60 meters to the texture coordinate range of 0 to 1. Each point in the grid is converted to the corresponding texture coordinate based on its spatial position. Subsequently, the rendering follows the visible progress value based on the texture coordinates of each point in the drawing area.

[0029] The drawing area is divided into two ends along its length: the start end and the end end. The start and end ends are relative. When the guide line display function is enabled, the end closer to the vehicle is the start end, and the end farther from the vehicle is the end end. When the guide line display function is disabled, the end farther from the vehicle is the start end, and the end closer to the vehicle is the end end.

[0030] The visible progress value is a number between 0 and 1, used to represent the visible length percentage of the drawing area. The visible length percentage is the ratio between the drawing length (visible length) in the drawing area and the total length of the drawing area. The magnitude of the visible progress value determines the visible length percentage of the guide line. Specifically, when the visible progress value is 0, the guide line is not visible to the user; when the visible progress value is 0.5, the user can see half of the total length of the guide line; when the visible progress value is 1, the user can see the full length of the guide line.

[0031] Taking a scenario where the guide line display is enabled and the normalized length of the guide line drawing area represents a road with an actual physical length of 60 meters as an example, in the initial short period after activation, the visible progress value gradually increases (e.g., from 0 to 1), and the user sees the guide line's light carpet length gradually increase until the complete guide line light carpet is displayed. For example, at time t1, the visible progress value is 0.1, corresponding to a visible guide line length of 6 meters; at time t2, the visible progress value is 0.3, corresponding to a visible guide line length of 18 meters; and at time t... n-1 At time t, the visible progress value is 0.8, corresponding to a visible guide line length of 48 meters. nAt a given moment, the visible progress value is 1, corresponding to a visible guide line length of 60 meters. At this time, the user can see the complete guide line. Correspondingly, during a short period when the guide line display is turned off, the visible progress value gradually decreases (e.g., from 1 to 0), and the visible length of the guide line gradually decreases until the guide line completely disappears and becomes invisible.

[0032] It should be noted that, regardless of whether the vehicle is stationary or in motion, the visible length of the guide line is determined by the visible progress value and the total length of the drawing area.

[0033] S12: According to the visible progress value, the drawing area is masked along the length direction. The remaining visible length of the drawing area after masking is related to the visible progress value.

[0034] Masking is used to mask areas in the drawing area that do not need to be displayed, so that only the remaining masked area is displayed. For easy distinction, the area that needs to be displayed is called the visible sub-region, and the area that does not need to be displayed is called the masked sub-region.

[0035] In one embodiment, the occluded sub-regions in the drawing area can be cropped or made transparent to display the visible sub-regions and occlude the invisible sub-regions, thereby making the final occluded sub-regions invisible to the user and the visible sub-regions visible to the user.

[0036] Please see Figure 2 , Figure 2 yes Figure 1 The flowchart shown is a schematic diagram of an embodiment of step S12. In this embodiment, the drawing area is masked along the length direction according to the visible progress value, including: S21: Using the visible progress value, determine the target visible boundary of the drawing area in the length direction, wherein the target visible boundary is used to divide the visible sub-region and the occluded sub-region in the drawing area.

[0037] In simple terms, the target visible boundary is the boundary dividing the drawn area into visible and occluded sub-regions. In one embodiment, the target visible boundary can be determined as follows: First, obtain the second product between the length of the drawn area (corresponding to the imaging length mentioned above) and the visible length percentage represented by the visible progress value. Then, take the location point in the drawn area whose distance from the starting end is equal to the distance of the second product as the target visible boundary. Here, the visible sub-region is the sub-region between the starting end and the target visible boundary, and the occluded sub-region is the sub-region between the target visible boundary and the ending end.

[0038] Taking a scenario where the guide line display function is enabled as an example, the normalized length of the drawing area is 1, the current visible progress value is 0.3, the second product is 0.3, and the position point in the drawing area that is 0.3 away from the starting end is taken as the target visible boundary (actually a dividing line with a vertical coordinate of 0.3). Then, the sub-regions in the drawing area that are within the dividing line and the starting end are the visible sub-regions, and the areas in the drawing area that are not the visible sub-regions are the occluded sub-regions.

[0039] S22: Utilize the positional relationship between each location point in the drawing area and the visible boundary of the target to generate the first occlusion weight corresponding to each location point in the drawing area; wherein, the first occlusion weight represents whether the location point is occluded, and the first occlusion weight corresponding to the location point located in the occlusion sub-region represents that the location point is occluded.

[0040] The positional relationship between each location point and the visible boundary of the target is determined using the texture ordinate of each location point and the texture ordinate of the visible boundary of the target. The texture ordinate is the Y-axis value in the texture coordinate system. The texture coordinate system also includes a texture abscissa, and the values ​​of both the texture abscissa and texture ordinate are between 0 and 1 (refer to the introduction in the normalization section above). The length direction of the guide line is the Y-axis, and the origin of the texture coordinate system can be determined according to predefined coordinate system rules; for example, the lower left corner of the guide line drawing area can be defined as the origin (0,0), and the texture coordinate of the corresponding upper left corner is (0,1), or the upper left corner of the guide line drawing area can be defined as the origin (0,0), and the texture coordinate of the corresponding lower left corner is (0,1).

[0041] When determining the first occlusion weight for each location point, to ensure that the direction of increase of the visible progress value is consistent with the direction of increase of the texture's vertical coordinate, it can be determined whether the current texture coordinate needs to be flipped based on the actual situation. Specifically, if the direction of increase of the visible progress value is consistent with the direction of increase of the texture's vertical coordinate, then the texture's vertical coordinate does not need to be flipped; if they are inconsistent, then the texture's vertical coordinate needs to be flipped.

[0042] In this embodiment, for each location point in the drawing area, the difference between the texture ordinate of that location point and the texture ordinate of the visible boundary of the target (denoted as the first difference) can be obtained first. Then, the first difference or third product corresponding to each location point is limited to a preset transparency range to obtain the first occlusion weight corresponding to each location point. Among them, the third product of the location point is the product between the first difference corresponding to the location point and a preset magnification factor, and the first occlusion weight corresponding to the location point located in the occlusion sub-region is one of the boundary values ​​of the preset transparency range, and this boundary value represents complete transparency.

[0043] For easier understanding, please refer to the following formula: fillRange=mix(0.0, 1.0, Progress) ProgressMask=clamp( ( fillRange - ( 1.0-texcoord.y) )*a, 0.0, 1.0 ) Where Progress represents the visible progress value at the current moment, and mix( . ) represents the interpolation function, which is used to interpolate using the current visible progress value to determine the position of the target visible boundary in the length direction of the drawing area at the current moment, fillRange. That is, fillRange represents the texture ordinate of the position point of the target visible boundary; where, since the value range of Progress is [0,1], fillRange=Progress.

[0044] ProgressMask represents the first occlusion weight of the location point, 1-texcoord.y represents the texture ordinate after coordinate flipping at any location point, so that the increasing direction of the flipped texture ordinate is consistent with the increasing direction of the visible progress value, fillRange - (1.0-texcoord.y) represents the first difference, 'a' represents the preset magnification factor, and (fillRange - (1.0-texcoord.y))*a represents the third product; clamp( . The ) represents a limiting function used to limit the third product within a preset transparency range [0,1]. Here, the preset transparency range is the mask transparency range.

[0045] Unless otherwise specified, the "*" in the formulas in this article represents multiplication. For example, (fillRange - (1.0-texcoord.y) )*a represents the product obtained by multiplying the first difference and the preset amplification factor (i.e., the third product).

[0046] In simple terms, 1.0-texcoord.y can be understood as the texture coordinate obtained by flipping the original texture coordinate of the position point vertically, and fillRange is the texture coordinate of the position point of the visible boundary of the target in the flipped texture coordinate system.

[0047] In one embodiment, the preset amplification factor 'a' is a configurable parameter, typically set to be greater than 1 (e.g., a=4), used to amplify the first difference. Due to the amplification of the difference, the value can jump from 0 to 1 over a very narrow vertical distance, compressing the semi-transparent transition zone to make the growth edge of the guide line steeper and sharper. Of course, in another embodiment, the first difference can also be directly limited to a preset transparency range [0,1].

[0048] In simple terms, the ultimate goal of this embodiment is to mask each location point within the masked sub-region. The first masking weight can be understood as the mask transparency of the location point. The mask transparency is used to control the intensity of light transmission. When the mask transparency is 0, the light corresponding to that location is completely masked, and the location is not visible to the user. When the mask transparency is 1, the light at that location can pass through and is visible to the user. Combining the above formula, when the first masking weight is 0 (i.e., the mask transparency is 0), it means that the corresponding location point is completely masked and invisible. When the first masking weight is 1, it means that the location point is displayed normally. When the first masking weight is a value between 0 and 1, the closer the first masking weight is to 1, the higher the light transmission degree of the corresponding location point; the closer it is to 0, the lower the light transmission degree of the corresponding location point. The weight value of the first masking weight between 0 and 1 is used to achieve a soft feathering transition effect at the end of the guide line.

[0049] To explain using the aforementioned calculation formula: When the first difference is less than 0, the first occlusion weight output after the third product of the corresponding position point is limited is equal to 0, and the position point with the first difference less than 0 is the position point in the occluded sub-region. Therefore, relying on the first occlusion weight with a value of 0, the pixel at this position can be controlled to remain completely transparent, thereby completing the occlusion; when the first difference is greater than 0, the first occlusion weight is greater than 0, the corresponding position point is in the visible area, and the corresponding mask transparency is presented according to the weight value, realizing the lighting display of the guide line drawing area.

[0050] S13: Render the occluded drawing area using the basic rendering parameters of the drawing area to obtain the guide line at the current moment. The guide line is used to display on the vehicle. The visible length of the guide line obtained from multiple consecutive moments changes monotonically.

[0051] The rendering of the guide line relies on its basic rendering parameters. In this embodiment, the basic rendering parameters are configurable parameters or rendering parameters determined using configurable parameters. These configurable parameters can be preset to achieve the desired guide line rendering effect. For examples, please refer to [reference needed]. Figure 4a and Figure 4b , Figure 4a This is a schematic diagram illustrating the configuration of the rendering parameters provided in this application in one embodiment. Figure 4b This is a rendered image of a guide line provided in this application according to one embodiment. Please refer to... Figure 4aThe configurable parameters involved in rendering include the main texture map, edge texture map, first guide line color (corresponding to the starting guide color below), second guide line color (corresponding to the ending guide color below), edge glow intensity, gradient position parameters, visible progress (maximum 1), feathering coefficient, at least one scan light map (scan light map), loop scan light on / off parameters (1 indicates on, 0 indicates off), emit / retract single scan light (the value changes from 0 to 1 to emit a single scan light, and from 1 to 0 to retract a single scan light).

[0052] The main texture map is primarily used to provide the basic transparency distribution of the guide line's main body, while the edge texture map is primarily used to provide the transparency distribution of the guide line's sides and the feathered transition area at its far end. The first and second guide line colors are the base colors at both ends of the guide line; for example, one end of the guide line's drawing area samples the first guide line color, and the other end samples the second guide line color. Then, relying on texture coordinate interpolation, a smooth color gradient of the guide line is achieved from near to far. The edge glow intensity is used to provide the brightness of the guide line's edge glow; the higher the value, the more striking the glow effect at the guide line's edge. The gradient position parameter is used to control the position of the guide line's color gradient range. The visible progress (corresponding to the Progress mentioned above, with a maximum value of 1) is a normalized progress parameter; its value increasing from 0 to 1 represents the gradual extension of the light carpet corresponding to the guide line; the value decreasing from 1 back to 0 represents the gradual retraction of the light carpet corresponding to the guide line. The feathering coefficient can be used to control the guide line to fade naturally at the start and end points, without producing... A rigid boundary exists; at least one scan map (sweep map) is used to provide the texture material for the scan light strip, including information such as the shape, transparency, or brightness distribution of the light strip; the loop sweep on / off parameter can be understood as a switch variable; a value of 1 indicates that the looping flowing sweep animation is on, and a value of 0 indicates that the sweep effect is off, and the guide line only retains the basic light carpet image; the emit / retract single sweep parameter can be understood as a normalized animation progress parameter. When its value changes from 0 to 1, the scan light strip is emitted from the near end of the vehicle towards the far end of the road; when the value changes from 1 to 0, the scan light strip retracts from the far end back to the starting point. For details, please refer to the description below.

[0053] in, Figure 4b This can be understood as being in Figure 4a The guide line is rendered at a certain moment under the configured parameters. In an implementation scenario, in order to make the far end of the guide line clearer than the near end, the opacity (i.e., mask transparency) value of the far end in the basic transparency distribution of the main texture map can be set to be close to 1, and the opacity of the near end can be less than the opacity of the far end.

[0054] The monotonic change in length indicates that at each moment during the on or off phase of the guide line function, the visible portion of the guide line gradually increases or decreases over time, without suddenly appearing or disappearing. This facilitates a consistent perception of the progress of the guide line for the user.

[0055] In one embodiment, the basic rendering parameters of the drawing area include the basic pixel values ​​of each location point in the drawing area. In this embodiment, the drawing area after occlusion processing is rendered using the basic rendering parameters of the drawing area to obtain the guide line at the current moment. This includes: determining the rendered pixel value of each location point using the basic pixel values ​​of each location point and the occlusion weight corresponding to each location point. The basic pixel values ​​are the base color of the guide line. The method for obtaining the basic pixel values ​​can be found below. Figure 3 The relevant description of the illustrated embodiment.

[0056] In one embodiment, the base pixel value of each location point can be adjusted directly using the occlusion weight corresponding to each location point to obtain the occluded pixel value of each location point. The occlusion weight corresponding to each location point is either the first occlusion weight or the second occlusion weight mentioned above; the second occlusion weight is generated based on the first occlusion weight, for example, by fusing the first occlusion weight of the location point with the base transparency parameter of the location point, and using the fusion result as the second occlusion weight of the location point.

[0057] In one embodiment, for each location point, the occlusion weight corresponding to the location point is used to weight the basic pixel value of the location point, and the weighted pixel value is used as the occluded pixel value of each location point.

[0058] Please refer to the description of the first occlusion weight in step S21. The first occlusion weight corresponding to the location point in the first occlusion sub-region is 0. When the first occlusion weight is 0, the second occlusion weight generated based on the first occlusion weight is also 0. Therefore, regardless of whether the first occlusion weight or the second occlusion weight is used to weight the base pixel value of the location point in the first occlusion sub-region, the weighted result is 0, and this location is not visible to the user.

[0059] In another implementation, at least one scanning light needs to be presented on the guide line. Therefore, after obtaining the pixel data and corresponding transparency data of each scanning light at the current moment, and obtaining the pixel values ​​of each position point after occlusion, the pixel values ​​of each position point after occlusion, as well as the scanning pixel values ​​and scanning transparency of several position points belonging to the scanning light, can be mixed according to the corresponding position points to obtain the rendered pixel values ​​of each position point. It should be noted that after the above processing, each position point in the occluded sub-region can be occluded, and each position point in the visible sub-region can be displayed according to the rendered pixel values ​​obtained after mixing. Related implementation methods can be referred to below. Figure 5 Description of the illustrated embodiment.

[0060] In this context, each scanning light at the current moment is located within a visible sub-region of the drawing area at the current moment. The pixel data of each scanning light includes the scanning pixel values ​​of several position points belonging to the scanning light within the drawing area, and the transparency data of each scanning light includes the scanning transparency corresponding to several position points.

[0061] At least one scanning light includes at least one of a first scanning light and a second scanning light. The first scanning light is determined using a first offset at the current moment. The first offset is determined using the scanning progress value at the current moment. During the time period when the guide line function is turned on or off, the scanning progress value is different at different moments, so the first offset is different at different moments. The scanning progress value belongs to [0,1]. In order to enable the user to perceive that the movement progress of the visible area of ​​the guide line matches the movement progress of the first scanning light, the difference between the scanning progress value of the first scanning light and the visible progress value can be set to be less than a preset difference threshold, so that the movement of the first scanning light and the movement of the visible area of ​​the guide line are synchronized.

[0062] In simple terms, the first offset is calculated based on the current scanning progress value, ensuring that the position of the first scan light is always synchronized with the visible progress. This can be understood as the first scan light moving from near to far within the rendering area as the scanning progress value changes from 0 to 1, allowing it to visually indicate the current rendering progress of the guide line.

[0063] The second scanning light is determined using the second offset at the current moment; the second offset is determined using the current moment, and the second scanning light can move periodically over time to present a flowing light effect. The second scanning light helps to remind users to pay attention to road conditions at all times.

[0064] The rendering information for each scan beam can be preset, including at least one scan beam texture as mentioned above; on / off parameters for the loop scan (corresponding to the scan beam below); parameters for emitting / receiving a single scan; and color settings for the scan beam. In other words, the pixel data of the scan beam can be determined by the set color; the method for obtaining the transparency data of each scan beam can be found below. Figure 6 The relevant description of the illustrated embodiment.

[0065] The above solution, during the activation or deactivation of the guide line function, occludes the drawing area of ​​the guide line along its length according to the visible progress value of the guide line at the current moment, and renders the occluded drawing area according to the basic rendering parameters to obtain the guide line at the current moment. Since the visible length of the occluded drawing area is related to the visible progress value, and the visible length of the guide line rendered at multiple moments changes monotonically, the visible length of the guide line seen by the user gradually changes during the activation or deactivation of the guide line function, rather than appearing or disappearing suddenly. Therefore, it can effectively reduce the visual impact caused by the sudden appearance or disappearance of the guide line, which leads to user attention distraction and is beneficial to driving safety.

[0066] It should be noted that the above mainly describes the rendering method of the guide line during the stage when the guide line function is turned on or off. However, during the normal driving process of the vehicle after the guide line function is turned on and before the function is turned off, the newly added segments of the guide line can be rendered directly. At this time, the rendering is not affected by the visible progress value. That is, during the normal driving process of the vehicle, the user does not have the visual perception of the visible area gradually increasing.

[0067] Please see Figure 3 , Figure 3 This is a flowchart illustrating an embodiment of obtaining the basic pixel values ​​of each location point provided in this application. In this embodiment, obtaining the basic pixel values ​​of each location point includes: S31: Obtain the gradient position parameters, starting guide color, and ending guide color of the drawing area.

[0068] S32: For each location point, determine the gradient weight of the location point using the texture ordinate and gradient position parameters.

[0069] S33: Use gradient weights to interpolate the starting and ending guide colors to determine the base pixel value of the position point.

[0070] This embodiment uses the texture ordinate of each location point and pre-configured gradient position parameters to interpolate the starting point guide color and the ending point guide color to obtain the base color value of each location point; the gradient position parameters are used to control the position of the gradient range of the guide line color.

[0071] Among them, the gradient position parameter, the starting guide color, and the ending guide color are all configurable parameters, which are preset parameters and can be set according to actual needs.

[0072] In one embodiment, the sum of the texture ordinate and gradient position parameter of the location point is limited to a preset value range and used as the gradient weight of the location point.

[0073] For example, the formula for determining the gradient weight can be referred to as follows: gradFactor = clamp(texCoord.y+GradientPos, 0.0, 1.0) Where texCoord.y represents the texture ordinate of the location point, GradientPos represents the gradient position parameter, and clamp( . ) represents the limiting function, which limits the sum of the texture ordinate and gradient position parameters of the position point to a preset value range [0,1]. gradFactor represents the gradient weight of the position point.

[0074] By interpolating the starting and ending guide colors using gradient weights, the base pixel values ​​for the determined position points can be referenced as follows: baseColor = mix(GuideLinecolor2, GuideLinecolor1, gradFactor) Where baseColor represents the base pixel value of the location point, which is the calculated interpolation result; GuideLinecolor2 represents the second guide line color; and GuideLinecolor1 represents the first guide line color. The first guide line color represents the starting point color of the guide line, and the second guide line color represents the ending point color of the guide line (e.g., the color furthest from the vehicle). mix( . ) represents the interpolation function.

[0075] The gradient position parameter is a normalized texture coordinate parameter that is adjustable. By adjusting the value of the gradient position parameter, the position range in which the sum of the texture vertical coordinate and the gradient position parameter falls within the range of 0 to 1 can be adjusted, thereby achieving an overall translation of the color gradient range and adjusting the position where the transition from the starting guide color to the ending guide color occurs on the guide line. Therefore, the function of the gradient position parameter is to adjust the position of the color gradient range on the guide line.

[0076] It should be noted that, using the method provided in this embodiment, guide lines with gradient color effects can be obtained.

[0077] Please see Figure 5 , Figure 5 This is a schematic flowchart illustrating an embodiment of determining the rendered pixel values ​​at each location point provided in this application. This embodiment includes: S51: Adjust the base pixel value of each position point using the occlusion weight corresponding to each position point to obtain the occluded pixel value of each position point.

[0078] The occlusion weight corresponding to the location point is either the first occlusion weight or the second occlusion weight mentioned above; the second occlusion weight is generated based on the first occlusion weight.

[0079] In one embodiment, the basic rendering parameters of the drawing area further include basic transparency parameters; for any location point, a second occlusion weight is generated based on the first occlusion weight of the location point, including: fusing the first occlusion weight of the location point with the basic transparency parameter of the location point as the second occlusion weight of the location point, wherein the basic transparency parameter includes at least one of the following: feather transparency and texture transparency, and the texture transparency includes at least one of the main texture map transparency and the edge texture map transparency.

[0080] In one specific embodiment, the basic transparency parameters include feather transparency and texture transparency, whereby texture transparency includes main texture map transparency and edge texture map transparency. In this embodiment, determining the second occlusion weight for any given location includes: obtaining a first product between the main texture map transparency and the fill intensity at that location; summing the first product with the edge texture map transparency at that location as the total texture transparency at that location; and using the product of the total texture transparency, feather transparency, and the first occlusion weight at that location as the second occlusion weight at that location.

[0081] For example, the relevant calculation formulas are as follows: alphaMask=(edgeTex.a+mainTex.a * intensity) * progressMask*feathermask Where alphaMask represents the second occlusion weight of the location point, progressMask represents the first occlusion weight of the location point, mainTex.a represents the transparency of the main texture map, edgeTex.a represents the transparency of the edge texture map, intensity represents the fill intensity, and feathermask represents the feathering transparency.

[0082] In this formula, all transparency values ​​refer to the mask transparency. For an introduction to mask transparency, please refer to the previous description. The main texture map transparency is used to control the transparency of the main light band of the guide line. The edge texture map transparency includes the transparency of the edge outline. The total texture transparency of the position point is the total texture transparency after overlaying the transparency of the main light effect and the edge light effect.

[0083] S52: Mix the occluded pixel values ​​of each position point, as well as the scanned pixel values ​​and scan transparency of several position points belonging to the scan light, according to the corresponding position points to obtain the rendered pixel values ​​of each position point.

[0084] In one embodiment, for each location point, the scanned pixel value and scan transparency of each scan light at that location point can be sequentially superimposed on the occluded pixel value at that location point to obtain the rendered pixel value of each location point. The superposition order of each scan light is not restricted.

[0085] To facilitate understanding, the following example uses the superposition order of the first sub-scan light, the second sub-scan light, and the second scan light, and the mixing according to the corresponding position points, along with relevant formulas, to illustrate the process of determining the pixel value after rendering at each position point: Color1=mix(color0, light1color, light1Alpha) Color2=mix(color1, light2color, light2Alpha) Color3=mix(color2, timelight1color, timelight1Alpha) Where color0 represents the pixel value after occlusion of the location point, light1color represents the color of the first sub-scan light, and light1Alpha is the mixing weight of color0 and light1color. The larger this weight value, the more the final color is biased towards the color of light1color. . ) represents the linear interpolation blending function, and Color1 represents the blended color of the occluded pixel value and the color of the first sub-scanning light (denoted as the first blended color); where the product of the transparency of the color of the first sub-scanning light and the transparency of the texture of the first sub-scanning light can be used as light1Alpha.

[0086] light2color represents the color of the second sub-scan light, light2Alpha represents the blending weight of color1 and light2color, and Color2 represents the blending color of the first blend color and the color of the second sub-scan light (denoted as the second blend color). The product of the transparency of the second sub-scan light color and the transparency of the texture of the second sub-scan light can be used as light2Alpha.

[0087] timelight1color represents the second scan light color, timelight1Alpha represents the blending weight, and Color3 represents the blending color of the second blending color and the second scan light color (denoted as the third blending color). Among them, the product of the transparency of the second scan light color and the transparency of the second scan light texture can be used as timelight1Alpha.

[0088] After obtaining the third mixed color, its color value is limited to [0,1] to prevent color value overflow, overexposure, and color distortion caused by the superposition of multiple light effects. A valid pixel color is then output, and the final limited color value is the rendered pixel value for the corresponding location. The colors and textures of each scanning light mentioned above are all pre-configured information.

[0089] It should be noted that during the intermediate usage phase (normal vehicle driving phase) before the guide line function is enabled and disabled, only the base pixel value of each location point is used as the rendered pixel value for that location point. Alternatively, the scan pixel value and scan transparency of the second scan light are mixed with the base pixel value of each location point to obtain the pixel value of each location point as the rendered pixel value. Unless otherwise specified, the transparency referred to in this article refers to the mask transparency.

[0090] Among them, the method of rendering guide lines by mixing the rendered pixel values ​​obtained with the second scanning light can be seen to generate guide lines that show the second scanning light flowing periodically on the light carpet corresponding to the guide lines. This flowing second scanning light helps to remind drivers to pay attention to road conditions at all times.

[0091] Furthermore, during the guide line function's on / off phase, each scan light can be mixed with the occluded pixel values ​​as needed to obtain the rendered pixel values ​​for each location. For example, at least one of the first and second scan lights can be mixed with the occluded pixel values, resulting in a first scan light that moves synchronously with the visible area, or a second scan light that flows periodically along the guide line, visible on the final rendered guide line. Alternatively, the first and second scan lights can be mixed with the occluded pixel values ​​so that both are visible on the final rendered guide line. Since the first scan light moves synchronously with the visible area, it allows the user to clearly see the visible progress of the guide line. Please refer to [further details needed]. Figure 4b , Figure 4b The yellow and blue light stripes on the light blanket of the guide line are both light stripes of scanning light.

[0092] It should be noted that the various textures mentioned in this article, as well as their transparency and corresponding color values, can all be pre-configured.

[0093] Please see Figure 6 , Figure 6 This is a schematic flowchart illustrating an embodiment of obtaining the transparency data of the scan light at the current moment, as provided in this application. In this embodiment, obtaining the transparency data of the scan light at the current moment for each scan light includes: S61: For each position point, obtain the sum of the offset of the scanning light at the current time and the texture vertical coordinate of the position point, and use it as the vertical sampling coordinate of the corresponding scanning light; wherein, the offset corresponding to the first scanning light is the first offset, and the offset corresponding to the second scanning light is the second offset.

[0094] In this embodiment, for the first scanning light, its first offset is the product of the scanning progress value at the current moment and a first constant. The first constant is a constant greater than 1, for example, the first constant is set to 4.

[0095] For example, the first offset of the first scanning light at the current moment can be obtained using the following formula: lightPos = SweepLightProgress * b+f Wherein, lightPos represents the first offset at the corresponding moment, and its value changes dynamically with the sweeping progress value to achieve the visual effect of the first scanning light following the sweeping progress value and sliding dynamically. SweepLightProgress represents the sweeping progress value at the corresponding moment, where b is the first constant and f is a preset offset used to adjust the initial reference position of the first scanning light, that is, the position when the first scanning light starts to slide. During the sliding process, the position of the first scanning light is affected by the sweeping progress value.

[0096] The second offset is determined using the current time. For example, the product of the time difference between the current time and the time when the guide line function is turned on and the speed parameter is used as the second offset. The speed parameter is used to adjust the flow speed of the second scanning light.

[0097] In one implementation scenario, the first scan light includes at least one of a first sub-scan light and a second sub-scan light. The first scan light is determined using a first sub-offset, and the second sub-scan light is determined using a second sub-offset. The second sub-offset is less than the first sub-offset, and a fourth difference between the second and first sub-offsets is a second target constant. The first sub-offset at the current moment is the product of the current scan progress value and a third target constant. The second target constant is, for example, 0.4. This method allows the second sub-scan light to move with the first sub-scan light on the final rendered guide line, creating a trailing effect.

[0098] In one embodiment, the first constant and the third target constant are equal. When f is 0, the first offset determined according to the first offset formula is equal to the first sub-offset. When f is the third difference, the first offset determined according to the first offset formula is equal to the second sub-offset.

[0099] In this process, after obtaining the offset of the scanning light corresponding to each position point, the sum of the offset of the scanning light corresponding to the current moment and the texture vertical coordinate of the position point is used as the vertical sampling coordinate of the scanning light corresponding to the position point.

[0100] S62: Calculate the sine function using the longitudinal sampling coordinates of the scanning light to determine the target sine value of the scanning light at the position point.

[0101] In one embodiment, for each position point, the fourth product between the longitudinal sampling coordinates of the scanning light corresponding to that position point and a preset coefficient is first obtained; then, a sine function is calculated on the fourth product to obtain the target sine value of that position point. The preset coefficient is the product of a first target constant and π.

[0102] For example, please refer to the following formula: Scan=sin ((texCoord.y+lightPos) * π * c) c = 1 / b Where Scan represents the target sine value of the location point, texCoord.y represents the texture ordinate of the location point, and the preset coefficient is cπ, where c represents the first target constant, b represents the aforementioned first constant, the first target constant c is the reciprocal of the first constant b, texCoord.y+lightPos represents the longitudinal sampling coordinate of the location point, and Scan represents the target sine value (i.e. the sine value of the fourth product).

[0103] Referring to the formulas involved in steps S61 and S62, the first constant b is used to amplify the phase offset of the scanning light waveform to expand the potential movement distance of the scanning light waveform along the vertical coordinate of the texture. In order to enable users to see the complete animation process of the scanning light moving into, filling, and moving out of the guide line drawing area (i.e., the light carpet window), b can be set to be greater than or equal to 3 to match the movement distance required for the complete animation. In addition, considering that the phase offset amplified by the first constant b will continue to accumulate and increase with the change of the scanning light progress value, which may easily lead to animation abnormalities, a first target constant c is set, and the first target constant is set to be c, which is the reciprocal of the first constant b, to compensate for the length of the phase amplified by the first constant b. After compensation, when the scanning light progress value changes from 0 to 1, the actual effective travel distance of the scanning light is adapted to the vertical length of the guide line drawing area, realizing the complete animation process of the scanning light entering the drawing area, filling the drawing area, and finally sliding out of the drawing area and disappearing. To avoid the phenomenon where the scanning light remains in the drawing area when the scanning progress value reaches 1, an animation margin can be reserved. For example, setting b=4 can add an extra stroke margin corresponding to the length of the drawing area. Therefore, in a specific implementation scenario, b=4 and c=0.25 can be set.

[0104] S63: Obtain the second difference between the target sine value of the location point and the peak filtering threshold, and use the second difference to determine the scanning light transparency of the scanning light corresponding to the location point; the scanning light transparency data includes the scanning light transparency of each location point.

[0105] In one embodiment, the initial transparency of the scan light corresponding to the location point can be obtained first using the second difference of the location point; then, the product of the initial transparency of the location point and the transparency associated with at least one scan light is used as the transparency of the scan light corresponding to that location point. The transparency associated with at least one scan light includes at least one of the following transparency types: texture transparency, color transparency, and feather transparency. The texture transparency, color transparency, and feather transparency of the scan light are preset data, and all are mask transparency.

[0106] In one specific embodiment, the transparency associated with at least one scan light includes: texture transparency, color transparency, and feathering transparency. In this embodiment, the method for determining the scan light transparency corresponding to a location point can refer to the following formula: scanAlpha = lightTex.a * lightColor.a * lightMask * featherMask Here, scanAlpha represents the transparency of the scan light corresponding to the position point, lightTex.a represents the texture transparency, lightColor.a represents the color transparency, featherMask represents the feathering transparency (feathering factor), and lightMask represents the initial transparency of the position point (this transparency is used to determine which position points need to be displayed and which position points need to be occluded).

[0107] In this embodiment, the product of the initial transparency of the location point and the associated transparency of each scan light is used as the transparency of the scan light corresponding to that location point.

[0108] In one embodiment, the initial transparency of the scanning light corresponding to the location point is obtained by using the second difference of the location point, including: obtaining the fifth product of the second difference and the fourth target constant; limiting the fifth product to a preset value range, and using the limited result as the initial transparency of the location point.

[0109] For example, please refer to the following formula: lightMask=clamp ( (scan-d) * e, 0.0, 1.0) e = 1 / (1-d) Where lightMask represents the initial transparency of the location point, scan-d represents the second difference of the location point, d represents the peak filtering threshold, scan represents the target sine value of the location point, e represents the fourth target constant used to amplify the second difference, and clamp ( . ) represents the limiting function, which limits the fifth product (scan-d) * e to a preset value range [0,1].

[0110] The fourth target constant *e* and the peak filtering threshold *d* satisfy the above functional relationship, and the specific value of the peak filtering threshold can be adjusted adaptively. The peak filtering threshold is used to extract the bright region at the top of the sine wave. The difference (1-d) between the sine peak (peak value is 1) and the peak filtering threshold determines the width of the light-transmitting region. The smaller the difference (1-d), the narrower the vertical range where *scan* is greater than *d*, and the shorter the corresponding vertical length of the scan light stripe. Therefore, when a scan light stripe with a shorter vertical length needs to be generated, the third difference between the peak filtering threshold and the peak value of the sine wave can be set to be less than a preset threshold.

[0111] The fourth target constant is essentially an amplification factor used to amplify the second difference scan-d. For positions where the second difference scan-d is greater than 0, the transparency value of that position can be increased by the fourth target constant. After limiting the amplitude, the transparency value is constrained to [0,1]. Through the above transparency value amplification process, the transparency difference between different positions can be increased, thereby compressing the length of the light transmission interval in the scanning direction.

[0112] In one specific embodiment, d=0.95, e=20, and the difference between the sine peak value and the peak filtering threshold is 0.05. The waveform margin exceeding the peak filtering threshold is amplified by 20 times, and the fifth product between the two is limited to determine the initial transparency of the position point as 1. Position points with an initial transparency of 1 can be displayed, while positions with an initial transparency of 0 are obscured.

[0113] It should be noted that the transparency data of the first and second scanning lights are determined in the same way. The difference is that the offsets are determined in different ways. After determining the offset of each scanning light, the corresponding transparency data can be determined using the above method.

[0114] The first sub-scanning light and the second sub-scanning light are determined in the same way as the scanning light mentioned above, except that the offsets corresponding to different scanning lights are different. Since the second sub-offset is smaller than the first sub-offset, and the fourth difference between the second sub-offset and the first sub-offset is the second target constant, the second sub-scanning light can follow the first scanning light to move and form a trailing effect.

[0115] Please see Figure 7 , Figure 7 This is a schematic diagram of a framework of an embodiment of the guide line rendering apparatus provided in this application. In this embodiment, the guide line rendering apparatus 70 includes an acquisition module 71, an occlusion processing module 72, and a rendering module 73. In this embodiment, the acquisition module 71 is used to acquire the drawing area and visible progress value of the guide line at the current moment during the guide line function's on or off phase. The visible progress value represents the visible length ratio of the drawing area, and the visible length ratio is the ratio between the visible length in the drawing area and the total length of the drawing area.

[0116] The occlusion processing module 72 is used to occlude the drawing area along the length direction according to the visible progress value, wherein the remaining visible length of the drawing area after occlusion processing is related to the visible progress value; the rendering module 73 is used to render the occluded drawing area using the basic rendering parameters of the drawing area to obtain the guide line at the current moment, wherein the guide line is used to be displayed on the vehicle, and the visible length corresponding to the guide line rendered at multiple consecutive moments changes monotonically.

[0117] In some embodiments, the guide line rendering apparatus 70 is also used to perform the steps of the guide line rendering method described above.

[0118] Please see Figure 8 , Figure 8 This is a schematic diagram of a framework of an embodiment of the processing apparatus provided in this application. In this embodiment, the processing apparatus 80 includes a memory 81 and a processor 82 coupled to each other. The memory 81 stores program instructions, and the processor 82 is used to execute the program instructions stored in the memory 81 to implement the steps of any of the above-described method implementations.

[0119] In one embodiment, the processing device 80 may be a computer device, including but not limited to microcomputers, servers, laptops, tablets, mobile phones, etc., which are not limited here.

[0120] When the processing device 80 is a computer device, the processor 82 of the processing device 80 can also be called a CPU (Central Processing Unit). Alternatively, the processor 82 can be an integrated circuit chip with signal processing capabilities. The processor 82 can also be a general-purpose processor, a digital signal processor (DSP), an application-specific integrated circuit (ASIC), a field-programmable gate array (FPGA), or other programmable logic devices, discrete gate or transistor logic devices, or discrete hardware components. A general-purpose processor can be a microprocessor or any conventional processor. Furthermore, the processor 82 can be implemented using integrated circuit chips.

[0121] In one embodiment, the processing device 80 may also be a processing chip, which may include, but is not limited to, embedded processing chips, dedicated computing chips, and other chips with program parsing, instruction execution, and data processing capabilities.

[0122] When the processing device 80 is a processing chip, the processor 82 may be a control circuit or logic operation circuit integrated inside the processing chip, and the memory 81 may be a storage unit built into the processing chip.

[0123] Please see Figure 9 , Figure 9 This is a schematic diagram of the framework of the computer-readable storage medium provided in this application. The computer-readable storage medium 90 of this application embodiment stores program instructions 91, which, when executed, implement the methods provided in any embodiment or any non-conflicting combination of the above-described methods. The program instructions 91 can form a program file and be stored in the computer-readable storage medium 90 in the form of a software product, so that a computer device (which may be a personal computer, server, or network device, etc.) can execute all or part of the steps of the methods of various embodiments of this application. The aforementioned computer-readable storage medium 90 includes various media capable of storing program code, such as a USB flash drive, portable hard drive, read-only memory (ROM), random access memory (RAM), magnetic disk, or optical disk, or terminal devices such as computers, servers, mobile phones, and tablets.

[0124] In some embodiments, the functions or modules of the apparatus provided in this disclosure can be used to perform the methods described in the above method embodiments. The specific implementation can be referred to the description of the above method embodiments, and for the sake of brevity, it will not be repeated here.

[0125] The description of the various embodiments above tends to emphasize the differences between the various embodiments. The similarities or similarities between them can be referred to, and for the sake of brevity, they will not be repeated here.

[0126] The units described as separate components may or may not be physically separate. The components shown as units may or may not be physical units; that is, they may be located in one place or distributed across multiple network units. Some or all of the units can be selected to achieve the purpose of this embodiment, depending on actual needs.

[0127] Furthermore, the functional units in the various embodiments of this application can be integrated into one processing unit, or each unit can exist physically separately, or two or more units can be integrated into one unit. The integrated unit can be implemented in hardware or as a software functional unit. If the integrated unit is implemented as a software functional unit and sold or used as an independent product, it can be stored in a computer-readable storage medium.

[0128] The above description is merely an embodiment of this application and does not limit the patent scope of this application. Any equivalent structural or procedural transformations made using the content of this application's specification and drawings, or direct or indirect applications in other related technical fields, are similarly included within the patent protection scope of this application.

Claims

1. A method for rendering guide lines, characterized in that, The method includes: During the phase of enabling or disabling the guide line function, the drawing area and visible progress value of the guide line at the current moment are obtained. The visible progress value represents the visible length ratio of the drawing area, and the visible length ratio is the ratio between the visible length in the drawing area and the total length of the drawing area. According to the visible progress value, the drawing area is masked along the length direction, wherein the remaining visible length of the drawing area after masking is related to the visible progress value; Using the basic rendering parameters of the drawing area, the occluded drawing area is rendered to obtain the guide line at the current moment. The guide line is used to display on the vehicle, and the visible length of the guide line obtained from multiple consecutive moments changes monotonically.

2. The method according to claim 1, characterized in that, The basic rendering parameters of the drawing area include the basic pixel values ​​of each point in the drawing area; The step of masking the drawing area along its length according to the visible progress value includes: Using the visible progress value, the target visible boundary of the drawing area in the length direction is determined, wherein the target visible boundary is used to divide the drawing area into visible sub-regions and occluded sub-regions; Using the positional relationship between each position point in the drawing area and the visible boundary of the target, a first occlusion weight is generated for each position point in the drawing area; wherein, the first occlusion weight indicates whether the position point is occluded, and the first occlusion weight corresponding to the position point located in the occlusion sub-region indicates that the position point is occluded. The step of rendering the occluded drawing area using the basic rendering parameters of the drawing area to obtain the guide line at the current moment includes: The rendered pixel value of each location point is determined by using the base pixel value of each location point and the occlusion weight corresponding to each location point; the occlusion weight corresponding to each location point is either the first occlusion weight or the second occlusion weight, and the second occlusion weight is generated based on the first occlusion weight.

3. The method according to claim 2, characterized in that, The basic rendering parameters also include basic transparency parameters, and the step of generating the second occlusion weight of the position point includes: The first occlusion weight of the location point is combined with the basic transparency parameter of the location point to form the second occlusion weight of the location point. The basic transparency parameter includes at least one of the following: feather transparency and texture transparency. The texture transparency includes at least one of the main texture map transparency and the edge texture map transparency.

4. The method according to claim 3, characterized in that, The first occlusion weight of each location point is within a preset transparency range. The basic transparency parameters include feather transparency and texture transparency. The texture transparency includes the main texture map transparency and the edge texture map transparency. The process of fusing the first occlusion weight of the location point with the basic transparency parameter of the location point to form the second occlusion weight of the location point includes: Obtain the first product between the main texture map transparency and the fill intensity of the location point. Sum the first product with the edge texture map transparency of the location point as the total texture transparency of the location point. Multiply the total texture transparency of the location point, the feather transparency, and the first occlusion weight as the second occlusion weight of the location point.

5. The method according to claim 2, characterized in that, The drawing area has a start end and an end end along its length, respectively; determining the target visible boundary of the drawing area along its length using the visible progress value includes: Obtain the second product between the length of the drawing area and the visible length percentage represented by the visible progress value. Take the location point in the drawing area whose distance from the starting end is the distance of the second product as the target visible boundary. The sub-region between the starting end and the target visible boundary is the visible sub-region, and the sub-region between the target visible boundary and the ending end is the occlusion sub-region.

6. The method according to claim 2, characterized in that, The step of generating a first occlusion weight corresponding to each position point in the drawing area by utilizing the positional relationship between each position point in the drawing area and the visible boundary of the target includes: For each of the aforementioned locations, obtain the first difference between the texture ordinate of the location and the texture ordinate of the visible boundary of the target; The first difference or third product corresponding to each of the aforementioned locations is limited to a preset transparency range to obtain a first occlusion weight corresponding to each of the aforementioned locations. The third product is the product between the first difference corresponding to the location and a preset magnification coefficient. The first occlusion weight corresponding to the location located within the occlusion sub-region is one of the boundary values ​​of the preset transparency range, and the boundary value represents complete transparency.

7. The method according to claim 2, characterized in that, The steps for obtaining the basic pixel values ​​of each of the aforementioned locations include: Obtain the gradient position parameters, starting guide color, and ending guide color of the drawing area. The gradient position parameters are parameters used to control the position of the gradient range of the guide line color. For each of the aforementioned location points, the gradient weight of the location point is determined using the texture ordinate and the gradient position parameter. The base pixel value of the position point is determined by interpolating the starting point guide color and the ending point guide color using the gradient weight.

8. The method according to claim 7, characterized in that, The step of determining the gradient weight of the location point using the texture ordinate and the gradient position parameters includes: The sum of the texture ordinate of the location point and the gradient position parameter is limited to a preset value range and used as the gradient weight of the location point.

9. The method according to claim 2, characterized in that, Before determining the rendered pixel value of each location point using the base pixel value of each location point and the occlusion weight corresponding to each location point, the method further includes: The pixel data and corresponding transparency data of at least one scan light at the current moment are obtained, wherein the scan light at the current moment is located in the visible sub-region of the drawing area at the current moment, the pixel data of each scan light includes the scan pixel values ​​of several position points belonging to the scan light in the drawing area, and the transparency data of each scan light includes the scan transparency corresponding to the several position points. The step of determining the rendered pixel value of each location point using the base pixel value of each location point and the occlusion weight corresponding to each location point includes: The base pixel values ​​of each location point are adjusted using the occlusion weights corresponding to each location point to obtain the occluded pixel values ​​of each location point. The masked pixel values ​​of each location point, the scanned pixel values ​​and scan transparency of several locations belonging to the scanned light are mixed according to the corresponding location points to obtain the rendered pixel values ​​of each location point.

10. The method according to claim 9, characterized in that, The at least one scanning beam includes at least one of a first scanning beam and a second scanning beam; The first scanning light is determined using the first offset at the current moment, wherein the first offset is determined using the scanning progress value at the current moment, and the first offset is different at different moments. The movement of the first scanning light at multiple consecutive moments is synchronized with the movement of the visible sub-region in the drawing area. The second scanning light is determined using the second offset at the current time; the second offset is determined using the current time, and the second scanning light can move periodically as time changes.

11. The method according to claim 10, characterized in that, For each scanning beam, obtain the transparency data of the scanning beam at the current moment, including: For each of the aforementioned positions, the sum of the offset of the scanning light at the current time and the texture ordinate of the position is obtained and used as the longitudinal sampling coordinate of the corresponding scanning light; wherein, the offset corresponding to the first scanning light is the first offset, and the offset corresponding to the second scanning light is the second offset; The target sine value of the scanning light at the specified position point is determined by calculating a sine function using the longitudinal sampling coordinates of the scanning light. Obtain a second difference between the target sine value and the peak filtering threshold of the location point, and use the second difference of the location point to determine the scanning light transparency of the scanning light corresponding to the location point; the scanning light transparency data includes the scanning light transparency of each location point.

12. The method according to claim 11, characterized in that, The third difference between the peak filtering threshold and the peak value of the sine value is less than the preset threshold; And / or, the step of using the longitudinal sampling coordinates of the scanning light to perform a sine function calculation to determine the target sine value of the scanning light at the position point includes: Obtain the fourth product between the longitudinal sampling coordinates and the preset coefficients; the preset coefficients are the product of the first target constant and π. The fourth product is used to calculate the sine function to obtain the target sine value of the position point; And / or, determining the scanning light transparency of the scanning light corresponding to the location point using the second difference of the location point includes: The initial transparency of the scanning light corresponding to the location point is obtained by using the second difference of the location point; The product of the initial transparency and the transparency associated with at least one scan light is used as the scan light transparency of the scan light corresponding to the position point; The transparency associated with at least one scan light includes at least one of the following: texture transparency, color transparency, and feathering transparency.

13. The method according to claim 12, characterized in that, The first scanning light includes at least one of a first sub-scanning light and a second sub-scanning light. The first scanning light is determined using a first sub-offset, and the second sub-scanning light is determined using a second sub-offset. The second sub-offset is less than the first sub-offset, and a fourth difference between the second sub-offset and the first sub-offset is a second target constant. The first sub-offset at the current moment is the product of the scanning progress value at the current moment and a third target constant. And / or, obtaining the initial transparency of the scanning light corresponding to the location point using the second difference of the location point includes: Obtain the fifth product of the second difference and the fourth target constant, wherein the fourth target constant is used to amplify the second difference; The fifth product is limited to a preset numerical range, and the result after limiting is used as the initial transparency of the position point.

14. A guide line rendering device, characterized in that, The device includes: The acquisition module is used to acquire the drawing area and visible progress value of the guide line at the current time during the stage of the guide line function being turned on or off. The visible progress value represents the visible length ratio of the drawing area, and the visible length ratio is the ratio between the visible length in the drawing area and the total length of the drawing area. The occlusion processing module is used to perform occlusion processing on the drawing area along the length direction according to the visible progress value, wherein the remaining visible length of the drawing area after occlusion processing is related to the visible progress value; The rendering module is used to render the occluded drawing area using the basic rendering parameters of the drawing area to obtain the guide line at the current moment. The guide line is used to be displayed on the vehicle, and the visible length of the guide line rendered at multiple consecutive moments changes monotonically.

15. A processing apparatus, characterized in that, Including interconnected memory and processor, The memory stores program instructions; The processor is used to execute program instructions stored in the memory to implement the method according to any one of claims 1-13.

16. A computer-readable storage medium, characterized in that, The computer-readable storage medium stores program instructions that can be executed by a processor to implement the method of any one of claims 1-13.