A method, system, and storage medium for vehicle headlight imaging correction based on grayscale modulation.

By using a grayscale modulation-based vehicle headlight imaging correction method, the grayscale matrix of the vehicle headlight is adjusted using a correction factor and an illuminance distribution matrix, which solves the problem of illuminance non-uniformity in the vehicle headlight projection system and improves the safety of nighttime driving.

CN119172509BActive Publication Date: 2026-01-06ZHEJIANG JIALI LISHUI IND
View PDF 0 Cites 0 Cited by

Patent Information

Application Number
CN202411669135.7
Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
Filing Date
2024-11-21
Publication Date
2026-01-06
Estimated Expiration
2044-11-21

AI Technical Summary

Technical Problem

Existing automotive lighting projection systems suffer from uneven projection illumination, making it difficult for drivers to spot pedestrians or vehicles at a distance at night, which can easily lead to traffic accidents.

Method used

A vehicle headlight imaging correction method based on grayscale modulation is adopted. By calculating the correction factor and the illuminance distribution matrix, the grayscale matrix of the vehicle headlight is adjusted to achieve illuminance uniformity correction. This includes calculating the correction factor based on the imaging surface roughness, light intensity and illuminance uniformity, constructing the illuminance distribution matrix of the tilt projection system, and performing grayscale modulation through pulse width modulation.

Benefits of technology

It effectively improves the uniformity of illumination of the headlight projection image, solves the problem of uneven illumination where the near side is brighter and the far side is darker, improves the driver's visibility at night, and reduces the risk of traffic accidents.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN119172509B_ABST
    Figure CN119172509B_ABST
Patent Text Reader

Abstract

The application discloses a kind of vehicle lamp imaging correction method and system based on gray scale modulation and storage medium, its method includes steps: according to the gray matrix of input image, the illumination of each pixel point on the image plane before and after tilting is obtained;According to the roughness of imaging surface and / or illumination intensity and / or illumination uniformity, the correction factor of each pixel point illumination is calculated;According to the illumination of each pixel point on the image plane when not tilting and the correction factor, the illumination distribution matrix of tilting projection system is calculated;According to the function relationship between the gray matrix of input image and the illumination distribution matrix of tilting projection system, the corrected input image gray matrix is calculated;According to the gray of each pixel point of original input image modulated by corrected input image gray matrix and pulse width modulation.The application solves the problem of illumination non-uniformity that vehicle lamp projection system projects image plane near bright, far dark.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] This invention belongs to the field of automotive lighting technology, and in particular relates to a method, system and storage medium for automotive lighting imaging correction based on grayscale modulation. Background Technology

[0002] With the development of new energy vehicles and intelligent vehicles, adaptive adjustment of automotive lights is a future trend in intelligent vehicle development. Most existing automotive lights suffer from uneven projection illumination, making it easy for drivers to fail to spot pedestrians or vehicles in time at night due to insufficient illumination in distant objects, thus leading to traffic accidents.

[0003] To address the issue of uneven illumination in projected images, one current solution is to use higher-brightness LED light clusters or more LED modules in the headlights to reduce the problem caused by uneven illumination. However, such headlights can affect oncoming vehicles and easily lead to traffic accidents. Furthermore, this solution requires high-power headlights that generate a lot of heat, placing stringent demands on heat dissipation and impacting the lifespan of the headlights.

[0004] To address the uneven illumination problem in existing vehicle headlight projection systems, where the projected image is brighter near the ground and darker at a distance, a vehicle headlight imaging correction method, system, and storage medium based on grayscale modulation are proposed. Summary of the Invention

[0005] This invention proposes a vehicle headlight imaging correction method, system, and storage medium based on grayscale modulation, to at least solve the problem of uneven illumination in the projected image plane of vehicle headlight projection systems, where the near side is brighter and the far side is darker.

[0006] According to an embodiment of the present invention, a vehicle headlight imaging correction method based on grayscale modulation is provided, comprising the steps of:

[0007] The illumination of each pixel on the image plane before and after tilting is obtained from the grayscale matrix of the input image.

[0008] The correction factor for the illuminance of each pixel is calculated based on the surface roughness of the image and / or the light intensity and / or the illuminance uniformity.

[0009] Calculate the illuminance distribution matrix of the tilted projection system based on the illuminance of each pixel on the image plane when it is not tilted and the correction factor.

[0010] The corrected grayscale matrix of the input image is calculated based on the functional relationship between the grayscale matrix of the input image and the illumination distribution matrix of the tilted projection system.

[0011] The gray level of each pixel in the original input image is modulated based on the corrected input image gray level matrix and pulse width modulation.

[0012] Optionally, obtaining the illumination of each pixel on the image plane before and after tilting based on the grayscale matrix of the input image includes the following steps:

[0013] Calculate the proportion of the effective time of the current signal in one cycle for each pixel and use the resulting duty cycle as the gray level of each pixel in the input image.

[0014] List the grayscale matrix of the input image based on the grayscale value of each pixel in the input image;

[0015] The illuminance of each pixel on the image plane before and after tilt is calculated based on the grayscale and tilt angle of the input image.

[0016] Optionally, a correction factor is calculated based on the imaging surface roughness and / or illumination intensity and / or illumination uniformity, including the following steps:

[0017] The imaging surface roughness, ambient light intensity, and ambient illuminance uniformity are normalized according to the preset parameter threshold range.

[0018] The influence coefficient is calculated based on the surface roughness of the imaging surface and / or the intensity and / or the uniformity of the external illumination.

[0019] The correction factor for the illuminance of each pixel on the image plane is calculated based on the illuminance and influence coefficient of each pixel before and after tilting.

[0020] Optionally, the influence coefficient is calculated based on the imaging surface roughness and / or ambient light intensity and / or ambient illuminance uniformity, including:

[0021] Calculate the roughness influence value based on the effect of imaging surface roughness on imaging;

[0022] Calculate the influence value of external light intensity on imaging;

[0023] Calculate the influence value of illuminance uniformity on imaging based on the effect of external illuminance uniformity.

[0024] The influence coefficient is calculated based on the roughness influence value and / or the external lighting influence value and / or the illuminance uniformity influence value.

[0025] Optionally, the illuminance distribution matrix of the tilted projection system is calculated based on the illuminance of each pixel on the image plane when it is not tilted and the correction factor, including the following steps:

[0026] Construct an illuminance matrix for each pixel on the image plane when it is not tilted, based on the illuminance of each pixel on the image plane when it is not tilted.

[0027] The illuminance distribution matrix of the tilted projection system is calculated based on the matrix formed by the correction factors and the illuminance matrix of each pixel on the image plane when it is not tilted.

[0028] Optionally, the step of calculating the corrected input image grayscale matrix based on the functional relationship between the grayscale matrix of the input image and the illumination distribution matrix of the tilted projection system includes the following steps:

[0029] Construct the illuminance distribution matrix of the corrected projection image surface according to the requirement of uniform illuminance of the projection image surface;

[0030] The corrected illuminance distribution matrix of the untilted image plane is calculated based on the illuminance distribution matrix of the corrected projected image plane and the correction factor of the illuminance of each pixel on the image plane.

[0031] The grayscale matrix of the corrected input image with uniform illumination on the projected image plane is calculated based on the illuminance distribution matrix of the image plane when it is not tilted.

[0032] Optionally, constructing the corrected illuminance distribution matrix of the projected image surface according to the uniformity requirement of the projected image surface includes the following steps:

[0033] Calculate the average illuminance of each pixel on the image plane of the uncorrected tilted projection system and use it as the expected value of the illuminance of each pixel on the corrected projection image plane;

[0034] The illuminance distribution matrix of the corrected projection image surface is constructed based on the expected values ​​of the illuminance of each pixel on the corrected projection image surface.

[0035] Optionally, the step of modulating the gray level of each pixel in the original input image based on the corrected input image gray level matrix and pulse width modulation includes the following steps:

[0036] List the grayscale matrix of the original input image based on the grayscale value of each pixel;

[0037] The on-time of the current within a time period is determined based on the gray value of the corresponding pixel in the corrected input image.

[0038] The on-time of the current at each pixel in the original input image is adjusted to match the on-time of the current at the corresponding pixel in the corrected input image.

[0039] According to another embodiment of the present invention, a computer-readable storage medium is provided that stores a computer program for electronic data interchange, wherein the computer program causes a computer to perform the above-described method.

[0040] According to another embodiment of the present invention, a vehicle headlight imaging correction system based on grayscale modulation is provided, comprising:

[0041] processor;

[0042] Memory;

[0043] and one or more programs, wherein the one or more programs are stored in memory and configured to be executed by the signal processing unit, the programs causing the computer to perform the methods described above.

[0044] The advantages of the vehicle headlight imaging correction device, method, system, and storage medium based on grayscale modulation of the present invention are:

[0045] (1) Calculate the correction factor based on the influence of imaging surface roughness and / or light intensity and / or illuminance uniformity on imaging, and use it to calculate the illuminance distribution matrix of the tilt projection system. Compared with the traditional vehicle headlight imaging technology, it can effectively evaluate the influence of different external conditions on vehicle headlight imaging, so as to ensure the accuracy of the illuminance distribution of the projection and facilitate the subsequent accurate calculation of the gray matrix of illuminance uniformity.

[0046] (2) Calculate the illuminance distribution matrix of the tilted projection system based on the illuminance of each pixel on the image plane when it is not tilted and the correction factor, and calculate the corrected gray matrix of the input image based on the functional relationship between the gray matrix of the input image and the illuminance distribution matrix of the tilted projection system. Compared with the traditional vehicle headlight projection imaging technology, it can effectively and accurately calculate the gray matrix of illuminance uniformity, which is convenient for subsequent gray-scale modulation.

[0047] (3) Modulate the gray level of each pixel in the original input image according to the corrected input image gray level matrix and pulse width modulation. Compared with the traditional vehicle headlight imaging technology, it can effectively correct the image and significantly improve the illuminance uniformity of the vehicle headlight projection image surface, making up for the uneven illuminance of the existing vehicle headlight projection system, which is brighter near the image and darker far away. Attached Figure Description

[0048] Figure 1 This is a flowchart of the vehicle headlight imaging correction method based on grayscale modulation according to an embodiment of the present invention;

[0049] Figure 2 This is a flowchart of step S01 of the vehicle headlight imaging correction method based on grayscale modulation according to an embodiment of the present invention;

[0050] Figure 3 This is a flowchart of step S02 of the vehicle headlight imaging correction method based on grayscale modulation according to an embodiment of the present invention;

[0051] Figure 4 This is a flowchart of sub-step S022 of the vehicle headlight imaging correction method based on grayscale modulation according to an embodiment of the present invention;

[0052] Figure 5 This is a flowchart of step S03 of the vehicle headlight imaging correction method based on grayscale modulation according to an embodiment of the present invention;

[0053] Figure 6This is a flowchart of step S04 of the vehicle headlight imaging correction method based on grayscale modulation according to an embodiment of the present invention;

[0054] Figure 7 This is a flowchart of sub-step S041 of the vehicle headlight imaging correction method based on grayscale modulation according to an embodiment of the present invention;

[0055] Figure 8 This is a flowchart of step S05 of the vehicle headlight imaging correction method based on grayscale modulation according to an embodiment of the present invention;

[0056] Figure 9 This is a schematic diagram of the structure of a vehicle headlight imaging correction system based on grayscale modulation according to an embodiment of the present invention. Detailed Implementation

[0057] The present invention will now be described in detail with reference to specific embodiments. These embodiments will help those skilled in the art to further understand the invention, but do not limit the invention in any way. It should be noted that those skilled in the art can make several changes and improvements without departing from the concept of the present invention. These all fall within the protection scope of the present invention.

[0058] The vehicle lights described in this embodiment include headlights and taillights for motor vehicles or non-motor vehicles.

[0059] According to an embodiment of the present invention, a vehicle headlight imaging correction method based on grayscale modulation is provided, the flowchart of which is shown below. Figure 1 As shown, it includes:

[0060] Step S01: Obtain the illumination of each pixel on the image plane before and after tilting based on the grayscale matrix of the input image;

[0061] Step S02: Calculate the correction factor for the illuminance of each pixel based on the surface roughness of the imaging and / or the light intensity and / or the illuminance uniformity.

[0062] Step S03: Calculate the illuminance distribution matrix of the tilted projection system based on the illuminance of each pixel on the image plane when it is not tilted and the correction factor;

[0063] Step S04: Calculate the corrected grayscale matrix of the input image based on the functional relationship between the grayscale matrix of the input image and the illumination distribution matrix of the tilted projection system;

[0064] Step S05: Modulate the gray level of each pixel in the original input image according to the corrected input image gray level matrix and pulse width modulation.

[0065] This embodiment considers the influence of external environmental factors on imaging of vehicle headlights, and modulates the grayscale distribution of vehicle headlight illuminance to significantly improve the illuminance uniformity of the projected image surface of the vehicle headlights, thus making up for the uneven illuminance defect of the existing vehicle headlight projection system, where the projected image surface is brighter at close range and darker at distant range.

[0066] In an exemplary embodiment, step S01, obtaining the illumination of each pixel on the image plane before and after tilting based on the grayscale matrix of the input image, is illustrated in the flowchart below. Figure 2 As shown, the steps include:

[0067] Step S011: Calculate the proportion of the effective time of the current signal in one cycle for each pixel and use the obtained duty cycle as the gray level of each pixel in the input image.

[0068] Step S012: List the grayscale matrix of the input image based on the grayscale value of each pixel in the input image;

[0069] Step S013: Calculate the illuminance of each pixel on the image plane before and after tilting based on the grayscale and tilt angle of the input image.

[0070] In this embodiment, the proportion of the effective time of the current signal in one cycle of each pixel is calculated, and the obtained duty cycle is used as the gray level of each pixel in the input image. The illumination of each pixel on the image plane before and after tilting is calculated according to Equation (1).

[0071] (1)

[0072] in, Let be the illuminance at a point on the image plane. Light transmittance Pi The brightness of the conjugate point on the object surface is compared with the gray value of the input image. related, The aperture angle of the center field of view. The angle between the principal ray and the optical axis.

[0073] In an exemplary embodiment, step S02, calculating the correction factor based on the imaging surface roughness and / or illumination intensity and / or illumination uniformity, is illustrated in the flowchart below. Figure 3 As shown, the steps include:

[0074] Step S021: Normalize the imaging surface roughness, external light intensity, and external illuminance uniformity according to the preset parameter threshold range.

[0075] Step S022: Calculate the influence coefficient based on the imaging surface roughness and / or the ambient light intensity and / or the ambient illuminance uniformity;

[0076] Step S023: Calculate the correction factor for the illuminance of each pixel on the image plane based on the illuminance and influence coefficient of each pixel before and after tilting.

[0077] In this embodiment, considering typical influencing factors such as surface texture and light intensity, the roughness range is defined as 0-1 mm wavelength, and the upper and lower limits of light intensity are defined as night and day, with a range of 0-10000 lux. The surface roughness and light intensity of the imaging are normalized to the maximum and minimum values.

[0078] In an exemplary embodiment, step S022, calculating the influence coefficient based on the imaging surface roughness and / or the ambient light intensity and / or the ambient illuminance uniformity, is illustrated in the flowchart below. Figure 4 As shown, the steps include:

[0079] Step S0221: Calculate the roughness influence value based on the effect of imaging surface roughness on imaging;

[0080] Step S0222: Calculate the influence value of external light intensity on imaging;

[0081] Step S0223: Calculate the influence value of illuminance uniformity based on the influence of external illuminance uniformity on imaging;

[0082] Step S0224: Calculate the influence coefficient based on the roughness influence value and / or the external light influence value and / or the illuminance uniformity influence value.

[0083] In this embodiment, the calculation of the roughness influence value based on the influence of imaging surface roughness on imaging is based on the positive correlation between imaging surface roughness and influence value obtained from the influence of imaging surface roughness on imaging distortion (the greater the imaging surface roughness, the greater the imaging distortion, that is, the greater the roughness influence value). The roughness influence value is calculated based on the positive correlation between imaging surface roughness and roughness influence value, and the roughness influence value is represented by variable l.

[0084] The calculation of the external light intensity influence value based on the influence of external light intensity on imaging is based on the positive correlation between external light intensity and influence value (the greater the external light intensity, the greater the influence on imaging quality, i.e., the greater the external light influence value). The external light intensity value is obtained based on the average, maximum, or minimum external light intensity within a certain range of the vehicle headlight image, and the external light influence value is calculated based on the positive correlation between external light intensity and external light influence value. The external light influence value is represented by the variable w.

[0085] The calculation of the illuminance uniformity influence value based on the impact of external illuminance uniformity on imaging is based on the negative correlation between external illuminance uniformity and the influence value (the smaller the external illuminance uniformity, the greater the impact on image quality, i.e., the larger the illuminance uniformity influence value). The external illuminance uniformity is evaluated based on the variance of the light intensity at multiple sampling points within a certain distance range near the headlights (the larger the variance, the smaller the external illuminance uniformity, and the larger the illuminance uniformity influence value, i.e., the light intensity variance and the illuminance uniformity influence value are positively correlated). The illuminance uniformity influence value is calculated based on the light intensity variance and the illuminance uniformity influence value, and the illuminance uniformity influence value is represented by the variable r.

[0086] The influence coefficient calculated based on the roughness influence value and / or the external illumination influence value and / or the illuminance uniformity influence value is obtained by calculating the positive correlation between the influence coefficient and the roughness influence value and / or the external illumination influence value and / or the illuminance uniformity influence value. The influence coefficient is represented by the variable s.

[0087] In Table A, A1 to A7 represent different implementation methods for calculating the influence coefficient. The roughness influence value l, the external light influence value w, and the illuminance uniformity influence value r in Table A are calculated according to any of the above implementation methods.

[0088] Table A: Different Implementation Methods for Calculating Influence Coefficients

[0089] Implementation Detailed features Formula parameters and calculation results A1 Calculate the influence coefficient based on the roughness influence value. In this embodiment, the positive correlation between imaging surface roughness and its influence value is obtained based on the effect of imaging surface roughness on imaging distortion (the greater the imaging surface roughness, the greater the imaging distortion, i.e., the greater the roughness influence value). The roughness influence value is calculated based on the positive correlation between imaging surface roughness and its influence value, and is represented as l. The influence coefficient s is calculated based on the positive correlation between the roughness influence value l and the influence coefficient. <![CDATA[In one implementation, the calculation influence coefficient s = o1·l o2 + o3, where o1, o2 (o2 > 0), and o3 are calculation coefficients obtained through prior training. In this embodiment, the imaging surface roughness is obtained and normalized to get the imaging surface roughness d = 0.6. According to the positive correlation between the imaging surface roughness and the roughness influence value, the roughness influence value l = k1·d k2 + k3 = 1×0.6 + 0 = 0.6 (k1, k2, k3 are calculation coefficients obtained through prior training. In this embodiment, k1 = 1, k2 = 1, k3 = 0), the calculation coefficients o1 = 1, o2 = 1, o3 = 0 obtained through prior training, and the calculation influence coefficient s = o1·l o2 + o3 = 1×0.6 + 0 = 0.6. <!-- 5 -->]]> A2 Calculate the influence coefficient based on the influence value of external light. In this embodiment, the positive correlation between ambient light intensity and its influence value is obtained based on the influence of ambient light intensity on image quality (the greater the ambient light intensity, the greater the influence on image quality, i.e., the greater the ambient light influence value). The ambient light influence value, denoted as w, is calculated based on the positive correlation between ambient light intensity and its influence value. The influence coefficient s is calculated based on the positive correlation between the ambient light influence value w and the influence coefficient. <![CDATA[In one implementation, the calculation influence coefficient s = o4·w o5 + o6, where o4, o5 (o5>0), and o6 are calculation coefficients obtained through prior training. In this embodiment, the average value of the external light intensity within a certain range of the headlight image is detected and normalized to obtain the external light intensity m = 0.7. According to its positive correlation with the external light influence value, the external light influence value w = k4·m k5 + k6 = 1×0.7 + 0 = 0.7 (k4, k5, k6 are calculation coefficients obtained through prior training. In this embodiment, k4 = 1, k5 = 1, k6 = 0), the calculation coefficient o4 = 1, o5 = 1, o6 = 0 obtained through prior training, and the calculation influence coefficient s = o4·w o5 + o6 = 1×0.7 + 0 = 0.7.]]> A3 Calculate the influence coefficient based on the influence value of illuminance uniformity. In this embodiment, the uniformity of external illuminance is assessed based on the variance of the light intensity at multiple sampling points within a certain distance range near the vehicle headlights (the larger the variance, the smaller the uniformity of external illuminance, and the greater the influence value of illuminance uniformity, i.e., there is a positive correlation between the variance of light intensity and the influence value of illuminance uniformity). The influence value of illuminance uniformity is calculated based on the variance of light intensity and the influence value of illuminance uniformity, and is denoted as r. The influence coefficient s is calculated based on the positive correlation between the influence value r of illuminance uniformity and the influence coefficient. <![CDATA[In one implementation, the calculation influence coefficient s = o7·r o8 + o9, where o7, o8 (o8 > 0), and o9 are calculation coefficients obtained through prior training. In this embodiment, the light intensities at multiple sampling points within a certain distance range near the vehicle headlight are detected and the variance value n = 2 is calculated. According to the positive correlation between the light intensity variance and the illumination uniformity influence value, the illumination uniformity influence value r = k7·n k8 + k9 = 0.4×2 + 0 = 0.8 (k7, k8, k9 are calculation coefficients obtained through prior training. In this embodiment, k7 = 0.4, k8 = 1, k9 = 0), the calculation coefficients obtained through prior training o7 = 1, o8 = 1, o9 = 0, and the calculation influence coefficient s = o7·r o8 + o9 = 1×0.8 + 0 = 0.8. <!-- 6 -->]]> A4 The influence coefficient is calculated based on the roughness influence value and the external light influence value. In this embodiment, based on the influence of imaging surface roughness on imaging distortion, a positive correlation is obtained between imaging surface roughness and its influence value (the greater the imaging surface roughness, the greater the imaging distortion, i.e., the greater the roughness influence value). The roughness influence value, denoted as l, is calculated based on this positive correlation. Similarly, based on the influence of external light intensity on imaging quality, a positive correlation is obtained between external light intensity and its influence value (the greater the external light intensity, the greater the influence on imaging quality, i.e., the greater the external light influence value). The external light influence value, denoted as w, is calculated based on this positive correlation. Finally, the influence coefficient s is calculated based on the positive correlation between the roughness influence value l, the external light influence value w, and the influence coefficient. <![CDATA[In one implementation, the calculation influence coefficient s = o10·l o11 +o12·w o13 , where o10, o11 (o11>0), o12, o13 (o13>0) are calculation coefficients obtained through prior training. In this embodiment, the imaging surface roughness is obtained and normalized to get the imaging surface roughness d = 0.6. According to the positive correlation between the imaging surface roughness and the roughness influence value, the roughness influence value l = k1·d k2 +k3 = 1×0.6 + 0 = 0.6 (k1, k2, k3 are calculation coefficients obtained through prior training. In this embodiment, k1 = 1, k2 = 1, k3 = 0); the average value of the external light intensity within a certain range of the headlight image is detected and normalized to get the external light intensity m = 0.7. According to its positive correlation with the external light influence value, the external light influence value w = k4·m k5 +k6 = 1×0.7 + 0 = 0.7 (k4, k5, k6 are calculation coefficients obtained through prior training. In this embodiment, k4 = 1, k5 = 1, k6 = 0); the calculation coefficients obtained through prior training are o10 = 0.7, o11 = 1, o12 = 0.3, o13 = 1. The calculation influence coefficient s = o10·l o11 +o12·w o13 =0.7×0.6 + 0.3×0.7 = 0.63. In another implementation, the calculation influence coefficient s = o14·l o15 ·w o16 +o17, where o14, o15 (o15>0), o16 (o16>0), o17 are calculation coefficients obtained through prior training. In this embodiment, the imaging surface roughness is obtained and normalized to get the imaging surface roughness d = 0.6. According to the positive correlation between the imaging surface roughness and the roughness influence value, the roughness influence value l = k1·d k2 +k3 = 1×0.6 + 0 = 0.6 (k1, k2, k3 are calculation coefficients obtained through prior training. In this embodiment, k1 = 1, k2 = 1, k3 = 0); the average value of the external light intensity within a certain range of the headlight image is detected and normalized to get the external light intensity m = 0.7. According to its positive correlation with the external light influence value, the external light influence value w = k4·m k5 +k6 = 1×0.7 + 0 = 0.7 (k4, k5, k6 are calculation coefficients obtained through prior training. In this embodiment, k4 = 1, k5 = 1, k6 = 0); the calculation coefficients obtained through prior training are o14 = 1.5, o15 = 1, o16 = 1, o17 = 0. The calculation influence coefficient s = o14·l o15 ·w o16 +o17 = 1.5×0.6×0.7 + 0 = 0.63.<!-- 7 -->]]> A5 The influence coefficient is calculated based on the influence values ​​of roughness and illuminance uniformity. In this embodiment, the positive correlation between imaging surface roughness and its influence value is obtained based on the effect of imaging surface roughness on imaging distortion (the greater the imaging surface roughness, the greater the imaging distortion, i.e., the greater the roughness influence value). The roughness influence value is calculated based on the positive correlation between imaging surface roughness and its influence value, and is denoted as l. The uniformity of external illumination is evaluated based on the variance of the illumination intensity at multiple sampling points within a certain distance range near the headlights (the greater the variance, the smaller the uniformity of external illumination, and the greater the influence value of illumination uniformity, i.e., there is a positive correlation between the variance of illumination intensity and the influence value of illumination uniformity). The influence value of illumination uniformity is calculated based on the variance of illumination intensity and the influence value of illumination uniformity, and is denoted as r. The influence coefficient s is calculated based on the positive correlation between the roughness influence value l, the influence value r of illumination uniformity, and the influence coefficient. <![CDATA[In one implementation, the calculation influence coefficient s = o18·l o19 +o20·r o21 , where o18, o19 (o19>0), o20, o21 (o21>0) are calculation coefficients obtained through prior training. In this embodiment, the imaging surface roughness is obtained and normalized to get the imaging surface roughness d = 0.6. According to the positive correlation between the imaging surface roughness and the roughness influence value, the roughness influence value l = k1·d k2 +k3 = 1×0.6+0 = 0.6 (k1, k2, k3 are calculation coefficients obtained through prior training. In this embodiment, k1 = 1, k2 = 1, k3 = 0); the light intensities at multiple sampling points within a certain distance range near the vehicle headlight are detected and the variance value n = 2 is calculated. According to the positive correlation between the light intensity variance and the illumination uniformity influence value, the illumination uniformity influence value r = k7·n k8 +k9 = 0.4×2+0 = 0.8 (k7, k8, k9 are calculation coefficients obtained through prior training. In this embodiment, k7 = 0.4, k8 = 1, k9 = 0); the calculation coefficients obtained through prior training are o18 = 0.8, o19 = 1, o20 = 0.2, o21 = 1, and the calculation influence coefficient s = o18·l o19 +o20·r o21 =0.8×0.6+0.2×0.8 =0.64. In another implementation, the calculation influence coefficient s = o22·l o23 ·r o23 +o25, where o22, o23 (o23>0), o24 (o24>0), o25 are calculation coefficients obtained through prior training. In this embodiment, the imaging surface roughness is obtained and normalized to get the imaging surface roughness d = 0.6. According to the positive correlation between the imaging surface roughness and the roughness influence value, the roughness influence value l = k1·d k2 +k3 = 1×0.6+0 = 0.6 (k1, k2, k3 are calculation coefficients obtained through prior training. In this embodiment, k1 = 1, k2 = 1, k3 = 0); the light intensities at multiple sampling points within a certain distance range near the vehicle headlight are detected and the variance value n = 2 is calculated. According to the positive correlation between the light intensity variance and the illumination uniformity influence value, the illumination uniformity influence value r = k7·n k8 +k9 = 0.4×2+0 = 0.8 (k7, k8, k9 are calculation coefficients obtained through prior training. In this embodiment, k7 = 0.4, k8 = 1, k9 = 0); the calculation coefficients obtained through prior training are o22 = 1.35, o23 = 1, o24 = 1, o25 = 0, and the calculation influence coefficient s = o22·l o23 ·r o23 +o25 = 1.35×0.6×0.8+0 = 0.648.<!-- 8 -->]]> A6 The influence coefficient is calculated based on the influence values ​​of external light intensity and uniform illuminance. In this embodiment, the positive correlation between ambient light intensity and its influence value is obtained based on the impact of ambient light intensity on image quality (the greater the ambient light intensity, the greater the impact on image quality, i.e., the greater the ambient light influence value). The ambient light influence value, denoted as w, is calculated based on the positive correlation between ambient light intensity and its influence value. The ambient illuminance uniformity is assessed based on the variance of the light intensity at multiple sampling points within a certain distance range near the headlights (the greater the variance, the smaller the ambient illuminance uniformity, and the greater the illuminance uniformity influence value, i.e., the light intensity variance and the illuminance uniformity influence value are positively correlated). The illuminance uniformity influence value, denoted as r, is calculated based on the light intensity variance and the illuminance uniformity influence value. The influence coefficient s is calculated based on the positive correlation between the ambient light influence value w, the illuminance uniformity influence value r, and the influence coefficient. <![CDATA[In one implementation, the calculation influence coefficient s = o26·w o27 +o28·r o29 , where o26, o27 (o27>0), o28, o29 (o29>0) are calculation coefficients obtained through prior training. In this embodiment, the average value of the external light intensity within a certain range of the headlight image is detected and normalized to obtain the external light intensity m = 0.7. According to its positive correlation with the external light influence value, the external light influence value w = k4·m k5 +k6 = 1×0.7 + 0 = 0.7 (k4, k5, k6 are calculation coefficients obtained through prior training. In this embodiment, k4 = 1, k5 = 1, k6 = 0); the light intensities at multiple sampling points within a certain distance range near the headlight are detected and the variance value n = 2 is calculated. According to the positive correlation between the light intensity variance and the illumination uniformity influence value, the illumination uniformity influence value r = k7·n k8 +k9 = 0.4×2 + 0 = 0.8 (k7, k8, k9 are calculation coefficients obtained through prior training. In this embodiment, k7 = 0.4, k8 = 1, k9 = 0); the calculation coefficients obtained through prior training are o26 = 0.7, o27 = 1, o28 = 0.3, o29 = 1, and the calculation influence coefficient s = o26·w o27 +o28·r o29 = 0.7×0.7 + 0.3×0.8 = 0.73. In another implementation, the calculation influence coefficient s = o30·w o31 ·r o32 +o33, where o30, o31 (o31>0), o32 (o32>0), o3 are calculation coefficients obtained through prior training. In this embodiment, the average value of the external light intensity within a certain range of the headlight image is detected and normalized to obtain the external light intensity m = 0.7. According to its positive correlation with the external light influence value, the external light influence value w = k4·m k5 +k6 = 1×0.7 + 0 = 0.7 (k4, k5, k6 are calculation coefficients obtained through prior training. In this embodiment, k4 = 1, k5 = 1, k6 = 0); the light intensities at multiple sampling points within a certain distance range near the headlight are detected and the variance value n = 2 is calculated. According to the positive correlation between the light intensity variance and the illumination uniformity influence value, the illumination uniformity influence value r = k7·n k8 +k9 = 0.4×2 + 0 = 0.8 (k7, k8, k9 are calculation coefficients obtained through prior training. In this embodiment, k7 = 0.4, k8 = 1, k9 = 0); the calculation coefficients obtained through prior training are o30 = 1.2, o31 = 1, o32 = 1, o33 = 0, and the calculation influence coefficient s = o30·w o31 ·r o32 +o33=1.2×0.7×0.8+0=0.672。 <!-- 9 -->]]> A7 The influence coefficient is calculated based on the influence values ​​of roughness, external light, and uniformity of illumination. In this embodiment, based on the influence of imaging surface roughness on imaging distortion, a positive correlation is obtained between imaging surface roughness and its influence value (the greater the imaging surface roughness, the greater the imaging distortion, i.e., the greater the roughness influence value). The roughness influence value is calculated based on this positive correlation, denoted as l. Similarly, based on the influence of external light intensity on imaging quality, a positive correlation is obtained between external light intensity and its influence value (the greater the external light intensity, the greater the influence on imaging quality, i.e., the greater the external light influence value). The roughness influence value is calculated based on the relationship between external light intensity and external light... The influence value of external illumination is calculated based on the positive correlation between the influence values, denoted as w; the uniformity of external illuminance is assessed based on the variance of the illumination intensity at multiple sampling points within a certain distance range near the headlights (the larger the variance, the smaller the uniformity of external illuminance, and the larger the influence value of uniform illuminance, i.e., there is a positive correlation between the variance of illumination intensity and the influence value of uniform illuminance), and the influence value of uniform illuminance is calculated based on the variance of illumination intensity and the influence value of uniform illuminance, denoted as r; the influence coefficient s is calculated based on the positive correlation between the influence value of roughness l, the influence value of external illumination w, the influence value of uniform illuminance r, and the influence coefficient. <![CDATA[In one implementation, the calculation influence coefficient s = o34·l o35 +o36·w o37 +o38·r o39 , where o34, o35 (o35>0), o36, o37 (o37>0), o38, o39 (o39>0) are calculation coefficients obtained through prior training. In this embodiment, the imaging surface roughness is obtained and normalized to get the imaging surface roughness d = 0.6. According to the positive correlation between the imaging surface roughness and the roughness influence value, the roughness influence value l = k1·d k2 +k3 = 1×0.6+0 = 0.6 (k1, k2, k3 are calculation coefficients obtained through prior training. In this embodiment, k1 = 1, k2 = 1, k3 = 0); the average external light intensity within a certain range of the headlight image is detected and normalized to get the external light intensity m = 0.7. According to its positive correlation with the external light influence value, the external light influence value w = k4·m k5 +k6 = 1×0.7+0 = 0.7 (k4, k5, k6 are calculation coefficients obtained through prior training. In this embodiment, k4 = 1, k5 = 1, k6 = 0); the light intensities at multiple sampling points within a certain distance range near the headlight are detected and the variance value n = 2 is calculated. According to the positive correlation between the light intensity variance and the illumination uniformity influence value, the illumination uniformity influence value r = k7·n k8 +k9 = 0.4×2+0 = 0.8 (k7, k8, k9 are calculation coefficients obtained through prior training. In this embodiment, k7 = 0.4, k8 = 1, k9 = 0); the calculation coefficients obtained through prior training are o34 = 0.5, o35 = 1, o26 = 0.3, o27 = 1, o28 = 0.2, o29 = 1, and the calculation influence coefficient s = o34·l o35 +o36·w o37 +o38·r o39 =0.5×0.6+0.3×0.7+0.2×0.8 = 0.67. In another implementation, the calculation influence coefficient s = o40·l o41 ·w o42 ·rs o43 +o44, where o40, o41 (o41>0), o(42>0), o43 (o43>0), o44 are calculation coefficients obtained through prior training. In this embodiment, the imaging surface roughness is obtained and normalized to get the imaging surface roughness d = 0.6. According to the positive correlation between the imaging surface roughness and the roughness influence value, the roughness influence value l = k1·d k2 +k3=1×0.6+0=0.6 (k1, k2, k3 are pre-trained calculation coefficients; in this embodiment, k1=1, k2=1, k3=0); The average ambient light intensity within a certain range of the vehicle headlight image is detected and normalized to obtain ambient light intensity m=0.7. Based on its positive correlation with the ambient light influence value, the ambient light influence value w=k4·m is calculated. k5 +k6=1×0.7+0=0.7 (k4, k5, k6 are pre-trained calculation coefficients; in this embodiment, k4=1, k5=1, k6=0); detect the illuminance at multiple sampling points within a certain distance range near the headlights and calculate the variance n=2. Based on the positive correlation between the illuminance variance and the influence value of illuminance uniformity, calculate the influence value of illuminance uniformity r=k7·n k8 +k9=0.4×2+0=0.8 (k7, k8, k9 are pre-trained calculation coefficients; in this embodiment, k7=0.4, k8=1, k9=0); the pre-trained calculation coefficients o40=2, o41=1, o42=1, o43=1, o44=0, and the calculated influence coefficient s=o40·l o41 ·w o42 ·r o43 +o44=2×0.6×0.7×0.8+0=0.672. ]]>

[0090] In an exemplary embodiment, step S03, calculating the illuminance distribution matrix of the tilted projection system based on the illuminance of each pixel on the image plane when it is not tilted and the correction factor, is illustrated in the flowchart below. Figure 5 As shown, the steps include:

[0091] Step S031: Construct an illuminance matrix for each pixel on the image plane when it is not tilted, based on the illuminance of each pixel on the image plane when it is not tilted.

[0092] Step S032: Calculate the illuminance distribution matrix of the tilted projection system based on the matrix formed by the correction factor and the illuminance matrix of each pixel on the image plane when it is not tilted.

[0093] In this embodiment, the correction factor for the illuminance of each pixel on the image plane is obtained based on the illuminance of each pixel before and after tilting, taking into account the influence coefficient. The formula for calculating the correction factor of the illuminance of each pixel on the image surface is shown in Equation (2).

[0094] (2)

[0095] in, This is a correction factor for the illuminance of each pixel on the image plane. The influence coefficient of each pixel is calculated by the method described in any item of Table A. The normalized illumination intensity for each pixel. Use the smallest positive integer to prevent the denominator from being 0.

[0096] The illuminance distribution matrix of the tilted projection system is calculated based on the matrix formed by the correction factor and the illuminance matrix of each pixel on the image plane when it is not tilted, as shown in equation (3).

[0097] (3)

[0098] in, Let be the illuminance distribution matrix of the tilted projection system. This is a correction factor for the illuminance of each pixel on the image plane. This represents the illumination of each pixel on the image plane when it is not tilted. This represents the number of pixels on the image plane in the left-right and top-bottom dimensions.

[0099] In another exemplary embodiment, step S04, calculating the corrected input image grayscale matrix based on the functional relationship between the grayscale matrix of the input image and the illumination distribution matrix of the tilted projection system, is illustrated in the flowchart below. Figure 6 As shown, the steps include:

[0100] Step S041: Construct the illuminance distribution matrix of the corrected projection image surface according to the uniformity requirement of the projection image surface;

[0101] Step S042: Calculate the corrected illuminance distribution matrix of the untilted image plane based on the corrected illuminance distribution matrix of the projected image plane and the correction factor of the illuminance of each pixel on the image plane.

[0102] Step S043: Calculate the grayscale matrix of the corrected input image when the illumination of the projected image plane is uniform, based on the illumination distribution matrix of the image plane when it is not tilted.

[0103] In an exemplary embodiment, step S041, constructing the corrected illuminance distribution matrix of the projected image surface according to the uniformity requirement of the projected image surface, is illustrated in the flowchart below. Figure 7 As shown, the steps include:

[0104] Step S0411: Calculate the average value of the illuminance of each pixel on the image surface of the uncorrected tilted projection system and use it as the expected value of the illuminance of each pixel on the corrected projection image surface.

[0105] Step S0412: Construct the illuminance distribution matrix of the corrected projection image surface based on the expected values ​​of the illuminance of each pixel on the corrected projection image surface.

[0106] In this embodiment, the average illuminance of each pixel on the image plane of the tilted projection system when it is not corrected is shown in Equation (4).

[0107] (4)

[0108] in, This is a correction factor for the illuminance of each pixel on the image plane. This represents the illumination of each pixel on the image plane when it is not tilted. This represents the number of pixels on the image plane in the left-right and top-bottom dimensions.

[0109] The average illuminance of each pixel on the image plane of the uncorrected tilted projection system is taken as the expected value of the illuminance of each pixel on the corrected projection image plane.

[0110] The illuminance of each pixel on the corrected projection image surface is set to the average illuminance of each pixel on the image surface of the uncorrected tilted projection system. The illuminance distribution matrix of the corrected projection image surface is... As shown in equation (5).

[0111] (5)

[0112] in, This is the illumination distribution matrix of the corrected projected image plane.

[0113] In step S042, the illumination distribution matrix of the corrected projected image plane is used. Correction factor for the illuminance of each pixel on the image plane Obtain the illumination distribution matrix of the image plane when it is not tilted. ,in, , ;

[0114] In step S043, based on the illumination distribution matrix of the image plane when it is not tilted... Obtain the grayscale matrix of the corrected input image when the illumination of the projected image surface is uniform, and calculate the grayscale matrix of the corrected input image when the illumination of the projected image surface is uniform using Equation (6).

[0115] (6)

[0116] in, The illuminance of each pixel on the corrected projected image plane. This is a correction factor for the illuminance of each pixel on the image plane. Illuminance calculation formula inverse function, This is the grayscale matrix of the input image after correction.

[0117] In an exemplary embodiment, step S05, modulating the gray level of each pixel in the original input image based on the corrected input image gray level matrix and pulse width modulation, is illustrated in the flowchart below. Figure 8 As shown, the steps include:

[0118] Step S051: List the grayscale matrix of the original input image based on the grayscale value of each pixel in the original input image;

[0119] Step S052: Determine the current-on time within a time period based on the grayscale value of the corresponding pixel in the corrected input image;

[0120] Step S053: Adjust the on-time of the current of each pixel in the original input image to the on-time of the current of the corresponding pixel in the corrected input image.

[0121] In this embodiment, the grayscale matrix of the original input image is listed based on the grayscale value of each pixel in the original input image, wherein the grayscale matrix of the original input image and the grayscale matrix of the corrected input image have the same dimension; the same time period T is determined for the original input image and the corrected input image, and the current on-time t within one time period T is determined based on the grayscale value of the corresponding pixel in the corrected input image, such that the quotient of the current on-time and the time period (t / T) is the same as the grayscale value of the corresponding pixel in the corrected input image; the current on-time of each pixel in the original input image is adjusted to the current on-time of the corresponding pixel in the corrected input image.

[0122] According to another embodiment of the present invention, a duty cycle adjustment method based on pulse width modulation is provided, comprising the following steps:

[0123] Step A1: Input the electrical signal to be adjusted into the timer and counter;

[0124] Step A2: The timer starts timing the duration of the electrical signal from the input signal, and the counter starts recording the high and low level changes of the electrical signal from the input signal.

[0125] Step A3: Measure the duration of the high and low levels and calculate the duty cycle;

[0126] Step A4: Compare the obtained duty cycle with the desired duty cycle. If the obtained duty cycle is different from the desired duty cycle, the microcontroller will be programmed to adjust the duty cycle, and the process will return to step A2.

[0127] Step A5: Output the obtained electrical signal;

[0128] According to yet another embodiment of the present invention, a computer-readable storage medium is also provided, which stores a computer program for electronic data interchange, wherein the computer program causes a computer to execute the grayscale modulation-based vehicle headlight imaging correction method described in the above embodiments.

[0129] According to another embodiment of the present invention, a vehicle headlight imaging correction system based on grayscale modulation is also provided, the structural schematic diagram of which is shown below. Figure 9 As shown, it includes:

[0130] processor;

[0131] Memory;

[0132] And one or more programs, wherein the one or more programs are stored in memory and configured to be executed by the processor, the programs causing the computer to perform the grayscale modulation-based vehicle headlight imaging correction method described in the above embodiments.

[0133] The methods described above according to the invention can be implemented in hardware, firmware, or as software or computer code that can be stored in a recording medium (such as a CD-ROM, RAM, floppy disk, hard disk, or magneto-optical disk), or as computer code originally stored on a remote recording medium or a non-transitory machine-readable medium and subsequently stored on a local recording medium, downloaded via a network. Thus, the methods described herein can be stored on a recording medium using a general-purpose computer, a dedicated processor, or programmable or dedicated hardware (such as an ASIC or FPGA) for such software processing. It is understood that the computer, processor, microprocessor controller, or programmable hardware includes storage components (e.g., RAM, ROM, flash memory, etc.) capable of storing or receiving software or computer code, which, when accessed and executed by the computer, processor, or hardware, implements the methods described herein. Furthermore, when a general-purpose computer accesses the code used to implement the processing shown herein, the execution of the code transforms the general-purpose computer into a dedicated computer for performing the processing shown herein.

[0134] Of course, those skilled in the art should recognize that the above embodiments are only used to illustrate the present invention and are not intended to limit the present invention. Any changes or modifications to the above embodiments that are within the scope of the present invention will fall within the protection scope of the present invention.

Claims

1. A gray scale modulation based imaging correction method for vehicle lamps, characterized in that, The application relates to a method for correcting an input image for a tilted projection system. The method comprises the following steps: According to the gray matrix of the input image, the illumination of each pixel point on the image plane before and after tilting is obtained; A correction factor of the illumination of each pixel point is calculated according to the roughness of the imaging surface and the illumination intensity and the illumination uniformity; The correction factor is calculated according to the roughness of the imaging surface, the illumination intensity and the illumination uniformity, and the method comprises the following steps: The roughness of the imaging surface, the illumination intensity and the illumination uniformity are normalized according to a preset parameter threshold range; An influence coefficient is calculated according to the roughness of the imaging surface, the illumination intensity and the illumination uniformity; The correction factor of the illumination of each pixel point on the image plane before and after tilting is calculated according to the illumination of each pixel point on the image plane before tilting and the influence coefficient.

2. The gray scale modulation based imaging correction method for vehicle lamps according to claim 1, characterized in that, The method comprises the following steps: A roughness influence value is calculated according to the influence of the roughness of the imaging surface on imaging; An external illumination influence value is calculated according to the influence of the external illumination intensity on imaging; An illumination uniformity influence value is calculated according to the influence of the external illumination uniformity on imaging; 3. The gray scale modulation based imaging correction method for vehicle lamps according to claim 1, characterized in that, The influence coefficient is calculated according to the roughness influence value, the external illumination influence value and the illumination uniformity influence value. The illumination distribution matrix of the tilted projection system is calculated according to the illumination of each pixel point on the image plane before tilting and the correction factor. The corrected input image gray matrix is calculated according to the function relationship between the input image gray matrix and the illumination distribution matrix of the tilted projection system.

4. The gray scale modulation based imaging correction method for vehicle lamps according to claim 1, characterized in that, The gray of each pixel point of the original input image is modulated according to the corrected input image gray matrix and pulse width modulation. The method comprises the following steps: The proportion of the effective time of the current signal in a cycle of each pixel point is calculated, and the obtained duty ratio is taken as the gray of each pixel point corresponding to the input image; The gray matrix of the input image is listed according to the gray value of each pixel point corresponding to the input image; 5. The gray scale modulation based imaging correction method for vehicle lamps according to claim 4, characterized in that, The illumination of each pixel point on the image plane before and after tilting is calculated according to the gray of the input image and the tilting angle. The method comprises the following steps: The illumination matrix of each pixel point on the image plane before tilting is constructed according to the illumination of each pixel point on the image plane before tilting; The illumination distribution matrix of the tilted projection system is calculated according to the matrix formed by the correction factor and the illumination matrix of each pixel point on the image plane before tilting. The method comprises the following steps: The illumination distribution matrix of the corrected projection image plane is constructed according to the illumination uniformity requirement of the projection image plane; The illumination distribution matrix of the image plane before tilting is calculated according to the corrected illumination distribution matrix of the projection image plane and the correction factor of the illumination of each pixel point on the image plane; The gray matrix of the corrected input image when the illumination of the projection image plane is uniform is calculated according to the corrected illumination distribution matrix of the image plane before tilting. The method comprises the following steps: The illumination distribution matrix of the corrected projection image plane is constructed according to the illumination uniformity requirement of the projection image plane; The average value of the illumination of each pixel point on the uncorrected projection image plane is calculated and used as the expected value of the illumination of each pixel point on the corrected projection image plane; The illumination distribution matrix of the corrected projection image plane is constructed according to the expected value of the illumination of each pixel point on the corrected projection image plane.

6. The intensity modulation based imaging correction method for vehicle lamps according to claim 1, wherein, The step of modulating the gray scale of each pixel point of the original input image according to the corrected input image gray scale matrix and pulse width modulation comprises the steps of: A gray scale matrix of the original input image is listed according to the gray scale value of each pixel point of the original input image; The on time of the current in a time period is determined according to the gray scale value of the corresponding pixel point of the corrected input image; The on time of the current of each pixel point of the original input image is adjusted to the on time of the current of the corresponding pixel point of the corrected input image.

7. A computer readable storage medium storing a computer program for electronic data interchange, wherein, The computer program enables the computer to execute the method of any one of claims 1-6.

8. A gray scale modulation based vehicle lamp imaging correction system, characterized by, comprise: a processor; a memory; and one or more programs, wherein the one or more programs are stored in the memory and configured to be executed by the processor, and the programs enable the computer to execute the method of any one of claims 1-6.