Brightness correction method and device of display screen and electronic equipment
Patent Information
- Application Number
- CN202410129229.9
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2024-01-30
- Publication Date
- 2026-10-09
- Estimated Expiration
- 2044-01-30
AI Technical Summary
[0004]本申请的主要目的在于提供一种显示屏的亮度校正方法、装置、计算机可读存储介质和电子设备,以至少解决现有技术中显示屏存在漏光导致显示屏存在色差的问题
[0015] By applying the technical solution of this application, the color coordinates corresponding to each grayscale value of the display screen and the white brightness corresponding to each grayscale value are obtained. The white brightness is then decomposed according to the color coordinates of each grayscale value to obtain the three-color brightness corresponding to each grayscale value. The maximum white brightness is calculated based on the three-color brightness, which includes red, green, and blue brightness. The corrected white brightness corresponding to each grayscale value is calculated based on the white brightness corresponding to the zero-level grayscale value and the maximum white brightness. Compared with the prior art where light leakage in the display screen leads to a certain degree of color shift, resulting in a mismatch between the displayed color and human perception, this application corrects the brightness of the display screen to compensate for the color difference caused by light leakage. Therefore, it can solve the problem of color difference caused by light leakage in the prior art, achieving the purpose of correcting screen color difference.
Smart Images

Figure CN117995125B_ABST
Abstract
Description
Technical Field
[0001] This application relates to the field of display calibration technology, and more specifically, to a brightness calibration method, apparatus, computer-readable storage medium, and electronic device for a display screen. Background Technology
[0002] Gamma correction technology is widely used in the display industry. This technology adjusts the human eye's visual perception of different brightness levels to a linear variation through gamma curve mapping. However, LCD screens inevitably suffer from light leakage in applications. The measured luminance values of the R, G, and B colors all show varying degrees of light leakage, which is more pronounced at low brightness levels. As a result, the accuracy of the gamma mapping curve decreases, and the established gamma lookup table will produce a certain degree of color shift, leading to a discrepancy between the displayed color and human visual perception.
[0003] Therefore, reducing light leakage interference and improving the accuracy of Gamma mapping curve finding are the technical challenges of Gamma correction. Establishing a high-precision Gamma correction algorithm is the key to solving these problems. Summary of the Invention
[0004] The main objective of this application is to provide a brightness correction method, apparatus, computer-readable storage medium, and electronic device for a display screen, so as to at least solve the problem of color difference caused by light leakage in the display screen in the prior art.
[0005] To achieve the above objectives, according to one aspect of this application, a brightness correction method for a display screen is provided, comprising: obtaining the color coordinates corresponding to each grayscale value of the display screen and the white brightness corresponding to each grayscale value, wherein the grayscale values are from level 0 to 255; decomposing the corresponding white brightness according to the color coordinates of each grayscale value to obtain the three-color brightness corresponding to each grayscale value; calculating the maximum white brightness based on the three-color brightness, wherein the three-color brightness includes red brightness, green brightness, and blue brightness; calculating the corrected white brightness corresponding to each grayscale value based on the white brightness corresponding to the zero-level grayscale value and the maximum white brightness, wherein the corrected white brightness is the corrected white brightness corresponding to each grayscale value.
[0006] Optionally, calculating the maximum white brightness based on the three-color brightness includes: obtaining standard color coordinates; decomposing the white brightness corresponding to each grayscale value according to the standard color coordinates to obtain standard three-color brightness, wherein the standard three-color brightness includes standard red brightness, standard green brightness, and standard blue brightness; calculating the ratios of the standard red brightness, standard green brightness, and standard blue brightness in the standard three-color brightness to obtain the standard red brightness ratio, standard green brightness ratio, and standard blue brightness ratio, and then applying the formula... Calculate the red, green, and blue vectors, where a r a is the standard red brightness ratio value. g a is the standard green brightness ratio value. b LvR is the standard blue luminance ratio. 255 LvG represents the red brightness corresponding to a grayscale value of 255. 255 The green brightness, LvB, represents the value corresponding to a grayscale level of 255. 255 Let C1 represent the blue brightness corresponding to the grayscale value of level 255, C2 represent the red vector, C3 represent the green vector, and C4 represent the blue vector. The largest red vector among the red vectors with a brightness less than the standard red brightness is determined as the maximum red vector; the largest green vector among the green vectors with a brightness less than the standard green brightness is determined as the maximum green vector; and the largest blue vector among the blue vectors with a brightness less than the standard blue brightness is determined as the maximum blue vector. The sum of the maximum red vector, the maximum green vector, and the maximum blue vector is calculated to obtain the maximum white brightness value.
[0007] Optionally, the white brightness is split according to the color coordinates of each grayscale value, including: using the formula and The formula decomposes the white brightness, where x represents the horizontal coordinate of the color coordinate, y represents the vertical coordinate of the color coordinate, and Lvw represents the white brightness. r The x-coordinate represents the red coordinate. g The x-coordinate represents the green coordinate. b The x-coordinate of the blue coordinate is represented by y. r The y-coordinate represents the red color coordinate. g The y-coordinate represents the green color coordinate. b The ordinate of the blue coordinate is represented by X. w Y represents the first component of the white brightness. w Z represents the second component of the white brightness. w The third component representing the white brightness, Y RThe red luminance, Y, represents the luminance of the three colors. G The green luminance, Y, represents the luminance of the three colors. B The blue luminance represents the luminance of the three colors.
[0008] Optionally, the corrected white brightness corresponding to each gray level is calculated based on the white brightness corresponding to the zero-order gray value and the maximum white brightness, including: using the formula Calculate the corrected white brightness corresponding to each grayscale value, where x represents the x-th grayscale value, Lv0 represents the white brightness corresponding to the zero-th grayscale value, Lvmax represents the maximum white brightness, and Lvx represents the corrected white brightness corresponding to the x-th grayscale value.
[0009] Optionally, after calculating the corrected white brightness corresponding to each gray level based on the white brightness corresponding to the zero-order gray value and the maximum white brightness, the method further includes: obtaining standard color coordinates; performing linear interpolation between the color coordinates corresponding to each gray level and the standard color coordinates to obtain the transition color coordinates corresponding to the transition gray values from the zero-order gray value to each gray level.
[0010] Optionally, the method further includes: decomposing the corrected white luminance to obtain corrected three-color luminance, wherein the corrected three-color luminance includes corrected red luminance, corrected green luminance, and corrected blue luminance; calculating the difference between the standard three-color luminance and the corresponding corrected three-color luminance to obtain three-color luminance difference values, wherein the three-color luminance difference values include red luminance difference, green luminance difference, and blue luminance difference; calculating the ratio of each three-color luminance difference value to the sum of the three-color luminance difference values to obtain three-color luminance weights, wherein the three-color luminance weights include red luminance weight, green luminance weight, and blue luminance weight; and calculating the transition three-color luminance corresponding to the transition gray values from the first-order grayscale value to each order grayscale value based on the three-color luminance weights.
[0011] Optionally, the method further includes: obtaining the current color gamut of the display screen to obtain a current three-color brightness matrix, and obtaining the three-color brightness of the target color gamut to obtain a target three-color brightness matrix, wherein the target color gamut is the color gamut that the display screen is expected to achieve; calculating the product of the inverse matrix of the current three-color brightness matrix and the target three-color brightness matrix to obtain a color space conversion matrix, and generating a brightness lookup table from the color space conversion matrix, wherein the brightness lookup table is used to look up the corresponding corrected white brightness according to the grayscale values of each level.
[0012] According to another aspect of this application, a brightness correction device for a display screen is provided, comprising: a first acquisition unit, configured to acquire the color coordinates corresponding to each grayscale value of the display screen and the white brightness corresponding to each grayscale value, wherein the grayscale value is from level 0 to 255; a first calculation unit, configured to decompose the corresponding white brightness according to the color coordinates of each grayscale value to obtain the three-color brightness corresponding to each grayscale value, and calculate the maximum white brightness according to the three-color brightness, wherein the three-color brightness includes red brightness, green brightness and blue brightness; and a second calculation unit, configured to calculate the corrected white brightness corresponding to each grayscale value according to the white brightness corresponding to the zero-level grayscale value and the maximum white brightness, wherein the corrected white brightness is the corrected white brightness corresponding to each grayscale value.
[0013] According to another aspect of this application, a computer-readable storage medium is provided, the computer-readable storage medium including a stored program, wherein, when the program is executed, it controls the device on which the computer-readable storage medium is located to perform any of the aforementioned brightness correction methods.
[0014] According to another aspect of this application, an electronic device is provided, comprising: one or more processors, 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 one or more processors, the one or more programs including methods for performing any of the brightness correction methods described above.
[0015] By applying the technical solution of this application, the color coordinates corresponding to each grayscale value of the display screen and the white brightness corresponding to each grayscale value are obtained. The white brightness is then decomposed according to the color coordinates of each grayscale value to obtain the three-color brightness corresponding to each grayscale value. The maximum white brightness is calculated based on the three-color brightness, which includes red, green, and blue brightness. The corrected white brightness corresponding to each grayscale value is calculated based on the white brightness corresponding to the zero-level grayscale value and the maximum white brightness. Compared with the prior art where light leakage in the display screen leads to a certain degree of color shift, resulting in a mismatch between the displayed color and human perception, this application corrects the brightness of the display screen to compensate for the color difference caused by light leakage. Therefore, it can solve the problem of color difference caused by light leakage in the prior art, achieving the purpose of correcting screen color difference. Attached Figure Description
[0016] The accompanying drawings, which form part of this application, are used to provide a further understanding of this application. The illustrative embodiments and descriptions of this application are used to explain this application and do not constitute an undue limitation of this application. In the drawings:
[0017] Figure 1A hardware structure block diagram of a mobile terminal for performing a brightness correction method for a display screen, according to an embodiment of this application, is shown.
[0018] Figure 2 A schematic flowchart of a brightness correction method for a display screen provided in an embodiment of this application is shown;
[0019] Figure 3 A schematic flowchart of a specific display screen brightness correction method provided in an embodiment of this application is shown;
[0020] Figure 4 This illustration shows a brightness mapping diagram for different bit-width gray levels provided by an embodiment of this application;
[0021] Figure 5 A schematic diagram of a color gamut conversion process provided by an embodiment of this application is shown;
[0022] Figure 6 A structural block diagram of a brightness correction device for a display screen provided in an embodiment of this application is shown.
[0023] The above figures include the following reference numerals:
[0024] 102. Processor; 104. Memory; 106. Transmission device; 108. Input / output device. Detailed Implementation
[0025] It should be noted that, unless otherwise specified, the embodiments and features described in this application can be combined with each other. This application will now be described in detail with reference to the accompanying drawings and embodiments.
[0026] To enable those skilled in the art to better understand the present application, the technical solutions in the embodiments of the present application will be clearly and completely described below with reference to the accompanying drawings. Obviously, the described embodiments are only some embodiments of the present application, and not all embodiments. Based on the embodiments in the present application, all other embodiments obtained by those skilled in the art without creative effort should fall within the scope of protection of the present application.
[0027] It should be noted that the terms "first," "second," etc., in the specification, claims, and accompanying drawings of this application are used to distinguish similar objects and are not necessarily used to describe a specific order or sequence. It should be understood that such data can be interchanged where appropriate for the embodiments of this application described herein. Furthermore, the terms "comprising" and "having," and any variations thereof, are intended to cover non-exclusive inclusion; for example, a process, method, system, product, or apparatus that comprises a series of steps or units is not necessarily limited to those steps or units explicitly listed, but may include other steps or units not explicitly listed or inherent to such processes, methods, products, or apparatus.
[0028] For ease of description, the following explains some of the nouns or terms used in the embodiments of this application:
[0029] Gamma correction: Gamma correction is a non-linear calculation or inverse calculation used to adjust the brightness or tri-color stimulus values of light in a film or imaging system.
[0030] As described in the background section, in the prior art, light leakage in the display screen causes a certain degree of color shift, which in turn causes the displayed color to be inconsistent with human visual perception. In order to solve the problem of a certain degree of color shift in the display screen, the embodiments of this application provide a brightness correction method, apparatus, computer-readable storage medium and electronic device for the display screen.
[0031] The technical solutions of the present invention will be clearly and completely described below with reference to the accompanying drawings in the embodiments of the present invention.
[0032] The methods and embodiments provided in this application can be executed on a mobile terminal, computer terminal, or similar computing device. Taking running on a mobile terminal as an example, Figure 1 This is a hardware structure block diagram of a mobile terminal for a display screen brightness correction method according to an embodiment of the present invention. Figure 1 As shown, a mobile terminal may include one or more ( Figure 1 Only one is shown in the diagram. A processor 102 (which may include, but is not limited to, a microprocessor MCU or a programmable logic device FPGA, etc.) and a memory 104 for storing data are also shown. The mobile terminal may further include a transmission device 106 for communication functions and an input / output device 108. Those skilled in the art will understand that... Figure 1 The structure shown is for illustrative purposes only and does not limit the structure of the mobile terminal described above. For example, the mobile terminal may also include components that are more... Figure 1 The more or fewer components shown, or having the same Figure 1 The different configurations shown.
[0033] The memory 104 can be used to store computer programs, such as application software programs and modules, like the computer program corresponding to the brightness correction method for the display screen in this embodiment of the invention. The processor 102 executes various functional applications and data processing by running the computer program stored in the memory 104, thereby implementing the above-described method. The memory 104 may include high-speed random access memory and may also include non-volatile memory, such as one or more magnetic storage devices, flash memory, or other non-volatile solid-state memory. In some instances, the memory 104 may further include memory remotely located relative to the processor 102, and these remote memories can be connected to the mobile terminal via a network. Examples of the aforementioned networks include, but are not limited to, the Internet, corporate intranets, local area networks, mobile communication networks, and combinations thereof. The transmission device 106 is used to receive or send data via a network. Specific examples of the aforementioned networks may include wireless networks provided by the mobile terminal's communication provider. In one example, the transmission device 106 includes a network interface controller (NIC), which can be connected to other network devices via a base station to communicate with the Internet. In one example, the transmission device 106 may be a radio frequency (RF) module, which is used to communicate with the Internet wirelessly.
[0034] This embodiment provides a brightness correction method for a display screen running on a mobile terminal, computer terminal, or similar computing device. It should be noted that the steps shown in the flowchart in the accompanying drawings can be executed in a computer system such as a set of computer-executable instructions. Although a logical order is shown in the flowchart, in some cases, the steps shown or described may be executed in a different order than that shown here.
[0035] Figure 2 This is a flowchart of a brightness correction method for a display screen according to an embodiment of this application. Figure 2 As shown, the method includes the following steps:
[0036] Step S201: Obtain the color coordinates corresponding to each grayscale value of the display screen and the white brightness corresponding to each grayscale value, wherein the grayscale values are from level 0 to 255.
[0037] Specifically, this application utilizes a high-precision LCD screen Gamma correction algorithm, applying color theory to reduce the frequency of data measurement and acquisition, thereby minimizing the use of parameters and eliminating the impact of light leakage to the greatest extent. The algorithm consists of two modules: DGA (Digital Gamma Correction Module, DGA) and CM (Color Management Module). The DGA module performs high-precision Gamma curve mapping, the core of which lies in establishing a mapping lookup table; therefore, the mapping lookup table is established first. This is achieved by measuring the current color coordinates of the display screen (the screen to be corrected), including the current R... 255 G 255 B 255 The corresponding color coordinates (x, y) also include the white brightness LvW corresponding to the 0-255 gray levels and its corresponding color coordinates (x, y).
[0038] Step S202: Based on the color coordinates of each grayscale value, the corresponding white brightness is split to obtain the three-color brightness corresponding to each grayscale value. The maximum white brightness is calculated based on the three-color brightness, wherein the three-color brightness includes red brightness, green brightness and blue brightness.
[0039] Specifically, the white brightness can be decomposed into red, green and blue brightness using color theory. Then, the maximum white brightness Lvmax is calculated using the three-color brightness mapping lookup table to remove a certain amount of light leakage and color bias.
[0040] Step S203: Calculate the corrected white brightness corresponding to each gray level based on the white brightness corresponding to the zero-order gray value and the maximum white brightness value, wherein the corrected white brightness is the corrected white brightness corresponding to each gray level gray value.
[0041] Specifically, after calculating the maximum white brightness, the corrected white brightness corresponding to each intermediate gray level can be calculated using the measured white brightness values Lv0 and Lvmax at the 0 gray level. The specific formula will be explained in detail below.
[0042] This embodiment, applying the technical solution of this application, obtains the color coordinates corresponding to each grayscale value of the display screen and the white brightness corresponding to each grayscale value; it decomposes the corresponding white brightness according to the color coordinates of each grayscale value to obtain the three-color brightness corresponding to each white brightness; it calculates the maximum white brightness based on the three-color brightness, which includes red brightness, green brightness, and blue brightness; and it calculates the corrected white brightness corresponding to each grayscale value based on the white brightness corresponding to the zero-level grayscale value and the maximum white brightness. Compared with the prior art, where light leakage in the display screen leads to a certain degree of color shift, resulting in a discrepancy between the displayed color and human perception, this application corrects the brightness of the display screen to compensate for the color difference caused by light leakage. Therefore, it can solve the problem of color difference caused by light leakage in the prior art, achieving the purpose of correcting screen color difference.
[0043] In the specific implementation process, step S202 above, which calculates the maximum white brightness based on the three-color brightness, can be achieved through the following steps: obtaining standard color coordinates; decomposing the white brightness corresponding to each grayscale value according to the standard color coordinates to obtain standard three-color brightness, wherein the standard three-color brightness includes standard red brightness, standard green brightness, and standard blue brightness; calculating the ratios of the standard red brightness, standard green brightness, and standard blue brightness in the standard three-color brightness to obtain the standard red brightness ratio, standard green brightness ratio, and standard blue brightness ratio, and then applying the formula... Calculate the red, green, and blue vectors, where a r For the above standard red brightness ratio, a g For the above standard green brightness ratio, a b The above standard blue luminance ratio, LvR 255 LvG represents the red brightness corresponding to a grayscale value of 255. 255 This represents the green brightness corresponding to a grayscale value of 255, in LvB. 255 Let C1 represent the blue luminance corresponding to the grayscale value of level 255, C2 represent the red vector, C3 represent the green vector, and C4 represent the blue vector. The largest red vector among those with a luminance less than the standard red vector is determined as the maximum red vector; the largest green vector among those with a luminance less than the standard green vector is determined as the maximum green vector; and the largest blue vector among those with a luminance less than the standard blue vector is determined as the maximum blue vector. The sum of the maximum red vector, the maximum green vector, and the maximum blue vector is calculated to obtain the maximum white luminance. This method calculates the maximum white luminance through the above steps, thus accurately determining the maximum white luminance.
[0044] Specifically, a chromaticity ratio delimitation method is proposed, which calculates Lvmax of the mapping lookup table, removes certain light leakage color bias, and calculates the brightness of red, green, and blue (LvR, LvG, LvB) of each LvW level using color theory, with the standard color gamut D... 65 For example, let its standard chromaticity coordinates be (x... 65 ,y 65 Taking any LvW of any order, and substituting the standard color coordinates into the above splitting formula, we can solve for the brightness values Lvrk, Lvrg, and Lvrb of the red, green, and blue colors, with a ratio of a. r :a g :a b The standard tri-color luminance at 255 gray levels is calculated using the steps described above: Standard red luminance LvR 255 Standard green brightness LvG 255 Standard blue luminance LvB 255 Then there is Take the corresponding elements in order, each not greater than LvR. 255 LvG 255 LvB 255 Given vectors C, C = (C1, C2, C3), sum them to obtain Lvmax. Take the 0 grayscale measurement value as Lv0, and then calculate the white brightness values of each level in the mapping lookup table according to the Gamma correction formula:
[0045] In some optional embodiments, the white brightness being split according to the color coordinates of each grayscale value in step S202 can be achieved through the following steps: using the formula and The formula decomposes the white brightness into the following values: x represents the x-coordinate of the color coordinate system, y represents the y-coordinate of the color coordinate system, Lvw represents the white brightness, xr represents the x-coordinate of the red color coordinate system, xg represents the x-coordinate of the green color coordinate system, xb represents the x-coordinate of the blue color coordinate system, yr represents the y-coordinate of the red color coordinate system, yg represents the y-coordinate of the green color coordinate system, yb represents the y-coordinate of the blue color coordinate system, and X... w Y represents the first component of the white brightness mentioned above. w Z represents the second component of the white brightness mentioned above. w Y represents the third component of the white brightness mentioned above. R The red luminance, Y, represents the luminance of the three colors mentioned above. G The green luminance, Y, represents the luminance of the three colors mentioned above. B The blue luminance represents the luminance of the three colors mentioned above. This method decomposes the white luminance through the steps described above, thus accurately obtaining the luminance of the three colors.
[0046] Specifically, the brightness of the red, green, and blue colors decomposed at each LvW level is calculated using color theory. Based on color theory, it is known that... Then for any order LvW, we have Y can be obtained by using the two sets of formulas mentioned above. R Y G Y B That is, the brightness of the three colors mentioned above: red, green, and blue.
[0047] To accurately calculate the corrected white brightness, step S203 above, which calculates the corrected white brightness corresponding to each gray level based on the white brightness corresponding to the zero-order gray value and the maximum white brightness, can be achieved through the following steps: using the formula... The corrected white luminance corresponding to each of the aforementioned grayscale values is calculated, where x represents the x-th grayscale value, Lv0 represents the white luminance corresponding to the zero-th grayscale value, Lvmax represents the maximum white luminance, and Lvx represents the corrected white luminance corresponding to the x-th grayscale value. This method calculates the corrected white luminance corresponding to each grayscale value using the above formula, thus accurately calculating the corrected white luminance.
[0048] In the specific implementation process, the 0 grayscale measurement value is taken as Lv0, and then the white brightness values of each level in the mapping lookup table are calculated according to the Gamma correction formula:
[0049] In some optional embodiments, after step S203, the method further includes the following steps: obtaining standard color coordinates; performing linear interpolation between the color coordinates corresponding to each grayscale value and the standard color coordinates to obtain transition color coordinates corresponding to the transition grayscale values from the zero-level grayscale value to the transition grayscale values of each grayscale value. This method uses linear interpolation to linearly transition the color coordinates from grayscale 0 to the target grayscale, thereby effectively avoiding abrupt changes in color coordinates.
[0050] In the actual implementation process, due to light leakage, the three color coordinates Lvr decomposed in the above steps are... x Lvg x and Lvb x There are increasing brightness values from gray level 1 to gray level t-1 that are less than the corresponding gray level 0. Therefore, we take gray level t, whose corresponding color coordinates retain the standard color coordinates; and take gray level 0, whose corresponding color coordinates retain the measured color coordinates. The transition color coordinates from gray level 0 to gray level t are obtained by interpolation calculated from the two sets of retained color coordinates.
[0051] To reduce the impact of monochromatic light leakage on monochromatic brightness, the above method further includes the following steps: decomposing the corrected white brightness to obtain corrected tri-color brightness, wherein the corrected tri-color brightness includes corrected red brightness, corrected green brightness, and corrected blue brightness; calculating the difference between the standard tri-color brightness and the corresponding corrected tri-color brightness to obtain tri-color brightness difference values, wherein the tri-color brightness difference values include red brightness difference, green brightness difference, and blue brightness difference; calculating the ratio of each of the above tri-color brightness difference values to the sum of the above tri-color brightness difference values to obtain tri-color brightness weights, wherein the tri-color brightness weights include red brightness weight, green brightness weight, and blue brightness weight; and calculating the transition tri-color brightness corresponding to the transition gray values from the first-order gray value to each order gray value based on the above tri-color brightness weights. This method, through the above proportional superposition algorithm, recalculates the tri-color brightness values of the transition gray levels to reduce the impact of monochromatic light leakage on monochromatic brightness.
[0052] Specifically, for grayscale t, the standard tri-color brightness decomposed in standard color coordinates is denoted as Lvr. t Lvg t Lvb t Then there is a difference in brightness among the three colors. ΔLvr represents the correction of red luminance, ΔLvg represents the correction of green luminance, and ΔLvb represents the correction of blue luminance. LvLvr0, LvLvg0, and LvLvb0 represent the correction of the three colors of luminance. Calculate the three weight values dr, dg, and db: Then the brightness values of any transitional three colors from grayscale 1 to t-1 are respectively Lvr k Lvg k Lvb k Lvr is the three-color brightness value corresponding to the k-th gray level. k For the k-th order red brightness, Lvr k-1 For the (k-1)th order of red brightness, LvW k For the k-th order white brightness, LvW k-1 It represents the (k-1)th order of white brightness.
[0053] In some optional implementations, the above method further includes the following steps: obtaining the current color gamut of the display screen to obtain a current three-color brightness matrix, and obtaining the three-color brightness of the target color gamut to obtain a target three-color brightness matrix, wherein the target color gamut is the color gamut that the display screen is expected to achieve; calculating the product of the inverse matrix of the current three-color brightness matrix and the target three-color brightness matrix to obtain a color space conversion matrix; and generating a brightness lookup table from the color space conversion matrix, wherein the brightness lookup table is used to find the corresponding corrected white brightness based on the grayscale values of each level. This method uses interpolation to establish a mapping lookup table, thus enabling DGA brightness mapping for different bit width grayscale levels.
[0054] In the specific implementation process, gray levels from 0 to 255 are respectively looked up for their corresponding Gamma2.2 mappings. The mapped measurement values are interpolated based on the two preceding and following measurement values to calculate the corresponding lookup gray level. If it is necessary to look up non-8-bit gray levels, such as the maximum gray level being 1023, then the remaining three values are linearly interpolated between every two gray levels in the obtained lookup table. The specific steps of the CM module are as follows: Step 1, input gray levels and normalize Degamma. Step 2: Construct the CSC color space conversion matrix for the data. degamma Perform color gamut conversion, and denote the output data as data. csc Using the color splitting method in DGA, the splitting matrices of the current color gamut and the target color gamut can be obtained, denoted as the current three-color luminance matrix A0 and the target three-color luminance matrix A10, respectively. x Then we have: Step 3: Perform inverse normalization Regamma, data regamma =log 2.2 data csc *255.
[0055] To enable those skilled in the art to better understand the technical solution of this application, the implementation process of the brightness correction method for the display screen of this application will be described in detail below with reference to specific embodiments.
[0056] This embodiment relates to a specific method for brightness correction of a display screen, such as... Figure 3 As shown, it includes the following steps:
[0057] Step S1: Measure the data, measure the current R value of the screen to be calibrated. 255 G 255 B 255 The corresponding color coordinates (x, y);
[0058] Step S2: Measure the white luminance LvW corresponding to the 0-255 grayscale levels and its corresponding color coordinates (x,y);
[0059] Step S3: Measure the brightness by splitting the red, green, and blue colors, and calculate the brightness LvR, LvG, and LvB of each LvW order using color theory.
[0060] Step S4: Propose a chromaticity ratio definition method, calculate Lvmax of the mapping lookup table, and remove a certain amount of light leakage color bias;
[0061] Step S5: Mapping and splitting. Take the 0 grayscale measurement value as Lv0, and then calculate the white brightness values of each level in the mapping lookup table according to the Gamma correction formula:
[0062] Step S6: Use the method in Step 3 to split Lvrx, Lvgx, and Lvbx;
[0063] Step S7: Change the transition grayscale and propose a low grayscale color coordinate transition method, which uses linear interpolation to linearly transition the color coordinates from grayscale 0 to the target grayscale.
[0064] Step S8: Propose a proportional superposition algorithm to recalculate the three-color brightness values of the transition grayscale and reduce the impact of monochromatic light leakage on monochromatic brightness;
[0065] Step S9: Lookup table. A mapping lookup table is established using interpolation to achieve DGA brightness mapping for different bit width gray levels, such as... Figure 4 As shown, the horizontal axis represents gray (grayscale value), and the vertical axis represents the measured Lv white brightness value. For grayscale levels 0 to 255, the corresponding Gamma lookup curves are searched. The mapped measurement value is interpolated using two consecutive measurement values k and k+1 to obtain t'. The corresponding lookup grayscale levels Lvk, Lvk+1, and Lvt are calculated to form the measurement value splitting curve. If a non-8-bit grayscale level needs to be searched, such as a maximum grayscale level of 1023, the remaining three values are linearly interpolated between every two grayscale levels in the obtained lookup table. To ensure that the input data and the subsequent Gamma lookup table maintain the same color gamut, the CM module performs color gamut conversion under Gamma2.2 mapping, such as... Figure 5 As shown: Step 1, the Data input grayscale is normalized to Deamma. Step 2: Construct the CSC matrix for the data. degamma Perform color gamut conversion, and denote the output data as data. csc Step 3: Perform inverse normalization Regamma, data regamma =log 2.2 data csc *255. The above steps effectively solve the error problem caused by light leakage in LCD screen Gamma correction, achieving high-precision correction while requiring less measurement frequency, eliminating the need to measure the full grayscale brightness values of R, G, and B colors separately.
[0066] This application also provides a brightness correction device for a display screen. It should be noted that the brightness correction device for a display screen in this application can be used to execute the brightness correction method for a display screen provided in this application. This device is used to implement the above embodiments and preferred embodiments; details already described will not be repeated. As used below, the term "module" can refer to a combination of software and / or hardware that implements a predetermined function. Although the device described in the following embodiments is preferably implemented in software, hardware implementation, or a combination of software and hardware, is also possible and contemplated.
[0067] The following describes the brightness correction device for the display screen provided in the embodiments of this application.
[0068] Figure 6 This is a schematic diagram of a brightness correction device for a display screen according to an embodiment of this application. Figure 6 As shown, the device includes:
[0069] The first acquisition unit 10 is used to acquire the color coordinates corresponding to each grayscale value of the display screen and the white brightness corresponding to each grayscale value, wherein the grayscale value is from level 0 to 255.
[0070] Specifically, this application utilizes a high-precision LCD screen Gamma correction algorithm, applying color theory to reduce the frequency of data measurement and acquisition, thereby minimizing the use of parameters and eliminating the impact of light leakage to the greatest extent. The algorithm consists of two modules: DGA (Digital Gamma Correction Module, DGA) and CM (Color Management Module). The DGA module performs high-precision Gamma curve mapping, the core of which lies in establishing a mapping lookup table; therefore, the mapping lookup table is established first. This is achieved by measuring the current color coordinates of the display screen (the screen to be corrected), including the current R... 255 G 255 B 255 The corresponding color coordinates (x, y) also include the white brightness LvW corresponding to the 0-255 gray levels and its corresponding color coordinates (x, y).
[0071] The first calculation unit 20 is used to decompose the corresponding white brightness according to the color coordinates of each gray value to obtain the three-color brightness corresponding to each gray value, and calculate the maximum white brightness according to the three-color brightness, wherein the three-color brightness includes red brightness, green brightness and blue brightness.
[0072] Specifically, the white brightness can be decomposed into red, green and blue brightness using color theory. Then, the maximum white brightness Lvmax is calculated using the three-color brightness mapping lookup table to remove a certain amount of light leakage and color bias.
[0073] The second calculation unit 30 is used to calculate the corrected white brightness corresponding to each gray value based on the white brightness corresponding to the zero-order gray value and the maximum white brightness, wherein the corrected white brightness is the corrected white brightness corresponding to each gray value.
[0074] Specifically, after calculating the maximum white brightness, the corrected white brightness corresponding to each intermediate gray level can be calculated using the measured white brightness values Lv0 and Lvmax at the 0 gray level. The specific formula will be explained in detail below.
[0075] This embodiment, applying the technical solution of this application, obtains the color coordinates corresponding to each grayscale value of the display screen and the white brightness corresponding to each grayscale value; it decomposes the corresponding white brightness according to the color coordinates of each grayscale value to obtain the three-color brightness corresponding to each white brightness; it calculates the maximum white brightness based on the three-color brightness, which includes red brightness, green brightness, and blue brightness; and it calculates the corrected white brightness corresponding to each grayscale value based on the white brightness corresponding to the zero-level grayscale value and the maximum white brightness. Compared with the prior art, where light leakage in the display screen leads to a certain degree of color shift, resulting in a discrepancy between the displayed color and human perception, this application corrects the brightness of the display screen to compensate for the color difference caused by light leakage. Therefore, it can solve the problem of color difference caused by light leakage in the prior art, achieving the purpose of correcting screen color difference.
[0076] In the specific implementation process, the first calculation unit includes a first splitting module, a first calculation module, a determining module, and a second calculation module. The first splitting module is used to obtain standard color coordinates and split the white brightness corresponding to each grayscale value according to the standard color coordinates to obtain standard three-color brightness, wherein the standard three-color brightness includes standard red brightness, standard green brightness, and standard blue brightness. The first calculation module is used to calculate the ratio of the standard red brightness, the standard green brightness, and the standard blue brightness in the standard three-color brightness, to obtain the standard red brightness ratio, the standard green brightness ratio, and the standard blue brightness ratio, and then calculate them using the formula... Calculate the red, green, and blue vectors, where a r For the above standard red brightness ratio, a g For the above standard green brightness ratio, a b The above standard blue luminance ratio, LvR 255 LvG represents the red brightness corresponding to a grayscale value of 255. 255 This represents the green brightness corresponding to a grayscale value of 255, in LvB. 255Let C1 represent the blue luminance corresponding to the grayscale value of level 255, C2 represent the red vector, C3 represent the green vector, and C4 represent the blue vector. The determining module identifies the largest red vector among those with a luminance less than the standard red vector, the largest green vector among those with a luminance less than the standard green vector, and the largest blue vector among those with a luminance less than the standard blue vector. The second calculation module calculates the sum of the largest red vector, the largest green vector, and the largest blue vector to obtain the maximum white luminance. This method calculates the maximum white luminance through the above steps, thus accurately determining the maximum white luminance.
[0077] Specifically, a chromaticity ratio delimitation method is proposed, which calculates Lvmax of the mapping lookup table, removes certain light leakage color bias, and calculates the brightness of red, green, and blue (LvR, LvG, LvB) of each LvW level using color theory, with the standard color gamut D... 65 For example, let its standard chromaticity coordinates be (x... 65 ,y 65 Taking any LvW of any order, and substituting the standard color coordinates into the above splitting formula, we can solve for the brightness values Lvrk, Lvrg, and Lvrb of the red, green, and blue colors, with a ratio of a. r :a g :a b The standard tri-color luminance at 255 gray levels is calculated using the steps described above: Standard red luminance LvR 255 Standard green brightness LvG 255 Standard blue luminance LvB 255 Then there is Take the corresponding elements in order, each not greater than LvR. 255 LvG 255 LvB 255 Given vectors C, C = (C1, C2, C3), sum them to obtain Lvmax. Take the 0 grayscale measurement value as Lv0, and then calculate the white brightness values of each level in the mapping lookup table according to the Gamma correction formula:
[0078] In some optional implementations, the first calculation module further includes a second splitting module, used to calculate using a formula. and The formula decomposes the white brightness into the following values: x represents the x-coordinate of the color coordinate system, y represents the y-coordinate of the color coordinate system, Lvw represents the white brightness, xr represents the x-coordinate of the red color coordinate system, xg represents the x-coordinate of the green color coordinate system, xb represents the x-coordinate of the blue color coordinate system, yr represents the y-coordinate of the red color coordinate system, yg represents the y-coordinate of the green color coordinate system, yb represents the y-coordinate of the blue color coordinate system, and X... w Y represents the first component of the white brightness mentioned above. w Z represents the second component of the white brightness mentioned above. w Y represents the third component of the white brightness mentioned above. R The red luminance, Y, represents the luminance of the three colors mentioned above. G The green luminance, Y, represents the luminance of the three colors mentioned above. B The blue luminance represents the luminance of the three colors mentioned above. This method decomposes the white luminance through the steps described above, thus accurately obtaining the luminance of the three colors.
[0079] Specifically, the brightness of the red, green, and blue colors decomposed at each LvW level is calculated using color theory. Based on color theory, it is known that... Then for any order LvW, we have Y can be obtained by using the two sets of formulas mentioned above. R Y G Y B That is, the brightness of the three colors mentioned above: red, green, and blue.
[0080] To accurately calculate the corrected white luminance, the second calculation unit further includes a second calculation module, used to calculate the corrected white luminance using the formula... The corrected white luminance corresponding to each of the aforementioned grayscale values is calculated, where x represents the x-th grayscale value, Lv0 represents the white luminance corresponding to the zero-th grayscale value, Lvmax represents the maximum white luminance, and Lvx represents the corrected white luminance corresponding to the x-th grayscale value. This method calculates the corrected white luminance corresponding to each grayscale value using the above formula, thus accurately calculating the corrected white luminance.
[0081] In the specific implementation process, the 0 grayscale measurement value is taken as Lv0, and then the white brightness values of each level in the mapping lookup table are calculated according to the Gamma correction formula:
[0082] In some optional embodiments, the method further includes a second acquisition unit and a linear interpolation unit. The second acquisition unit is used to acquire standard color coordinates; the linear interpolation unit is used to perform linear interpolation between the color coordinates corresponding to each grayscale value and the standard color coordinates to obtain the transition color coordinates corresponding to the transition grayscale values from the zero-order grayscale value to the transition grayscale values of each order. This method uses linear interpolation to linearly transition the color coordinates from grayscale 0 to the target grayscale, thereby effectively avoiding abrupt changes in color coordinates.
[0083] In the actual implementation process, due to light leakage, the three color coordinates Lvr decomposed in the above steps are... x Lvg x and Lvb x There are increasing brightness values from gray level 1 to gray level t-1 that are less than the corresponding gray level 0. Therefore, we take gray level t, whose corresponding color coordinates retain the standard color coordinates; and take gray level 0, whose corresponding color coordinates retain the measured color coordinates. The transition color coordinates from gray level 0 to gray level t are obtained by interpolation calculated from the two sets of retained color coordinates.
[0084] To reduce the impact of monochromatic light leakage on monochromatic brightness, the method further includes a first splitting unit, a third calculation unit, a fourth calculation unit, and a fifth calculation unit. The first splitting unit splits the corrected white brightness to obtain corrected three-color brightness, where the corrected three-color brightness includes corrected red brightness, corrected green brightness, and corrected blue brightness. The third calculation unit calculates the difference between the standard three-color brightness and the corresponding corrected three-color brightness to obtain three-color brightness difference values, where the three-color brightness difference values include red brightness difference, green brightness difference, and blue brightness difference. The fourth calculation unit calculates the ratio of each of the three-color brightness differences to the sum of the three-color brightness differences to obtain three-color brightness weights, where the three-color brightness weights include red brightness weight, green brightness weight, and blue brightness weight. The fifth calculation unit calculates the transitional three-color brightness corresponding to the transitional grayscale values from the first-order grayscale value to each order of grayscale value based on the three-color brightness weights. This method, through the aforementioned proportional superposition algorithm, recalculates the three-color brightness values of the transitional grayscale levels, reducing the impact of monochromatic light leakage on monochromatic brightness.
[0085] Specifically, for grayscale t, the standard tri-color brightness decomposed in standard color coordinates is denoted as Lvr. t Lvg t Lvb t Then there is a difference in brightness among the three colors. ΔLvr represents the correction of red luminance, ΔLvg represents the correction of green luminance, and ΔLvb represents the correction of blue luminance. LvLvr0, LvLvg0, and LvLvb0 represent the correction of the three colors of luminance. Calculate the three weight values dr, dg, and db: Then the brightness values of any transitional three colors from grayscale 1 to t-1 are respectively Lvr k Lvg k Lvb k Lvr is the three-color brightness value corresponding to the k-th gray level. k For the k-th order red brightness, Lvr k-1 For the (k-1)th order of red brightness, LvW k For the k-th order white brightness, LvW k-1 It represents the (k-1)th order of white brightness.
[0086] In some optional embodiments, the method further includes a third acquisition unit and a generation unit. The third acquisition unit is used to acquire the current color gamut of the display screen to obtain a current three-color brightness matrix, and to acquire the three-color brightness of the target color gamut to obtain a target three-color brightness matrix, wherein the target color gamut is the color gamut that the display screen is expected to achieve. The generation unit is used to calculate the product of the inverse matrix of the current three-color brightness matrix and the target three-color brightness matrix to obtain a color space conversion matrix, and to generate a brightness lookup table from the color space conversion matrix, wherein the brightness lookup table is used to look up the corresponding corrected white brightness according to each grayscale value. This method uses interpolation to establish a mapping lookup table, which can realize DGA brightness mapping for different bit width grayscale levels.
[0087] In the specific implementation process, gray levels from 0 to 255 are respectively looked up for their corresponding Gamma2.2 mappings. The mapped measurement values are interpolated based on the two preceding and following measurement values to calculate the corresponding lookup gray level. If it is necessary to look up non-8-bit gray levels, such as the maximum gray level being 1023, then the remaining three values are linearly interpolated between every two gray levels in the obtained lookup table. The specific steps of the CM module are as follows: Step 1, input gray levels and normalize Degamma. Step 2: Construct the CSC color space conversion matrix for the data. degamma Perform color gamut conversion, and denote the output data as data. csc Using the color splitting method in DGA, the splitting matrices of the current color gamut and the target color gamut can be obtained, denoted as the current three-color luminance matrix A0 and the target three-color luminance matrix A10, respectively. x Then we have: Step 3: Perform inverse normalization Regamma, data regamma =log 2.2 data csc *255.
[0088] The brightness correction device for the aforementioned display screen includes a processor and a memory. The first acquisition unit, the first calculation unit, and the second calculation unit are all stored as program units in the memory, and the processor executes the program units stored in the memory to achieve the corresponding functions. All of the above modules are located in the same processor; alternatively, the modules may be located in different processors in any combination.
[0089] The processor contains a kernel, which retrieves the corresponding program unit from memory. One or more kernels can be configured, and the brightness of the display screen can be corrected by adjusting the kernel parameters.
[0090] The memory may include non-permanent memory in computer-readable media, such as random access memory (RAM) and / or non-volatile memory, such as read-only memory (ROM) or flash RAM, and the memory includes at least one memory chip.
[0091] This invention provides a computer-readable storage medium including a stored program, wherein, when the program is executed, it controls the device containing the computer-readable storage medium to perform the brightness correction method of the display screen.
[0092] Specifically, the brightness calibration methods for the display screen include:
[0093] Step S201: Obtain the color coordinates corresponding to each grayscale value of the display screen and the white brightness corresponding to each grayscale value, wherein the grayscale values are from level 0 to 255.
[0094] Specifically, this application utilizes a high-precision LCD screen Gamma correction algorithm, applying color theory to reduce the frequency of data measurement and acquisition, minimize the use of parameters, and eliminate the impact of light leakage to the greatest extent. The algorithm consists of two modules: DGA and CM. The DGA module performs high-precision Gamma curve mapping, its core being the establishment of a mapping lookup table; therefore, the mapping lookup table is established first. This is achieved by measuring the current color coordinates of the display screen (the screen to be corrected), including the color coordinates (x, y) corresponding to the current R255, G255, and B255 values, as well as the white brightness LvW corresponding to the 0-255 grayscale levels and its corresponding color coordinates (x, y).
[0095] Step S202: Based on the color coordinates of each grayscale value, the corresponding white brightness is split to obtain the three-color brightness corresponding to each grayscale value. The maximum white brightness is calculated based on the three-color brightness, wherein the three-color brightness includes red brightness, green brightness and blue brightness.
[0096] Specifically, the white brightness can be decomposed into red, green and blue brightness using color theory. Then, the maximum white brightness Lvmax is calculated using the three-color brightness mapping lookup table to remove a certain amount of light leakage and color bias.
[0097] Step S203: Calculate the corrected white brightness corresponding to each gray level based on the white brightness corresponding to the zero-order gray value and the maximum white brightness value, wherein the corrected white brightness is the corrected white brightness corresponding to each gray level gray value.
[0098] Specifically, after calculating the maximum white brightness, the corrected white brightness corresponding to each intermediate gray level can be calculated using the measured white brightness values Lv0 and Lvmax at the 0 gray level. The specific formula will be explained in detail below.
[0099] Optionally, calculating the maximum white brightness based on the aforementioned three-color brightness includes: obtaining standard color coordinates; decomposing the white brightness corresponding to each grayscale value according to the aforementioned standard color coordinates to obtain standard three-color brightness, wherein the aforementioned standard three-color brightness includes standard red brightness, standard green brightness, and standard blue brightness; calculating the ratios of the aforementioned standard red brightness, the aforementioned standard green brightness, and the aforementioned standard blue brightness in the aforementioned standard three-color brightness to obtain the standard red brightness ratio, the standard green brightness ratio, and the standard blue brightness ratio, and then applying the formula... Calculate the red, green, and blue vectors, where a r For the above standard red brightness ratio, a g For the above standard green brightness ratio, a b The above standard blue luminance ratio, LvR 255 LvG represents the red brightness corresponding to a grayscale value of 255. 255 This represents the green brightness corresponding to a grayscale value of 255, in LvB. 255 Let C1 represent the blue brightness corresponding to the grayscale value of level 255, C2 represent the red vector, C3 represent the green vector, and C4 represent the blue vector. The largest red vector among the red vectors with a brightness less than the standard red brightness is determined as the maximum red vector; the largest green vector among the green vectors with a brightness less than the standard green brightness is determined as the maximum green vector; and the largest blue vector among the blue vectors with a brightness less than the standard blue brightness is determined as the maximum blue vector. The sum of the maximum red vector, the maximum green vector, and the maximum blue vector is calculated to obtain the maximum white brightness value.
[0100] Optionally, the white brightness is decomposed according to the color coordinates of each grayscale value, including: using the formula and The formula breaks down the white brightness into its components, where x represents the horizontal axis of the color coordinate system, y represents the vertical axis, and Lvw represents the white brightness. r The x-coordinate represents the red coordinate. g The x-coordinate represents the green coordinate. b The x-coordinate of the blue coordinate is represented by y. r The y-coordinate represents the red coordinates mentioned above. g The y-coordinate represents the green coordinates mentioned above. b The ordinate of the blue coordinates mentioned above, X w Y represents the first component of the white brightness mentioned above. w Z represents the second component of the white brightness mentioned above. w Y represents the third component of the white brightness mentioned above. R The red luminance, Y, represents the luminance of the three colors mentioned above. G The green luminance, Y, represents the luminance of the three colors mentioned above. B The blue luminance represents the luminance of the three colors mentioned above.
[0101] Optionally, the corrected white brightness corresponding to each gray level is calculated based on the white brightness corresponding to the zero-order gray value and the maximum white brightness, including: using the formula Calculate the corrected white brightness corresponding to each gray level, where x represents the x-th gray level, Lv0 represents the white brightness corresponding to the zero-level gray level, Lvmax represents the maximum white brightness, and Lvx represents the corrected white brightness corresponding to the x-th gray level.
[0102] Optionally, after calculating the corrected white brightness corresponding to each gray value based on the white brightness corresponding to the zero-order gray value and the maximum white brightness, the method further includes: obtaining standard color coordinates; performing linear interpolation between the color coordinates corresponding to each gray value and the standard color coordinates to obtain the transition color coordinates corresponding to the transition gray values from the zero-order gray value to each gray value.
[0103] Optionally, the above method further includes: decomposing the corrected white luminance to obtain corrected three-color luminance, wherein the corrected three-color luminance includes corrected red luminance, corrected green luminance, and corrected blue luminance; calculating the difference between the standard three-color luminance and the corresponding corrected three-color luminance to obtain three-color luminance difference values, wherein the three-color luminance difference values include red luminance difference, green luminance difference, and blue luminance difference; calculating the ratio of each of the three-color luminance difference values to the sum of the three-color luminance difference values to obtain three-color luminance weights, wherein the three-color luminance weights include red luminance weight, green luminance weight, and blue luminance weight; and calculating the transition three-color luminance corresponding to the transition gray values from the first-order gray value to each order of gray value based on the three-color luminance weights.
[0104] Optionally, the above method further includes: obtaining the current color gamut of the display screen to obtain the current three-color brightness matrix, and obtaining the three-color brightness of the target color gamut to obtain the target three-color brightness matrix, wherein the target color gamut is the color gamut that the display screen is expected to achieve; calculating the product of the inverse matrix of the current three-color brightness matrix and the target three-color brightness matrix to obtain the color space conversion matrix, and generating a brightness lookup table from the color space conversion matrix, wherein the brightness lookup table is used to look up the corresponding corrected white brightness according to the grayscale values of each level.
[0105] This invention provides an electronic device, which includes a processor, a memory, and a program stored in the memory and executable on the processor. When the processor executes the program, it performs at least the following steps:
[0106] Step S201: Obtain the color coordinates corresponding to each grayscale value of the display screen and the white brightness corresponding to each grayscale value, wherein the grayscale values are from level 0 to 255.
[0107] Step S202: Based on the color coordinates of each grayscale value, the corresponding white brightness is split to obtain the three-color brightness corresponding to each grayscale value. The maximum white brightness is calculated based on the three-color brightness, wherein the three-color brightness includes red brightness, green brightness and blue brightness.
[0108] Step S203: Calculate the corrected white brightness corresponding to each gray level based on the white brightness corresponding to the zero-order gray value and the maximum white brightness value, wherein the corrected white brightness is the corrected white brightness corresponding to each gray level gray value.
[0109] The devices mentioned in this article can be servers, PCs, tablets, mobile phones, etc.
[0110] Optionally, calculating the maximum white brightness based on the aforementioned three-color brightness includes: obtaining standard color coordinates; decomposing the white brightness corresponding to each grayscale value according to the aforementioned standard color coordinates to obtain standard three-color brightness, wherein the aforementioned standard three-color brightness includes standard red brightness, standard green brightness, and standard blue brightness; calculating the ratios of the aforementioned standard red brightness, the aforementioned standard green brightness, and the aforementioned standard blue brightness in the aforementioned standard three-color brightness to obtain the standard red brightness ratio, the standard green brightness ratio, and the standard blue brightness ratio, and then applying the formula... Calculate the red, green, and blue vectors, where a r For the above standard red brightness ratio, a g For the above standard green brightness ratio, a b The above standard blue luminance ratio, LvR 255 LvG represents the red brightness corresponding to a grayscale value of 255. 255 This represents the green brightness corresponding to a grayscale value of 255, in LvB. 255 Let C1 represent the blue brightness corresponding to the grayscale value of level 255, C2 represent the red vector, C3 represent the green vector, and C4 represent the blue vector. The largest red vector among the red vectors with a brightness less than the standard red brightness is determined as the maximum red vector; the largest green vector among the green vectors with a brightness less than the standard green brightness is determined as the maximum green vector; and the largest blue vector among the blue vectors with a brightness less than the standard blue brightness is determined as the maximum blue vector. The sum of the maximum red vector, the maximum green vector, and the maximum blue vector is calculated to obtain the maximum white brightness value.
[0111] Optionally, the white brightness is decomposed according to the color coordinates of each grayscale value, including: using the formula and The formula breaks down the white brightness into its components, where x represents the horizontal axis of the color coordinate system, y represents the vertical axis, and Lvw represents the white brightness. r The x-coordinate represents the red coordinate. g The x-coordinate represents the green coordinate. b The x-coordinate of the blue coordinate is represented by y. r The y-coordinate represents the red coordinates mentioned above. g The y-coordinate represents the green coordinates mentioned above. b The ordinate of the blue coordinates mentioned above, X w Y represents the first component of the white brightness mentioned above. w Z represents the second component of the white brightness mentioned above. w Y represents the third component of the white brightness mentioned above. RThe red luminance, Y, represents the luminance of the three colors mentioned above. G The green luminance, Y, represents the luminance of the three colors mentioned above. B The blue luminance represents the luminance of the three colors mentioned above.
[0112] Optionally, the corrected white brightness corresponding to each gray level is calculated based on the white brightness corresponding to the zero-order gray value and the maximum white brightness, including: using the formula Calculate the corrected white brightness corresponding to each gray level, where x represents the x-th gray level, Lv0 represents the white brightness corresponding to the zero-level gray level, Lvmax represents the maximum white brightness, and Lvx represents the corrected white brightness corresponding to the x-th gray level.
[0113] Optionally, after calculating the corrected white brightness corresponding to each gray value based on the white brightness corresponding to the zero-order gray value and the maximum white brightness, the method further includes: obtaining standard color coordinates; performing linear interpolation between the color coordinates corresponding to each gray value and the standard color coordinates to obtain the transition color coordinates corresponding to the transition gray values from the zero-order gray value to each gray value.
[0114] Optionally, the above method further includes: decomposing the corrected white luminance to obtain corrected three-color luminance, wherein the corrected three-color luminance includes corrected red luminance, corrected green luminance, and corrected blue luminance; calculating the difference between the standard three-color luminance and the corresponding corrected three-color luminance to obtain three-color luminance difference values, wherein the three-color luminance difference values include red luminance difference, green luminance difference, and blue luminance difference; calculating the ratio of each of the three-color luminance difference values to the sum of the three-color luminance difference values to obtain three-color luminance weights, wherein the three-color luminance weights include red luminance weight, green luminance weight, and blue luminance weight; and calculating the transition three-color luminance corresponding to the transition gray values from the first-order gray value to each order of gray value based on the three-color luminance weights.
[0115] Optionally, the above method further includes: obtaining the current color gamut of the display screen to obtain the current three-color brightness matrix, and obtaining the three-color brightness of the target color gamut to obtain the target three-color brightness matrix, wherein the target color gamut is the color gamut that the display screen is expected to achieve; calculating the product of the inverse matrix of the current three-color brightness matrix and the target three-color brightness matrix to obtain the color space conversion matrix, and generating a brightness lookup table from the color space conversion matrix, wherein the brightness lookup table is used to look up the corresponding corrected white brightness according to the grayscale values of each level.
[0116] This application also provides a computer program product, which, when executed on a data processing device, is suitable for executing an initialization program having at least the following method steps:
[0117] Step S201: Obtain the color coordinates corresponding to each grayscale value of the display screen and the white brightness corresponding to each grayscale value, wherein the grayscale values are from level 0 to 255.
[0118] Step S202: Based on the color coordinates of each grayscale value, the corresponding white brightness is split to obtain the three-color brightness corresponding to each grayscale value. The maximum white brightness is calculated based on the three-color brightness, wherein the three-color brightness includes red brightness, green brightness and blue brightness.
[0119] Step S203: Calculate the corrected white brightness corresponding to each gray level based on the white brightness corresponding to the zero-order gray value and the maximum white brightness value, wherein the corrected white brightness is the corrected white brightness corresponding to each gray level gray value.
[0120] Optionally, calculating the maximum white brightness based on the aforementioned three-color brightness includes: obtaining standard color coordinates; decomposing the white brightness corresponding to each grayscale value according to the aforementioned standard color coordinates to obtain standard three-color brightness, wherein the aforementioned standard three-color brightness includes standard red brightness, standard green brightness, and standard blue brightness; calculating the ratios of the aforementioned standard red brightness, the aforementioned standard green brightness, and the aforementioned standard blue brightness in the aforementioned standard three-color brightness to obtain the standard red brightness ratio, the standard green brightness ratio, and the standard blue brightness ratio, and then applying the formula... Calculate the red, green, and blue vectors, where a r For the above standard red brightness ratio, a g For the above standard green brightness ratio, a b The above standard blue luminance ratio, LvR 255 LvG represents the red brightness corresponding to a grayscale value of 255. 255 This represents the green brightness corresponding to a grayscale value of 255, in LvB. 255 Let C1 represent the blue brightness corresponding to the grayscale value of level 255, C2 represent the red vector, C3 represent the green vector, and C4 represent the blue vector. The largest red vector among the red vectors with a brightness less than the standard red brightness is determined as the maximum red vector; the largest green vector among the green vectors with a brightness less than the standard green brightness is determined as the maximum green vector; and the largest blue vector among the blue vectors with a brightness less than the standard blue brightness is determined as the maximum blue vector. The sum of the maximum red vector, the maximum green vector, and the maximum blue vector is calculated to obtain the maximum white brightness value.
[0121] Optionally, the white brightness is decomposed according to the color coordinates of each grayscale value, including: using the formula and The formula breaks down the white brightness into its components, where x represents the horizontal axis of the color coordinate system, y represents the vertical axis, and Lvw represents the white brightness. r The x-coordinate represents the red coordinate. g The x-coordinate represents the green coordinate. b The x-coordinate of the blue coordinate is represented by y. r The y-coordinate represents the red coordinates mentioned above. g The y-coordinate represents the green coordinates mentioned above. b The ordinate of the blue coordinates mentioned above, X w Y represents the first component of the white brightness mentioned above. w Z represents the second component of the white brightness mentioned above. w Y represents the third component of the white brightness mentioned above. R The red luminance, Y, represents the luminance of the three colors mentioned above. G The green luminance, Y, represents the luminance of the three colors mentioned above. B The blue luminance represents the luminance of the three colors mentioned above.
[0122] Optionally, the corrected white brightness corresponding to each gray level is calculated based on the white brightness corresponding to the zero-order gray value and the maximum white brightness, including: using the formula Calculate the corrected white brightness corresponding to each gray level, where x represents the x-th gray level, Lv0 represents the white brightness corresponding to the zero-level gray level, Lvmax represents the maximum white brightness, and Lvx represents the corrected white brightness corresponding to the x-th gray level.
[0123] Optionally, after calculating the corrected white brightness corresponding to each gray value based on the white brightness corresponding to the zero-order gray value and the maximum white brightness, the method further includes: obtaining standard color coordinates; performing linear interpolation between the color coordinates corresponding to each gray value and the standard color coordinates to obtain the transition color coordinates corresponding to the transition gray values from the zero-order gray value to each gray value.
[0124] Optionally, the above method further includes: decomposing the corrected white luminance to obtain corrected three-color luminance, wherein the corrected three-color luminance includes corrected red luminance, corrected green luminance, and corrected blue luminance; calculating the difference between the standard three-color luminance and the corresponding corrected three-color luminance to obtain three-color luminance difference values, wherein the three-color luminance difference values include red luminance difference, green luminance difference, and blue luminance difference; calculating the ratio of each of the three-color luminance difference values to the sum of the three-color luminance difference values to obtain three-color luminance weights, wherein the three-color luminance weights include red luminance weight, green luminance weight, and blue luminance weight; and calculating the transition three-color luminance corresponding to the transition gray values from the first-order gray value to each order of gray value based on the three-color luminance weights.
[0125] Optionally, the above method further includes: obtaining the current color gamut of the display screen to obtain the current three-color brightness matrix, and obtaining the three-color brightness of the target color gamut to obtain the target three-color brightness matrix, wherein the target color gamut is the color gamut that the display screen is expected to achieve; calculating the product of the inverse matrix of the current three-color brightness matrix and the target three-color brightness matrix to obtain the color space conversion matrix, and generating a brightness lookup table from the color space conversion matrix, wherein the brightness lookup table is used to look up the corresponding corrected white brightness according to the grayscale values of each level.
[0126] It is obvious to those skilled in the art that the modules or steps of the present invention described above can be implemented using general-purpose computing devices. They can be centralized on a single computing device or distributed across a network of multiple computing devices. They can be implemented using computer-executable program code, and thus can be stored in a storage device for execution by a computing device. In some cases, the steps shown or described can be performed in a different order than those described herein, or they can be fabricated as separate integrated circuit modules, or multiple modules or steps can be fabricated as a single integrated circuit module. Thus, the present invention is not limited to any particular combination of hardware and software.
[0127] Those skilled in the art will understand that embodiments of this application can be provided as methods, systems, or computer program products. Therefore, this application can take the form of a completely hardware embodiment, a completely software embodiment, or an embodiment combining software and hardware aspects. Furthermore, this application can take the form of a computer program product embodied on one or more computer-usable storage media (including but not limited to disk storage, CD-ROM, optical storage, etc.) containing computer-usable program code.
[0128] This application is described with reference to flowchart illustrations and / or block diagrams of methods, apparatus (systems), and computer program products according to embodiments of this application. It will be understood that each block of the flowchart illustrations and / or block diagrams, and combinations of blocks in the flowchart illustrations and / or block diagrams, can be implemented by computer program instructions. These computer program instructions can be provided to a processor of a general-purpose computer, special-purpose computer, embedded processor, or other programmable data processing apparatus to produce a machine, such that the instructions, which execute via the processor of the computer or other programmable data processing apparatus, generate instructions for implementing the flowchart... Figure 1 One or more processes and / or boxes Figure 1 A device that provides the functions specified in one or more boxes.
[0129] These computer program instructions may also be stored in a computer-readable storage medium that can direct a computer or other programmable data processing device to function in a particular manner, such that the instructions stored in the computer-readable storage medium produce an article of manufacture including instruction means, which are implemented in a process Figure 1 One or more processes and / or boxes Figure 1 The function specified in one or more boxes.
[0130] These computer program instructions may also be loaded onto a computer or other programmable data processing equipment to cause a series of operational steps to be performed on the computer or other programmable equipment to produce a computer-implemented process, thereby providing instructions that execute on the computer or other programmable equipment for implementing the process. Figure 1 One or more processes and / or boxes Figure 1 The steps of the function specified in one or more boxes.
[0131] In a typical configuration, a computing device includes one or more processors (CPU), input / output interfaces, network interfaces, and memory.
[0132] Memory may include non-persistent memory in computer-readable media, such as random access memory (RAM) and / or non-volatile memory, such as read-only memory (ROM) or flash RAM. Memory is an example of computer-readable media.
[0133] Computer-readable media includes both permanent and non-permanent, removable and non-removable media that can store information using any method or technology. Information can be computer-readable instructions, data structures, modules of programs, or other data. Examples of computer storage media include, but are not limited to, phase-change memory (PRAM), static random access memory (SRAM), dynamic random access memory (DRAM), other types of random access memory (RAM), read-only memory (ROM), electrically erasable programmable read-only memory (EEPROM), flash memory or other memory technologies, CD-ROM, digital versatile optical disc (DVD) or other optical storage, magnetic tape, magnetic magnetic disk storage or other magnetic storage devices, or any other non-transferable medium that can be used to store information accessible by a computing device. As defined herein, computer-readable media does not include transient computer-readable media, such as modulated data signals and carrier waves.
[0134] It should also be noted that the terms "comprising," "including," or any other variations thereof are intended to cover non-exclusive inclusion, such that a process, method, article, or apparatus that comprises a list of elements includes not only those elements but also other elements not expressly listed, or elements inherent to such process, method, article, or apparatus. Unless otherwise specified, an element defined by the phrase "comprising one..." does not exclude the presence of other identical elements in the process, method, article, or apparatus that includes that element.
[0135] As can be seen from the above description, the embodiments of this application achieve the following technical effects:
[0136] 1) In the brightness correction method of the display screen of this application, the color coordinates corresponding to each grayscale value of the display screen and the white brightness corresponding to each grayscale value are obtained; the white brightness corresponding to each grayscale value is decomposed according to the color coordinates of each grayscale value to obtain the three-color brightness corresponding to each grayscale value; the maximum white brightness is calculated according to the three-color brightness, which includes red brightness, green brightness, and blue brightness; the corrected white brightness corresponding to each grayscale value is calculated according to the white brightness corresponding to the zero-level grayscale value and the maximum white brightness. Compared with the problems in the prior art where light leakage of the display screen leads to a certain degree of color shift, resulting in the display color not matching human eye perception, this application corrects the brightness of the display screen to compensate for the color difference problem caused by light leakage. Therefore, it can solve the problem of color difference caused by light leakage of the display screen in the prior art and achieve the purpose of correcting the screen color difference.
[0137] 2) In the brightness correction device of this application, the color coordinates corresponding to each grayscale value of the display screen and the white brightness corresponding to each grayscale value are obtained; the white brightness corresponding to each grayscale value is decomposed according to the color coordinates of each grayscale value to obtain the three-color brightness corresponding to each grayscale value; the maximum white brightness is calculated based on the three-color brightness, which includes red brightness, green brightness, and blue brightness; the corrected white brightness corresponding to each grayscale value is calculated based on the white brightness corresponding to the zero-level grayscale value and the maximum white brightness. Compared with the problems in the prior art where light leakage of the display screen leads to a certain degree of color shift, resulting in the displayed color not matching human eye perception, this application corrects the brightness of the display screen to compensate for the color difference problem caused by light leakage. Therefore, it can solve the problem of color difference caused by light leakage in the prior art and achieve the purpose of correcting the screen color difference.
[0138] The above description is merely a preferred embodiment of this application and is not intended to limit this application. Various modifications and variations can be made to this application by those skilled in the art. Any modifications, equivalent substitutions, improvements, etc., made within the spirit and principles of this application should be included within the protection scope of this application.
Claims
1. A brightness calibration method for a display screen, characterized in that, include: Obtain the color coordinates corresponding to each grayscale value of the display screen and the white brightness corresponding to each grayscale value, wherein the grayscale value is from level 0 to 255; The white brightness is split according to the color coordinate of each gray level value to obtain the three-color brightness corresponding to each gray level white brightness. The maximum white brightness is calculated according to the three-color brightness, wherein the three-color brightness includes red brightness, green brightness and blue brightness. The corrected white brightness corresponding to each gray level is calculated based on the white brightness corresponding to the zero-order gray value and the maximum white brightness, wherein the corrected white brightness is the corrected white brightness corresponding to each gray level. Calculating the maximum white brightness based on the three-color brightness includes: obtaining standard color coordinates; decomposing the white brightness corresponding to each grayscale value according to the standard color coordinates to obtain standard three-color brightness, wherein the standard three-color brightness includes standard red brightness, standard green brightness, and standard blue brightness; calculating the ratio of the standard red brightness, the standard green brightness, and the standard blue brightness in the standard three-color brightness to obtain the standard red brightness ratio, the standard green brightness ratio, and the standard blue brightness ratio, and then applying the formula... Calculate the red vector, green vector, and blue vector, where, a r The standard red brightness ratio, a g The standard green brightness ratio is... a b The standard blue luminance ratio is... LvR 255 This represents the red brightness corresponding to a grayscale value of 255. LvG 255 This represents the green brightness corresponding to a grayscale value of 255. LvB 255 Let C1 represent the blue brightness corresponding to the grayscale value of level 255, C2 represent the red vector, C3 represent the green vector, and C4 represent the blue vector. The largest red vector among the red vectors with a brightness less than the standard red brightness is determined as the maximum red vector; the largest green vector among the green vectors with a brightness less than the standard green brightness is determined as the maximum green vector; and the largest blue vector among the blue vectors with a brightness less than the standard blue brightness is determined as the maximum blue vector. The sum of the maximum red vector, the maximum green vector, and the maximum blue vector is calculated to obtain the maximum white brightness value.
2. The brightness correction method according to claim 1, characterized in that, The white brightness is split according to the color coordinates of each grayscale value, including: Through formula and The formula decomposes the white brightness, where x represents the horizontal coordinate of the color coordinate system and y represents the vertical coordinate of the color coordinate system. Lvw The value x represents the white brightness. r The x-coordinate represents the red coordinate. g The x-coordinate represents the green coordinate. b The x-coordinate of the blue coordinate is represented by y. r The y-coordinate represents the red color coordinate. g The y-coordinate represents the green color coordinate. b The ordinate of the blue coordinate is represented by X. w Y represents the first component of the white brightness. w Z represents the second component of the white brightness. w The third component representing the white brightness, Y R The red luminance, Y, represents the luminance of the three colors. G The green luminance, Y, represents the luminance of the three colors. B The blue luminance represents the luminance of the three colors.
3. The brightness correction method according to claim 1, characterized in that, Calculate the corrected white brightness corresponding to each gray level based on the white brightness corresponding to the zero-order gray value and the maximum white brightness, including: Through formula Calculate the corrected white luminance corresponding to each grayscale value, wherein, Lv0 represents the white brightness corresponding to the zero-order gray value, Lvmax represents the maximum white brightness, and Lvx represents the corrected white brightness corresponding to the x-order gray value.
4. The brightness correction method according to claim 1, characterized in that, After calculating the corrected white brightness corresponding to each gray level based on the white brightness corresponding to the zero-order gray value and the maximum white brightness, the method further includes: Obtain standard color coordinates; Linear interpolation is performed between the color coordinates corresponding to each grayscale value and the standard color coordinates to obtain the transition color coordinates corresponding to the transition grayscale values from the zero-order grayscale value to each grayscale value.
5. The brightness correction method according to claim 1, characterized in that, The method further includes: The corrected white brightness is split into corrected three-color brightness, wherein the corrected three-color brightness includes corrected red brightness, corrected green brightness and corrected blue brightness; Calculate the difference between the standard three-color brightness and the corresponding corrected three-color brightness to obtain the three-color brightness difference value, wherein the three-color brightness difference value includes the red brightness difference value, the green brightness difference value, and the blue brightness difference value; Calculate the ratio of each of the three-color brightness differences to the sum of the three-color brightness differences to obtain the three-color brightness weights, wherein the three-color brightness weights include red brightness weight, green brightness weight and blue brightness weight; The transitional three-color brightness is calculated based on the three-color brightness weights to determine the transitional gray values corresponding to the transitional gray values from the first-order gray value to each order of gray value.
6. The brightness correction method according to claim 1, characterized in that, The method further includes: The current color gamut of the display screen is obtained to obtain the current three-color brightness matrix, and the three-color brightness of the target color gamut is obtained to obtain the target three-color brightness matrix, wherein the target color gamut is the color gamut that the display screen is expected to achieve; The product of the inverse of the current three-color luminance matrix and the target three-color luminance matrix is calculated to obtain a color space conversion matrix. The color space conversion matrix is then used to generate a luminance lookup table, wherein the luminance lookup table is used to find the corresponding corrected white luminance based on the grayscale values of each order.
7. A brightness correction device for a display screen, characterized in that, include: The first acquisition unit is used to acquire the color coordinates corresponding to each grayscale value of the display screen and the white brightness corresponding to each grayscale value, wherein the grayscale value is from level 0 to 255. The first calculation unit is used to decompose the corresponding white brightness according to the color coordinate of each gray value to obtain the three-color brightness corresponding to each gray value, and calculate the maximum white brightness according to the three-color brightness, wherein the three-color brightness includes red brightness, green brightness and blue brightness; The second calculation unit is used to calculate the corrected white brightness corresponding to each gray level based on the white brightness corresponding to the zero-order gray value and the maximum white brightness, wherein the corrected white brightness is the corrected white brightness corresponding to each gray level. The first calculation unit includes a first splitting module, a first calculation module, a determining module, and a second calculation module. The first splitting module is used to obtain standard color coordinates and split the white brightness corresponding to each grayscale value according to the standard color coordinates to obtain standard three-color brightness, wherein the standard three-color brightness includes standard red brightness, standard green brightness, and standard blue brightness. The first calculation module is used to calculate the ratio of the standard red brightness, the standard green brightness, and the standard blue brightness in the standard three-color brightness to obtain the standard red brightness ratio, the standard green brightness ratio, and the standard blue brightness ratio, and then calculate them using the formula... Calculate the red vector, green vector, and blue vector, where, a r The standard red brightness ratio, a g The standard green brightness ratio is... a b The standard blue luminance ratio is... LvR 255 This represents the red brightness corresponding to a grayscale value of 255. LvG 255 This represents the green brightness corresponding to a grayscale value of 255. LvB 255 The blue luminance corresponding to the grayscale value of level 255 is represented by C1, the red vector by C2, and the blue vector by C3. The determining module is used to determine the largest red vector among the red vectors that are less than the standard red luminance as the maximum red vector, the largest green vector among the green vectors that are less than the standard green luminance as the maximum green vector, and the largest blue vector among the blue vectors that are less than the standard blue luminance as the maximum blue vector. The second calculation module is used to calculate the sum of the maximum red vector, the maximum green vector, and the maximum blue vector to obtain the maximum white luminance value.
8. A computer-readable storage medium, characterized in that, The computer-readable storage medium includes a stored program, wherein, when the program is executed, it controls the device on which the computer-readable storage medium is located to perform the brightness correction method according to any one of claims 1 to 6.
9. An electronic device, characterized in that, include: One or more processors, 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 one or more processors, the one or more programs including methods for performing the brightness correction method according to any one of claims 1 to 6.
Citation Information
Patent Citations
Method for improving monochromatic white balance adjustment and calibration precision on basis of white color brightness parameters
CN103366709A
RGBW compensation method and apparatus based on color cast of white sub pixels
CN105118413A