Brightness compensation method, head-up display, storage medium and program product

A brightness compensation method based on edge detection and point spread function modeling solves the problem of blurry projected images on head-up displays, improving image clarity and information readability, and enhancing driving safety and interaction efficiency.

CN120735587BActive Publication Date: 2025-11-11GOERTEK OPTICAL TECH CO LTD
View PDF 2 Cites 0 Cited by

Patent Information

Application Number
CN202511195196.9
Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
Filing Date
2025-08-26
Publication Date
2025-11-11
Estimated Expiration
2045-08-26

AI Technical Summary

Technical Problem

The projected image of the head-up display is blurry due to defects in the optical components, resulting in poor readability and affecting the user's viewing experience and driving safety.

Method used

Edge pixel information is obtained through edge detection, and the diffusion brightness is calculated by combining it with a preset list of point diffusion functions. Edge brightness compensation is then performed, and the projection brightness is dynamically adjusted to overcome the optical diffusion effect.

Benefits of technology

It significantly improves the clarity and readability of projected images, enhances the user viewing experience, and improves driving safety and human-computer interaction efficiency.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN120735587B_ABST
    Figure CN120735587B_ABST
Patent Text Reader

Abstract

This application discloses a brightness compensation method, a head-up display (HUD), a storage medium, and a program product, relating to the field of HUD technology. The brightness compensation method, applied to a HUD, includes: after detecting a projection command for a target image, performing edge detection on the target image to obtain the pixel position and target brightness of edge pixels in the target image; determining the pixel position, target brightness, and point spread function of the diffusion pixels corresponding to the edge pixels based on the pixel positions of the edge pixels and a preset point spread function list; calculating the diffusion brightness of the edge pixels based on the pixel positions, target brightness, point spread function, and pixel positions of the edge pixels; and performing edge brightness compensation on the target image based on the target brightness and diffusion brightness of the edge pixels to obtain a projection image corresponding to the target image, and projecting and displaying the projection image. This application can improve the clarity of the projected image of a HUD.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] This application relates to the field of head-up display technology, and more particularly to brightness compensation methods, head-up displays, storage media, and program products. Background Technology

[0002] Head-up displays (HUDs), as a core interactive component of intelligent driving systems, use optical projection technology to project key data such as vehicle speed, navigation guidance, and warning information directly onto a transparent medium (such as the windshield or a dedicated combination unit) in front of the driver's field of vision, allowing the driver to obtain real-time driving information without looking down. This technology significantly reduces the risk of driver distraction, improves human-machine interaction efficiency and driving safety, and has now become a standard feature of high-end in-vehicle systems and future autonomous vehicles.

[0003] However, during the projection imaging process of a HUD, the light emitted by the image generation unit is transmitted through multiple layers of optical components, including lenses, mirrors, and projection media, before reaching the user's eyes. During this light transmission process, inherent defects in the light components (such as lens shape deviations, uneven mirror coatings, surface microstructure defects in the windshield or assembly, internal impurities, or deformation of the interlayer bonding) cause the light to fail to concentrate and diffuse, ultimately resulting in a blurry projected image, poor readability, and severely impacting the user's viewing experience and driving safety. Summary of the Invention

[0004] The main objective of this application is to provide a brightness compensation method to solve the technical problems of blurry projected images and poor information readability in head-up displays.

[0005] To achieve the above objectives, this application provides a brightness compensation method applied to a head-up display, the method comprising:

[0006] After detecting the projection command of the target image, edge detection is performed on the target image to obtain the edge pixel information of the target image. The edge pixel information includes the pixel position and target brightness of the edge pixel, and the target brightness is used to represent the pixel brightness of the pixel in the target image.

[0007] Based on the pixel position of the edge pixel and a preset list of point spread functions, determine the pixel position, target brightness, and point spread function of the spread pixel corresponding to the edge pixel;

[0008] The diffusion brightness of the edge pixel is calculated based on the pixel position, target brightness, and point diffusion function of the diffusion pixel, as well as the pixel position of the edge pixel.

[0009] Based on the target brightness and diffusion brightness of the edge pixels, edge brightness compensation is performed on the target image to obtain the corresponding projection image, and the projection image is displayed. The edge brightness compensation ensures that when the target brightness is less than the diffusion brightness, the projection brightness of the edge pixel is less than or equal to the target brightness, and when the target brightness is greater than the diffusion brightness, the projection brightness is greater than or equal to the target brightness. The projection brightness is used to represent the pixel brightness of the pixel in the projection image.

[0010] In one embodiment, the step of determining the pixel position, target brightness, and point spread function of the diffusion pixel corresponding to the edge pixel based on the pixel position of the edge pixel and a preset point spread function list includes:

[0011] Based on the pixel position of the edge pixel, a point spread function whose spread range covers the edge pixel is determined from a preset list of point spread functions;

[0012] The pixel corresponding to the point diffusion function that covers the edge pixel is taken as the diffusion pixel corresponding to the edge pixel, and the pixel position and target brightness of the diffusion pixel are determined.

[0013] In one embodiment, the step of determining, based on the pixel position of the edge pixel, a point spread function whose spread range covers the edge pixel from a preset list of point spread functions includes:

[0014] Based on the pixel position of the edge pixel, the neighboring pixels of the edge pixel are determined, wherein the neighboring pixels include the edge pixel;

[0015] From a preset list of point spread functions, determine the point spread function corresponding to the neighboring pixels, and from the point spread functions corresponding to the neighboring pixels, determine the point spread function whose spread range covers the edge pixels.

[0016] In one embodiment, the step of determining the pixel position, target brightness, and point spread function of the diffusion pixel corresponding to the edge pixel based on the pixel position of the edge pixel and a preset point spread function list includes:

[0017] Based on the pixel position of the edge pixel, the neighboring pixels of the edge pixel are determined, wherein the neighboring pixels include the edge pixel;

[0018] The diffusion pixel corresponding to the edge pixel is determined from the neighboring pixels, and the pixel position and target brightness of the diffusion pixel are determined.

[0019] From the preset list of point diffusion functions, determine the point diffusion function corresponding to the diffusion pixel.

[0020] In one embodiment, the edge pixel information further includes the gradient magnitude of the edge pixel, and the step of determining the neighboring pixels of the edge pixel based on the pixel position of the edge pixel includes:

[0021] The neighborhood position of the edge pixel is determined based on the pixel position of the edge pixel;

[0022] The neighborhood size of the edge pixel is determined based on the gradient magnitude of the edge pixel.

[0023] Based on the neighborhood position and neighborhood size of the edge pixel, the neighborhood of the edge pixel is constructed, and the neighboring pixels of the edge pixel are determined from the neighborhood of the edge pixel.

[0024] In one embodiment, the edge pixel information further includes the gradient direction of the edge pixel, and the step of constructing the neighborhood of the edge pixel based on the neighborhood position and neighborhood size of the edge pixel includes:

[0025] The neighborhood orientation of the edge pixel is determined based on the gradient direction of the edge pixel.

[0026] The neighborhood of the edge pixel is constructed based on the neighborhood position, neighborhood size, and neighborhood orientation of the edge pixel.

[0027] In one embodiment, the step of performing edge brightness compensation on the target image based on the target brightness and diffusion brightness of the edge pixels to obtain the projection image corresponding to the target image includes:

[0028] Acquire ambient light information detected by the ambient light sensor, and determine the brightness compensation coefficient based on the ambient light information;

[0029] The brightness compensation value of the edge pixel is calculated based on the target brightness and diffusion brightness of the edge pixel, as well as the brightness compensation coefficient.

[0030] Based on the brightness compensation value of the edge pixels, edge brightness compensation is performed on the target image to obtain the projection image corresponding to the target image.

[0031] In addition, to achieve the above objectives, this application also provides a head-up display, the head-up display including: a memory, a processor, and a computer program stored in the memory and executable on the processor, wherein the computer program, when executed by the processor, implements the steps of the brightness compensation method as described above.

[0032] In addition, to achieve the above objectives, this application also provides a storage medium, which is a computer-readable storage medium, on which a computer program is stored, and when the computer program is executed by a processor, it implements the steps of the brightness compensation method described above.

[0033] In addition, to achieve the above objectives, this application also provides a program product, which is a computer program product, comprising a computer program that, when executed by a processor, implements the steps of the brightness compensation method described above.

[0034] To address the technical problem of blurred projected images and poor readability caused by optical diffusion during the projection process of head-up displays (HUDs) due to inherent defects in multi-layer optical components (such as lens surface deviation, uneven mirror coating, and microstructure defects on the surface of the windshield or combiner), this application proposes a brightness compensation method based on image edge detection and point spread function modeling to effectively improve the clarity and readability of the projected image. This brightness compensation method is applied to a head-up display (HUD) and includes: after detecting a projection command for a target image, performing edge detection on the target image to obtain edge pixel information of the target image, wherein the edge pixel information includes the pixel position and target brightness of the edge pixel, and the target brightness is used to represent the pixel brightness of the pixel in the target image; determining the pixel position, target brightness, and point spread function of the diffusion pixel corresponding to the edge pixel based on the pixel position of the edge pixel and a preset point spread function list; calculating the diffusion brightness of the edge pixel based on the pixel position, target brightness, point spread function, and pixel position of the edge pixel; performing edge brightness compensation on the target image based on the target brightness and diffusion brightness of the edge pixel to obtain the image to be projected corresponding to the target image, and projecting and displaying the image to be projected, wherein the edge brightness compensation ensures that when the target brightness of the edge pixel is less than the diffusion brightness, the projected brightness is less than or equal to the target brightness, and when the target brightness is greater than the diffusion brightness, the projected brightness is greater than or equal to the target brightness, and the projected brightness is used to represent the pixel brightness of the pixel in the image to be projected.

[0035] Specifically, upon receiving a projection control command for a target image, this embodiment first performs edge detection on the target image to extract edge pixel information, including the pixel position and target brightness of the edge pixels. Then, based on the pixel position of the edge pixels and a preset list of point spread functions, it identifies "diffusion pixels" that will interfere with the brightness of the edge pixels due to optical diffusion, and obtains the corresponding point spread function. Next, based on the pixel position and target brightness of the diffusion pixels, it uses the point spread function to estimate the diffusion brightness of the edge pixels after optical diffusion under the current optical system. Finally, by comparing the difference between the target brightness and the diffusion brightness of the edge pixels, it dynamically adjusts the projection brightness of the edge pixels: when the target brightness is lower than the diffusion brightness, it appropriately reduces the projection brightness to suppress the blur diffusion effect; when the target brightness is higher than the diffusion brightness, it appropriately increases the projection brightness to improve edge contrast, thereby generating a brightness-compensated image to be projected and projected for display. This application embodiment accurately models the optical diffusion of the optical system at the image edge and actively performs targeted brightness compensation on the edge area during the image generation stage. This significantly reduces the image blurring caused by defects in optical components, improves the outline clarity and visual recognition of key driving information (such as vehicle speed, navigation arrows, warning symbols, etc.), thereby effectively improving the user viewing experience, enhancing driving safety, and increasing human-computer interaction efficiency. It has good engineering application value and promotion prospects. Attached Figure Description

[0036] The accompanying drawings, which are incorporated in and form part of this specification, illustrate embodiments consistent with this application and, together with the description, serve to explain the principles of this application.

[0037] To more clearly illustrate the technical solutions in the embodiments of this application or the prior art, the drawings used in the description of the embodiments or the prior art will be briefly introduced below. Obviously, the drawings described below are only some embodiments of this application. For those skilled in the art, other drawings can be obtained based on the structures shown in these drawings without creative effort.

[0038] Figure 1 This is a flowchart illustrating the first embodiment of the brightness compensation method of this application;

[0039] Figure 2 This is a schematic diagram of the process for determining diffused pixels in the first embodiment of the brightness compensation method of this application;

[0040] Figure 3 This is a flowchart illustrating the second embodiment of the brightness compensation method of this application;

[0041] Figure 4 This is a flowchart illustrating the third embodiment of the brightness compensation method of this application;

[0042] Figure 5 This is a schematic diagram of the device structure of the head-up display hardware operating environment involved in the brightness compensation method in this application embodiment.

[0043] The purpose, features, and advantages of this application will be further explained in conjunction with the embodiments and with reference to the accompanying drawings. Detailed Implementation

[0044] Exemplary embodiments will now be described in detail, examples of which are illustrated in the accompanying drawings. When the following description relates to the drawings, unless otherwise indicated, the same numbers in different drawings denote the same or similar elements. The embodiments described in the following exemplary embodiments do not represent all embodiments consistent with this application. Rather, they are merely examples of apparatuses and methods consistent with some aspects of this application as detailed in the appended claims.

[0045] It should be understood that the specific embodiments described herein are merely illustrative of the technical solutions of this application and are not intended to limit this application.

[0046] A head-up display (HUD) is a display system that projects key driving information (such as speed, navigation guidance, and driver assistance prompts) onto a transparent medium in front of the driver's field of vision using optical projection technology. This system plays a crucial role in improving driving safety and reducing the frequency of driver eye movement.

[0047] However, in practical applications, due to the presence of multiple lenses, mirrors, windshields, or combiners in the HUD optical path, these components may have problems such as surface deviation, uneven coating, surface microstructure defects, and internal impurities, which can cause unexpected light diffusion, resulting in problems such as image blurring, unclear edges, and poor information readability, affecting the user's viewing experience and driving safety.

[0048] The main solution of this application embodiment is as follows: After detecting the projection instruction of the target image, edge detection is performed on the target image to obtain the edge pixel information of the target image. The edge pixel information includes the pixel position and target brightness of the edge pixel, and the target brightness is used to represent the pixel brightness of the pixel in the target image. Based on the pixel position of the edge pixel and a preset point spread function list, the pixel position, target brightness, and point spread function of the diffusion pixel corresponding to the edge pixel are determined. Based on the pixel position, target brightness, and point spread function of the diffusion pixel, and the pixel position of the edge pixel, the diffusion brightness of the edge pixel is calculated. Based on the target brightness and diffusion brightness of the edge pixel, edge brightness compensation is performed on the target image to obtain the image to be projected corresponding to the target image, and the image to be projected is projected and displayed. The edge brightness compensation ensures that when the target brightness of the edge pixel is less than the diffusion brightness, the projected brightness is less than or equal to the target brightness, and when the target brightness is greater than the diffusion brightness, the projected brightness is greater than or equal to the target brightness. The projected brightness is used to represent the pixel brightness of the pixel in the image to be projected.

[0049] Upon receiving a projection control command for a target image, this embodiment first performs edge detection on the target image to extract edge pixel information, including the pixel position and target brightness of the edge pixels. Then, based on the pixel position of the edge pixels and a preset list of point spread functions, it identifies "diffusion pixels" that will interfere with the brightness of the edge pixels due to optical diffusion, and obtains the corresponding point spread function. Next, based on the pixel position and target brightness of the diffusion pixels, it uses the point spread function to estimate the diffusion brightness of the edge pixels after optical diffusion under the current optical system. Finally, by comparing the difference between the target brightness and the diffusion brightness of the edge pixels, it dynamically adjusts the projection brightness of the edge pixels: when the target brightness is lower than the diffusion brightness, it appropriately reduces the projection brightness to suppress the blur diffusion effect; when the target brightness is higher than the diffusion brightness, it appropriately increases the projection brightness to improve edge contrast, thereby generating a brightness-compensated image to be projected and projected for display. This application embodiment accurately models the optical diffusion of the optical system at the image edge and actively performs targeted brightness compensation on the edge area during the image generation stage. This significantly reduces the image blurring caused by defects in optical components, improves the outline clarity and visual recognition of key driving information (such as vehicle speed, navigation arrows, warning symbols, etc.), thereby effectively improving the user viewing experience, enhancing driving safety, and increasing human-computer interaction efficiency. It has good engineering application value and promotion prospects.

[0050] To better understand the technical solution of this application, a detailed description will be provided below in conjunction with the accompanying drawings and specific implementation methods.

[0051] This application proposes a brightness compensation method according to a first embodiment.

[0052] Please refer to Figure 1 , Figure 1 This is a flowchart illustrating the first embodiment of the brightness compensation method of this application.

[0053] In this embodiment, the brightness compensation method is applied to a head-up display, and the method may include steps S100~S300:

[0054] Step S100: After detecting the projection instruction of the target image, edge detection is performed on the target image to obtain the edge pixel information of the target image. The edge pixel information includes the pixel position and target brightness of the edge pixel. The target brightness is used to represent the pixel brightness of the pixel in the target image.

[0055] As those skilled in the art will know, edge detection is an image processing technique used to identify locations in an image where gray levels change abruptly, and these locations typically correspond to the outline or boundary of an object.

[0056] In this embodiment, the target image refers to the original digital image generated in the head-up display (HUD) system according to specific needs or instructions, and prepared to be projected onto a projection medium in front of the driver's field of vision using optical projection technology. It contains key driving information such as vehicle speed, navigation guidance, and warning information. The projection instruction is a control command used to instruct the head-up display to project the target image onto the projection medium in front of the driver's field of vision. Edge pixel information refers to the set of specific attributes extracted from the target image regarding edge pixels, mainly including the pixel position of each edge pixel in its image coordinate system and its corresponding pixel brightness.

[0057] Since HUD systems are primarily used to display critical driving information, which often relies on sharp edges to convey accurate content, this embodiment first performs edge detection on the target image after detecting the projection command of the target image. This extracts edge pixel information, including the pixel position and target brightness of the edge pixels, thereby accurately locating the critical driving information. This ensures that subsequent image processing focuses on the visual elements corresponding to the critical driving information, improving the targeting and efficiency of brightness compensation, avoiding unnecessary full-image processing, reducing computational resource consumption, and making the final projected image displayed on the projection medium sharper and clearer at the edges of the visual elements corresponding to the critical driving information. This effectively improves the readability of the projected image and enhances the speed and accuracy with which the driver obtains critical driving information.

[0058] Furthermore, processing only edge pixels means that brightness compensation is mainly focused on important structural features of the image rather than the entire image area. This helps to suppress noise amplification in non-critical areas, reduce the risk of misreading information due to cluttered backgrounds or poor lighting conditions, highlight key driving information while maintaining overall image quality, and enhance the overall readability of the projected image.

[0059] It is worth mentioning that, in this embodiment, the operator size and gradient magnitude threshold used for edge detection can be adjusted according to actual needs (a pixel is determined to be an edge pixel when its gradient magnitude is greater than the gradient magnitude threshold). For example, when the ambient light is sufficient and the illuminance is greater than or equal to a preset value, a first operator size and a first gradient magnitude threshold are used; when the ambient light is weak and the illuminance is less than the preset value, a second operator size and a second gradient magnitude threshold are used. The first operator size is larger than the second operator size, and the first gradient magnitude threshold is smaller than the second gradient magnitude threshold. Under ambient light, the projected image of the head-up display will appear somewhat blurry. The stronger the ambient light and the higher the illuminance, the blurrier the projected image appears to the human eye. Therefore, when the ambient light is strong, it is necessary to actively increase the operator size and decrease the gradient magnitude threshold to include more pixels at the edges in the brightness compensation, thereby counteracting the impact of ambient light on the clarity of the projected image.

[0060] Step S200: Determine the pixel position, target brightness, and point spread function of the diffusion pixel based on the pixel position of the edge pixel and the preset point spread function list.

[0061] As those skilled in the art will know, the point spread function describes the image distribution formed after an ideal point light source passes through an optical system, reflecting how the optical system spreads the light.

[0062] In this embodiment, the dot spread function list consists of a set of pre-calculated dot spread functions. In this embodiment, the dot spread function of the head-up display at each pixel location is pre-calibrated under darkroom conditions using dot matrix light patterns or structured light patterns, and then integrated into a dot spread function list for the head-up display. This facilitates finding the required dot spread function during brightness compensation.

[0063] It should be noted that since the point spread function corresponding to different pixel positions may be the same, in order to reduce storage and avoid storing a large number of duplicate point spread functions in the point spread function list, this embodiment can only store non-duplicate point spread functions in the point spread function list, and then establish the association between the point spread function and the pixel position.

[0064] It should be noted that diffused pixels refer to pixels whose optical diffusion behavior may interfere with the pixel brightness of edge pixels in the projected image under current optical systems.

[0065] For example, such as Figure 2 As shown, in a first feasible implementation, step S200 may include steps S210 to S220:

[0066] Step S210: Based on the pixel position of the edge pixel, determine the point spread function whose spread range covers the edge pixel from the preset point spread function list;

[0067] Step S220: The pixels corresponding to the point diffusion function of the edge pixels whose diffusion range covers the edge pixels are taken as the diffusion pixels corresponding to the edge pixels, and the pixel position and target brightness of the diffusion pixels are determined.

[0068] It should be noted that diffusion range refers to the physical spatial range in an optical system where the light emitted or reflected by a pixel does not only act on its original position on the final image surface due to inherent defects or non-ideal imaging characteristics of optical components (such as lenses, mirrors, windshields, etc.), but diffuses into a certain area around it.

[0069] In this embodiment, each pixel position of the head-up display corresponds to a point spread function in the point spread function list, which is used to reflect the optical diffusion pattern at that pixel position. The point spread function is usually presented in the form of a two-dimensional matrix. In this two-dimensional matrix, the area with a value greater than or equal to a preset value (which can be flexibly set according to actual needs) can be called the effective area of ​​the point spread function. After the effective area is combined with the specific pixel position, the diffusion range of the point spread function at that pixel position can be determined.

[0070] For example, pixel A has a pixel position of (100, 100), and the corresponding point spread function is a 3*3 two-dimensional matrix:

[0071] .

[0072] Each position in the matrix corresponds to a pixel position. The region in the matrix with a value greater than or equal to 0.1 is the effective region of the point spread function. The center position of the matrix (i.e., the position of the number 0.6 in the matrix) corresponds to the pixel position (100, 100) of pixel A. Therefore, the spread range of the point spread function includes the following pixel positions: (99, 99), (99, 100), (100, 100), (101, 100), and (100, 101).

[0073] Based on this, if the pixel position of an edge pixel is any pixel position contained within the diffusion range of the point diffusion function, then it can be determined that the edge pixel is covered by the diffusion range of the point diffusion function.

[0074] In this embodiment, when the point spread function list only stores non-repeating point spread functions, the spread range of the point spread function at each pixel position can be pre-calculated based on the correlation between the point spread function and the pixel position, and a correlation relationship can be established between the point spread function, the pixel position, and the spread range. Accordingly, in step S220, when the pixel corresponding to the point spread function whose spread range covers the edge pixel is used as the spread pixel corresponding to the edge pixel, the pixel that is jointly associated with the spread range and the point spread function is actually used as the spread pixel corresponding to the edge pixel.

[0075] It is worth mentioning that the diffusion range of the point spread function at each pixel position can be calculated in real time. At this time, the preset value used to define the effective area of ​​the point spread function can be dynamically determined according to the target brightness at the pixel position in the target image, and the larger the target brightness, the smaller the preset value.

[0076] This implementation introduces "diffusion range" as the selection criterion for diffusion pixels. Compared with directly using the neighboring pixels of edge pixels as diffusion pixels, it can ensure that pixels with real optical diffusion behavior with edge pixels are accurately matched as diffusion pixels, thereby improving the selection accuracy of diffusion pixels and the calculation accuracy of diffusion brightness. At the same time, it avoids introducing irrelevant pixels and wasting the extremely limited computing resources of the head-up display itself.

[0077] Furthermore, in one feasible implementation, step S210 may include steps S211-S212:

[0078] Step S211: Determine the neighboring pixels of the edge pixels based on the pixel position of the edge pixels, wherein the neighboring pixels include the edge pixels;

[0079] As those skilled in the art will know, in image processing, a neighborhood refers to a pixel area defined around a central pixel, according to a certain shape and size. Typically, the neighborhood is formed by extending outwards from the central pixel by several pixel units, such as a 3×3, 5×5, or circular area. Neighborhood pixels are pixels belonging to that neighborhood.

[0080] Step S212: Determine the point spread function corresponding to the neighboring pixels from the preset point spread function list, and determine the point spread function whose spread range covers the edge pixels from the point spread functions corresponding to the neighboring pixels.

[0081] Compared to directly searching for a point spread function (PSF) whose diffusion range covers the edge pixel from a preset PSF list based on the pixel position of the edge pixel, this embodiment refines step S210. It first determines the neighboring pixels of the edge pixel, and then searches for PSFs whose diffusion range covers the edge pixel from the PSFs corresponding to these neighboring pixels. Since the pixels most likely to cause optical diffusion effects on the edge pixel are usually concentrated in their neighborhood, this embodiment's search method fully utilizes the local characteristics of neighboring pixels, limiting the global search process, which originally targeted the entire PSF list, to a matching operation only within a finite set of PSFs corresponding to the neighboring pixels. This improvement significantly reduces the search space while maintaining brightness compensation effects, avoiding the large amount of redundant computation caused by global scanning, thereby effectively reducing the computational complexity of the algorithm and improving processing efficiency. It is particularly suitable for in-vehicle HUD systems with high real-time requirements.

[0082] For example, in a second feasible implementation, step S200 may further include steps S230 to S250:

[0083] Step S230: Determine the neighboring pixels of the edge pixels based on the pixel position of the edge pixels, wherein the neighboring pixels include the edge pixels;

[0084] Step S240: Determine the diffusion pixel corresponding to the edge pixel from the neighboring pixels, and determine the pixel position and target brightness of the diffusion pixel;

[0085] Step S250: Determine the point spread function corresponding to the spread pixel from the preset list of point spread functions.

[0086] This implementation proposes a technical approach based on filtering diffusion pixels from neighboring pixels and then matching the corresponding point spread function (PSF). Compared to the implementation that directly searches for pixels whose diffusion range covers the edge pixel from a preset PSF list based on the edge pixel's location, this implementation fully considers the local characteristics of light intensity propagation in the optical system. First, it determines the set of neighboring pixels of the edge pixel, identifies diffusion pixels that have an optical diffusion effect on the current edge pixel, and finally matches their corresponding PSFs, making the brightness compensation process closer to the real imaging physical mechanism.

[0087] The unique contribution of this technical solution lies in two aspects: First, it effectively reduces the search space, limiting the global matching that originally targeted the entire PSF list to local matching only within the neighborhood, significantly reducing algorithm complexity and improving processing efficiency, making it particularly suitable for applications with high real-time requirements, such as automotive HUDs. Second, by introducing a neighborhood pixel analysis mechanism, it enhances the modeling ability of local optical characteristics, improves the accuracy and robustness of brightness compensation, and avoids over-compensation or under-compensation caused by misselecting irrelevant pixels, thereby improving the system's adaptability and stability while ensuring image quality.

[0088] It is worth mentioning that in this embodiment, when determining the diffusion pixel from the neighboring pixels in step S240, all neighboring pixels can be determined as diffusion pixels of the edge pixel. Alternatively, the weight can be dynamically calculated based on the distance between the neighboring pixels and the edge pixel and the difference in target brightness. Neighboring pixels with a weight greater than a preset weight, or the first n (n greater than 0 and an integer) neighboring pixels ranked from largest to smallest weight, can be determined as diffusion pixels of the edge pixel. It is easy to understand that the smaller the distance between the neighboring pixels and the edge pixel, and the greater the difference in target brightness, the greater the calculated weight.

[0089] Step S300: Calculate the diffusion brightness of the edge pixels based on the pixel position of the diffusion pixel, the target brightness, the point diffusion function, and the pixel position of the edge pixels.

[0090] It should be noted that diffusion brightness refers to the actual brightness level of a pixel in the projected image, taking into account the optical diffusion effect of surrounding pixels and without brightness compensation. This diffusion brightness is a result calculated based on the original target brightness and the influence of the optical diffusion of surrounding pixels.

[0091] In this embodiment, the target brightness of each diffuse pixel at the edge pixel can be calculated by applying the corresponding point spread function to the diffuse pixels of the edge pixel, thereby summing up the diffuse brightness of the edge pixel. For example, the diffuse pixels of edge pixel A include pixel A with a target brightness of 10 and pixel B with a target brightness of 20. The brightness ratio of the point spread function of pixel A at pixel A is 0.5, and the brightness ratio of the point spread function of pixel B at pixel A is 0.2. Therefore, the diffuse brightness of pixel A = 10 * 0.5 + 20 * 0.2 = 9.

[0092] It should be noted that the application of the point spread function is based on physical brightness in nits. Therefore, when the target brightness represents a brightness level rather than physical brightness, it is necessary to first convert the target brightness from brightness level to physical brightness in nits based on the maximum physical brightness of the head-up display before the point spread function can be applied to calculate the spread brightness. Those skilled in the art have already studied this in depth, and this implementation will not elaborate on it further.

[0093] Step S400: Based on the target brightness and diffusion brightness of the edge pixels, perform edge brightness compensation on the target image to obtain the image to be projected corresponding to the target image, and project and display the image to be projected. The edge brightness compensation makes the projection brightness of the edge pixels less than or equal to the target brightness when the target brightness is less than the diffusion brightness, and greater than or equal to the target brightness when the target brightness is greater than the diffusion brightness. The projection brightness is used to represent the pixel brightness of the pixel in the image to be projected.

[0094] After determining the target brightness and diffusion brightness of the edge pixels in this embodiment, the projection brightness of the edge pixels in the final projection output can be dynamically adjusted by comparing the target brightness and diffusion brightness. This offsets the influence of the diffusion effect of the optical system, achieves edge brightness compensation for the target image, improves the imaging clarity of the projected image at the edges of visual elements, reduces the image blurring problem caused by optical element defects, and enhances information readability.

[0095] In this embodiment, the edge brightness compensation mechanism can actively correct brightness distortion caused by optical diffusion during the image rendering stage, thereby significantly improving the clarity and sharpness of image edges. Specifically:

[0096] When the target brightness is less than the diffuse brightness, reducing the projection brightness can prevent edge pixels from being overwhelmed by diffuse light due to excessive brightness, thus avoiding image blurring.

[0097] When the target brightness is greater than the diffuse brightness, increasing the projection brightness can enhance the contrast between the edge and the background, thereby improving visual recognition.

[0098] Furthermore, this brightness compensation strategy only applies to the edge areas of the image, balancing image quality improvement with resource consumption control, and has good engineering applicability.

[0099] Upon receiving the projection control command for the target image, this embodiment first performs edge detection on the target image, extracting edge pixel information, including the pixel position and target brightness of the edge pixels. Then, based on the pixel position of the edge pixels and a preset list of point spread functions, it identifies "diffusion pixels" that will interfere with the brightness of the edge pixels due to optical diffusion, and obtains the corresponding point spread function. Next, based on the pixel position and target brightness of the diffusion pixels, it uses the point spread function to estimate the diffusion brightness of the edge pixels after optical diffusion under the current optical system. Finally, by comparing the difference between the target brightness and the diffusion brightness of the edge pixels, it dynamically adjusts the projection brightness of the edge pixels: when the target brightness is lower than the diffusion brightness, it appropriately reduces the projection brightness to suppress the blur diffusion effect; when the target brightness is higher than the diffusion brightness, it appropriately increases the projection brightness to improve edge contrast, thereby generating a brightness-compensated image to be projected and projected for display. This application embodiment accurately models the optical diffusion of the optical system at the image edge and actively performs targeted brightness compensation on the edge area during the image generation stage. This significantly reduces the image blurring caused by defects in optical components, improves the outline clarity and visual recognition of key driving information (such as vehicle speed, navigation arrows, warning symbols, etc.), thereby effectively improving the user viewing experience, enhancing driving safety, and increasing human-computer interaction efficiency. It has good engineering application value and promotion prospects.

[0100] Based on the first embodiment described above, a brightness compensation method according to the second embodiment of this application is proposed.

[0101] Please refer to Figure 3 , Figure 3 This is a flowchart illustrating the second embodiment of the brightness compensation method of this application.

[0102] In the second embodiment of this application, the same or similar content as in the above embodiments can be referred to the above description, and will not be repeated hereafter.

[0103] In this embodiment, step S400, which involves performing edge brightness compensation on the target image based on the target brightness and diffusion brightness of the edge pixels to obtain the projection image corresponding to the target image, may include steps S410 to S430:

[0104] Step S410: Obtain ambient light information detected by the ambient light sensor, and determine the brightness compensation coefficient based on the ambient light information;

[0105] It should be noted that an ambient light sensor is a photoelectric sensing device used to detect the intensity and / or brightness of ambient light, such as an illuminance meter or luminance meter, which can sense the brightness of the current driving environment in real time (reflected by illuminance or brightness). Ambient light information refers to the data collected and output by the ambient light sensor that represents the brightness of the current environment (i.e., ambient light intensity).

[0106] It should also be noted that the brightness compensation coefficient is a dynamically adjusted parameter. Its value is directly related to the golden light information and is used to quantify the severity of the impact of ambient light on the sharpness of the projected image, thereby adjusting the intensity of subsequent brightness compensation. The stronger the ambient light (e.g., direct sunlight at noon), the more significant the negative impact on the projected image, such as blurring and reduced contrast. In this case, a larger brightness compensation coefficient is needed to drive a stronger compensation behavior to counteract the adverse effects of ambient light. Conversely, when the ambient light is weak (e.g., at night or in a tunnel), the brightness compensation coefficient is reduced accordingly to avoid over-compensation that could lead to image distortion or wasted resources.

[0107] It is easy to understand that this embodiment can pre-define the relationship between ambient light information and brightness compensation coefficient, and represent this relationship in the form of a mapping table or data function. Thus, in practical applications, the brightness compensation coefficient can be determined based on the ambient light information detected by the ambient light sensor by looking up the table or calculating the function.

[0108] Step S420: Calculate the brightness compensation value of the edge pixel based on the target brightness and diffusion brightness of the edge pixel, as well as the brightness compensation coefficient.

[0109] It should be noted that the brightness compensation value refers to the adjustment amount applied to the original target brightness of the edge pixels to counteract the optical diffusion effect and the influence of ambient light (positive values ​​indicate brightness increase, and negative values ​​indicate brightness decrease). The core of this step is to integrate the brightness compensation coefficient, which reflects the ambient light intensity and is determined in step S410, into the basic compensation calculation based on the difference between the target brightness and the diffuse brightness. Specifically, the brightness compensation value depends not only on the difference between the target brightness and the diffuse brightness (as disclosed in the first embodiment of optical diffusion), but also on the modulation of the brightness compensation coefficient. The larger the brightness compensation coefficient, the stronger the ambient light interference, and the basic compensation amount calculated based on the difference between the target brightness and the diffuse brightness will be amplified accordingly, thereby generating the final brightness compensation value adapted to the current ambient light conditions.

[0110] It should be noted that, in this embodiment, the brightness compensation coefficient may include a first brightness compensation coefficient and a second brightness compensation coefficient. The first brightness compensation coefficient is used to participate in the calculation of the brightness compensation value when the target brightness of the edge pixel is less than the diffusion brightness, while the second brightness compensation coefficient is used to participate in the calculation of the brightness compensation value when the target brightness of the edge pixel is greater than the diffusion brightness. This is because, under the same ambient light adjustment, the influence of ambient light on the bright side (i.e., edge pixels with target brightness greater than diffusion brightness) and dark side (i.e., edge pixels with target brightness less than diffusion brightness) of the image is not homogeneous, requiring differentiated responses to achieve more accurate brightness compensation.

[0111] Step S430: Based on the brightness compensation value of the edge pixels, perform edge brightness compensation on the target image to obtain the projection image corresponding to the target image.

[0112] By incorporating ambient light information and dynamically determining the brightness compensation coefficient accordingly, this embodiment significantly improves the environmental adaptability of the brightness compensation method. The system can sense changes in external lighting conditions in real time (such as entering a tunnel from bright daylight or changing from cloudy to strong sunlight) and automatically adjust the compensation intensity (brightness compensation value). This makes the brightness compensation strategy no longer static and fixed, but intelligently responds to the strength of actual ambient light interference, ensuring that the clarity and readability of key driving information edges can be effectively maintained under various complex lighting scenarios (strong light, weak light, rapid changes in light, etc.).

[0113] Since ambient light (especially strong ambient light) is one of the main external factors causing blurry and reduced contrast in HUD projected images, its effects are often compounded by the inherent diffusion effect of the optical system. To address this, this embodiment quantifies the ambient light factor as a brightness compensation coefficient and integrates it into the calculation of the brightness compensation value. This allows the final edge brightness compensation to simultaneously counteract both internal diffusion within the optical system and external ambient light interference—two major factors causing blurred projected images. This dual countermeasure mechanism significantly improves the robustness of the projected image in terms of visual clarity and information recognition under complex and variable conditions, especially strong ambient light.

[0114] Furthermore, this embodiment, while inheriting the computational efficiency advantages of the first embodiment by processing only edge pixels and avoiding full-image processing, adds ambient light information acquisition and brightness compensation coefficient calculation processes with controllable computational overhead (typically involving simple table lookups or linear mappings). More importantly, by dynamically adjusting the compensation intensity based on ambient light intensity, unnecessary strong compensation calculations in low-light environments or subsequent remedial processing due to insufficient compensation in strong light environments are avoided. Thus, the overall system resources are still used efficiently, meeting the real-time and low-power requirements of automotive HUDs.

[0115] Based on the above embodiments, a brightness compensation method according to the third embodiment of this application is proposed.

[0116] Please refer to Figure 4 , Figure 4 This is a flowchart illustrating the third embodiment of the brightness compensation method of this application.

[0117] In the third embodiment of this application, the same or similar content as the above embodiments can be referred to the above description, and will not be repeated hereafter.

[0118] In this embodiment, the edge pixel information also includes the gradient magnitude of the edge pixel. The step of determining the neighboring pixels of the edge pixel based on the pixel position of the edge pixel may include steps S260~S280:

[0119] Step S260: Determine the neighborhood position of the edge pixel based on the pixel position of the edge pixel;

[0120] It should be noted that the neighborhood location refers to the position of a neighboring area, which is generally represented by the pixel position of the center pixel of that neighborhood. In this embodiment, the center pixel of the neighborhood of an edge pixel is the edge pixel itself; therefore, the neighborhood location of an edge pixel can be represented by the pixel position of that edge pixel.

[0121] Step S270: Determine the neighborhood size of the edge pixel based on the gradient magnitude of the edge pixel;

[0122] It should be noted that neighborhood size refers to the dimensions of the neighborhood, representing the extent of the neighborhood constructed around the neighboring location in the image space, usually expressed in pixels. For regular neighborhoods, such as rectangular neighborhoods, their size can be represented by the number of pixels corresponding to their length and width. For circular neighborhoods, their size can be represented by the number of pixels corresponding to their radius or diameter. For rhomboid neighborhoods, their size can be represented by the number of pixels corresponding to their long and short diagonals. For irregular neighborhoods, their size can be represented by the number of pixels corresponding to their area; this implementation does not impose specific limitations on this.

[0123] As those skilled in the art will know, gradient magnitude is a quantitative indicator calculated during edge detection that characterizes the degree of grayscale change at a given pixel. A larger gradient magnitude indicates a steeper grayscale change and a sharper edge in the local image region where the edge pixel is located; a smaller gradient magnitude indicates a smoother grayscale change and a more blurred or wider edge.

[0124] It should be noted that the larger the gradient magnitude of the edge pixels, the steeper the grayscale change in the image and the greater the brightness difference of the surrounding pixels. Correspondingly, the optical diffusion of high-brightness pixels has a more significant impact on the brightness of surrounding pixels, and even pixels at a distance will be subject to non-negligible brightness interference. Therefore, a larger neighborhood size is required to ensure that these potential source pixels of diffusion influence, which may have a wide spatial distribution, can be covered. In other words, the larger the gradient magnitude of the edge pixels, the larger the corresponding neighborhood size should be.

[0125] Step S280: Based on the neighborhood position and neighborhood size of the edge pixel, construct the neighborhood of the edge pixel, and determine the neighboring pixels of the edge pixel from the neighborhood of the edge pixel.

[0126] This embodiment abandons the traditional approach of fixed-size neighborhoods and innovatively uses the gradient magnitude of the edge pixels themselves as the core criterion for determining the neighborhood size. This makes neighborhood construction no longer mechanical and one-size-fits-all, but intelligently responds to the actual differences in local edge characteristics (i.e., brightness differences) of the image. For edges with large brightness differences (edge ​​pixels with high gradient magnitudes), a large neighborhood is used to ensure coverage of pixels that may cause optical diffusion in a wider area; for edges with small brightness differences (edge ​​pixels with low gradient magnitudes), a small neighborhood is used, focusing on the nearest and most directly affected pixel. This dynamic adjustment mechanism significantly improves the fit between neighborhood construction and the actual physical behavior of optical diffusion.

[0127] The appropriateness of the neighborhood size directly determines the accuracy of subsequent diffusion pixel identification (whether based on PSF lookup or neighborhood filtering). Fixed-size neighborhoods are prone to inaccuracies in images with large differences in edge characteristics: small neighborhoods may miss distant diffusion pixels that significantly affect edges with large brightness differences, leading to insufficient compensation; large neighborhoods may introduce too many irrelevant pixels at edges with small brightness differences, increasing noise interference or computational redundancy, or even leading to overcompensation. This embodiment dynamically adjusts the neighborhood size by gradient magnitude to accurately match the actual needs of the optical diffusion influence range of edges with different brightness differences, thereby fundamentally optimizing the recognition accuracy of diffusion pixels. This directly translates to subsequent brightness compensation calculations, ensuring that the compensation effect can be applied more accurately to truly relevant pixels, significantly improving the effectiveness and reliability of the final edge sharpness compensation.

[0128] In one feasible implementation, the edge pixel information further includes the gradient direction of the edge pixels, and step S280 may include steps S281~S282:

[0129] Step S281: Determine the neighborhood orientation of the edge pixel based on the gradient direction of the edge pixel;

[0130] Step S282: Construct the neighborhood of the edge pixel based on the neighborhood location, neighborhood size and neighborhood orientation.

[0131] As those skilled in the art will know, the gradient direction is a vector angle (usually expressed as the angle with the horizontal axis) calculated during edge detection, representing the direction of the fastest change in image grayscale at the edge pixel. It is perpendicular to the tangent direction of the local edge of the image and points in the direction of the fastest increase in grayscale.

[0132] It should be noted that neighborhood orientation refers to the orientation of the neighborhood, that is, the dominant extension direction of the neighborhood in the image space. In this embodiment, the neighborhood of the edge pixel is a diamond-shaped neighborhood, an elliptical neighborhood, or other oriented neighborhood. For a diamond-shaped neighborhood, its orientation refers to the extension direction of its long diagonal; for an elliptical neighborhood, its orientation refers to the extension direction of its major axis.

[0133] It is easy to understand that in this embodiment, both the long diagonal direction of the rhomboid neighborhood and the long axis direction of the elliptical neighborhood are set to be parallel to the gradient direction of the edge pixel or have a specific, fixed geometric relationship (e.g., coincident or at a predetermined angle). This setting ensures that the dominant extension direction of the neighborhood (i.e., the neighborhood orientation) can be precisely aligned with the direction in which the optical diffusion effect has the strongest influence at the edge pixel location (typically along the normal direction of the edge, i.e., the gradient direction).

[0134] By explicitly defining the orientation of the rhomboid neighborhood as its long diagonal direction and the elliptical neighborhood as its major axis direction, and aligning these directions with the gradient direction, this implementation ensures that the constructed anisotropic neighborhood can most effectively characterize the spatial distribution characteristics of optical diffusion at the edge location. The long diagonal / major axis direction represents the dimension with the farthest propagation distance and the largest potential influence range of light intensity diffusion in the neighborhood morphology. Aligning it with the gradient direction (the main diffusion direction) maximizes the coverage of diffusion source pixels that may significantly interfere with the brightness of the current edge pixel along this main direction, while minimizing the introduction of irrelevant pixels in secondary directions.

[0135] It's worth noting that when the neighborhood of an edge pixel is a rhomboid, elliptical, or even irregular neighborhood, pixels whose area is more than 50% within that neighborhood can be considered as the neighbor pixels of that edge pixel. Alternatively, only pixels whose entire area is within that neighborhood can be considered as the neighbor pixels of that edge pixel; the specific proportion can be flexibly adjusted according to actual needs.

[0136] It should be noted that the above embodiments / implementations are only used to assist in understanding this application and do not constitute a limitation on the brightness compensation method of this application. Any simple modifications based on this technical concept are within the protection scope of this application.

[0137] In addition, please refer to Figure 5 , Figure 5 This is a schematic diagram of the hardware operating environment of the head-up display involved in the brightness compensation method in this application embodiment.

[0138] This application also provides a head-up display, which includes: at least one processor; and a memory communicatively connected to the at least one processor; wherein the memory stores instructions executable by the at least one processor, which are executed by the at least one processor to enable the at least one processor to perform the steps of the brightness compensation method in the above embodiments.

[0139] The following is for reference. Figure 5 It shows a schematic diagram of a structure suitable for implementing the head-up display of the embodiments of this application. Figure 5 The head-up display shown is merely an example and should not be construed as limiting the functionality and scope of use of the embodiments of this application.

[0140] like Figure 5 As shown, the head-up display (HUD) may include a processing device 1001 (e.g., a central processing unit, a graphics processing unit, etc.) that can perform various appropriate actions and processes according to a program stored in a read-only memory 1002 or a program loaded from a storage device 1003 into a random access memory 1004. The random access memory 1004 also stores various programs and data required for the operation of the HUD. The processing device 1001, the read-only memory 1002, and the random access memory 1004 are interconnected via a bus 1005. An input / output interface 1006 is also connected to the bus. Typically, the following systems can be connected to the input / output interface 1006: input devices 1007 including, for example, a touchscreen, touchpad, keyboard, mouse, image sensor, microphone, accelerometer, gyroscope, etc.; output devices 1008 including, for example, a liquid crystal display (LCD), speaker, vibrator, etc.; storage devices 1003 including, for example, magnetic tape, hard disk, etc.; and communication devices 1009. The communication device 1009 allows the head-up display to communicate wirelessly or wiredly with other devices to exchange data. Although the figures show head-up displays with various systems, it should be understood that implementing or having all of the systems shown is not required. More or fewer systems may be implemented alternatively.

[0141] Specifically, according to the embodiments disclosed in this application, the processes described above with reference to the flowcharts can be implemented as computer software programs. For example, embodiments disclosed in this application include a computer program product comprising a computer program carried on a computer-readable medium, the computer program containing program code for performing the methods shown in the flowcharts. In such embodiments, the computer program can be downloaded and installed from a network via a communication device, or installed from storage device 1003, or installed from read-only memory 1002. When the computer program is executed by processing device 1001, it performs the functions defined in the methods of the embodiments disclosed in this application.

[0142] The head-up display provided in this application, employing the brightness compensation method described in the above embodiments, can solve the technical problems of blurred projected images and poor information readability in head-up displays. Compared with the prior art, the beneficial effects of the head-up display provided in this application are the same as those of the brightness compensation method provided in the above embodiments, and other technical features of this head-up display are the same as those disclosed in the methods of the above embodiments, and will not be repeated here.

[0143] It should be understood that the various parts disclosed in this application can be implemented using hardware, software, firmware, or a combination thereof. In the description of the above embodiments, specific features, structures, materials, or characteristics can be combined in any suitable manner in one or more embodiments or examples.

[0144] The above are merely specific embodiments of this application, but the scope of protection of this application is not limited thereto. Any variations or substitutions that can be easily conceived by those skilled in the art within the scope of the technology disclosed in this application should be included within the scope of protection of this application. Therefore, the scope of protection of this application should be determined by the scope of protection of the above claims.

[0145] In addition, this application also provides a storage medium, which is a computer-readable storage medium having computer-readable program instructions (i.e., a computer program) stored thereon, the computer-readable program instructions being used to perform the steps of the brightness compensation method in the above embodiments.

[0146] The storage medium provided in this application may be, for example, a USB flash drive, but is not limited to, electrical, magnetic, optical, electromagnetic, infrared, or semiconductor systems, devices, or any combination thereof. More specific examples of computer-readable storage media may include, but are not limited to: electrical connections having one or more wires, portable computer disks, hard disks, random access memory, read-only memory (erasable programmable read-only memory, optical fiber, portable compact disk read-only memory, optical storage devices, magnetic storage devices, or any suitable combination thereof). In this embodiment, the computer-readable storage medium may be any tangible medium containing or storing a program that can be used by or in conjunction with an instruction execution system, system, or device. The program code contained on the computer-readable storage medium may be transmitted using any suitable medium, including but not limited to: wires, optical cables, RF (Radio Frequency), etc., or any suitable combination thereof.

[0147] The aforementioned storage medium may be a head-up display or included in a head-up display; or it may exist independently and not assembled into a head-up display or head-up display.

[0148] The aforementioned storage medium carries one or more programs. When these programs are executed by the head-up display (HUD), the HUD performs the following actions: upon detecting a projection command for the target image, it performs edge detection on the target image to obtain edge pixel information, including the pixel position and target brightness of the edge pixel, where the target brightness represents the pixel brightness in the target image; based on the pixel position of the edge pixel and a preset list of point spread functions, it determines the pixel position, target brightness, and point spread function of the diffusion pixel corresponding to the edge pixel; based on the pixel position, target brightness, and point spread function of the diffusion pixel, and the pixel position of the edge pixel, it calculates the diffusion brightness of the edge pixel; based on the target brightness and diffusion brightness of the edge pixel, it performs edge brightness compensation on the target image to obtain the image to be projected corresponding to the target image, and projects and displays the image to be projected. The edge brightness compensation ensures that when the target brightness of the edge pixel is less than the diffusion brightness, the projected brightness is less than or equal to the target brightness, and when the target brightness is greater than the diffusion brightness, the projected brightness is greater than or equal to the target brightness. The projected brightness represents the pixel brightness in the image to be projected.

[0149] Computer program code for performing the operations of this application can be written in one or more programming languages ​​or a combination thereof, including object-oriented programming languages ​​such as Java, Smalltalk, and C++, as well as conventional procedural programming languages ​​such as the "C" language or similar programming languages. The program code can be executed entirely on the user's computer, partially on the user's computer, as a standalone software package, partially on the user's computer and partially on a remote computer, or entirely on a remote computer or server. In cases involving remote computers, the remote computer can be connected to the user's computer via any type of network—including local area networks (LANs) or wide area networks (WANs), or it can be connected to an external computer (e.g., via the Internet using an Internet service provider).

[0150] The flowcharts and block diagrams in the accompanying drawings illustrate the architecture, functionality, and operation of possible implementations of systems, methods, and computer program products according to various embodiments of this application. In this regard, each block in a flowchart or block diagram may represent a module, segment, or portion of code containing one or more executable instructions for implementing a specified logical function. It should also be noted that in some alternative implementations, the functions indicated in the blocks may occur in a different order than those indicated in the drawings. For example, two consecutively indicated blocks may actually be executed substantially in parallel, and they may sometimes be executed in reverse order, depending on the functions involved. It should also be noted that each block in the block diagrams and / or flowcharts, and combinations of blocks in the block diagrams and / or flowcharts, can be implemented using a dedicated hardware-based system that performs the specified function or operation, or using a combination of dedicated hardware and computer instructions.

[0151] The modules described in the embodiments of this application can be implemented in software or hardware. The names of the modules do not necessarily limit the functionality of the unit itself.

[0152] The storage medium provided in this application stores computer-readable program instructions (i.e., a computer program) for performing the steps of the above-described brightness compensation method, which can solve the technical problems of blurry projected images and poor information readability in head-up displays. Compared with the prior art, the beneficial effects of the storage medium provided in this application are the same as those of the brightness compensation method provided in the above embodiments, and will not be repeated here.

[0153] Furthermore, this application also provides a program product, which is a computer program product, including a computer program that, when executed by a processor, implements the steps of the brightness compensation method as described in the above embodiments.

[0154] The program product provided in this application can solve the technical problems of blurry projected images and poor information readability in head-up displays. Compared with the prior art, the beneficial effects of the program product provided in this application are the same as the beneficial effects of the brightness compensation method provided in the above embodiments, and will not be repeated here.

[0155] The above description is only a part of the embodiments of this application and does not limit the patent scope of this application. All equivalent structural transformations made under the technical concept of this application and using the contents of the specification and drawings of this application, or direct / indirect applications in other related technical fields, are included in the patent protection scope of this application.

Claims

1. A brightness compensation method, characterized in that, The method is applied to a head-up display, and the method includes: After detecting the projection command of the target image, edge detection is performed on the target image to obtain the edge pixel information of the target image. The edge pixel information includes the pixel position and target brightness of the edge pixel, and the target brightness is used to represent the pixel brightness of the pixel in the target image. Based on the pixel position of the edge pixel and a preset list of point spread functions, determine the pixel position, target brightness, and point spread function of the spread pixel corresponding to the edge pixel; The diffusion brightness of the edge pixel is calculated based on the pixel position, target brightness, and point diffusion function of the diffusion pixel, as well as the pixel position of the edge pixel. Based on the target brightness and diffusion brightness of the edge pixels, edge brightness compensation is performed on the target image to obtain the corresponding projection image, and the projection image is displayed. The edge brightness compensation ensures that when the target brightness is less than the diffusion brightness, the projection brightness of the edge pixel is less than or equal to the target brightness, and when the target brightness is greater than the diffusion brightness, the projection brightness is greater than or equal to the target brightness. The projection brightness is used to represent the pixel brightness of the pixel in the projection image.

2. The brightness compensation method as described in claim 1, characterized in that, The step of determining the pixel position, target brightness, and point spread function of the diffusion pixel corresponding to the edge pixel based on the pixel position of the edge pixel and a preset point spread function list includes: Based on the pixel position of the edge pixel, a point spread function whose spread range covers the edge pixel is determined from a preset list of point spread functions; The pixel corresponding to the point diffusion function that covers the edge pixel is taken as the diffusion pixel corresponding to the edge pixel, and the pixel position and target brightness of the diffusion pixel are determined.

3. The brightness compensation method as described in claim 2, characterized in that, The step of determining, based on the pixel position of the edge pixel, a point spread function whose spread range covers the edge pixel from a preset list of point spread functions includes: Based on the pixel position of the edge pixel, the neighboring pixels of the edge pixel are determined, wherein the neighboring pixels include the edge pixel; From a preset list of point spread functions, determine the point spread function corresponding to the neighboring pixels, and from the point spread functions corresponding to the neighboring pixels, determine the point spread function whose spread range covers the edge pixels.

4. The brightness compensation method as described in claim 1, characterized in that, The step of determining the pixel position, target brightness, and point spread function of the diffusion pixel corresponding to the edge pixel based on the pixel position of the edge pixel and a preset point spread function list includes: Based on the pixel position of the edge pixel, the neighboring pixels of the edge pixel are determined, wherein the neighboring pixels include the edge pixel; The diffusion pixel corresponding to the edge pixel is determined from the neighboring pixels, and the pixel position and target brightness of the diffusion pixel are determined. From the preset list of point diffusion functions, determine the point diffusion function corresponding to the diffusion pixel.

5. The brightness compensation method as described in claim 4, characterized in that, The edge pixel information also includes the gradient magnitude of the edge pixel, and the step of determining the neighboring pixels of the edge pixel based on the pixel position of the edge pixel includes: The neighborhood position of the edge pixel is determined based on the pixel position of the edge pixel; The neighborhood size of the edge pixel is determined based on the gradient magnitude of the edge pixel. Based on the neighborhood position and neighborhood size of the edge pixel, the neighborhood of the edge pixel is constructed, and the neighboring pixels of the edge pixel are determined from the neighborhood of the edge pixel.

6. The brightness compensation method as described in claim 5, characterized in that, The edge pixel information also includes the gradient direction of the edge pixel, and the step of constructing the neighborhood of the edge pixel based on the neighborhood position and neighborhood size of the edge pixel includes: The neighborhood orientation of the edge pixel is determined based on the gradient direction of the edge pixel. The neighborhood of the edge pixel is constructed based on the neighborhood position, neighborhood size, and neighborhood orientation of the edge pixel.

7. The brightness compensation method as described in claim 1, characterized in that, The step of performing edge brightness compensation on the target image based on the target brightness and diffusion brightness of the edge pixels to obtain the projection image corresponding to the target image includes: Acquire ambient light information detected by an ambient light sensor, and determine a brightness compensation coefficient based on the ambient light information; The brightness compensation value of the edge pixel is calculated based on the target brightness and diffusion brightness of the edge pixel, as well as the brightness compensation coefficient. Based on the brightness compensation value of the edge pixels, edge brightness compensation is performed on the target image to obtain the projection image corresponding to the target image.

8. A head-up display, characterized in that, include: A memory, a processor, and a computer program stored in the memory and executable on the processor, wherein the computer program, when executed by the processor, implements the steps of the brightness compensation method as described in any one of claims 1 to 7.

9. A storage medium, characterized in that, The storage medium is a computer-readable storage medium, on which a computer program is stored, and when the computer program is executed by a processor, it implements the steps of the brightness compensation method as described in any one of claims 1 to 7.

10. A program product, characterized in that, The program product is a computer program product, which includes a computer program that, when executed by a processor, implements the steps of the brightness compensation method as described in any one of claims 1 to 7.

Citation Information

Patent Citations

  • Dimming method and device, electronic equipment and computer readable storage medium

    CN116092434A

  • Luminosity projection compensation for transparent head-up display (HUD)

    CN119065135A