Brightness adjustment method and light emitting device
By modulating the grayscale values of the light source to meet the linearity requirements of human eye response brightness, the problem of poor user viewing experience caused by non-linear changes in human eye response brightness is solved, and the uniformity of the viewing experience and the lighting effect are improved.
Patent Information
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- SHENZHEN QIANYAN TECH LTD
- Filing Date
- 2026-03-26
- Publication Date
- 2026-06-26
AI Technical Summary
The human eye's response brightness changes non-linearly with grayscale values, resulting in a poor viewing experience for users.
By determining whether the mapping relationship of the light source at each input gray level meets the linearity requirement, the gray level value is modulated using the Gamma parameter to obtain the target modulated gray level value, and then converted according to the gray level data type requirements of the light source to ensure that the mapping relationship between the human eye response brightness and the input gray level value meets the linearity requirement.
This achieves a more linear response of human eye brightness to grayscale values, improving the uniformity of the viewing experience and the lighting gradient effect.
Smart Images

Figure CN122294342A_ABST
Abstract
Description
Technical Field
[0001] This application relates to the field of lighting technology, and more specifically, to a brightness adjustment method and a light-emitting device. Background Technology
[0002] The luminous power of a light source is determined by the input grayscale value. The larger the grayscale value, the greater the luminous power of the light source, and correspondingly, the higher the physical brightness. Although the physical brightness of the light emitted by a light source is basically linearly related to the grayscale value, the human eye's response to the brightness of the light emitted by the light source (also known as the human eye response brightness) is highly nonlinear with the change of grayscale value, resulting in a poor viewing experience for users. Summary of the Invention
[0003] In view of the above problems, this application proposes a brightness adjustment method and a light-emitting device to solve the problem of poor user viewing experience caused by the nonlinear change of human eye response brightness with grayscale value in related technologies.
[0004] In a first aspect, a brightness adjustment method is provided, comprising: determining whether the mapping relationship between the human eye response brightness and the input grayscale value at each input grayscale value of the light source meets the linearity requirement; If the linearity requirement is not met, the input grayscale values are modulated according to the Gamma parameter to obtain the target modulated grayscale value corresponding to each input grayscale value; wherein, the mapping relationship between the human eye response brightness of the light source under the target modulated grayscale value and the input grayscale value satisfies the linearity requirement. According to the grayscale data type requirements of the light source, the target modulation grayscale value is converted to obtain the target grayscale value corresponding to each input grayscale value; wherein, when the input is the input grayscale value, the light source emits light according to the target grayscale value corresponding to the input grayscale value.
[0005] Secondly, a brightness adjustment device is provided, comprising: a judgment module, configured to determine whether the mapping relationship between the human eye response brightness and the input grayscale value at each input grayscale value of the light source meets a linearity requirement; a modulation module, configured to, if the linearity requirement is not met, modulate each input grayscale value according to a Gamma parameter to obtain a target modulated grayscale value corresponding to each input grayscale value; wherein the mapping relationship between the human eye response brightness of the light source at the target modulated grayscale value and the input grayscale value meets the linearity requirement; and a conversion module, configured to convert the target modulated grayscale value according to the grayscale data type requirements of the light source to obtain a target grayscale value corresponding to each input grayscale value; wherein, when the input is the input grayscale value, the light source emits light according to the target grayscale value corresponding to the input grayscale value.
[0006] Thirdly, a light-emitting device is provided, comprising: a processor; a memory storing computer instructions, wherein when the computer instructions are executed by the processor, a target grayscale value corresponding to each input grayscale value is determined according to the method described above; and a light source emitting light according to the target grayscale value corresponding to the input grayscale value when the input of the light source is the input grayscale value.
[0007] Fourthly, a computer-readable storage medium is provided that stores computer instructions thereon, which, when executed by a processor, implement the method described above.
[0008] Fifthly, a computer program product is provided, including computer instructions that, when executed by a processor, implement the method described above.
[0009] In this application, when the mapping relationship between the human eye response brightness of the light source at the input grayscale value and the input grayscale value does not meet the linearity requirement, the input grayscale values are modulated according to the Gamma parameter to obtain the target modulated grayscale value corresponding to each input grayscale value. This ensures that the mapping relationship between the human eye response brightness of the light source at the target modulated grayscale value and the input grayscale value meets the linearity requirement. Then, according to the grayscale value requirements of the light source, the target modulated grayscale value is converted to obtain the target grayscale value corresponding to each input grayscale value. When the display screen receives the input grayscale value, the light source emits light according to the target grayscale value corresponding to the input grayscale value, rather than directly emitting light according to the input grayscale value. Since the grayscale value directly determines the luminous power of the light source, this application achieves nonlinear modulation of the luminous power of the light source, i.e., determining the target modulated grayscale value for each input grayscale value. This ensures that after modulation, the change in human eye response brightness with the input grayscale value is more linear, and the perceived light gradient effect of the light source is more uniform, effectively guaranteeing the viewing experience. Attached Figure Description
[0010] The accompanying drawings, which are incorporated in and form part of this specification, illustrate embodiments consistent with this application and, together with the description, serve to explain the principles of this application. It is obvious that the drawings described below are merely some embodiments of this application, and those skilled in the art can obtain other drawings based on these drawings without any inventive effort.
[0011] Figure 1 This is a flowchart illustrating a brightness adjustment method according to an embodiment of this application.
[0012] Figure 2A The example shows the curves of the physical brightness of the light source and the brightness of the human eye response as a function of the input grayscale value.
[0013] Figure 2B An exemplary diagram of the fitted line determined by the fitting is shown.
[0014] Figure 3 This is a flowchart illustrating step 120 according to an embodiment of this application.
[0015] Figure 4 It shows the curves of the physical brightness and human eye response brightness of the modulated light source as a function of the input grayscale value.
[0016] Figure 5 This is a flowchart illustrating step 320 according to an embodiment of this application.
[0017] Figure 6 This is a flowchart illustrating a brightness adjustment method according to a specific embodiment of this application.
[0018] Figure 7 This is a flowchart illustrating a brightness adjustment method according to another specific embodiment of this application.
[0019] Figure 8 This is a flowchart illustrating a brightness adjustment method according to another specific embodiment of this application.
[0020] Figure 9 Another curve showing the variation of the physical brightness and human eye response brightness of the modulated light source with the input grayscale value is shown. Detailed Implementation
[0021] The embodiments of this application are described in detail below. Examples of the embodiments are shown in the accompanying drawings, wherein the same or similar reference numerals denote the same or similar elements or elements having the same or similar functions throughout. The embodiments described below with reference to the accompanying drawings are exemplary and are only used to explain this application, and should not be construed as limiting this application.
[0022] In the following description, the terms "first" and "second" are used only to distinguish similar objects and do not represent a specific ordering of objects. It is understood that "first" and "second" may be interchanged in a specific order or sequence where permitted, so that the embodiments of this application described herein can be implemented in an order other than that illustrated or described herein.
[0023] In this document, "multiple" refers to two or more. "And / or" describes the relationship between associated objects, indicating that three relationships can exist. For example, A and / or B can represent: A alone, A and B simultaneously, or B alone. The character " / " generally indicates that the preceding and following associated objects are in an "or" relationship. In the following description, references to "some embodiments or some embodiment methods" describe a subset of all possible embodiments. However, it is understood that "some embodiments" can be the same subset or different subsets of all possible embodiments and can be combined with each other without conflict.
[0024] Figure 1 This is a flowchart illustrating a brightness adjustment method according to an embodiment of this application. The method can be executed by an electronic device, which can be a device with a light source or a light-emitting device, such as a smart TV, smartphone, display, vehicle terminal, lighting equipment, etc. (Refer to...) Figure 1 As shown, the method includes at least steps 110 to 130, which are described in detail below: Step 110: Determine whether the mapping relationship between the human eye response brightness and the input grayscale value under each input grayscale value of the light source meets the linearity requirement.
[0025] The human eye response brightness at each input gray level of the light source can be determined in advance based on the spectral data of the light source and multiple input gray level values.
[0026] A light source can be the light source of a display screen, which is the core light-emitting component that provides the basic light-emitting or light-transmitting energy to the display screen and determines the brightness and basic color characteristics of the displayed image. It is also called a backlight (backlight module) or a self-emissive light source. It is the energy source that enables the display screen to present a visible image, and its performance directly determines the display screen's core visual indicators such as brightness, color gamut, color temperature, and grayscale performance. A light source can also be the light source provided in lighting equipment for illumination and to present lighting effects, such as LED beads, light strips, and surface lights.
[0027] Input grayscale values refer to the grayscale values theoretically provided to a light source to drive it to emit light. Grayscale represents a discrete series of brightness levels, from pure black (lowest brightness) to pure white (highest brightness). Grayscale values are non-negative integers, and the grayscale bit depth (also called bit depth) determines the total number of grayscale values. For example, if the grayscale bit depth is 8, the grayscale values range from 0 to 255, and the total number of grayscale values is 2 to the power of 8, or 256. Similarly, if the grayscale bit depth is 10, the grayscale values range from 0 to 1023. Different grayscale values result in different luminous power of the light source, and consequently, different physical brightness of the emitted light.
[0028] The human eye response brightness of a light source at an input grayscale value refers to the subjective perceived brightness of the light source's physical brightness when the light source emits light according to that input grayscale value. It is the subjective perceived value of the brightness parameter of the physical light after being modulated by the visual characteristics of the human eye, rather than the objective physical brightness of the light.
[0029] In some embodiments, the spectral data of the light source includes the original spectral radiant power of the light source and the correction parameters of the light source; the human eye response brightness at each input gray level value of the light source can be determined according to the following steps A1-A3: Step A1: Determine the spectral power scaling factor corresponding to the input grayscale value based on the input grayscale value and the correction parameters of the light source.
[0030] For each input grayscale value, normalize the input grayscale value to obtain a normalized grayscale value. Normalization can be performed according to the following formula: ;(Formula 1) This represents the j-th input grayscale value. The corresponding normalized grayscale values, where, , =0, It is related to the gray level depth of the input gray level value; if the gray level depth of the input gray level value is 'a', then For example, if the grayscale depth of the input grayscale value is 8, then It is 255.
[0031] By combining the normalized grayscale value and the light source correction parameters, the spectral power scaling factor corresponding to the input grayscale value can be determined using the following formula: ;(Formula 2) This represents the j-th input grayscale value. The corresponding spectral power scaling factor, These represent the correction parameters for the light source.
[0032] Step A2: Calculate the brightness based on the spectral power scaling factor corresponding to the input grayscale value and the original spectral radiant power to obtain the physical brightness of the light source at the input grayscale value.
[0033] By combining the spectral power scaling factor corresponding to the input grayscale value and the original spectral radiant power, the input grayscale value is converted into a tristimulus value. The resulting Y stimulus (i.e., the green primary color stimulus) represents the physical brightness of the light source at that input grayscale value.
[0034] The tristimulus values can be converted using the following formula: ;(Formula 3) ;(Formula 4) ;(Formula 5) This represents the j-th input grayscale value. X stimulus value (red primary color stimulation amount); This represents the j-th input grayscale value. The Y stimulus value (green primary color stimulus amount), which is the j-th input grayscale value of the light source. Physical brightness; This represents the j-th input grayscale value. Z-stimulation value (blue primary stimulation level); For wavelength, The range of visible light wavelengths is defined as ∈ [380, 780]. This refers to the original spectral radiant power of the light source; , and This represents the CIE standard observer function, which is CIE standard data.
[0035] The physical brightness of a light source at an input grayscale value refers to the brightness of the light emitted by the light source when that input grayscale value is used to drive the light source.
[0036] Step A3: Based on the conversion relationship between physical brightness and human eye response brightness and the physical brightness of the light source at the input grayscale value, determine the human eye response brightness at the input grayscale value of the light source.
[0037] The conversion relationship between physical brightness and human eye response brightness can be expressed by Stevens' power law, for example, as the following formula: ;(Formula 6) Indicates the brightness response of the human eye; Indicates physical brightness; It is a constant; It is a power exponent determined by the intensity of the perceived stimulus. It can be given in advance.
[0038] By using steps A1-A3 above, the human eye response brightness at each input gray level value of the light source can be determined.
[0039] The mapping relationship between the human eye response brightness under multiple input grayscale values of the light source and the input grayscale value reflects how the human eye response brightness under multiple input grayscale values of the light source changes with the input grayscale value when the input grayscale value is taken as the input and the human eye response brightness under the input grayscale value of the light source is taken as the output.
[0040] The inventors of this application have discovered that if the display screen is driven to emit light directly according to the input grayscale value, when the input grayscale value changes linearly, the change in human eye response brightness with the input grayscale value is not linear and has a high degree of nonlinearity. That is, the mapping relationship between human eye response brightness and input grayscale value under multiple input grayscale values of the light source does not meet the linearity requirement.
[0041] For example Figure 2A As shown, curve 1 represents the curve of the physical brightness of the light source changing with the input gray level value, which is basically linear. Curve 2 represents the curve of the human eye response brightness changing with the input gray level value of the light source, which is a convex curve. Curve 2 also reflects the mapping relationship between the human eye response brightness and the input gray level value under multiple input gray level values of the light source.
[0042] It can be seen that if the light source is driven to emit light directly according to the input grayscale value, when the light source is low brightness, the human eye responds to the brightness rapidly, while when the light source is high brightness, the human eye responds to the brightness gradually. In other words, the human eye is more sensitive when the light source is in the low brightness range, and feels very bright when the physical brightness of the light source is low.
[0043] In this application, a linearity requirement is defined to limit the range of linearity in which the human eye's response brightness changes with the input grayscale value. Linearity fitting can be performed based on the mapping relationship between the human eye's response brightness and the input grayscale value under multiple input grayscale values of the light source. The range of linearity reflected by this mapping relationship is then determined. If the range of linearity reflected by this mapping relationship exceeds the range defined by the linearity requirement, then the mapping relationship between the human eye's response brightness and the input grayscale value under multiple input grayscale values of the light source does not meet the linearity requirement; otherwise, the linearity requirement is met.
[0044] In some embodiments, the human eye response brightness at each input grayscale value of the light source can be linearly fitted to multiple input grayscale values using the least squares method to determine a fitted straight line. For example, Figure 2B As shown, the x-coordinate of each black dot represents the input grayscale value, and the y-coordinate represents the human eye response brightness at the corresponding input grayscale value of the light source. The fitted straight line is also shown. Based on this, the human eye response brightness that deviates the most from the fitted straight line is determined, for example, [example value]. Figure 2B The human eye response brightness corresponding to point B1 is determined, and the deviation of point B1 from the fitted straight line is determined. Then, the deviation of point B1 from the fitted line is... With the maximum human eye response brightness value The ratio of the two values represents the linearity of the mapping relationship between the human eye's response brightness at the input grayscale value of the light source and the input grayscale value. The maximum human eye response brightness value refers to the maximum value among multiple input grayscale values of the light source.
[0045] After determining the linearity corresponding to the mapping relationship between the human eye response brightness and the input grayscale value of the light source, if the linearity is within the limit range defined by the linearity requirement, then the linearity requirement is met; otherwise, the limit requirement is not met.
[0046] Step 120: If it is determined that the linearity requirement is not met, then each input gray level value is modulated according to the Gamma parameter to obtain the target modulated gray level value corresponding to each input gray level value; wherein, the mapping relationship between the human eye response brightness of the light source under the target modulated gray level value and the input gray level value satisfies the linearity requirement.
[0047] If the mapping relationship between the human eye response brightness and the input grayscale value of the light source does not meet the linearity requirement, then each input grayscale value is modulated according to the Gamma parameter to obtain the target modulated grayscale value corresponding to each input grayscale value. In this way, when the input of the light source is a single input grayscale value, the light source will not be driven to emit light according to the input grayscale value.
[0048] The human eye response brightness of a light source at the target modulation grayscale value refers to the brightness response of the human eye to the physical brightness of the light source when the light source is driven to emit light according to the target modulation grayscale value. The mapping relationship between the human eye response brightness of the light source at the target modulation grayscale value and the input grayscale value reflects how the human eye response brightness of the light source at the target modulation grayscale value corresponding to the input grayscale value changes with the input grayscale value, when the input grayscale value is taken as input and the human eye response brightness of the light source at the target modulation grayscale value corresponding to the input grayscale value is taken as output.
[0049] Since the mapping relationship between the human eye response brightness of the light source at the target modulation gray level value and the input gray level value satisfies the linearity requirement, it indicates that when the input of the light source is the input gray level value and the light source emits light according to the target modulation gray level value corresponding to the input gray level value, the linearity of the change of the human eye response brightness with the input gray level value is relatively high, that is, the linearity of this change is relatively high.
[0050] In some embodiments, such as Figure 3 As shown, step 120 includes the following steps 310-360: Step 310: Based on the i-th Gamma parameter, perform Gamma calculation on each input grayscale value to obtain the i-th modulation grayscale value corresponding to each input grayscale value; i is initialized to 1 and i is a positive integer.
[0051] In this application, determining the target modulated grayscale value corresponding to each input grayscale value involves modulating the input grayscale value at least once. In this application, the modulation of the input grayscale value is performed using a Gamma parameter to calculate the Gamma value; different Gamma parameters are used for different modulations. During the first modulation, i is initialized to 1, and the first Gamma parameter is obtained accordingly. This first Gamma parameter can be a pre-set Gamma parameter.
[0052] like Figure 2A As shown, the human eye's response brightness increases rapidly at low brightness levels, while it tends to level off at high brightness levels. The human eye is more sensitive at low brightness levels, and even when the physical brightness is low, it feels very bright. Therefore, the initially set first Gamma parameter can be used to reduce the human eye's response brightness at low input grayscale values. That is, by calculating the Gamma of the input grayscale value using the initially set first Gamma parameter, the human eye's response brightness when the light source is driven to emit light according to the first modulation grayscale value corresponding to the input grayscale value is less than the human eye's response brightness when the light source is driven to emit light according to the input grayscale value.
[0053] The i-th modulated grayscale value corresponding to an input grayscale value refers to the grayscale value obtained by calculating Gamma using the i-th Gamma parameter on the input grayscale value. In some embodiments, the first Gamma parameter can be set to 1. In some embodiments, step 310 may include steps B1-B5 as follows: Step B1: Calculate the ratio of the input grayscale value to the first reference base to obtain the reference ratio.
[0054] Step B2 involves performing an exponential operation with the reference ratio as the base and the i-th Gamma parameter as the exponent to obtain the reference coefficient.
[0055] Step B3: Multiply the reference coefficient by the first reference base to obtain the i-th reference gray level value corresponding to the input gray level value.
[0056] In some embodiments, a first reference base can be determined based on the grayscale depth of the input grayscale value. Specifically, if the grayscale depth of the input grayscale value is b, where b is a positive integer, then... Used as the primary reference base. For example, if the grayscale depth of the input grayscale value is 8, then... =255, used as the first reference base.
[0057] Taking a first reference base of 255 as an example, the i-th reference grayscale value corresponding to the input grayscale value can be determined according to the following formula: ;(Formula 7) in, This represents the i-th reference grayscale value corresponding to the input grayscale value G; This represents the i-th Gamma parameter. This is the reference ratio mentioned above.
[0058] In other embodiments, a reference grayscale bit depth can be set. Assuming the reference grayscale bit depth is equal to q, then... As a first reference base. In some embodiments, the gray level depth required by the display screen can be used as the reference gray level depth. In this way, after determining the target modulation gray level value corresponding to the input gray level value, it is not necessary to convert the target modulation gray level value according to the gray level depth required by the display screen.
[0059] Step B4: If the grayscale value required by the light source is an integer, then the i-th reference grayscale value is rounded to obtain the i-th modulation grayscale value corresponding to the input grayscale value.
[0060] When the grayscale value required by the light source is an integer, the subsequent grayscale value also needs to be an integer to drive the light source. However, when performing Gamma calculation according to the above process, the i-th modulation grayscale value corresponding to the input grayscale value may not be an integer, but a floating-point value. Therefore, the i-th reference grayscale value is rounded to obtain the i-th modulation grayscale value corresponding to the input grayscale value, ensuring that the i-th modulation grayscale value corresponding to the input grayscale value is an integer value.
[0061] Step B5: If the grayscale value required by the light source is floating-point, then the i-th reference grayscale value is used as the i-th modulation grayscale value corresponding to the input grayscale value.
[0062] When the grayscale value required by the light source is a floating-point number, no rounding is required. The i-th reference grayscale value is used as the i-th modulation grayscale value corresponding to the input grayscale value.
[0063] Step 320: Determine the physical brightness of the light source at the i-th modulation gray level value, and use it as the i-th physical brightness corresponding to the input gray level value.
[0064] The physical brightness of a light source at the i-th modulation gray level refers to the physical brightness of the light emitted by the light source when driven by the i-th modulation gray level. It can be determined by following a process similar to steps A1-A2 above, combining the spectral data of the light source with the i-th modulation gray level corresponding to each input gray level.
[0065] Step 330: Determine the human eye response brightness corresponding to each i-th physical brightness. This can be done using Formula 6 above.
[0066] Step 340: Determine whether the mapping relationship between the human eye response brightness corresponding to the i-th physical brightness and the input grayscale value meets the linearity requirement; if it does, proceed to step 350; if it does not, proceed to step 360.
[0067] Similarly, the mapping relationship between the human eye response brightness corresponding to the i-th physical brightness and the input grayscale value reflects how the human eye response brightness corresponding to the i-th physical brightness changes with the input grayscale value when the input grayscale value is used as the input and the human eye response brightness corresponding to the i-th physical brightness is used as the output.
[0068] If the mapping relationship between the human eye response brightness corresponding to the i-th physical brightness and the input grayscale value satisfies the linearity requirement, then when the input of the light source is the input grayscale value, and the light source is driven to emit light according to the i-th modulation grayscale value corresponding to the input grayscale value, the linearity of the change in the human eye response brightness with the input grayscale value is relatively high. The process of determining the linearity represented by the mapping relationship between the human eye response brightness corresponding to the i-th physical brightness and the input grayscale value is similar to that described above and will not be repeated here.
[0069] Step 350: Take the i-th modulation grayscale value corresponding to each input grayscale value as the corresponding target modulation grayscale value.
[0070] Step 360: Adjust the i-th Gamma parameter to obtain the (i+1)-th Gamma parameter, and increment i by 1. Then return to step 310.
[0071] The i-th Gamma parameter can be added to the preset offset to obtain the (i+1)-th Gamma parameter. The offset can be set as needed, for example, the offset can be set to 0.01, but it is not limited to this.
[0072] Through steps 310-360 above, the target modulation grayscale value corresponding to each input grayscale value can be determined in a targeted manner, ensuring that the human eye response brightness of the light source under the target modulation grayscale value and the mapping relationship between the input grayscale value meet the linearity requirements.
[0073] Figure 4 The example shows the curves of the physical brightness and human eye response brightness of the modulated light source as a function of the input grayscale value. Figure 4 Curve 3 reflects the change in physical brightness of the light source at the target modulation grayscale value corresponding to the input grayscale value as the input grayscale value changes; curve 4 reflects the change in human eye response brightness as the input grayscale value occurs when the light source is driven according to the target modulation grayscale value corresponding to the input grayscale value. (Comparison) Figure 4 Curve 4 and Figure 2A As can be seen from curve 2 in the figure, after modulation, the linearity of the human eye response brightness as a function of the input grayscale value is significantly improved.
[0074] In some embodiments, after step 110, the method further includes: if the mapping relationship between the human eye response brightness and the input grayscale value under the input grayscale value of the light source meets the linearity requirement, then the input grayscale value is used as the corresponding target modulation grayscale value.
[0075] In other words, if the mapping relationship between the human eye response brightness and the input gray level value of the light source meets the linearity requirement, it is not necessary to modulate the input gray level value. Instead, an input gray level value can be used as the target modulated gray level value corresponding to that input gray level value.
[0076] Step 130: According to the grayscale value requirements of the light source, the target modulation grayscale value is converted to obtain the target grayscale value corresponding to each input grayscale value; wherein, when the input is the input grayscale value, the light source emits light according to the target grayscale value corresponding to the input grayscale value.
[0077] The grayscale value requirements include the required grayscale bit depth and the required data type. The data type can be integer or floating-point. The grayscale bit depth of the target modulation grayscale value may not be consistent with the grayscale bit depth required by the display screen. Therefore, the target modulation grayscale value is converted according to the grayscale bit depth of the display screen. However, after the grayscale bit depth conversion, the original integer grayscale value may become a floating-point grayscale value. Therefore, it is necessary to further convert the grayscale value after the grayscale bit depth conversion according to the data type required by the display screen to obtain the target grayscale value corresponding to the input grayscale value. This target grayscale value meets the grayscale bit depth required by the display screen, and the data type of the target grayscale value is the data type required by the display screen.
[0078] In some embodiments, the grayscale data type requires a required grayscale bit depth; the grayscale bit depth of the target modulation grayscale value is m; the grayscale bit depth required by the display screen is n; m and n are both integers greater than 1; step 130 includes the following ①-②: ①If n is not equal to m, convert the target modulation grayscale value corresponding to the input grayscale value to an n-bit grayscale value to obtain an intermediate grayscale value; determine the target grayscale value corresponding to the input grayscale value based on the intermediate grayscale value.
[0079] ②If n equals m, the target modulated gray level value corresponding to the input gray level value is used as the target gray level value corresponding to the input gray level value.
[0080] When n is not equal to m, the following formula can be used to convert to an n-bit grayscale: ;(Formula 8) Indicates input grayscale value The corresponding intermediate grayscale value; Indicates input grayscale value The corresponding target modulation grayscale value. When m=8 =256.
[0081] In some embodiments, the grayscale data type requirement also includes a required numeric type. Correspondingly, the step of determining the target grayscale value corresponding to the input grayscale value based on the intermediate grayscale value includes: if the required numeric type is integer, taking the rounded value of the intermediate grayscale value as the target grayscale value corresponding to the input grayscale value; if the required numeric type is floating-point, taking the intermediate grayscale value as the target grayscale value corresponding to the input grayscale value.
[0082] When the required data type of the light source is integer, as mentioned above, the target modulation grayscale value corresponding to the obtained input grayscale value is also actually integer. When n is greater than m, The value is also an integer. Therefore, in this case, converting the target modulated grayscale value to an n-bit grayscale results in an intermediate grayscale value that is also an integer. Correspondingly, the rounded-down value of the intermediate grayscale value is the same as the intermediate grayscale value. Therefore, it can also be understood that when n is greater than m, and the light source requires an integer value, the rounded-down value of the intermediate grayscale value = the intermediate grayscale value = the target grayscale value corresponding to the input grayscale value.
[0083] If the required numerical type of the light source is integer, and n is less than m, The value is a decimal. When the target grayscale value is converted to an n-bit grayscale, the resulting intermediate grayscale value is not necessarily an integer. In this case, the rounded value of the intermediate grayscale may not be equal to the intermediate grayscale value. Therefore, in this case, the rounded value of the intermediate grayscale is used as the target grayscale value corresponding to the input grayscale value.
[0084] If n is not equal to m, and the required numerical type is floating point, then the target modulated gray level value corresponding to the input gray level value will be converted to an n-bit gray level to obtain an intermediate gray level value, which will be used as the target gray level value corresponding to the input gray level value.
[0085] If n equals m, regardless of whether the required numerical type is integer or floating-point, the target modulation grayscale value corresponding to the input grayscale value is also an integer. Therefore, no additional conversion is needed. The target modulation grayscale value corresponding to the input grayscale value is used as the target grayscale value corresponding to the input grayscale value.
[0086] In some embodiments, a mapping relationship between input grayscale values and target grayscale values can be established based on the target grayscale value determined for each input grayscale value. This mapping relationship is stored in the storage space of the display screen. Thus, when the input of the light source is any input grayscale value, the target grayscale value corresponding to the input grayscale value is obtained from the stored mapping relationship between input grayscale values and target grayscale values. The light source of the display screen emits light according to the obtained target grayscale value, and the target grayscale value determines the luminous power of the light source of the display screen.
[0087] In this application, when the mapping relationship between the human eye response brightness of the light source at the input grayscale value and the input grayscale value does not meet the linearity requirement, the input grayscale values are modulated according to the Gamma parameter to obtain the target modulated grayscale value corresponding to each input grayscale value. This ensures that the mapping relationship between the human eye response brightness of the light source at the target modulated grayscale value and the input grayscale value meets the linearity requirement. Then, according to the grayscale value requirements of the light source, the target modulated grayscale value is converted to obtain the target grayscale value corresponding to each input grayscale value. When the display screen receives the input grayscale value, the light source emits light according to the target grayscale value corresponding to the input grayscale value, instead of directly emitting light according to the input grayscale value. Since the grayscale value directly determines the luminous power of the light source, this application achieves nonlinear modulation of the luminous power of the light source, i.e., determining the target modulated grayscale value for each input grayscale value. This ensures that after modulation, the change in human eye response brightness with the input grayscale value is more linear, and the perceived light gradient effect is more uniform, effectively guaranteeing the viewing experience.
[0088] Furthermore, as described above, the human eye responds to brightness rapidly at low brightness levels, while the response level tends to level off at high brightness levels. The human eye is more sensitive at low brightness levels, perceiving light as bright even when the physical brightness is low. When the input grayscale value is small, modulation will result in a smaller target modulation grayscale value, which can reduce the physical brightness of the light source. This, in turn, can improve the perceived contrast between light and dark, enriching the lighting effect.
[0089] In some embodiments, the i-th modulation grayscale value is a floating-point number; correspondingly, such as Figure 5 As shown, step 320 includes the following steps 510-540: Step 510: Determine a first reference gray level value and a second reference gray level value for the i-th modulation gray level value. The first reference gray level value is the largest integer value less than or equal to the i-th modulation gray level value, and the second reference gray level value is the smallest integer value greater than or equal to the i-th modulation gray level value.
[0090] For each i-th modulation gray level value, a first reference gray level value and a second reference gray level value are determined. For the i-th modulation gray level value, the two integer values (integers) closest to the i-th modulation gray level value are used as the first reference gray level value and the second reference gray level value, where the first reference gray level value ≤ the i-th modulation gray level value ≤ the second reference gray level value.
[0091] Step 520: Calculate the physical brightness based on the spectral data and the first reference grayscale value to obtain the first physical brightness of the light source under the first reference grayscale value.
[0092] Step 530: Calculate the physical brightness based on the spectral data and the second reference grayscale value to obtain the second physical brightness of the light source under the second reference grayscale value.
[0093] Substituting the first reference grayscale value into Formula 1 above, and following Formulas 1-2 and 4 as above, the first physical brightness of the light source at the first reference grayscale value is calculated. Similarly, substituting the second reference grayscale value into Formula 1 above, and following Formulas 1-2 and 4 as above, the second physical brightness of the light source at the second reference grayscale value is calculated.
[0094] Step 540: Calculate the physical brightness of the light source at the i-th modulation gray level value based on the difference between the i-th modulation gray level value and the first reference gray level value, the difference between the second physical brightness and the first physical brightness, and the first physical brightness.
[0095] In some embodiments, step 540 includes: multiplying the difference between the i-th modulation grayscale value and the first reference grayscale value, and the difference between the second physical brightness and the first physical brightness, to obtain a brightness compensation value; and adding the first physical brightness and the brightness compensation value to obtain the physical brightness of the light source at the i-th modulation grayscale value.
[0096] The physical brightness of the light source at the i-th modulation gray level can be determined using the following formula: ;(Formula 9) This represents the i-th modulated gray level value corresponding to the input gray level value G; This represents the i-th modulation grayscale value corresponding to the input grayscale value G of the light source. Physical brightness below; Represented as The determined first reference grayscale value; Indicates the second physical brightness; This represents the first physical brightness. In Formula 9, This is the brightness compensation value mentioned above.
[0097] In the above embodiment, considering that grayscale values are usually converted to brightness using integer grayscale values, when the i-th modulation grayscale value is a floating-point number, the physical brightness of the light source at the i-th modulation grayscale value is determined by combining the floor value (i.e., the first reference grayscale value) and the floor value (i.e., the second reference grayscale value) of the i-th modulation grayscale value. This ensures that the determined physical brightness of the light source at the i-th modulation grayscale value is greater than or equal to the physical brightness of the light source at the first reference grayscale value and less than or equal to the physical brightness of the light source at the second reference grayscale value. Therefore, the accuracy of the determined physical brightness can be guaranteed, and the deviation will not be too large.
[0098] In some other embodiments, the i-th modulation grayscale value is an integer; step 320 includes: calculating the physical brightness based on the spectral data and the i-th modulation grayscale value to obtain the physical brightness of the light source at the i-th modulation grayscale value.
[0099] The i-th modulation grayscale value can be substituted into Formula 1 above, and the physical brightness of the light source at the i-th modulation grayscale value can be calculated according to Formulas 1-2 and Formula 4.
[0100] The solution of this application will be described below with reference to some specific embodiments.
[0101] In the following embodiment, the gray level depth of the input gray level value is 8, the value range of the input gray level value is 0~255, the first reference base is 255, and correspondingly, the gray level depth of each modulation gray level value is also 8.
[0102] (a) If the required grayscale bit depth n of the light source is equal to 8, and the required grayscale value of the light source is an integer, it can be done according to... Figure 6 The process shown in ① is used to perform grayscale modulation to obtain the target grayscale value corresponding to each input grayscale value.
[0103] like Figure 6 As shown in step ①, the process includes: step 601, obtaining the input grayscale value G located between 0 and 255; step 602, calculating the physical brightness Y of the light source at each input grayscale value; step 603, determining the human eye response brightness corresponding to each physical brightness Y; step 604, judging whether the curve of the human eye response brightness changing with the input grayscale value meets the linearity requirement; if it does not meet the requirement, proceed to step 605; if it does meet the requirement, proceed to step 612, using the input grayscale value as the target modulation grayscale value and also as the target grayscale value.
[0104] Step 605: Calculate Gamma for the input grayscale value G and round the result to obtain the modulation grayscale value. That is, initialize i to 1, and calculate Gamma according to Formula 7 based on the i-th Gamma parameter and the first reference base of 255 to obtain the i-th reference grayscale value corresponding to the input grayscale value G; round the i-th reference grayscale value, and use the rounded result as the i-th modulation grayscale value corresponding to the input grayscale value.
[0105] Step 606: Determine the physical brightness of the light source at the modulation grayscale value (e.g., the i-th modulation grayscale value). At this time, the i-th modulation grayscale value is an integer, and the physical brightness Y can be calculated according to formulas 1-2 and 4.
[0106] Step 607: Determine the human eye response brightness corresponding to the physical brightness Y of the light source at the i-th modulation gray level value.
[0107] Step 608: Determine whether the curve of the new human eye response brightness (i.e., the human eye response brightness determined in step 607) changing with the input grayscale value meets the linearity requirement; if it does, proceed to step 609; if it does not, proceed to step 611: adjust the Gamma parameter, that is, adjust the i-th Gamma parameter to obtain the (i+1)-th Gamma parameter, and then use the (i+1)-th Gamma parameter for Gamma calculation in step 605.
[0108] Step 609: Determine the modulation grayscale value as the target modulation grayscale value, and also use it as the target grayscale value.
[0109] Step 610: Output the target grayscale value.
[0110] according to Figure 6 The process shown in ① determines the corresponding target grayscale value for each input grayscale value, ensuring that when the input of the light source is the input grayscale value, the light source emission is determined according to the target grayscale value corresponding to the input grayscale value, so that the change in brightness of the human eye with the input grayscale value meets the linearity requirement. Moreover, the grayscale bit depth of the target grayscale value is 8, and the target grayscale value is an integer, ensuring that the grayscale value requirements of the light source are met.
[0111] (ii) If the required grayscale bit depth n of the light source is equal to 8, and the required grayscale value of the light source is floating-point, it can be done according to... Figure 6 The process shown in ② is used to perform grayscale modulation to obtain the target grayscale value corresponding to each input grayscale value.
[0112] The processing procedure in this situation is the same as Figure 6 The process shown in ① is roughly the same, the only difference being the processing steps. Figure 6In section ②, a bold black box is used to indicate that, in this case, the result of the Gamma calculation does not need to be retrieved in each calculation. Instead, the result is directly used as the modulation grayscale value. Correspondingly, the modulation grayscale value in this case is a floating-point number.
[0113] Subsequently, a first reference grayscale value and a second reference grayscale value are determined for the floating-point modulation grayscale value, and the first physical brightness of the light source under the first reference grayscale value and the second physical brightness under the second reference grayscale value are determined accordingly.
[0114] In a specific example, the physical brightness of the light source at each grayscale value from 0 to 255 can be pre-calculated. Then, in the above steps, the physical brightness at the first reference grayscale value can be found in the grayscale value and physical brightness table, and this is taken as the first physical brightness; the physical brightness at the second reference grayscale value can also be found, and this is taken as the second physical brightness. In this embodiment, the physical brightness of the light source at each input grayscale value can be pre-calculated based on multiple given input grayscale values and the spectral data of the light source, according to Formulas 1, 2, and 4 above, forming a grayscale value and physical brightness table, which is then stored in the grayscale value and physical brightness table. In subsequent processes, the physical brightness at the first reference grayscale value and the physical brightness at the second reference grayscale value are found from this grayscale value and physical brightness table.
[0115] Subsequently, combining the first and second physical brightness, the physical brightness of the light source at the floating-point modulation grayscale value is calculated according to Formula 9 above. The subsequent processing is the same as... Figure 6 The process shown in ① is basically the same.
[0116] (iii) If the required grayscale bit depth n of the light source is less than 8, and the required grayscale value of the light source is an integer, it can be calculated according to... Figure 7 The process shown in ① is used to perform grayscale modulation to obtain the target grayscale value corresponding to each input grayscale value.
[0117] Figure 7 The processing procedure shown in ① is roughly the same as Figure 6 The process shown in ① is in Figure 7 In section ①, different processing steps are marked with bold black boxes.
[0118] like Figure 7As shown in ①, the target modulation grayscale value determined for the input grayscale value is an integer with a grayscale bit depth of 8. However, the grayscale bit depth n required by the light source is less than 8. Therefore, the target modulation grayscale value does not meet the grayscale value requirements of the display screen (the value type is satisfied, but the grayscale bit depth is not). Thus, after determining the target modulation grayscale value for the input grayscale value, the target modulation grayscale value is converted to an n-bit grayscale value according to formula 8 above. The conversion result is then rounded to obtain the target grayscale value, which has a grayscale bit depth of n and is an integer.
[0119] like Figure 7 As shown in ①, if the curve of the human eye response brightness changing with the input grayscale value is initially determined to meet the linearity requirement, the input grayscale value is used as the target modulation grayscale value. Although the input grayscale value is an integer, its grayscale bit depth is 8, which does not meet the grayscale bit depth required by the display screen. Therefore, according to formula 8 above, the target modulation grayscale value is converted to an n-bit grayscale, and then the conversion result is rounded to obtain the target grayscale value. The grayscale bit depth of the obtained target grayscale value is n, and the target grayscale value is an integer.
[0120] (iv) If the required grayscale bit depth n of the light source is less than 8, and the required grayscale value of the light source is floating-point, it can be handled according to... Figure 7 The process shown in ② is used to perform grayscale modulation to obtain the target grayscale value corresponding to each input grayscale value.
[0121] exist Figure 7 In section ②, the part marked with a bold black border is... Figure 7 The different processing steps shown in ① are different from those in the other steps within the unbold black boxes. Figure 7 Same as shown in ①.
[0122] like Figure 7 As shown in ②, in each Gamma calculation, the result of the Gamma calculation does not need to be evaluated; instead, it is directly used as the modulation grayscale value. Correspondingly, the modulation grayscale value in this case is floating-point. Then, a first reference grayscale value and a second reference grayscale value are determined for the floating-point modulation grayscale value, and the first physical brightness of the light source under the first reference grayscale value and the second physical brightness under the second reference grayscale value are determined accordingly. Combining the first physical brightness and the second physical brightness, the physical brightness of the light source under the floating-point modulation grayscale value is calculated according to Formula 9 above.
[0123] Furthermore, when the modulated grayscale value is used as the target modulated grayscale value, the target modulated grayscale value is a floating-point number with a grayscale bit depth of 8, which does not meet the grayscale bit depth n required by the light source. Therefore, according to Formula 8 above, the target modulated grayscale value is converted to an n-bit grayscale value, and the conversion result is used as the target grayscale value. The resulting target grayscale value has a grayscale bit depth of n and is a floating-point number.
[0124] Correspondingly, when the input grayscale value G is used as the target modulation grayscale value, the grayscale bit depth of the target modulation grayscale value is 8, which does not meet the grayscale bit depth n required by the light source. Therefore, according to formula 8 above, the target modulation grayscale value is converted to an n-bit grayscale value, and the conversion result is used as the target grayscale value. The resulting target grayscale value has a grayscale bit depth of n, and the target grayscale value is a floating-point number.
[0125] (v) If the required grayscale bit depth n of the light source is greater than 8, and the required grayscale value of the light source is an integer, it can be calculated according to... Figure 8 The process shown in ① is used to perform grayscale modulation to obtain the target grayscale value corresponding to each input grayscale value.
[0126] Figure 8 The processing procedure shown in ① is roughly the same as Figure 6 The process shown in ① is in Figure 8 In ① of the text, regarding the relationship with Figure 6 Different processing steps are marked with bold black boxes in section ①. That is, after determining the modulation grayscale value as the target modulation grayscale value, or the input grayscale value as the target modulation grayscale value, the target modulation grayscale value is converted to an n-bit grayscale value according to formula 8 above, and the conversion result is used as the target grayscale value. The grayscale depth of the obtained target grayscale value is n, and the target grayscale value is an integer.
[0127] Will Figure 8 The process of ① in Figure 7 Comparing the processes in ① and ②, the processes are basically the same, the difference being that... Figure 8 In the process shown in ①, after converting the target modulation grayscale value to an n-bit grayscale, the conversion result is directly used as the target grayscale value without rounding the result. This is because when n is greater than 8, in formula 8, The value is an integer. When the target modulation grayscale value is also an integer, the conversion result obtained according to Formula 8 is also an integer. Therefore, no additional rounding is required.
[0128] (vi) If the required grayscale bit depth n of the light source is greater than 8, and the required grayscale value of the light source is floating-point, it can be handled according to... Figure 8 The process shown in ② is used to perform grayscale modulation to obtain the target grayscale value corresponding to each input grayscale value.
[0129] exist Figure 8 In section ②, the part marked with a bold black border is... Figure 8 The different processing steps shown in ① are different from those in the other steps within the unbold black boxes. Figure 8 The same as shown in ①. Moreover, Figure 8 The processing procedure shown in ② is the same as Figure 7 The processing steps shown in ② are the same; the only difference is the value of n. Therefore, we will not repeat them here. Figure 8 The processing procedure shown in ② will be described in detail.
[0130] Figure 9 An example is shown showing the curves of the brightness of the light source and the human eye response brightness as a function of the input gray level value after the input gray level value is modulated according to the proposed scheme, when the gray level bit depth of the input gray level value is 16. Figure 9 Curve 5 reflects the change in physical brightness of the light source at the target modulated gray level corresponding to the input gray level value as the input gray level value changes; curve 6 reflects the change in human eye response brightness as the input gray level value changes when the light source is driven according to the target modulated gray level value corresponding to the input gray level value. Its linearity is high and meets the linearity requirements. (Comparison) Figure 4 Curve 4 and Figure 9 As can be seen from curve 6, when the gray level depth of the input gray level value is large, the curve modulated by the Gamma parameter is smoother.
[0131] The following describes an apparatus embodiment of this application, which can be used to perform the methods described in the above embodiments of this application. For details not disclosed in the apparatus embodiments of this application, please refer to the method embodiments described in the above embodiments of this application.
[0132] This application also provides a brightness adjustment device, comprising: a judgment module for judging whether the mapping relationship between the human eye response brightness and the input grayscale value under each input grayscale value of the light source meets the linearity requirement; a modulation module for modulating each input grayscale value according to the Gamma parameter if the linearity requirement is not met, to obtain the target modulated grayscale value corresponding to each input grayscale value; wherein the mapping relationship between the human eye response brightness of the light source under the target modulated grayscale value and the input grayscale value meets the linearity requirement; and a conversion module for converting the target modulated grayscale value according to the grayscale data type requirement of the light source, to obtain the target grayscale value corresponding to each input grayscale value; wherein when the input is an input grayscale value, the light source emits light according to the target grayscale value corresponding to the input grayscale value.
[0133] In some embodiments, the modulation module includes: a calculation unit, configured to perform Gamma calculation on each input grayscale value according to the i-th Gamma parameter, to obtain the i-th modulation grayscale value corresponding to each input grayscale value; i is initialized to 1 and i is a positive integer; a first determining unit, configured to determine the physical brightness of the light source at the i-th modulation grayscale value, as the i-th physical brightness corresponding to the input grayscale value; a second determining unit, configured to determine the human eye response brightness corresponding to each i-th physical brightness; and a third determining unit, configured to determine if the human eye response brightness corresponding to the i-th physical brightness is consistent with the input grayscale value. The mapping relationship between the values satisfies the linearity requirement. The i-th modulation gray level value corresponding to each input gray level value is taken as the corresponding target modulation gray level value. The adjustment unit is used to adjust the i-th Gamma parameter if the mapping relationship between the human eye response brightness corresponding to the i-th physical brightness and the input gray level value does not meet the linearity requirement, to obtain the (i+1)-th Gamma parameter, and to increment i by 1 and return to the step of calculating Gamma for each input gray level value according to the i-th Gamma parameter to obtain the i-th modulation gray level value corresponding to each input gray level value.
[0134] In some embodiments, the calculation unit includes: a ratio calculation unit, used to calculate the ratio of the input grayscale value to a first reference base to obtain a reference ratio; an exponentiation unit, used to perform exponentiation with the reference ratio as the base and the i-th Gamma parameter as the exponent to obtain a reference coefficient; a multiplication unit, used to multiply the reference coefficient by the first reference base to obtain the i-th reference grayscale value corresponding to the input grayscale value; a rounding unit, used to round the i-th reference grayscale value to obtain the i-th modulation grayscale value corresponding to the input grayscale value if the grayscale value required by the light source is an integer; and a modulation grayscale value determination unit, used to take the i-th reference grayscale value as the i-th modulation grayscale value corresponding to the input grayscale value if the grayscale value required by the light source is a floating-point value.
[0135] In some embodiments, the i-th modulation grayscale value is a floating-point number; the first determining unit includes: a reference value determining unit, configured to determine a first reference grayscale value and a second reference grayscale value for the i-th modulation grayscale value, wherein the first reference grayscale value is the largest integer value less than or equal to the i-th modulation grayscale value, and the second reference grayscale value is the smallest integer value greater than or equal to the i-th modulation grayscale value; a first physical brightness determining unit, configured to calculate the physical brightness of the light source based on the spectral data of the light source and the first reference grayscale value to obtain a first physical brightness of the light source at the first reference grayscale value; a second physical brightness determining unit, configured to calculate the physical brightness of the light source at the i-th modulation grayscale value based on the difference between the i-th modulation grayscale value and the first reference grayscale value, the difference between the second physical brightness and the first physical brightness, and the first physical brightness.
[0136] In some embodiments, the brightness determination unit is configured to: multiply the difference between the i-th modulation grayscale value and the first reference grayscale value, and the difference between the second physical brightness and the first physical brightness, to obtain a brightness compensation value; and add the first physical brightness and the brightness compensation value to obtain the physical brightness of the light source at the i-th modulation grayscale value.
[0137] In some embodiments, the i-th modulation grayscale value is an integer; the first determining unit is configured to: calculate the physical brightness of the light source based on the spectral data and the i-th modulation grayscale value, to obtain the physical brightness of the light source at the i-th modulation grayscale value.
[0138] In some embodiments, the grayscale data type requires a required grayscale bit depth; the grayscale bit depth of the target modulation grayscale value is m; the required grayscale bit depth is n; m and n are both integers greater than 1; the conversion module is configured to: if n is not equal to m, convert the target modulation grayscale value corresponding to the input grayscale value to n-bit grayscale to obtain an intermediate grayscale value; determine the target grayscale value corresponding to the input grayscale value based on the intermediate grayscale value; if n is equal to m, use the target modulation grayscale value corresponding to the input grayscale value as the target grayscale value corresponding to the input grayscale value.
[0139] In some embodiments, the grayscale data type requirement also includes a required numeric type. In the step of determining the target grayscale value corresponding to the input grayscale value based on the intermediate grayscale value, the conversion module is further configured to: if the required numeric type is integer, use the rounded value of the intermediate grayscale value as the target grayscale value corresponding to the input grayscale value; if the required numeric type is floating-point, use the intermediate grayscale value as the target grayscale value corresponding to the input grayscale value.
[0140] In some embodiments, the brightness adjustment device further includes: a second determining module, configured to, if it is determined that the mapping relationship between the human eye response brightness and the input grayscale value under the input grayscale value of the light source meets the linearity requirement, then take the input grayscale value as the corresponding target modulation grayscale value.
[0141] An embodiment of this application also provides a light-emitting device, which includes a processor, a memory, and computer instructions stored in the memory. When the computer instructions are executed by the processor, the target gray level value corresponding to each input gray level value is determined according to the method in the above method embodiment. A light source is also provided. When the input of the light source is an input gray level value, the light source emits light according to the target gray level value corresponding to the input gray level value.
[0142] A processor may include one or more processing cores. The processor connects various parts within the electronic device using various interfaces and lines, and performs various functions and processes data by running or executing instructions, programs, code sets, or instruction sets stored in memory, and by calling data stored in memory. Optionally, the processor may be implemented using at least one hardware form of Digital Signal Processing (DSP), Field-Programmable Gate Array (FPGA), or Programmable Logic Array (PLA). The processor may integrate one or a combination of several of the following: Central Processing Unit (CPU), Graphics Processing Unit (GPU), and modem. The CPU primarily handles the operating system, user interface, and applications; the GPU is responsible for rendering and drawing the displayed content; and the modem handles wireless communication. It is understood that the modem may also be implemented separately as a communication chip, without being integrated into the processor.
[0143] The memory can be used to store instructions, programs, code, code sets, or instruction sets. The memory may include a program storage area and a data storage area. The program storage area may store instructions for implementing an operating system, instructions for implementing at least one function, instructions for implementing the various method embodiments described below, etc. The data storage area may also store data created during the use of the electronic device.
[0144] This application also provides a computer-readable storage medium storing computer-readable instructions that, when executed by a processor, implement the methods in any of the above-described method embodiments. The computer-readable storage medium may be an electronic memory such as flash memory, EEPROM (Electrically Erasable Programmable Read-Only Memory), EPROM, hard disk, or ROM. Optionally, the computer-readable storage medium includes a non-transitory computer-readable storage medium. The computer-readable storage medium has storage space for computer-readable instructions that perform any of the method steps described above. These computer-readable instructions can be read from or written to one or more computer program products. The computer-readable instructions may, for example, be compressed in a suitable form.
[0145] According to one aspect of the embodiments of this application, a computer program product is provided, the computer program product including computer-readable instructions stored in a computer-readable storage medium. A processor of a computer device reads the computer-readable instructions from the computer-readable storage medium, and the processor executes the computer-readable instructions, causing the computer device to perform the methods of any of the above embodiments.
[0146] It should be noted that although several modules or units for the device used to perform actions have been mentioned in the detailed description above, this division is not mandatory. In fact, according to the embodiments of this application, the features and functions of two or more modules or units described above can be embodied in one module or unit. Conversely, the features and functions of one module or unit described above can be further divided and embodied by multiple modules or units.
[0147] Through the above description of the embodiments, those skilled in the art will readily understand that the exemplary embodiments described herein can be implemented by software or by combining software with necessary hardware. Therefore, the technical solutions according to the embodiments of this application can be embodied in the form of a software product, which can be stored in a non-volatile storage medium (such as a CD-ROM, USB flash drive, external hard drive, etc.) or on a network, including several instructions to cause a computing device (such as a personal computer, server, touch terminal, or network device, etc.) to execute the methods according to the embodiments of this application.
[0148] Other embodiments of this application will readily occur to those skilled in the art upon consideration of the specification and practice of the embodiments disclosed herein. This application is intended to cover any variations, uses, or adaptations of this application that follow the general principles of this application and include common knowledge or customary techniques in the art not disclosed herein.
[0149] It should be understood that this application is not limited to the precise structure described above and shown in the accompanying drawings, and various modifications and changes can be made without departing from its scope. The scope of this application is limited only by the appended claims.
Claims
1. A brightness adjustment method, characterized in that, include: Determine whether the mapping relationship between the human eye response brightness and the input grayscale value at each input grayscale value of the light source meets the linearity requirement; If the linearity requirement is not met, the input grayscale values are modulated according to the Gamma parameter to obtain the target modulated grayscale value corresponding to each input grayscale value; wherein, the mapping relationship between the human eye response brightness of the light source under the target modulated grayscale value and the input grayscale value satisfies the linearity requirement. According to the grayscale data type requirements of the light source, the target modulation grayscale value is converted to obtain the target grayscale value corresponding to each input grayscale value; wherein, when the input is the input grayscale value, the light source emits light according to the target grayscale value corresponding to the input grayscale value.
2. The method according to claim 1, characterized in that, The step of modulating each of the input grayscale values according to the Gamma parameter to obtain the target modulated grayscale value corresponding to each of the input grayscale values includes: Based on the i-th Gamma parameter, Gamma is calculated for each input grayscale value to obtain the i-th modulation grayscale value corresponding to each input grayscale value; i is initialized to 1 and i is a positive integer; The physical brightness of the light source at the i-th modulation grayscale value is determined and used as the i-th physical brightness corresponding to the input grayscale value; Determine the human eye response brightness corresponding to each of the i-th physical brightness; If the mapping relationship between the human eye response brightness corresponding to the i-th physical brightness and the input grayscale value satisfies the linearity requirement, the i-th modulation grayscale value corresponding to each input grayscale value is taken as the corresponding target modulation grayscale value. If the mapping relationship between the human eye response brightness corresponding to the i-th physical brightness and the input grayscale value does not meet the linearity requirement, then the i-th Gamma parameter is adjusted to obtain the (i+1)-th Gamma parameter, and i is incremented by 1, and the process of calculating Gamma for each input grayscale value based on the i-th Gamma parameter to obtain the i-th modulation grayscale value corresponding to each input grayscale value is returned.
3. The method according to claim 2, characterized in that, The step of calculating the Gamma of each input grayscale value based on the i-th Gamma parameter to obtain the i-th modulation grayscale value corresponding to each input grayscale value includes: Calculate the ratio of the input grayscale value to the first reference base to obtain the reference ratio; Using the reference ratio as the base and the i-th Gamma parameter as the exponent, perform an exponential operation to obtain the reference coefficient; Multiply the reference coefficient by the first reference base to obtain the i-th reference gray level value corresponding to the input gray level value; If the grayscale value required by the light source is an integer, then the i-th reference grayscale value is rounded to obtain the i-th modulation grayscale value corresponding to the input grayscale value. If the grayscale value required by the light source is a floating-point number, then the i-th reference grayscale value is used as the i-th modulation grayscale value corresponding to the input grayscale value.
4. The method according to claim 2, characterized in that, The i-th modulation grayscale value is a floating-point number; determining the physical brightness of the light source at the i-th modulation grayscale value includes: A first reference grayscale value and a second reference grayscale value are determined for the i-th modulation grayscale value, wherein the first reference grayscale value is the largest integer value less than or equal to the i-th modulation grayscale value, and the second reference grayscale value is the smallest integer value greater than or equal to the i-th modulation grayscale value; The physical brightness of the light source is calculated based on the spectral data of the light source and the first reference grayscale value to obtain the first physical brightness of the light source at the first reference grayscale value. The physical brightness of the light source is calculated based on the spectral data and the second reference grayscale value to obtain the second physical brightness of the light source under the second reference grayscale value. The physical brightness of the light source at the i-th modulation gray level is calculated based on the difference between the i-th modulation gray level and the first reference gray level, the difference between the second physical brightness and the first physical brightness, and the first physical brightness.
5. The method according to claim 4, characterized in that, Determining the physical brightness of the light source at the i-th modulation grayscale value based on the difference between the i-th modulation grayscale value and the first reference grayscale value, the difference between the second physical brightness and the first physical brightness, and the first physical brightness includes: Multiply the difference between the i-th modulated grayscale value and the first reference grayscale value, and the difference between the second physical brightness and the first physical brightness, to obtain the brightness compensation value. The first physical brightness is added to the brightness compensation value to obtain the physical brightness of the light source at the i-th modulation gray level value.
6. The method according to any one of claims 1 to 5, characterized in that, The grayscale data type requires a required grayscale bit depth; the grayscale bit depth of the target modulation grayscale value is m; the required grayscale bit depth is n; m and n are both integers greater than 1; The step of converting the target modulation grayscale value according to the grayscale data type requirements of the light source to obtain the target grayscale value corresponding to each of the input grayscale values includes: If n is not equal to m, the target modulation grayscale value corresponding to the input grayscale value is converted to an n-bit grayscale value to obtain an intermediate grayscale value; based on the intermediate grayscale value, the target grayscale value corresponding to the input grayscale value is determined. If n equals m, the target modulation grayscale value corresponding to the input grayscale value is taken as the target grayscale value corresponding to the input grayscale value.
7. The method according to claim 6, characterized in that, The grayscale data type requirement also includes the required numeric type; The step of determining the target grayscale value corresponding to the input grayscale value based on the intermediate grayscale value includes: If the required numerical value is an integer, the integer value of the intermediate grayscale value is used as the target grayscale value corresponding to the input grayscale value. If the required numerical value is of floating-point type, the intermediate grayscale value is used as the target grayscale value corresponding to the input grayscale value.
8. The method according to any one of claims 1 to 5, characterized in that, After determining whether the mapping relationship between the human eye response brightness at each input grayscale value of the light source and the input grayscale value meets the linearity requirement, the method further includes: If the mapping relationship between the human eye response brightness and the input grayscale value at each input grayscale value of the light source is determined to meet the linearity requirement, then the input grayscale value is output as the corresponding target modulation grayscale value.
9. A light-emitting device, characterized in that, include: processor; A memory storing computer instructions, which, when executed by the processor, determine a target grayscale value corresponding to each input grayscale value according to the method described in any one of claims 1-8; The light source emits light according to the target grayscale value corresponding to the input grayscale value when the input grayscale value is the input grayscale value.
10. A computer-readable storage medium storing computer instructions thereon, characterized in that, When the computer instructions are executed by the processor, the method as described in any one of claims 1-8 is implemented.