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

The brightness compensation method based on edge detection and point spread function modeling solves the problem of blurred HUD projection images, improves image clarity and information readability, and enhances driving safety and human-computer interaction efficiency.

CN120735587AActive Publication Date: 2025-10-03GOERTEK OPTICAL TECH CO LTD
View PDF 5 Cites 0 Cited by

Patent Information

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

AI Technical Summary

Technical Problem

During the projection process of the head-up display (HUD), the inherent defects of multi-layer optical components cause light diffusion, resulting in blurred projected images and poor information readability, affecting the user's viewing experience and driving safety.

Method used

Through edge detection and point spread function modeling, the impact of optical diffusion on edge pixels is identified, and brightness compensation is dynamically adjusted to generate a clear image to be projected.

Benefits of technology

It significantly reduces image blur caused by optical component defects, improves the outline clarity and visual recognition of key driving information, improves user viewing experience, and enhances driving safety.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN120735587A_ABST
    Figure CN120735587A_ABST
Patent Text Reader

Abstract

The invention discloses a brightness compensation method, a head-up display, a storage medium and a program product, and relates to the technical field of head-up displayers, and the brightness compensation method is applied to the head-up display, and comprises the steps: carrying out the edge detection of a target image after a projection instruction of the target image is detected, obtaining pixel positions and target brightness of edge pixels in the target image; according to the pixel position of the edge pixel and a preset point spread function list, determining the pixel position of a diffusion pixel corresponding to the edge pixel, target brightness and a point spread function; according to the pixel position of the diffusion pixel, the target brightness, the point diffusion function and the pixel position of the edge pixel, the diffusion brightness of the edge pixel is calculated; and performing edge brightness compensation on the target image based on the target brightness and the diffusion brightness of the edge pixel to obtain a to-be-projected image corresponding to the target image, and performing projection display on the to-be-projected image. The projection image definition of the head-up display can be improved.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present application relates to the technical field of head-up displays, and in particular to a brightness compensation method, a head-up display, a storage medium, and a program product. Background Art

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

[0003] However, during the HUD projection imaging process, light emitted by the image generation unit passes through multiple optical components, including lenses, reflectors, and projection media, before reaching the user's eyes. During this light transmission process, inherent defects in optical components (such as lens surface deviations, uneven reflector coatings, surface microstructure defects in the windshield or combiner, internal impurities, or interlayer bonding deformation) can cause the light to become unfocused and diffuse. This ultimately results in a blurred projected image and poor information readability, seriously impacting the user's viewing experience and driving safety. Summary of the Invention

[0004] The main purpose of this application is to provide a brightness compensation method, which aims to solve the technical problems of blurred projection images and poor information readability of head-up displays.

[0005] To achieve the above objectives, the present application provides a brightness compensation method, which is applied to a head-up display and includes: After detecting the projection instruction of the target image, edge detection is performed on the target image to obtain edge pixel information of the target image, wherein the edge pixel information includes pixel positions and target brightness of the edge pixels, 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 according to the pixel position of the edge pixel and a preset point spread function list; Calculating the diffusion brightness of the edge pixel according to the pixel position, target brightness and point spread function of the diffusion pixel and the pixel position of the edge pixel; Based on the target brightness and diffuse brightness of the edge pixels, edge brightness compensation is performed on the target image to obtain an image to be projected corresponding to the target image, and the image to be projected is projected and displayed, wherein the edge brightness compensation ensures that when the target brightness of the edge pixels is less than the diffuse brightness, the projected brightness is less than or equal to the target brightness, and when the target brightness is greater than the diffuse 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.

[0006] 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: According to the pixel position of the edge pixel, determining a point spread function whose diffusion range covers the edge pixel from a preset point spread function list; The pixel corresponding to the point spread function whose diffusion range covers the edge pixel is used as the diffusion pixel corresponding to the edge pixel, and the pixel position and target brightness of the diffusion pixel are determined.

[0007] In one embodiment, the step of determining, based on the pixel positions of the edge pixels, a point spread function whose diffusion range covers the edge pixels from a preset point spread function list includes: Determining neighboring pixels of the edge pixel according to the pixel position of the edge pixel, wherein the neighboring pixels include the edge pixel; The point spread functions corresponding to the neighborhood pixels are determined from a preset point spread function list, and the point spread functions whose diffusion range covers the edge pixels are determined from the point spread functions corresponding to the neighborhood pixels.

[0008] 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: Determining neighboring pixels of the edge pixel according to the pixel position of the edge pixel, wherein the neighboring pixels include the edge pixel; Determining a diffusion pixel corresponding to the edge pixel from the neighborhood pixels, and determining a pixel position and a target brightness of the diffusion pixel; The point spread function corresponding to the diffusion pixel is determined from a preset point spread function list.

[0009] In one embodiment, the edge pixel information further includes a gradient magnitude of the edge pixel, and the step of determining the neighboring pixels of the edge pixel according to the pixel position of the edge pixel includes: Determining a neighborhood position of the edge pixel according to the pixel position of the edge pixel; Determining a neighborhood size of the edge pixel according to the gradient magnitude of the edge pixel; Based on the neighborhood position and neighborhood size of the edge pixel, a neighborhood of the edge pixel is constructed, and neighboring pixels of the edge pixel are determined from the neighborhood of the edge pixel.

[0010] In one embodiment, the edge pixel information further includes a 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: Determining a neighborhood orientation of the edge pixel according to a gradient direction of the edge pixel; A neighborhood of the edge pixel is constructed based on the neighborhood position, neighborhood size, and neighborhood orientation of the edge pixel.

[0011] In one embodiment, the step of performing edge brightness compensation on the target image based on the target brightness and diffuse brightness of the edge pixels to obtain the image to be projected corresponding to the target image includes: Acquiring ambient light information detected by an ambient light sensor, and determining a brightness compensation coefficient based on the ambient light information; Calculating a brightness compensation value of the edge pixel according to the target brightness and diffuse brightness of the edge pixel and the brightness compensation coefficient; Based on the brightness compensation values ​​of the edge pixels, edge brightness compensation is performed on the target image to obtain an image to be projected corresponding to the target image.

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

[0013] In addition, to achieve the above-mentioned purpose, the present application also provides a storage medium, which is a computer-readable storage medium. A computer program is stored on the computer-readable storage medium. When the computer program is executed by a processor, the steps of the brightness compensation method as described above are implemented.

[0014] In addition, to achieve the above-mentioned purpose, the present application also provides a program product, which is a computer program product. The computer program product includes a computer program, and when the computer program is executed by a processor, the steps of the brightness compensation method as described above are implemented.

[0015] To address the technical problem that during the projection process of a head-up display (HUD), inherent defects of multi-layer optical elements (such as lens surface deviation, uneven reflector coating, microstructure defects on the windshield or combiner surface, etc.) cause optical diffusion, resulting in blurred projected images and poor information readability, this application proposes a brightness compensation method based on a combination of image edge detection and point spread function modeling to effectively improve the clarity of the projected image and information readability. The brightness compensation method is applied to a head-up display and includes: after detecting a projection instruction of 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, and point spread function of the diffusion pixel, and the pixel position of the edge pixel; performing edge brightness compensation on the target image based on the target brightness and the diffusion brightness of the edge pixel to obtain an 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 the projection brightness of the edge pixel is less than or equal to the target brightness when the target brightness is less than the diffusion brightness, and is greater than or equal to the target brightness when the target brightness is greater than the diffusion brightness, and the projection brightness is used to represent the pixel brightness of the pixel in the image to be projected.

[0016] Specifically, after receiving the projection control instruction of the target image, the embodiment of the present application first performs edge detection on the target image and extracts the edge pixel information of the target image, including the pixel position and target brightness of the edge pixels. Then, based on the pixel position of the edge pixels and the preset point spread function list, the "diffusion pixels" whose optical diffusion will interfere with the brightness of the edge pixels are identified, and the corresponding point spread function is obtained. Then, based on the pixel position of the diffusion pixels and their target brightness, the point spread function is used 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, the projection brightness of the edge pixels is dynamically adjusted: when the target brightness is lower than the diffusion brightness, the projection brightness is appropriately reduced to suppress the blur diffusion effect, and when the target brightness is higher than the diffusion brightness, the projection brightness is appropriately increased to improve the edge contrast, thereby generating a brightness-compensated image to be projected and projecting it for display. The embodiments of the present application achieve precise modeling of the optical diffusion of the optical system at the image edge and proactively perform targeted brightness compensation on the edge area during the image generation phase, thereby significantly reducing image blur caused by defects in optical components and enhancing the contour 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 enhancing the efficiency of human-computer interaction. The embodiments of the present application have good engineering application value and promotion prospects. BRIEF DESCRIPTION OF THE DRAWINGS

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

[0018] In order to more clearly illustrate the embodiments of the present application or the technical solutions in the prior art, the following briefly introduces the drawings required for use in the embodiments or the description of the prior art. Obviously, the drawings described below are only some embodiments of the present application. For ordinary technicians in this field, other drawings can be obtained based on the structures shown in these drawings without paying any creative work.

[0019] Figure 1 A schematic diagram of a flow chart of the first embodiment of the brightness compensation method of the present application; Figure 2 This is a schematic diagram of the process of determining diffused pixels in the first embodiment of the brightness compensation method of the present application; Figure 3 A schematic diagram of a flow chart of a second embodiment of the brightness compensation method of the present application; Figure 4 A schematic diagram of a flow chart of a third embodiment of the brightness compensation method of the present application; Figure 5Schematic diagram of the device structure of the hardware operating environment of the head-up display involved in the brightness compensation method in the embodiment of the present application.

[0020] 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 DESCRIPTION

[0021] Exemplary embodiments will be described in detail herein, with examples illustrated in the accompanying drawings. In the following description, when referring to the drawings, identical numerals in different figures represent identical or similar elements, unless otherwise indicated. The embodiments described in the following exemplary embodiments are not intended to represent all embodiments consistent with the present application. Rather, they are merely examples of apparatus and methods consistent with certain aspects of the present application, as detailed in the appended claims.

[0022] It should be understood that the specific embodiments described herein are merely used to explain the technical solutions of the present application and are not intended to limit the present application.

[0023] A head-up display (HUD) uses optical projection technology to project key driving information (such as speed, navigation instructions, and driver assistance prompts) onto a transparent medium in front of the driver's field of view. This system plays an important role in improving driving safety and reducing the driver's tendency to shift their gaze.

[0024] However, in actual applications, due to the presence of optical components such as multi-layer lenses, reflectors, windshields or combiners in the HUD optical path, these components may have surface deviations, uneven coating, surface microstructure defects, internal impurities and other problems, resulting in unexpected diffusion of light, causing problems such as blurred images, unclear edges, and poor information readability, affecting the user's viewing experience and driving safety.

[0025] In this regard, the main solution of the embodiment of the present application is: after detecting the projection instruction of the target image, edge detection is performed 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; according to 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; according to 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 an image to be projected corresponding to the target image, and the image to be projected is projected and displayed, wherein the edge brightness compensation makes the projection brightness of the edge pixel 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, and the projection brightness is used to represent the pixel brightness of the pixel in the image to be projected.

[0026] After receiving the projection control instruction of the target image, the embodiment of the present application first performs edge detection on the target image and extracts the edge pixel information of the target image, including the pixel position and target brightness of the edge pixels. Then, based on the pixel position of the edge pixels and the preset point spread function list, the "diffusion pixels" whose optical diffusion will interfere with the brightness of the edge pixels are identified, and the corresponding point spread function is obtained. Then, based on the pixel position of the diffusion pixels and their target brightness, the point spread function is used 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, the projection brightness of the edge pixels is dynamically adjusted: when the target brightness is lower than the diffusion brightness, the projection brightness is appropriately reduced to suppress the blur diffusion effect, and when the target brightness is higher than the diffusion brightness, the projection brightness is appropriately increased to improve the edge contrast, thereby generating a brightness-compensated image to be projected and projecting it for display. The embodiments of the present application achieve precise modeling of the optical diffusion of the optical system at the image edge and proactively perform targeted brightness compensation on the edge area during the image generation phase, thereby significantly reducing image blur caused by defects in optical components and enhancing the contour 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 enhancing the efficiency of human-computer interaction. The embodiments of the present application have good engineering application value and promotion prospects.

[0027] In order to better understand the technical solution of the present application, a detailed description will be given below in conjunction with the accompanying drawings and specific implementation methods.

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

[0029] Please refer to Figure 1 , Figure 1 A flowchart of the first embodiment of the brightness compensation method of the present application is provided.

[0030] In this embodiment, the brightness compensation method is applied to a head-up display, and the method may include steps S100 to S300: Step S100, after detecting the projection instruction of the target image, edge detection is performed 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; Those skilled in the art will appreciate that edge detection is an image processing technique used to identify locations in an image where grayscale levels change dramatically. These locations usually correspond to object contours or boundaries.

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

[0032] Since the HUD system is mainly used to display key driving information, which often relies on clear edges to convey accurate content, this embodiment first performs edge detection on the target image after detecting the projection instruction of the target image, and extracts edge pixel information, including the pixel position and target brightness of the edge pixels, so as to accurately locate the key driving information, ensure that subsequent image processing is concentrated on the visual elements corresponding to the key driving information, thereby improving the pertinence and efficiency of brightness compensation, avoiding unnecessary full-image processing, and reducing the consumption of computing resources. The projected image finally displayed on the projection medium is sharper and clearer at the edges of the visual elements corresponding to the key driving information, effectively improving the information readability of the projected image, and improving the speed and accuracy of the driver's acquisition of key driving information.

[0033] In addition, processing only edge pixels means that brightness compensation is mainly concentrated on important structural features of the image rather than the entire image area. This helps to suppress noise amplification in non-critical areas and reduce the risk of information misreading due to background clutter or poor lighting conditions. While maintaining overall image quality, it highlights key driving information and enhances the overall readability of the projected image.

[0034] It's worth noting that in this embodiment, the operator size and gradient amplitude threshold used in edge detection can be adjusted based on actual needs (a pixel is considered an edge pixel when its gradient amplitude exceeds the gradient amplitude threshold). For example, when ambient light is sufficient and the illuminance is greater than or equal to a preset value, a first operator size and a first gradient amplitude threshold are used. When ambient light is low and the illuminance is less than the preset value, a second operator size and a second gradient amplitude threshold are used. The first operator size is larger than the second operator size, and the first gradient amplitude threshold is smaller than the second gradient amplitude threshold. Under ambient light, the projected image of a head-up display (HUD) 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 ambient light is high, it's necessary to proactively increase the operator size and lower the gradient amplitude threshold to include more pixels at the edge in brightness compensation, thereby counteracting the effects of ambient light on projected image clarity.

[0035] Step S200 , determining the pixel position, target brightness, and point spread function of the diffusion pixel according to the pixel position of the edge pixel and a preset point spread function list; Those skilled in the art will appreciate that the point spread function describes the distribution of an image formed after an ideal point light source passes through an optical system, and reflects how the optical system diffuses light.

[0036] In this embodiment, the PSF list consists of a set of pre-calculated PSFs. In this embodiment, the PSFs at each pixel of the HUD are pre-calibrated using a dot-matrix light pattern or a structured light pattern under darkroom conditions. These PSFs are then integrated into the PSF list for the HUD, facilitating the search for the required PSFs during brightness compensation.

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

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

[0039] For example, Figure 2 As shown, in a first feasible implementation manner, step S200 may include steps S210 to S220: Step S210 , determining a point spread function whose diffusion range covers the edge pixels from a preset point spread function list according to the pixel positions of the edge pixels; Step S220 : taking the pixel corresponding to the point spread function whose diffusion range covers the edge pixel as the diffusion pixel corresponding to the edge pixel, and determining the pixel position and target brightness of the diffusion pixel.

[0040] It should be noted that the diffusion range refers to the physical spatial range in which the light emitted or reflected from a certain pixel in an optical system does not only act on its original position on the final imaging surface, but will diffuse into a certain surrounding area due to the inherent defects or non-ideal imaging characteristics of optical components (such as lenses, reflectors, windshields, etc.).

[0041] 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 the pixel position. The point spread function is usually presented in the form of a two-dimensional matrix. In the 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 combining the effective area with the specific pixel position, the diffusion range of the point spread function at the pixel position can be determined.

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

[0043] Each position of the matrix corresponds to a pixel position. The area in the matrix where the value is greater than or equal to 0.1 is the effective area of ​​the point spread function. The center position of the matrix (that is, the position where the number 0.6 is located in the matrix) corresponds to the pixel position (100,100) of pixel A. Therefore, the diffusion range of the point spread function includes the following pixel positions: (99,99), (99,100), (100,100), (101,100) and (100,101).

[0044] On this basis, if the pixel position of the edge pixel is any pixel position included in the diffusion range of the point spread function, it can be determined that the edge pixel is covered by the diffusion range of the point spread function.

[0045] In this embodiment, when the PSF list stores only unique PSFs, the diffusion range of the PSF at each pixel position can be pre-calculated based on the association between the PSF and the pixel position, and an association between the PSF, pixel position, and diffusion range can be established. Accordingly, in step S220, when the pixel corresponding to the PSF whose diffusion range covers the edge pixel is determined as the diffusion pixel corresponding to the edge pixel, the pixel that is actually associated with the PSF and the diffusion range is determined as the diffusion pixel corresponding to the edge pixel.

[0046] It is worth mentioning that the diffusion range of the point spread function at each pixel position can also 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 greater the target brightness, the smaller the preset value.

[0047] This embodiment introduces "diffusion range" as a screening criterion for diffusion pixels. Compared to the method of directly using the neighboring pixels of edge pixels as diffusion pixels, it can ensure that pixels that have real optical diffusion behavior with edge pixels are accurately matched as diffusion pixels, thereby improving the accuracy of diffusion pixel selection and diffusion brightness calculation, while avoiding the introduction of irrelevant pixels and wasting the extremely limited computing resources of the head-up display itself.

[0048] Furthermore, in a feasible implementation, step S210 may include steps S211 and S212: Step S211, determining neighboring pixels of the edge pixel according to the pixel position of the edge pixel, wherein the neighboring pixels include the edge pixel; Those skilled in the art will recognize that in image processing, a neighborhood refers to a pixel area of ​​a certain shape and size surrounding a central pixel. Typically, the neighborhood of a central pixel is defined by extending a number of pixels in all directions from the central pixel, such as a 3×3, 5×5, or circular rectangle. Neighborhood pixels are pixels belonging to this neighborhood.

[0049] Step S212 : determining the point spread functions corresponding to the neighboring pixels from a preset point spread function list, and determining the point spread functions whose diffusion range covers the edge pixels from the point spread functions corresponding to the neighboring pixels.

[0050] 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 by first determining the neighboring pixels of the edge pixel and then searching for a PSF whose diffusion range covers the edge pixel from the PSFs corresponding to these neighboring pixels. Since the pixels most likely to cause optical diffusion to edge pixels are usually concentrated in their neighborhood, the search method of this embodiment fully utilizes the local characteristics of the neighboring pixels, limiting the global search process originally oriented towards the entire PSF list to matching operations only within the limited set of PSFs corresponding to the neighboring pixels. This improvement significantly reduces the search space while ensuring the brightness compensation effect, avoids the large amount of redundant calculations 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.

[0051] For example, in a second feasible implementation manner, step S200 may further include steps S230 to S250: Step S230, determining neighboring pixels of the edge pixel according to the pixel position of the edge pixel, wherein the neighboring pixels include the edge pixel; Step S240, determining the diffusion pixel corresponding to the edge pixel from the neighborhood pixels, and determining the pixel position and target brightness of the diffusion pixel; Step S250 : determining the point spread function corresponding to the diffused pixel from a preset point spread function list.

[0052] This implementation proposes a technique for filtering diffuse pixels based on their neighborhood and then matching the corresponding point spread functions (PSFs). Compared to implementations that directly search for a diffusion range covering an 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 optical systems. It first determines the set of neighboring pixels of the edge pixel, identifies the diffuse pixels that have an optical diffusion effect on the current edge pixel, and ultimately matches their corresponding PSFs, making the brightness compensation process more realistic for real-world imaging physics.

[0053] The unique contribution of this technical solution lies in: on the one hand, it effectively narrows the search space, limiting the global matching originally targeting the entire PSF list to local matching only within the neighborhood range, significantly reducing the algorithm complexity and improving processing efficiency, and is particularly suitable for application scenarios with high real-time requirements such as in-vehicle HUD; on the other hand, by introducing a neighborhood pixel analysis mechanism, it enhances the modeling ability of local optical properties, improves the accuracy and robustness of brightness compensation, and avoids over-compensation or under-compensation caused by the misselection of irrelevant pixels, thereby improving the adaptability and stability of the system while ensuring image quality.

[0054] It is worth noting that in this embodiment, when determining diffusion pixels from neighboring pixels in step S240, all neighboring pixels may be determined as diffusion pixels for the edge pixel. Alternatively, weights may be dynamically calculated based on the distance between the neighboring pixels and the edge pixel and the target brightness difference, thereby determining neighboring pixels with weights greater than a preset weight, or neighboring pixels ranked in the top n (n is an integer) weights from largest to smallest, as diffusion pixels for the edge pixel. It is readily understood that the smaller the distance between the neighboring pixels and the edge pixel and the greater the target brightness difference, the greater the calculated weight.

[0055] Step S300 , calculating the diffusion brightness of the edge pixel based on the pixel position of the diffusion pixel, the target brightness and the point spread function, and the pixel position of the edge pixel; It should be noted that diffuse brightness refers to the actual brightness level of a pixel in the projected image, taking into account the optical diffusion effect of surrounding diffuse pixels and without brightness compensation. This diffuse brightness is calculated based on the original target brightness and the effect of optical diffusion of surrounding diffuse pixels.

[0056] In this embodiment, the corresponding point spread function can be applied to the diffusion pixels of the edge pixel to calculate the brightness component of the target brightness of each diffusion pixel at the edge pixel, thereby summing up to obtain 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. Then, the diffuse brightness of pixel A = 10*0.5 + 20*0.2 = 9.

[0057] It should be noted that the application basis of the point spread function is physical brightness in nits. Therefore, when the target brightness represents the brightness level rather than the physical brightness, it is necessary to first convert the target brightness from the brightness level to the 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 diffuse brightness. Persons skilled in the art have conducted in-depth research on this, and this embodiment will not be elaborated on in detail.

[0058] Step S400: Perform edge brightness compensation on the target image based on the target brightness and diffuse brightness of the edge pixels to obtain an image to be projected corresponding to the target image, and project the image to be projected for display. The edge brightness compensation ensures that when the target brightness of the edge pixels is less than the diffuse brightness, the projected brightness is less than or equal to the target brightness, and when the target brightness is greater than the diffuse 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.

[0059] After determining the target brightness and diffuse brightness of the edge pixels, this embodiment can dynamically adjust the projection brightness of the edge pixels in the final projection output by comparing the target brightness and the diffuse brightness, thereby offsetting the influence of the diffusion effect of the optical system, achieving edge brightness compensation for the target image, improving the imaging clarity of the projected image at the edge of the visual element, reducing the image blur problem caused by defects in the optical element, and enhancing information readability.

[0060] In this embodiment, the edge brightness compensation mechanism can actively correct the brightness distortion caused by optical diffusion during the image rendering stage, thereby significantly improving the clarity and sharpness of the image edges. Specifically: When the target brightness is lower than the diffuse brightness, the projection brightness is reduced to prevent edge pixels from being overwhelmed by diffuse light due to excessive brightness, thus avoiding image blur. When the target brightness is greater than the diffuse brightness, increasing the projection brightness can enhance the contrast between the edge and the background and improve visual recognition.

[0061] In addition, this brightness compensation strategy only works on the edge areas of the image, taking into account both image quality improvement and resource overhead control, and has good engineering practicality.

[0062] After receiving a projection control instruction for a target image, this embodiment first performs edge detection on the target image and extracts edge pixel information of the target image, including the pixel positions and target brightness of the edge pixels. Then, based on the pixel positions of the edge pixels and a preset list of point spread functions, "diffusion pixels" whose brightness is affected by optical diffusion are identified and their corresponding point spread functions are obtained. Next, based on the pixel positions of the diffusion pixels and their target brightness, the point spread functions are used to estimate the diffuse brightness of the edge pixels after optical diffusion under the current optical system. Finally, by comparing the difference between the target brightness and the diffuse brightness of the edge pixels, the projection brightness of the edge pixels is dynamically adjusted: when the target brightness is lower than the diffuse brightness, the projection brightness is appropriately reduced to suppress the blurring diffusion effect; when the target brightness is higher than the diffuse brightness, the projection brightness is appropriately increased to improve edge contrast, thereby generating a brightness-compensated image to be projected and projecting it for display. The embodiments of the present application achieve precise modeling of the optical diffusion of the optical system at the image edge and proactively perform targeted brightness compensation on the edge area during the image generation phase, thereby significantly reducing image blur caused by defects in optical components and enhancing the contour 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 enhancing the efficiency of human-computer interaction. The embodiments of the present application have good engineering application value and promotion prospects.

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

[0064] Please refer to Figure 3 , Figure 3 This is a flowchart diagram of the second embodiment of the brightness compensation method of the present application.

[0065] In the second embodiment of the present application, for the same or similar contents as those in the above embodiments, please refer to the above introduction and will not be repeated hereafter.

[0066] In this embodiment, the step of performing edge brightness compensation on the target image based on the target brightness and diffuse brightness of the edge pixels in step S400 to obtain the image to be projected corresponding to the target image may include steps S410 to S430: Step S410, obtaining ambient light information detected by the ambient light sensor, and determining a brightness compensation coefficient according to the ambient light information; 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. It can sense the brightness of the current driving environment in real time (as reflected by illuminance or brightness). Ambient light information refers to the data collected and output by the ambient light sensor that represents the current brightness level (i.e., ambient light intensity).

[0067] It's also important to note that the brightness compensation coefficient is a dynamically adjusted parameter, its value directly related to the golden light information. It's used to quantify the severity of the ambient light's impact on projected image clarity, thereby adjusting the intensity of subsequent brightness compensation. Stronger ambient light (for example, direct midday sunlight) typically causes more significant negative effects on the projected image, such as blurring and reduced contrast. In these cases, a larger brightness compensation coefficient is required to drive stronger compensation to counteract the adverse effects of ambient light. Conversely, when ambient light is weak (for example, at night or in tunnels), the brightness compensation coefficient is reduced accordingly to avoid over-compensation that could lead to image distortion or waste of resources.

[0068] It is not difficult to understand that this embodiment can pre-calibrate the relationship between ambient light information and the brightness compensation coefficient, and express the relationship in the form of a mapping table or a data function, so that in actual 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.

[0069] Step S420, calculating a brightness compensation value of the edge pixel according to the target brightness and diffuse brightness of the edge pixel and a brightness compensation coefficient; It should be noted that the brightness compensation value refers to the adjustment amount that needs to be applied to the original target brightness of the edge pixels to offset the optical diffusion effect and the influence of ambient light (a positive value indicates an increase in brightness, and a negative value indicates a decrease in brightness). The core of this step is to integrate the brightness compensation coefficient determined in step S410, which reflects the ambient light intensity, 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 for the optical diffusion effect), but is also modulated by 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 a final brightness compensation value that is adapted to the current ambient light conditions.

[0070] 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 calculate the brightness compensation value when the target brightness of an edge pixel is less than the diffuse brightness, while the second brightness compensation coefficient is used to calculate the brightness compensation value when the target brightness of an edge pixel is greater than the diffuse brightness. This is because, under the same ambient light adjustment, the ambient light has a non-uniform effect on the bright side of the edge (i.e., edge pixels with a target brightness greater than the diffuse brightness) and the dark side (i.e., edge pixels with a target brightness less than the diffuse brightness) in the image, requiring a differentiated response to achieve more accurate brightness compensation.

[0071] Step S430 : performing edge brightness compensation on the target image based on the brightness compensation values ​​of the edge pixels to obtain an image to be projected corresponding to the target image.

[0072] By incorporating ambient light information and dynamically determining the brightness compensation coefficient based on it, 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 transitioning from cloudy to strong sunlight) and automatically adjust the compensation intensity (brightness compensation value). This eliminates the need for a static brightness compensation strategy, instead enabling it to intelligently respond to the intensity of actual ambient light interference, ensuring that the edges of critical driving information remain sharp and legible in a variety of complex lighting scenarios (strong light, weak light, and rapidly changing light conditions).

[0073] Ambient light (especially strong ambient light) is one of the main external factors that cause HUD projected image blur and reduced contrast. Its impact is often superimposed on 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 that cause projected image blur. This dual countermeasure mechanism significantly improves the visual clarity and robustness of projected images under complex and changing ambient light conditions, especially strong ambient light conditions.

[0074] Furthermore, while this embodiment inherits the computational efficiency advantage of the first embodiment, which only processes edge pixels and avoids full-image processing, the newly added ambient light information acquisition and brightness compensation coefficient calculation processes themselves have manageable computational overhead (typically involving a simple table lookup or linear mapping). More importantly, by dynamically adjusting the compensation strength based on ambient light intensity, this avoids unnecessary strong compensation calculations in low-light environments, or the need for subsequent remedial processing due to insufficient compensation in bright light environments. This maintains efficient overall utilization of system resources, meeting the real-time and low-power requirements of automotive HUDs.

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

[0076] Please refer to Figure 4 , Figure 4 This is a flowchart diagram of the third embodiment of the brightness compensation method of the present application.

[0077] In the third embodiment of the present application, for the same or similar contents as those in the above embodiments, please refer to the above introduction and will not be repeated hereafter.

[0078] In this embodiment, the edge pixel information further includes the gradient magnitude of the edge pixel. The step of determining the neighboring pixels of the edge pixel according to the pixel position of the edge pixel may include steps S260 to S280: Step S260, determining the neighborhood position of the edge pixel according to the pixel position of the edge pixel; It should be noted that the neighborhood position refers to the position of the neighborhood, which is generally represented by the pixel position of the center pixel of the neighborhood. In this embodiment, the center pixel of the neighborhood of an edge pixel is the edge pixel, so the neighborhood position of the edge pixel can be represented by the pixel position of the edge pixel.

[0079] Step S270, determining the neighborhood size of the edge pixel according to the gradient magnitude of the edge pixel; It should be noted that the neighborhood size refers to the size of the neighborhood, which indicates the range of the neighborhood constructed around the neighborhood position in the image space, usually expressed in pixels. For a regular neighborhood, such as a rectangular neighborhood, its size can be expressed by the number of pixels corresponding to its length and width. For a circular neighborhood, its size can be expressed by the number of pixels corresponding to its radius or diameter. For a prismatic neighborhood, its size can be expressed by the number of pixels corresponding to its long diagonal and short diagonal. For an irregular neighborhood, it can be expressed by the number of pixels corresponding to its area, which is not specifically limited in this embodiment.

[0080] Those skilled in the art will recognize that the gradient magnitude is a quantitative indicator calculated during edge detection that represents the severity of the grayscale change at a 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 more gradual grayscale change and a blurrier or wider edge.

[0081] It should be noted that the larger the gradient amplitude of the edge pixel, the steeper the image grayscale change and the greater the brightness difference of the surrounding pixels. Correspondingly, the optical diffusion of the high-brightness pixel has a more obvious impact on the brightness of the surrounding pixels, and even pixels farther away will be affected by non-negligible brightness interference. Therefore, a larger neighborhood size is needed to ensure that these potential diffusion-affected source pixels with potentially wide spatial distribution can be covered. That is, the larger the gradient amplitude of the edge pixel, the larger the corresponding neighborhood size should be.

[0082] Step S280 : constructing a neighborhood of the edge pixel based on the neighborhood position and neighborhood size of the edge pixel, and determining neighboring pixels of the edge pixel from the neighborhood of the edge pixel.

[0083] This embodiment abandons the traditional approach of fixed-size neighborhoods and innovatively uses the gradient amplitude of the edge pixels themselves as the core basis for determining the neighborhood size. This makes the construction of the neighborhood no longer mechanical and one-size-fits-all, but can intelligently respond to the actual differences in the local edge characteristics of the image (i.e., brightness differences). For edges with large brightness differences (edge ​​pixels with high gradient amplitudes), a large neighborhood is used to ensure that pixels in a wider area that may be affected by optical diffusion are covered; for edges with small brightness differences (edge ​​pixels with low gradient amplitudes), a small neighborhood is used to focus on the closest pixels with the most direct impact. This dynamic adjustment mechanism significantly improves the fit between neighborhood construction and the physical behavior of real optical diffusion.

[0084] The rationality of the neighborhood size directly determines the accuracy of subsequent diffuse pixel identification (whether based on PSF search or neighborhood screening). Fixed-size neighborhoods are prone to inaccuracy in images with large differences in edge characteristics: small neighborhoods may miss distant diffuse pixels that have a significant impact on edges with large brightness differences, resulting in insufficient compensation; large neighborhoods may introduce too many irrelevant pixels at edges with small brightness differences, increasing noise interference or computational redundancy, and even leading to overcompensation. This embodiment dynamically adjusts the neighborhood size by gradient amplitude to accurately match the actual requirements of the optical diffusion influence range of edges with different degrees of brightness difference, thereby optimizing the recognition accuracy of diffuse pixels at the root. This is directly transmitted to the subsequent brightness compensation calculation, ensuring that the compensation effect can be more accurately applied to truly relevant pixels, significantly improving the effectiveness and reliability of the final edge clarity compensation.

[0085] In a feasible implementation, the edge pixel information further includes the gradient direction of the edge pixel, and step S280 may include steps S281 to S282: Step S281, determining the neighborhood orientation of the edge pixel according to the gradient direction of the edge pixel; Step S282: constructing a neighborhood of the edge pixel based on the neighborhood position, neighborhood size, and neighborhood orientation of the edge pixel.

[0086] Those skilled in the art will recognize that the gradient direction is the vector angle (usually expressed as an angle with the horizontal axis) calculated during edge detection, indicating the direction of the fastest grayscale change at the edge pixel. It is perpendicular to the tangent direction of the local edge in the image and points in the direction of the fastest grayscale increase.

[0087] It should be noted that the 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 neighborhood with an orientation, such as a prismatic neighborhood or an elliptical neighborhood. For a prismatic neighborhood, its orientation refers to the extension direction of its long diagonal line, and for an elliptical neighborhood, its orientation refers to the extension direction of its long axis.

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

[0089] By explicitly defining the orientation of a prismatic neighborhood as its long diagonal and that of an elliptical neighborhood as its long axis, and aligning these orientations with the gradient direction, this implementation ensures that the constructed non-isotropic neighborhood can most effectively characterize the spatial distribution characteristics of optical diffusion at the edge location. The long diagonal / long axis direction represents the dimension in the neighborhood morphology where the influence of light intensity diffusion propagates the farthest and has the greatest potential impact. Aligning this with the gradient direction (the primary diffusion direction) maximizes the neighborhood's spatial coverage of diffusion source pixels along this primary direction that could significantly interfere with the brightness of the current edge pixel, while minimizing the introduction of irrelevant pixels along secondary directions.

[0090] It is worth mentioning that when the neighborhood of an edge pixel is a prismatic neighborhood, an elliptical neighborhood, or even an irregular neighborhood, pixels with more than 50% of their area within the neighborhood can be used as neighboring pixels of the edge pixel. Alternatively, only pixels with all their area within the neighborhood can be used as neighboring pixels of the edge pixel. The specific ratio can be flexibly adjusted according to actual needs.

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

[0092] In addition, please refer to Figure 5 , Figure 5 Schematic diagram of the device structure of the hardware operating environment of the head-up display involved in the brightness compensation method in the embodiment of the present application.

[0093] The present 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 that can be executed by the at least one processor, and the instructions 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 embodiment.

[0094] Reference below Figure 5 , which shows a structural schematic diagram of a head-up display suitable for implementing an embodiment of the present application. Figure 5 The head-up display shown is only an example and should not limit the functions and scope of use of the embodiments of the present application.

[0095] like Figure 5As shown, the head-up display may include a processing device 1001 (e.g., a central processing unit, a graphics processing unit, etc.), which can perform various appropriate actions and processes based on programs stored in a read-only memory 1002 or programs 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 head-up display. 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 may be connected to the input / output interface 1006: an input device 1007 including, for example, a touchscreen, touchpad, keyboard, mouse, image sensor, microphone, accelerometer, gyroscope, etc.; an output device 1008 including, for example, a liquid crystal display (LCD), speaker, vibrator, etc.; a storage device 1003 including, for example, a magnetic tape or hard disk; and a communication device 1009. The communication device 1009 can allow the head-up display to communicate with other devices wirelessly or wired to exchange data. Although the figure shows a head-up display with various systems, it should be understood that it is not required to implement or have all the systems shown. More or fewer systems can be implemented or have instead.

[0096] In particular, according to the embodiments disclosed in the present application, the processes described above with reference to the flowcharts can be implemented as computer software programs. For example, the embodiments disclosed in the present application include a computer program product comprising a computer program carried on a computer-readable medium, the computer program comprising program code for executing the method shown in the flowchart. In such an embodiment, the computer program can be downloaded and installed from a network via a communication device, or installed from a storage device 1003, or installed from a read-only memory 1002. When the computer program is executed by the processing device 1001, the above-mentioned functions defined in the method of the embodiment disclosed in the present application are performed.

[0097] The heads-up display provided in this application utilizes the brightness compensation method described in the aforementioned embodiments to address the technical issues of blurred projected images and poor information readability in heads-up displays. Compared to the prior art, the benefits of the heads-up display provided in this application are the same as those of the brightness compensation method described in the aforementioned embodiments. Other technical features of the heads-up display are the same as those disclosed in the aforementioned embodiments and are not further elaborated here.

[0098] 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 one or more embodiments or examples in a suitable manner.

[0099] The above are merely specific embodiments of the present application, but the scope of protection of the present application is not limited thereto. Any modifications or substitutions that can be easily conceived by a person skilled in the art within the technical scope disclosed in this application should be included in the scope of protection of this application. Therefore, the scope of protection of this application should be based on the scope of protection of the above claims.

[0100] In addition, the present application also provides a storage medium, which is a computer-readable storage medium having computer-readable program instructions (ie, a computer program) stored thereon, and the computer-readable program instructions are used to execute the steps of the brightness compensation method in the above embodiment.

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

[0102] The above-mentioned storage medium may be included in the head-up display or the head-up display; or may exist independently without being assembled into the head-up display or the head-up display.

[0103] The storage medium carries one or more programs. When executed by a head-up display, the one or more programs cause the head-up display to: after detecting a projection instruction for a target image, perform 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; determine 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; calculate the diffusion brightness of 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; perform edge brightness compensation on the target image based on the target brightness and the diffusion brightness of the edge pixel to obtain a to-be-projected image corresponding to the target image, and project and display the to-be-projected image, wherein the edge brightness compensation ensures that the projection brightness of the edge pixel is less than or equal to the target brightness when the target brightness is less than the diffusion brightness, and is greater than or equal to the target brightness when the target brightness is greater than the diffusion brightness, and the projection brightness is used to represent the pixel brightness of the pixel in the to-be-projected image.

[0104] Computer program code for performing the operations of the present application may be written in one or more programming languages, or a combination thereof, including object-oriented programming languages ​​such as Java, Smalltalk, C++, and conventional procedural programming languages ​​such as "C" or similar programming languages. The program code may be executed entirely on the user's computer, partially on the user's computer, as a stand-alone 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 a remote computer, the remote computer may be connected to the user's computer via any type of network, including a local area network or a wide area network, or may be connected to an external computer (e.g., via the Internet using an Internet service provider).

[0105] The flow charts and block diagrams in the accompanying drawings illustrate the possible architecture, functions and operations of the systems, methods and computer program products according to various embodiments of the present application. In this regard, each box in the flow chart or block diagram can represent a module, program segment or a part of code, and the module, program segment or a part of code contains one or more executable instructions for realizing the specified logical function. It should also be noted that in some alternative implementations, the functions marked in the box can also occur in a different order than that marked in the accompanying drawings. For example, two boxes represented in succession can actually be executed substantially in parallel, and they can sometimes be executed in the opposite order, depending on the functions involved. It should also be noted that each box in the block diagram and / or flow chart, and the combination of the boxes in the block diagram and / or flow chart can be implemented by a dedicated hardware-based system that performs the specified function or operation, or can be implemented by a combination of dedicated hardware and computer instructions.

[0106] The modules described in the embodiments of the present application may be implemented in software or hardware, wherein the name of a module does not necessarily limit the unit itself.

[0107] The storage medium provided herein stores computer-readable program instructions (i.e., a computer program) for executing the steps of the aforementioned brightness compensation method. This storage medium can address the technical issues of blurred projected images and poor information readability in heads-up displays (HUDs). Compared to existing technologies, the beneficial effects of the storage medium provided herein are similar to those of the brightness compensation method provided in the aforementioned embodiments and are not further elaborated here.

[0108] In addition, an embodiment of the present application further provides a program product, which is a computer program product and includes a computer program. When the computer program is executed by a processor, the steps of the brightness compensation method in the above embodiment are implemented.

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

[0110] The above description is only part of the embodiments of the present application and does not limit the patent scope of the present application. All equivalent structural transformations made by using the contents of the present application specification and drawings under the technical concept of the present application, or direct / indirect application in other related technical fields are included in the patent protection scope of the present 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 instruction of the target image, edge detection is performed on the target image to obtain edge pixel information of the target image, wherein the edge pixel information includes pixel positions and target brightness of the edge pixels, 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 according to the pixel position of the edge pixel and a preset point spread function list; Calculating the diffusion brightness of the edge pixel according to the pixel position, target brightness and point spread function of the diffusion pixel and the pixel position of the edge pixel; Based on the target brightness and diffuse brightness of the edge pixels, edge brightness compensation is performed on the target image to obtain an image to be projected corresponding to the target image, and the image to be projected is projected and displayed, wherein the edge brightness compensation ensures that when the target brightness of the edge pixels is less than the diffuse brightness, the projected brightness is less than or equal to the target brightness, and when the target brightness is greater than the diffuse 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.

2. The brightness compensation method according to claim 1, wherein: The step of determining the pixel position, target brightness, and point spread function of the diffusion pixel corresponding to the edge pixel according to the pixel position of the edge pixel and a preset point spread function list includes: According to the pixel position of the edge pixel, determining a point spread function whose diffusion range covers the edge pixel from a preset point spread function list; The pixel corresponding to the point spread function whose diffusion range covers the edge pixel is used 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 according to claim 2, wherein: The step of determining, based on the pixel positions of the edge pixels, a point spread function whose diffusion range covers the edge pixels from a preset point spread function list comprises: Determining neighboring pixels of the edge pixel according to the pixel position of the edge pixel, wherein the neighboring pixels include the edge pixel; The point spread functions corresponding to the neighborhood pixels are determined from a preset point spread function list, and the point spread functions whose diffusion range covers the edge pixels are determined from the point spread functions corresponding to the neighborhood pixels.

4. The brightness compensation method according to claim 1, wherein: The step of determining the pixel position, target brightness, and point spread function of the diffusion pixel corresponding to the edge pixel according to the pixel position of the edge pixel and a preset point spread function list includes: Determining neighboring pixels of the edge pixel according to the pixel position of the edge pixel, wherein the neighboring pixels include the edge pixel; Determining a diffusion pixel corresponding to the edge pixel from the neighborhood pixels, and determining a pixel position and a target brightness of the diffusion pixel; The point spread function corresponding to the diffusion pixel is determined from a preset point spread function list.

5. The brightness compensation method according to claim 4, wherein: The edge pixel information further includes the gradient magnitude of the edge pixel. The step of determining the neighboring pixels of the edge pixel according to the pixel position of the edge pixel includes: Determining a neighborhood position of the edge pixel according to the pixel position of the edge pixel; Determining a neighborhood size of the edge pixel according to the gradient magnitude of the edge pixel; Based on the neighborhood position and neighborhood size of the edge pixel, a neighborhood of the edge pixel is constructed, and neighboring pixels of the edge pixel are determined from the neighborhood of the edge pixel.

6. The brightness compensation method according to claim 5, wherein: The edge pixel information further includes the gradient direction of the edge pixel. The step of constructing the neighborhood of the edge pixel based on the neighborhood position and neighborhood size of the edge pixel includes: Determining a neighborhood orientation of the edge pixel according to a gradient direction of the edge pixel; A 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 according to claim 1, wherein: The step of performing edge brightness compensation on the target image based on the target brightness and the diffuse brightness of the edge pixels to obtain an image to be projected corresponding to the target image includes: Acquiring ambient light information detected by an ambient light sensor, and determining a brightness compensation coefficient based on the ambient light information; Calculating a brightness compensation value of the edge pixel according to the target brightness and diffuse brightness of the edge pixel and the brightness compensation coefficient; Based on the brightness compensation values ​​of the edge pixels, edge brightness compensation is performed on the target image to obtain an image to be projected 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 when the computer program is executed by the processor, the steps of the brightness compensation method according to any one of claims 1 to 7 are implemented.

9. A storage medium, characterized in that: The storage medium is a computer-readable storage medium having a computer program stored thereon. When the computer program is executed by a processor, the steps of the brightness compensation method according to any one of claims 1 to 7 are implemented.

10. A program product, characterized in that The program product is a computer program product, which includes a computer program. When the computer program is executed by a processor, the steps of the brightness compensation method according to any one of claims 1 to 7 are implemented.

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

  • Brightness compensation method and device, equipment and storage medium

    CN119207257A

  • Method for acquiring backlight diffusion transmission parameter, display control method and display control device

    US20190353961A1

  • Display device for vehicle

    WO2025100760A1