Navigation light band blurring method, navigation light band blurring device and electronic equipment

By using Gaussian function for weight mapping, the problem of mutation of fuzzy effect caused by smooth gradient function is solved, and the smooth change of fuzzy effect and the good fusion of light band background is achieved, which improves the visual display effect.

CN120163728APending Publication Date: 2025-06-17BEIJING JINGWEI HIRAIN TECH CO INC
View PDF 0 Cites 0 Cited by

Patent Information

Application Number
CN202510234883.0
Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Filing Date
2025-02-28
Publication Date
2025-06-17

AI Technical Summary

Technical Problem

The gradient change rate of the smooth gradient function approaches the step function when the fuzzy distance is reduced, resulting in a mutation of the fuzzy effect and cannot blend well with the background color of the light band.

Method used

The weight mapping operation is used for Gaussian function, and the normal distribution characteristics of the Gaussian function are used to gradually change the fuzzy effect, reduce the probability of mutation, and adjust the weight outside the spot area during weight mapping to avoid the blur range affecting the light band background.

Benefits of technology

The smooth changes in the blur effect are achieved, visual mutations are reduced, the fusion effect of the light band background color and the blur effect are improved, and the visual display effect is improved.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN120163728A_ABST
    Figure CN120163728A_ABST
Patent Text Reader

Abstract

The invention provides a navigation light band blurring method and device and electronic equipment, and relates to the field of navigation light band processing. In the invention, during the fuzzy processing, the Gaussian function is utilized to carry out the weight mapping operation, the Gaussian function distribution presents a normal distribution effect, and compared with a smooth gradient function, the change trend is gentle, so that when the weight mapping operation is carried out, the area closer to the light spot position has greater influence on the light spot blurring; the influence of the area far away from the light spot position on light spot blurring is small, so that the blurring effect is gradually changed, the mutation probability is reduced, and good fusion with the light band background color can be visually achieved. In addition, during weight mapping, the weights of other areas except the light spot area are decreased, and the situation that the light band background is affected by the fuzzy range is avoided. In addition, interval consistency can be kept on the gradient change rate during weight mapping, and the visual display effect is improved.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present invention relates to the field of navigation light band processing, and more specifically, to a navigation light band blurring method, device, and electronic device. Background Art

[0002] AR-HUD is an automotive intelligent cockpit system that applies augmented reality (AR) technology to a head-up display (HUD). It can integrate vehicle information, use the front windshield as a projection medium to reflect images, combine real-time road conditions, and fuse navigation and ADAS (Advanced Driving Assistance System) information with the road ahead. It displays content such as steering indicators, obstacle warnings, lane departures, forward vehicle warnings, and blind spot monitoring, creating a virtual-real fusion effect.

[0003] In the field of automotive electronics AR-HUD, a ground-hugging navigation light band, as a visual three-dimensional model, can significantly enhance the interaction effect between the HUD and the driver and improve the driver's experience.

[0004] When implementing the ground-hugging navigation light band, a smoothing gradient function in a GLSL (OpenGL Shading Language) script in OpenGL (Open Graphics Library) can be used to increase the blurring effect of the navigation light band spot. However, it is found in actual use that the gradient change rate of the smoothing gradient function gradually approaches a step function as the blurring distance decreases, resulting in a sudden change in the blurring effect and poor visual fusion with the background color of the light band. Summary of the Invention

[0005] In view of this, the present invention provides a navigation light band blurring method, device, and electronic device to solve the problem that the gradient change rate of the smoothing gradient function gradually approaches a step function as the blurring distance decreases, resulting in a sudden change in the blurring effect and poor visual fusion with the background color of the light band.

[0006] To solve the above technical problems, the present invention adopts the following technical solutions:

[0007] A navigation light band blurring method, comprising:

[0008] Determining the position of the light spot in the next calculation cycle based on the vehicle speed information in the current calculation cycle;

[0009] Calculating the distance between the texture coordinates to be blurred and the position of the light spot for the texture coordinates to be blurred;

[0010] Using the distance, perform a Gaussian function weight mapping operation on the initial filled pixels corresponding to the texture coordinates to be blurred, to obtain the blurred pixels corresponding to the texture coordinates to be blurred;

[0011] Perform a linear blending difference calculation operation on the initial filled pixels and the blurred pixels corresponding to the texture coordinates to be blurred, to obtain the image texture corresponding to the navigation light strip;

[0012] Perform a rendering operation on the image texture.

[0013] Optionally, based on the vehicle speed information of the current calculation cycle, determine the spot position of the next calculation cycle, including:

[0014] Based on the vehicle speed information of the current calculation cycle, calculate the initial spot position of the next calculation cycle;

[0015] Perform a normalization operation on the initial spot position, to obtain the spot position of the next calculation cycle.

[0016] Optionally, for the texture coordinates to be blurred, calculate the distance between the texture coordinates to be blurred and the spot position, including:

[0017] Obtain the texture coordinates to be blurred;

[0018] Calculate the ratio of the texture coordinates to be blurred to the preset resolution, to obtain the target texture coordinates;

[0019] Calculate the distance between the target texture coordinates and the spot position.

[0020] Optionally, using the distance, perform a Gaussian function weight mapping operation on the initial filled pixels corresponding to the texture coordinates to be blurred, to obtain the blurred pixels corresponding to the texture coordinates to be blurred, including:

[0021] Perform a scaling and offset operation on the distance, to obtain Gaussian coordinates;

[0022] Obtain the Gaussian blur mean, the Gaussian blur standard deviation, and the initial filled pixels corresponding to the texture coordinates to be blurred;

[0023] Based on the Gaussian coordinates, the Gaussian blur mean, and the Gaussian blur standard deviation, perform a Gaussian function weight mapping operation on the initial filled pixels corresponding to the texture coordinates to be blurred, to obtain the blurred pixels corresponding to the texture coordinates to be blurred.

[0024] Optionally, obtain the initial filled pixels corresponding to the texture coordinates to be blurred, including:

[0025] Obtain the initial texture;

[0026] Initialize and fill the initial texture using the image texture pixel values and transparency information to obtain an intermediate texture;

[0027] Extract the initial filled pixels corresponding to the texture coordinates to be blurred from the intermediate texture.

[0028] Optionally, perform a linear blending difference calculation operation on the initial filled pixels and the blurred pixels corresponding to the texture coordinates to be blurred to obtain the image texture corresponding to the navigation light band, including:

[0029] Process the vehicle speed information of the next calculation cycle using a smoothing gradient function to obtain the spot influence weight value;

[0030] Calculate the difference between a preset value and the spot influence weight value;

[0031] Calculate the first product of the difference and the initial filled pixels, and calculate the second product of the spot influence weight value and the blurred pixels;

[0032] Take the sum of the first product and the second product as the pixel value of the texture coordinates to be blurred in the image texture to obtain the image texture.

[0033] Optionally, perform a rendering operation on the image texture, including:

[0034] Call a shader program to combine the image texture with the navigation mesh material to display the combined texture result.

[0035] A navigation light band blurring device, including:

[0036] A spot position determination module, configured to determine the spot position of the next calculation cycle based on the vehicle speed information of the current calculation cycle;

[0037] A distance calculation module, configured to calculate the distance between the texture coordinates to be blurred and the spot position for the texture coordinates to be blurred;

[0038] A mapping module, configured to perform a Gaussian function weight mapping operation on the initial filled pixels corresponding to the texture coordinates to be blurred using the distance to obtain the blurred pixels corresponding to the texture coordinates to be blurred;

[0039] A difference calculation module, configured to perform a linear blending difference calculation operation on the initial filled pixels and the blurred pixels corresponding to the texture coordinates to be blurred to obtain the image texture corresponding to the navigation light band;

[0040] A rendering module, configured to perform a rendering operation on the image texture.

[0041] Optionally, the spot position determination module is specifically configured to:

[0042] Based on the vehicle speed information of the current calculation cycle, calculate the initial spot position of the next calculation cycle, and perform a normalization operation on the initial spot position to obtain the spot position of the next calculation cycle.

[0043] An electronic device includes: a memory and a processor;

[0044] Wherein, the memory is used for storing programs;

[0045] The processor calls the program and is used to execute the above-mentioned navigation light band blurring method.

[0046] Compared with the prior art, the present invention has the following beneficial effects:

[0047] The present invention provides a navigation light band blurring method, device and electronic device. In the present invention, when performing blurring processing, a Gaussian function is used for weight mapping operation. The Gaussian function distribution presents a normal distribution effect. Compared with the smooth gradient function, the change trend is gentle. When performing the weight mapping operation, the area closer to the spot position has a greater impact on the spot blurring, and the area farther from the spot position has a smaller impact on the spot blurring, so that the blurring effect changes gradually, reducing the mutation probability, and visually can be better integrated with the background color of the light band. In addition, when the present invention performs weight mapping, the weights of other areas outside the spot area become smaller, avoiding the blurring range from affecting the light band background. In addition, when the present invention performs weight mapping, it can maintain interval consistency in the gradient change rate, improving the visual display effect. Description of the Drawings

[0048] In order to more clearly illustrate the technical solutions in the embodiments of the present invention or the prior art, the following will briefly introduce the drawings required for use in the description of the embodiments or the prior art. Obviously, the drawings in the following description are only the embodiments of the present invention. For those of ordinary skill in the art, other drawings can be obtained according to the provided drawings without creative efforts.

[0049] Figure 1 It is a flowchart of a navigation light band blurring method provided by an embodiment of the present invention;

[0050] Figure 2 It is a display schematic diagram of a ground-attached navigation light band provided by an embodiment of the present invention;

[0051] Figure 3 It is a flowchart of a distance calculation method provided by an embodiment of the present invention;

[0052] Figure 4 It is a flowchart of a method for determining blurred pixels provided by an embodiment of the present invention;

[0053] Figure 5 Schematic diagram of a scenario of a navigation light strip blurring method provided by an embodiment of the present invention;

[0054] Figure 6 Flowchart of a method for determining image texture provided by an embodiment of the present invention;

[0055] Figure 7 Flowchart of a light strip filtering and blurring processing method provided by an embodiment of the present invention;

[0056] Figure 8 Flowchart of another navigation light strip blurring method provided by an embodiment of the present invention;

[0057] Figure 9 Schematic diagram of a scenario of a navigation light strip blurring method provided by an embodiment of the present invention;

[0058] Figure 10 Structural diagram of a device for a navigation light strip blurring method provided by an embodiment of the present invention. Detailed implementation manners

[0059] Next, the technical solutions in the embodiments of the present invention will be clearly and completely described in conjunction with the accompanying drawings in the embodiments of the present invention. Obviously, the described embodiments are only a part of the embodiments of the present invention, rather than all the embodiments. Based on the embodiments of the present invention, all other embodiments obtained by those of ordinary skill in the art without creative efforts shall fall within the protection scope of the present invention.

[0060] AR-HUD is an automotive intelligent cockpit system that applies augmented reality (AR) technology to a head-up display (HUD). It can integrate vehicle information, use the front windshield as a projection medium to reflect and form an image, combine real-time road condition information, fuse navigation and ADAS (Advanced Driving Assistance System) information with the road ahead, and display content such as steering indications, obstacle warnings, lane departures, forward vehicle warnings, and blind spot monitoring, creating a virtual-real fusion effect.

[0061] In the field of automotive electronics AR-HUD, the smoothness and fineness of the rendering model directly affect the AR interaction effect and thus the HUD usage experience. During rendering, the ground-hugging navigation light strip, as a visual three-dimensional model, can significantly enhance the interaction effect between the HUD and the driver and improve the driver's usage experience.

[0062] When the ground-hugging navigation light strip is specifically implemented, the smooth gradient function in the GLSL (OpenGL Shading Language) script in OpenGL (Open Graphics Library, open source graphics library) can be used to increase the blur effect of the light spot of the navigation light strip. However, in actual use, it is found that the gradient change rate of the smooth gradient function gradually approaches the step function as the blur distance decreases, resulting in a sudden change in the blur effect and making it impossible to achieve a good visual fusion with the background color of the light strip.

[0063] Specifically, when the longitudinal length of the light spot is b - a and it is blurred in the interval [a, b], first normalize the interval [a, b] and binarize the values outside the interval. At this time, the values inside the interval change linearly, and the change formula is:

[0064]

[0065] Next, substitute the linear function into the function:

[0066] F(x) = 3x 2 -2x 3

[0067] The obtained smooth gradient function is:

[0068] F(f(x)) = 3f(x) 2 -2f(x) 3

[0069] The smooth gradient function maps the values in the [a, b] interval to a non-linear interval, thereby obtaining a relatively smooth blur function. Next, determine the blur target and the blur interval in the GLSL script to produce a relatively smooth blur effect.

[0070] Among them, x is the specific texture coordinate. It can be seen from this formula that when x b outside the interval, at this time f(x) is 0 or 1, and when a ≤ x ≤ b, the value of f(x) is If the value of b - a is small, the smaller the width of the light spot, at this time the absolute value of the slope is larger, making f(x) approach the step function, the worse the blur effect, the clearer the edge, and the sudden change in the blur effect occurs, making it impossible to achieve a good visual fusion with the background color of the light strip, resulting in a layering effect between the navigation light strip and the light spot effect.

[0071] In order to solve this problem, the inventors found that when the Gaussian function performs a weight mapping operation, the Gaussian function distribution presents a normal distribution effect, and the changing trend is gentler than the smooth gradient function. Therefore, when performing blur processing, the Gaussian function can be used to perform a weight mapping operation, so that the area closer to the light spot position has a greater impact on the blur of the light spot, and the area farther away from the light spot position has a smaller impact on the blur of the light spot, so that the blur effect changes gradually, reduces the probability of mutation, and can be better integrated with the background color of the light band visually.

[0072] In addition, when the weights are mapped, the weights of other areas outside the spot area are reduced to avoid the blurred range affecting the light band background. In addition, when the weights are mapped, the gradient change rate can maintain interval consistency to improve the visual display effect.

[0073] Based on the above content, an embodiment of the present invention provides a navigation light band blurring method, which mainly focuses on the vehicle speed and uses a light spot to display on the light band. Figure 1 , the navigation light band blurring method may include:

[0074] S11. Determine the light spot position of the next calculation cycle based on the vehicle speed information of the current calculation cycle.

[0075] In practical applications, refer to Figure 2 , Figure 2 This is a schematic diagram of the display of the ground navigation light strip. A light spot is displayed on the light strip. In actual applications, the light strip and the light spot have different colors. The position of the light spot changes in different calculation cycles, such as changing from position 1 to position 2, and then to position 3. Positions 1, 2, and 3 may be adjacent or not adjacent. After the light spot position gradually moves to the bottom of the light strip, it returns to the top of the light strip and moves again. The speed of the light spot position change in different calculation cycles is related to the vehicle speed. The faster the vehicle speed, the faster the light spot moves.

[0076] In practical applications, the light spot position of the next calculation cycle can be predicted based on the vehicle speed of the current cycle, so that the light spot can be displayed at the corresponding light spot position when the next calculation cycle arrives. The calculation cycle can be configured according to actual conditions.

[0077] Specifically, step S11 may include:

[0078] 1) Based on the vehicle speed information of the current calculation cycle, calculate the initial spot position of the next calculation cycle.

[0079] In this embodiment, the vehicle speed is mapped to a position to obtain the light spot position. The calculation formula for the initial light spot position of the next calculation cycle can be as follows:

[0080] speed [i+1]= speed [i] + vehicle speed ·μ

[0081] where i is the current cycle, i + 1 is the next calculation cycle, vehicle speed is the vehicle speed in the current calculation cycle, speed [i] is the position of the light spot before normalization in the previous calculation cycle, speed [i+1] is the position of the light spot before normalization in this calculation cycle, i.e., the initial light spot position, speed [i] has an interval of [0, π / 2], vehicle speed has an interval of [0, MaxSpeed], where MaxSpeed is obtained from the vehicle body data, unit m / s, and μ is the interval mapping constant.

[0082] Collect the vehicle speed in the current calculation cycle through the sensor, and the above speed [i] , and substituting into the formula can calculate speed [i+1] .

[0083] 2) Perform a normalization operation on the initial light spot position to obtain the light spot position in the next calculation cycle.

[0084] In this embodiment, performing a normalization operation on the initial light spot position through trigonometric functions is to standardize the initial light spot position to the corresponding position on the texture and smoothly transition to [1, 0]. Specifically, the normalization formula is:

[0085] cache [i+1] = cos[speed [i+1]

[0086] where cache [i+1] is the light spot position in the next calculation cycle, i.e., the normalized light spot position.

[0087] S12. For the texture coordinates to be blurred, calculate the distance between the texture coordinates to be blurred and the light spot position.

[0088] In this embodiment, Figure 2 each coordinate in the light band in

[0089] is called the texture coordinate to be blurred. In practical applications, the blurring effect will be determined based on the distance between this coordinate and the light spot position. Therefore, it is necessary to calculate the distance between the texture coordinate to be blurred and the light spot position. Figure 3 Referring to

[0090] S21. Obtain the texture coordinates to be blurred.

[0091] ​Specifically, the to-be-blurred texture coordinate fragCoord represents each coordinate of the texture in the GLSL script.

[0092] S22. Calculate the ratio of the to-be-blurred texture coordinate to the preset resolution to obtain the target texture coordinate.

[0093] In this embodiment, the preset resolution is denoted by iResolution_y, specifically the dynamic resolution in the Y direction. It is mapped in the texture interval in the Y direction to achieve texture normalization, so that the texture interval is consistent with the spot interval. When performing the mapping, calculate fragCoord / iResolution_y to obtain the target texture coordinate uv, that is:

[0094] uv = fragCoord / iResolution_y

[0095] S23. Calculate the distance between the target texture coordinate and the position of the light spot.

[0096] In practical applications, the distance between the target texture coordinate and the position of the light spot is denoted by β. Assume that uv_y is any coordinate in the Y direction of the texture, then β is the value of uv_y at the cache [i+1] position minus the cache [i+1] value. When the target texture coordinate is above or below the cache [i+1] position, β can be calculated separately. The specific calculation formula is:

[0097] β Top = uv_top - cache [i+1]

[0098] β bottom = uv_bottom - cache [i+1]

[0099] Among them, uv_top is the vertical pixel position of a point above the cache [i+1] , that is, the target texture coordinate, and the interval is [0, cache [i+1] . β Top is the β value when the target texture coordinate is above the cache [i+1] position, and the value range of β Top corresponding to cache [i+1] is [-1, 0]. uv_bottom is the vertical pixel position of a point below the cache [i+1] , that is, the target texture coordinate, and the interval is [cache [i+1] , 1]. β bottom is the β value when the target texture coordinate is below the cache [i+1] position, corresponding to the cache[i+1] The value range of [] is [1, 0]. At this time, the value range transition interval is [0 - cache [i+1] , 1 - cache [i+1] . When cache [i+1] = 0.1, the value range transition interval is [-0.1, 0.9]. The value range transition interval is shown in Table 1, which is the maximum and minimum interval for Gaussian weight calculation.

[0100] Table 1

[0101] <![CDATA[β Top > 1.0 0.9 0.8 0.7 0.6 0.5 0.4 0.3 0.2 0.1 0.0 <![CDATA[cache [i+1] > 0.0 0.1 0.2 0.3 0.4 0.5 0.6 0.7 0.8 0.9 1.0 <![CDATA[β bottom > -0.0 -0.1 -0.2 -0.3 -0.4 -0.5 -0.6 -0.7 -0.8 -0.9 -1.0

[0102] S13. Using the distance, perform a Gaussian function weight mapping operation on the initial filled pixels corresponding to the to - be - blurred texture coordinates to obtain the blurred pixels corresponding to the to - be - blurred texture coordinates.

[0103] Specifically, after obtaining the distance, β can be used to determine the blurred pixel value of each target texture coordinate. According to different values of β, the blurred degrees of different target texture coordinates are different. The blurred degree at the distance cache [i+1] position is smaller, and the blurred degree at the distance cache [i+1] position is larger, achieving a progressive blurred effect and avoiding sudden changes.

[0104] Refer to Figure 4 , the specific implementation of step S13 is as follows:

[0105] S31. Perform a scaling and offset operation on the distance to obtain Gaussian coordinates.

[0106] In this embodiment, before determining the blurring, β is first used to scale and offset the distance, converting β to the Gaussian coordinate system. According to the position of β, the influence weight of blurring is determined. The farther the β position is, the lower the influence weight, and the closer it is to the background color.

[0107] In practical applications, the formula used for the scaling and offset operation on the distance is:

[0108]

[0109] where Gauss [i+1] is the Gaussian coordinate corresponding to the target texture coordinate. When the target texture coordinate is above the cache [i+1] position, the value of Gauss [i+1] is δ + β Top / 2δ. When the target texture coordinate is below the cache [i+1] position, the value of Gauss [i+1] is δ + β bottom / 2δ, at this time, the Gaussian mean value has an offset of -δ and becomes 0. According to the range transition interval limit, 0-cache [i+1] is the minimum effective range of the Gaussian function, 1-cache [i+1] is the maximum effective range of the Gaussian function.

[0110] δ is 1 / 2 of the longitudinal length of the light spot. The actual value of δ is related to the application scenario and is used to determine the light spot size and the degree of blurring. In the present invention, the value is 0.04. In cache [i+1] the light spot blurring interval at the position is [cache [i+1] -2δ, cache [i+1] +2δ], at this time, the interval of β is [-2δ, +2δ]. In the interval [-2δ, +2δ], the Gauss [i+1] value is normalized. Since δ is less than 1, in the β Top interval [0, cache [i+1] -2δ] and the β bottom interval [cache [i+1] +2δ, 1], the Gauss [i+1] value is increased, so that the distance between the corresponding β point and the origin in the Gaussian coordinate system increases. In the Gaussian distribution, the farther the distance from the mean point (here it is the origin 0), the smaller the probability and the smaller the influence degree. Therefore, the influence degree of the corresponding β point here is reduced, and the degree of fusion with the background color is improved.

[0111] In this embodiment, the interval of β is fixed as [-2δ, +2δ]. Compared with the prior art solution where the interval is [-δ, +δ], the interval size is expanded. When implementing the blurring effect through the Gaussian function weight mapping, the light spot brightness in the interval [-δ, +δ] is relatively high. In [-2δ, +2δ], except for the interval [-δ, +δ], the brightness value gradually decreases and gradually fades to the light band background color, and the blurring effect is better.

[0112] S32. Obtain the Gaussian blur mean value, the Gaussian blur standard deviation, and the initial filled pixel corresponding to the texture coordinate to be blurred.

[0113] In practical applications, in order to achieve the blurring effect, the Gaussian blur mean value μ and the Gaussian blur standard deviation σ need to be used in the Gaussian function. The Gaussian blur mean value μ and the Gaussian blur standard deviation σ need to be initialized. The Gaussian blur mean value μ is initialized to 0, and when initializing the standard deviation σ, it is required that the final color calculated by mixing the background pixel value and the Gaussian peak pixel value is equal to the 8-bit RGB color maximum value 255.

[0114] In practical applications, the initialization operations of the Gaussian blur mean μ and the Gaussian blur standard deviation σ can be pre-implemented. In this embodiment, the initialized Gaussian blur mean and the Gaussian blur standard deviation are directly obtained.

[0115] In addition, in order to achieve the light band effect, it is necessary to perform a filling operation on the initialized background empty texture I to obtain the initial filled pixels corresponding to the texture coordinates to be blurred.

[0116] Specifically, the process of obtaining the initial filled pixels corresponding to the texture coordinates to be blurred may include:

[0117] 1) Obtain the initial texture.

[0118] In practical applications, the initial texture is the above-mentioned background empty texture I.

[0119] 2) Use the image texture pixel values and transparency information to perform an initialization filling operation on the initial texture to obtain an intermediate texture.

[0120] After obtaining the background empty texture I, referring to Figure 5 , normalize the image texture in the Y direction to the interval [0, 1] Figure 5 ([0, 1] uses the upper right figure identifier in Figure 5 , the interval of β uses the lower right figure identifier in Figure 5 , Gauss [i+1] uses Figure 5 the lower left figure identifier in Figure 5 the upper left figure identifier in

[0121] 3) Extract the initial filled pixels corresponding to the texture coordinates to be blurred from the intermediate texture.

[0122] After the filling is completed, an intermediate texture is obtained. For each coordinate in the intermediate texture, that is, the texture coordinates to be blurred, the corresponding initial filled pixels can be obtained.

[0123] S33. Based on the Gaussian coordinates, the Gaussian blur mean, and the Gaussian blur standard deviation, perform a Gaussian function weight mapping operation on the initial filled pixels corresponding to the texture coordinates to be blurred to obtain the blurred pixels corresponding to the texture coordinates to be blurred.

[0124] In practical applications, after determining the above Gaussian coordinates, the Gaussian blur mean, the Gaussian blur standard deviation, and the initial filled pixels corresponding to the texture coordinates to be blurred, the initial filled pixels corresponding to the texture coordinates to be blurred can be subjected to weight mapping. When performing weight mapping, the Gaussian function is used. In this embodiment, the Gaussian function is used to replace the above f(x) function. The Gaussian function has a normal distribution and a gentle change trend, and does not exhibit the change effect of a step function. Therefore, when using the Gaussian function, it can ensure that the blur effect changes smoothly and does not produce a sudden change effect.

[0125] Specifically, the weight mapping of the Gaussian coordinate Gauss is obtained using a one-dimensional Gaussian curve, and the weight is applied to the background pixels to obtain blurred pixels. The specific operation formula is: [i+1] The weight mapping of the Gaussian coordinate Gauss is obtained using a one-dimensional Gaussian curve, and the weight is applied to the background pixels to obtain blurred pixels. The specific operation formula is:

[0126]

[0127] where μ and σ are the Gaussian blur mean and the Gaussian blur standard deviation respectively, src is the initial filled pixel corresponding to the texture coordinates to be blurred, and in the β Top interval [0, cache [i+1] -2δ] and the β bottom interval [cache [i+1] +2δ, 1], the Gauss [i+1] value increases rapidly, and the corresponding weight is compressed to avoid the blur range affecting the light band background.

[0128] S14. Perform a linear mixing difference calculation operation on the initial filled pixel corresponding to the texture coordinates to be blurred and the blurred pixel to obtain the image texture corresponding to the navigation light band.

[0129] Specifically, after obtaining the blurred pixels of the texture coordinates to be blurred, a linear mixing difference calculation operation can be performed on the initial filled pixels and the blurred pixels to make the blur effect more natural and more in line with actual requirements.

[0130] Specifically, referring to Figure 6 , step S14 may include:

[0131] S41. Process the vehicle speed information in the next calculation cycle using a smoothing gradient function to obtain the spot influence weight.

[0132] Specifically, the vehicle speed interval is further standardized using a smoothing gradient function to obtain the spot influence weight w(cache [i+1] ). The specific calculation formula is:

[0133] w(cache [i+1] ) = 3f(cache [i+1] ) 2 -2f(cache[i+1] ) 3

[0134] Among them, the function f() is the above-mentioned f(x).

[0135] S42. Calculate the difference between the preset value and the spot influence weight.

[0136] Specifically, in order to implement the linear mixing difference calculation operation, the values of w and 1 - w need to be calculated. Therefore, in this embodiment, the preset value is 1, that is, the value of 1 - w is calculated in this embodiment.

[0137] S43. Calculate the first product of the difference and the initial filling pixel, and calculate the second product of the spot influence weight and the blurred pixel.

[0138] S44. Use the sum of the first product and the second product as the pixel value of the texture coordinate to be blurred in the image texture, and obtain the image texture.

[0139] Specifically, the spot influence weights w and 1 - w are used to linearly mix and interpolate the background pixels (i.e., the initial filling pixels) and the blurred pixels, so that the background color and the spot blurred gradient color in the fragment shader are more smoothly blended. The calculation formula for linear mixing interpolation is:

[0140] result = (1 - w)·drc + w·dst

[0141] Among them, result is the pixel value of the texture coordinate to be blurred in the image texture, (1 - w)·sr is the first product, w·dst is the second product, and result is the sum of the first product and the second product.

[0142] In practical applications, the GPU (Graphics Processing Unit) can be used to parallel - calculate the pixel values of each texture coordinate to be blurred in the image texture, and finally the image texture can be obtained.

[0143] S15. Perform a rendering operation on the image texture.

[0144] After obtaining the above - mentioned image texture, the display result can be rendered for the user to view, which is convenient for the user to understand the actual vehicle speed information.

[0145] During actual rendering, a shader program is called to combine the image texture with the navigation mesh material to display the combined texture result.

[0146] To enable those skilled in the art to understand the present invention more clearly, the module implementation in the present invention is introduced. The navigation light - strip spot blurring support solution of the present invention is divided into two major modules:

[0147] Module M1, the system initialization and rendering instruction module, completes the environmental configuration for the execution of the shader program, mainly including frame buffer creation, shader parameter setting, and rendering draw loop, etc. The frame buffer is used to store the output color of the fragment shader; the shader parameters include but are not limited to input and output vehicle body speed information, light band color mode, Gaussian blur kernel function, etc., and these data are passed from the host memory to the shader program; during the rendering draw, the vehicle body speed information is passed into the shader program at all times, processed by the shader program, the real-time color is output to the frame buffer, and the frame buffer is cleared before the start of the second rendering. The loop node of the present invention is associated with the real-time vehicle speed, and when the vehicle speed after mapping transition reaches the interval edge, the next loop is started.

[0148] Module M2, the OpenGL shader program. The traditional processing flow of light band filtering and blurring based on image processing is as Figure 7 shown. The algorithm process is a specific implementation for traditional Gaussian blur. The input is the light spot to be blurred on the navigation light band, the blur sampling kernel is set, the pixel points are traversed and convolved according to the blur sampling kernel, and the output image texture is used for the AR HUD ground navigation grid material to realize the combination of the image texture and the navigation grid material, and finally the combined texture result is displayed.

[0149] Refer to Figure 8 and Figure 9 , the overall process of the present invention is as follows:

[0150] Apply the OpenGL shader program to implement the image post-processing function in the way of rendering to texture. Set the initial background empty texture as I, and the output texture (the above-mentioned image texture) that fuses the blurred light spot as O. The actual implementation of the algorithm is carried out in the fragment shader. For each pixel point in the initial empty texture I, according to the initial parameter information, the texture pixels are initially filled through GPU operations, the current normalized target texture coordinates are obtained through the vehicle speed information, the longitudinal preliminary blurred light spot (i.e., the light spot composed of the above-mentioned blurred pixels) is obtained by Gaussian blur according to the texture coordinate information and the blur interval, and finally the influence weight value of the blurred light spot is controlled by the smooth gradient function, and the final color value of each pixel point of the image texture O is obtained through linear mixing interpolation. Apply the GLSL script created by this algorithm to the Material, set the vertex shader and the fragment shader, and apply it to the entity material texture to obtain the finally presented navigation grid.

[0151] In specific implementation, based on the AR HUD navigation light band blur algorithm of OpenGL, the idea of using GLSL scripts to perform parallel calculation of Gaussian blur weights according to loop nodes is introduced in the AR HUD of the in-vehicle platform. The spot blur effect and the light band texture are dynamically fused into the ground-hugging navigation light band, and the OpenGL framework with high portability supported by multiple platforms is used for rendering to enhance the actual visual effect when the light band navigation is turned on. Compared with image processing parallel acceleration platforms such as CUDA and OpenCL, the result of using OpenGL for rendering and processing is more convenient for the in-vehicle AR HUD projection software to directly use this result texture to render to the HUD screen. The schematic diagram of the input and output of the fragment shader is as Figure 9 shown. The vehicle body speed information and the Gaussian blur kernel function are input, and through the shader, different color light band textures of the dynamically moving blurred spots are rendered and output. Finally, a grid is created in real time according to the lane and navigation information and fused with the texture, so as to generate a realistic, natural and beautiful rendered image.

[0152] In this embodiment, when performing the blur processing, the Gaussian function is used for the weight mapping operation. The distribution of the Gaussian function presents a normal distribution effect. Compared with the smooth gradient function, the change trend is gentle. When performing the weight mapping operation, the area closer to the spot position has a greater impact on the spot blur, and the area farther from the spot position has a smaller impact on the spot blur, so that the blur effect changes gradually, reducing the mutation probability, and visually can be better fused with the background color of the light band. In addition, when the present invention performs weight mapping, the weights of other areas outside the spot area become smaller, avoiding the blur range from affecting the light band background. In addition, when the present invention performs weight mapping, the interval consistency can be maintained in the gradient change rate, improving the visual display effect.

[0153] In addition, the present invention fixes the β interval. Compared with the traditional scheme of using a smooth gradient function or using a traditional image processing Gaussian blur kernel convolution, the interval consistency can be maintained in the gradient change rate, improving the visual display effect; the fusion weight will perform interval mapping along with the width of the spot. The size of the spot width only changes the interval scaling of the weight mapping, and there will be no mutation situation. Moreover, no matter where the spot appears in the texture, the size of the spot is fixed and the blur degree within the range is consistent, and the fusion effect with the background is consistent.

[0154] In addition, the present invention adopts parallel calculation in terms of calculation, and the processing delay is extremely low, which is more beneficial to the AR HUD projection optical machine that requires high frame rate refresh display.

[0155] Based on the above embodiment of the navigation light band blur method, another embodiment of the present invention provides a navigation light band blur device. Referring to Figure 10 , it may include:

[0156] The spot position determination module 11 is configured to determine the spot position in the next calculation cycle based on the vehicle speed information in the current calculation cycle;

[0157] The distance calculation module 12 is configured to calculate the distance between the texture coordinates to be blurred and the spot position for the texture coordinates to be blurred;

[0158] The mapping module 13 is configured to perform a Gaussian function weight mapping operation on the initial filled pixels corresponding to the texture coordinates to be blurred by using the distance, so as to obtain the blurred pixels corresponding to the texture coordinates to be blurred;

[0159] The difference calculation module 14 is configured to perform a linear mixing difference calculation operation on the initial filled pixels and the blurred pixels corresponding to the texture coordinates to be blurred, so as to obtain the image texture corresponding to the navigation light strip;

[0160] The rendering module 15 is configured to perform a rendering operation on the image texture.

[0161] Furthermore, the spot position determination module is specifically configured to:

[0162] Based on the vehicle speed information in the current calculation cycle, calculate the initial spot position in the next calculation cycle, and perform a normalization operation on the initial spot position to obtain the spot position in the next calculation cycle.

[0163] Furthermore, the distance calculation module 12 is specifically configured to:

[0164] Obtain the texture coordinates to be blurred, calculate the ratio of the texture coordinates to be blurred to the preset resolution to obtain the target texture coordinates, and calculate the distance between the target texture coordinates and the spot position.

[0165] Furthermore, the mapping module 13 includes:

[0166] The Gaussian processing sub-module is configured to perform a scaling and offset operation on the distance to obtain Gaussian coordinates;

[0167] The data acquisition sub-module is configured to acquire the Gaussian blur mean value, the Gaussian blur standard deviation, and the initial filled pixels corresponding to the texture coordinates to be blurred;

[0168] The pixel processing sub-module is configured to perform a Gaussian function weight mapping operation on the initial filled pixels corresponding to the texture coordinates to be blurred based on the Gaussian coordinates, the Gaussian blur mean value, and the Gaussian blur standard deviation, so as to obtain the blurred pixels corresponding to the texture coordinates to be blurred.

[0169] Furthermore, the data acquisition sub-module includes:

[0170] The texture acquisition unit is configured to acquire the initial texture;

[0171] A filling unit, configured to perform an initialization filling operation on the initial texture by using the image texture pixel values and the transparency information to obtain an intermediate texture;

[0172] A pixel processing unit, configured to extract the initial filled pixels corresponding to the texture coordinates to be blurred from the intermediate texture.

[0173] Further, the difference calculation module 14 includes:

[0174] A vehicle speed processing sub-module, configured to process the vehicle speed information of the next calculation cycle by using a smooth gradient function to obtain a light spot influence weight value;

[0175] A first calculation sub-module, configured to calculate the difference between a preset value and the light spot influence weight value;

[0176] A second calculation sub-module, configured to calculate the first product of the difference and the initial filled pixels, and calculate the second product of the light spot influence weight value and the blurred pixels;

[0177] A third calculation sub-module, configured to use the sum of the first product and the second product as the pixel value of the texture coordinates to be blurred in the image texture to obtain an image texture.

[0178] Further, the rendering module 15 is specifically configured to:

[0179] Call a shader program to combine the image texture with the navigation mesh material to display the combined texture result.

[0180] In this embodiment, when performing the blurring process, a Gaussian function is used for the weight mapping operation. The Gaussian function distribution presents a normal distribution effect. Compared with the smooth gradient function, the change trend is gentle. When performing the weight mapping operation, the area closer to the light spot position has a greater influence on the light spot blurring, and the area farther from the light spot position has a smaller influence on the light spot blurring, so that the blurring effect changes gradually, reducing the mutation probability and being able to be better integrated with the light band background color visually. In addition, in the present invention, when performing the weight mapping, the weights of other areas outside the light spot area become smaller, avoiding the blurring range from affecting the light band background. In addition, in the present invention, the interval consistency can be maintained in the gradient change rate during the weight mapping, improving the visual display effect.

[0181] It should be noted that for the working processes of the various modules, sub-modules and units in this embodiment, please refer to the corresponding descriptions in the above embodiments, and will not be elaborated here.

[0182] Based on the above embodiments of the navigation light band blurring method and apparatus, another embodiment of the present invention provides an electronic device, including: a memory and a processor;

[0183] Among them, the memory is used to store programs;

[0184] The processor calls the program and is used to execute the above-mentioned navigation light strip blur method.

[0185] In this embodiment, when performing blurring processing, a Gaussian function is used for weight mapping operation. The distribution of the Gaussian function presents a normal distribution effect. Compared with the smoothing gradient function, the change trend is gentle. When performing the weight mapping operation, the area closer to the spot position has a greater impact on the spot blurring, and the area farther from the spot position has a smaller impact on the spot blurring, making the blurring effect change gradually and reducing the mutation probability. Visually, it can be better integrated with the background color of the light strip. In addition, when the present invention performs weight mapping, the weights of other areas outside the spot area become smaller, avoiding the blurring range from affecting the light strip background. In addition, when the present invention performs weight mapping, it can maintain interval consistency in the gradient change rate, improving the visual display effect.

[0186] The above description of the disclosed embodiments enables those skilled in the art to implement or use the present invention. Various modifications to these embodiments will be obvious to those skilled in the art. The general principles defined herein can be implemented in other embodiments without departing from the spirit or scope of the present invention. Therefore, the present invention will not be limited to these embodiments shown herein, but rather to the widest scope consistent with the principles and novel features disclosed herein.

Claims

1. A navigation light band blurring method, characterized in that: include: Based on the vehicle speed information of the current calculation cycle, determine the light spot position of the next calculation cycle; For the texture coordinates to be blurred, calculating the distance between the texture coordinates to be blurred and the light spot position; Using the distance, performing a Gaussian function weight mapping operation on the initial filling pixels corresponding to the texture coordinates to be blurred, to obtain blurred pixels corresponding to the texture coordinates to be blurred; Performing a linear mixed difference calculation operation on the initial filling pixels and the blurred pixels corresponding to the texture coordinates to be blurred, to obtain an image texture corresponding to the navigation light band; A rendering operation is performed on the image texture.

2. The navigation light band blurring method according to claim 1, characterized in that: Based on the vehicle speed information of the current calculation cycle, the light spot position of the next calculation cycle is determined, including: Based on the vehicle speed information of the current calculation cycle, the initial spot position of the next calculation cycle is calculated; The initial light spot position is normalized to obtain the light spot position of the next calculation cycle.

3. The navigation light band blurring method according to claim 1, characterized in that: For the texture coordinates to be blurred, calculating the distance between the texture coordinates to be blurred and the light spot position includes: Get the texture coordinates to be blurred; Calculating the ratio of the texture coordinates to be blurred to a preset resolution to obtain target texture coordinates; The distance between the target texture coordinates and the light spot position is calculated.

4. The navigation light band blurring method according to claim 1, characterized in that: Using the distance, performing a Gaussian function weight mapping operation on the initial filling pixels corresponding to the texture coordinates to be blurred to obtain blurred pixels corresponding to the texture coordinates to be blurred, including: Scaling and offsetting the distance to obtain Gaussian coordinates; Obtaining a Gaussian blur mean, a Gaussian blur standard deviation, and initial filling pixels corresponding to the texture coordinates to be blurred; Based on the Gaussian coordinates, the Gaussian blur mean and the Gaussian blur standard deviation, a Gaussian function weight mapping operation is performed on the initial filling pixels corresponding to the texture coordinates to be blurred to obtain blurred pixels corresponding to the texture coordinates to be blurred.

5. The navigation light band blurring method according to claim 4, characterized in that: Obtaining the initial filling pixels corresponding to the texture coordinates to be blurred, including: Get the initial texture; Using the image texture pixel value and transparency information, the initial texture is initialized and filled to obtain an intermediate texture; Initial filling pixels corresponding to the texture coordinates to be blurred are extracted from the intermediate texture.

6. The navigation light band blurring method according to claim 1, characterized in that: Performing a linear mixed difference calculation operation on the initial filling pixels and the blurred pixels corresponding to the texture coordinates to be blurred to obtain an image texture corresponding to the navigation light band, including: The vehicle speed information of the next calculation cycle is processed using a smooth gradient function to obtain a light spot influence weight; Calculate the difference between the preset value and the light spot influence weight; Calculating a first product of the difference and the initial filling pixel, and calculating a second product of the light spot influence weight and the blurred pixel; The sum of the first product and the second product is used as the pixel value of the texture coordinate to be blurred in the image texture to obtain the image texture.

7. The navigation light band blurring method according to claim 1, characterized in that: Performing a rendering operation on the image texture includes: A shader program is called to combine the image texture with the navigation mesh material to display the combined texture result.

8. A navigation light band blurring device, characterized in that: include: A light spot position determination module, used to determine the light spot position of the next calculation cycle based on the vehicle speed information of the current calculation cycle; A distance calculation module, used for calculating the distance between the texture coordinates to be blurred and the light spot position. A mapping module, used to perform a Gaussian function weight mapping operation on the initial filling pixels corresponding to the texture coordinates to be blurred using the distance, so as to obtain blurred pixels corresponding to the texture coordinates to be blurred; A difference calculation module is used to perform a linear mixed difference calculation operation on the initial filling pixels and the blurred pixels corresponding to the texture coordinates to be blurred, so as to obtain an image texture corresponding to the navigation light band; A rendering module is used to perform a rendering operation on the image texture.

9. The navigation light band blurring device according to claim 8, characterized in that: The light spot position determination module is specifically used for: Based on the vehicle speed information of the current calculation cycle, the initial light spot position of the next calculation cycle is calculated, and the initial light spot position is normalized to obtain the light spot position of the next calculation cycle.

10. An electronic device, characterized in that: include: Memory and processor; Wherein, the memory is used to store programs; The processor calls a program and is used to execute the navigation light band blurring method as described in any one of claims 1-7.