A grayscale compensation method, apparatus, medium, electronic device, and program product

By breaking down the grayscale compensation algorithm into multiple lookup tables and converting it into fixed-point operations, the problems of high design complexity, large hardware resources, and high power consumption of IR Drop compensation algorithms in FPGAs are solved, achieving more efficient system performance and resource utilization.

CN119252162BActive Publication Date: 2026-01-30BOE TECHNOLOGY GROUP CO LTD
View PDF 2 Cites 0 Cited by

Patent Information

Application Number
CN202411597989.9
Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
Filing Date
2024-11-08
Publication Date
2026-01-30
Estimated Expiration
2044-11-08

AI Technical Summary

Technical Problem

Existing technologies for implementing IR Drop compensation algorithms using FPGAs suffer from high design complexity, large hardware resource requirements, and high power consumption.

Method used

The grayscale compensation algorithm is broken down into multiple lookup tables and converted into fixed-point operations, including a first current lookup table, a second current lookup table, and a compensation coefficient lookup table, thereby reducing the need for floating-point operations.

Benefits of technology

It reduces the complexity and power consumption of FPGA design, reduces the use of hardware resources, and improves system performance.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN119252162B_ABST
    Figure CN119252162B_ABST
Patent Text Reader

Abstract

This invention provides a grayscale compensation method, apparatus, medium, electronic device, and program product. The method determines the actual current of each pixel based on the global average current of the image to be displayed on the display panel and the column current weight of each pixel. The global average current is determined based on the sum of the currents of all pixels, and the current of each pixel is determined by its grayscale value in a pre-constructed first current lookup table. For each pixel in the image to be displayed, the target current of that pixel is determined based on the maximum grayscale component in its R, G, and B channels in a pre-constructed second current lookup table. The compensation coefficient of each pixel is determined based on its actual current and target current in a pre-constructed set of compensation coefficient lookup tables. This invention breaks down the calculations involved in the algorithm into multiple lookup tables according to the calculation flow and provides them to the FPGA, reducing the complexity, cost, and power consumption of the design in the FPGA.
Need to check novelty before this filing date? Find Prior Art

Description

TECHNICAL FIELD

[0001] The present application relates to the field of image processing, and in particular to a gray scale compensation method and device, medium, electronic equipment and program product. BACKGROUND

[0002] In the manufacturing process of a display panel, due to the limitation of processing technology, the size of the current is affected by various factors, such as the mobility of TFT (Thin Film Transistor), the threshold voltage of OLED (Organic Light Emitting Diode), and the overall power supply voltage. The fluctuations and differences of these parameters will cause the display brightness of the same gray scale under different voltage drops on the display panel to be inconsistent. As shown in FIG. 1, for the same picture, the brightness of the black background is brighter than that of the white background, which is the IR Drop phenomenon in the display panel. Figure 1

[0003] The IR Drop compensation method (referred to as IRC algorithm) aims to eliminate the IR Drop phenomenon, but when implementing the algorithm using FPGA (Field Programmable Gate Array), a large amount of hardware resources and clock cycles are required, which not only increases the design complexity, but also increases the cost and power consumption. Therefore, there is an urgent need for a method that can reduce the design complexity, reduce the use of hardware resources, and reduce the power consumption. SUMMARY

[0004] The present application provides a gray scale compensation method, device, medium, electronic equipment and program product to solve the deficiencies in the related art.

[0005] According to a first aspect of an embodiment of the present application, a gray scale compensation method is provided, the method comprising: determining the actual current of each pixel point according to the global average current of the image to be displayed on the display panel and the column current weight of each pixel point; wherein the global average current is determined according to the total sum of the currents of all pixel points, and the current of each pixel point is determined by the gray scale value of the pixel point in a pre-constructed first current lookup table; the column current weight is determined according to the average value of the currents of the pixel points in the same column; for each pixel point in the image to be displayed, the target current of the pixel point is determined in a pre-constructed second current lookup table according to the maximum gray scale component in the R, G, and B channels; the compensation coefficient of each pixel point is determined in a pre-constructed set of compensation coefficient lookup tables according to the actual current and the target current of each pixel point; and the target gray scale value of each pixel point is determined according to the compensation coefficient and the gray scale value of each pixel point.

[0006] In some embodiments, before determining the actual current of each pixel point, the method further comprises: if the image to be displayed is 8 bits, converting the image to be displayed to 12 bits.

[0007] ​In some embodiments, the determining the actual current of each pixel point according to the global average current of the image to be displayed on the display panel and the column current weight of each pixel point comprises: determining the current of each pixel point in a first current lookup table constructed in advance according to the gray scale value of each pixel point in the image to be displayed; determining the global average current according to the total sum of the currents of all pixel points divided by the number of pixels; determining the column average current according to the total sum of the currents of all pixel points in each column and the number of pixels in the column; determining the column current weight according to a preset power of the column average current, the column current weights corresponding to the pixel points in the same column being the same; obtaining the actual current of each pixel point according to the product of the global average current and the column current weight of each pixel point.

[0008] In some embodiments, the determining the current of each pixel point in a first current lookup table constructed in advance according to the gray scale value of each pixel point in the image to be displayed comprises:

[0009] For each pixel point in the image to be displayed, a first candidate current corresponding to the high 8 bits of the 12-bit gray scale value of the pixel point is obtained from a first current lookup table constructed in advance, and a second candidate current corresponding to the value after the high 8 bits is operated by 1 is obtained;

[0010] If the first candidate current is greater than the second candidate current, the difference between the first candidate current and the second candidate current is obtained, the product of the difference and the low 4 bits of the 12-bit gray scale value is operated by bits to obtain a first interpolation current, and the current of the pixel point is obtained according to the first candidate current and the first interpolation current;

[0011] If the first candidate current is less than the second candidate current, the difference between the second candidate current and the first candidate current is obtained, the product of the difference and the low 4 bits of the 12-bit gray scale value is operated by bits to obtain a second interpolation current, and the current of the pixel point is obtained according to the first candidate current and the second interpolation current.

[0012] In some embodiments, the first current lookup table is constructed based on the following steps: according to the correlation between the gray scale value and the current value, all values of the gray scale value in a preset range are traversed to obtain the first current lookup table; wherein the preset range is [0, 256].

[0013] In some embodiments, the compensation coefficient of each pixel point is determined according to the actual current and the target current of each pixel point in a pre-constructed set of compensation coefficient lookup tables, including: for each pixel point, obtaining an adjustment ratio of luminance of the gray scale value of the pixel point when the contrast changes in a pre-constructed first compensation coefficient lookup table; calculating a first current for controlling the actual luminance of the pixel point according to the correlation between the target current of the pixel point and the adjustment ratio; obtaining a first coefficient corresponding to the first current in a pre-constructed second compensation coefficient lookup table; calculating a second current for controlling the actual luminance of the pixel point according to the correlation between the actual current of the pixel point and the adjustment ratio; obtaining a second coefficient corresponding to the second current in a pre-constructed third compensation coefficient lookup table; and calculating the compensation coefficient of the pixel point according to the product of the first coefficient and the second coefficient.

[0014] In some embodiments, the second compensation coefficient lookup table is constructed based on the following steps: for a first current with a value range of [0, 1], the value range is equally divided into 256 nodes; performing an exponential operation on each interval node, and shifting the exponential operation result to the left by 12 bits to obtain a first coefficient corresponding to each node; and constructing a second compensation coefficient lookup table according to each node and the first coefficient corresponding to each node.

[0015] In some embodiments, after determining the compensation coefficient of each pixel point, the method further includes: obtaining a correction coefficient corresponding to the actual current of each pixel point in a pre-constructed correction coefficient lookup table; and correcting the compensation coefficient of each pixel point by using the correction coefficient to obtain a corrected compensation coefficient.

[0016] In some embodiments, the correction of the compensation coefficient of each pixel point by using the correction coefficient to obtain a corrected compensation coefficient includes:

[0017] If the compensation coefficient of the pixel point is greater than or equal to a preset value, the difference between the compensation coefficient and the preset value is obtained, the product of the difference and the correction coefficient is obtained, the quotient of the product and the preset value is calculated, and the sum of the quotient and the preset value is taken as the corrected compensation coefficient;

[0018] If the compensation coefficient of the pixel point is less than a preset value, the difference between the preset value and the compensation coefficient is obtained, the product of the difference and the correction coefficient is obtained, and the difference between the preset value and the product is taken as the corrected compensation coefficient.

[0019] According to a second aspect of the embodiments of the present application, a gray scale compensation device is provided, which comprises: an actual current determination unit configured to determine an actual current of each pixel point according to a global average current of a to-be-displayed image on a display panel and a column current weight of each pixel point, wherein the global average current is determined according to a total sum of currents of all pixel points, and the current of each pixel point is determined by a gray scale value of the pixel point in a first current lookup table constructed in advance; the column current weight is determined according to an average value of currents of pixel points in a same column; a target current determination unit configured to determine, for each pixel point in the to-be-displayed image, a target current of the pixel point in a second current lookup table constructed in advance according to a maximum gray scale component in R, G and B channels of the pixel point; a compensation coefficient determination unit configured to determine a compensation coefficient of each pixel point in a group of compensation coefficient lookup tables constructed in advance according to the actual current and the target current of each pixel point; and a compensation unit configured to determine a target gray scale value of each pixel point according to the compensation coefficient and the gray scale value of each pixel point.

[0020] According to a third aspect of the embodiments of the present application, a computer readable storage medium is provided, which stores a computer program, and the program is executed by a processor to implement the method of any one of the first aspect.

[0021] According to a fourth aspect of the embodiments of the present application, an electronic device is provided, which comprises: a processor; and a memory configured to store processor-executable instructions; wherein the processor is configured to execute the method of any one of the first aspect.

[0022] According to a fifth aspect of the embodiments of the present application, a computer program product is provided, which comprises a computer program and instructions, and the computer program / instructions are executed by a processor to implement the method of any one of the first aspect.

[0023] According to the above embodiment, the actual current of each pixel point is determined according to the global average current of the image to be displayed on the display panel and the column current weight of each pixel point, wherein the global average current is determined according to the total sum of the currents of all pixel points, and the current of each pixel point is determined by the gray scale value of the pixel point in the first current lookup table constructed in advance; for each pixel point in the image to be displayed, the target current of the pixel point is determined according to the maximum gray scale component in the R, G and B three channels in the second current lookup table constructed in advance; the compensation coefficient of each pixel point is determined in a group of compensation coefficient lookup tables constructed in advance according to the actual current and the target current of each pixel point; and the target gray scale value of each pixel point is determined according to the compensation coefficient and the gray scale value of each pixel point. That is, the calculation involved in the algorithm is split into multiple lookup tables according to the calculation process and provided to the FPGA, so as to realize the purpose of converting the floating point operation of the algorithm into fixed point operation, and reduce the complexity, cost and power consumption of the design in the FPGA.

[0024] It should be understood that the above general description and the following detailed description are only exemplary and explanatory, and cannot limit the present application. BRIEF DESCRIPTION OF DRAWINGS

[0025] The accompanying drawings, which are incorporated into and form part of the specification, illustrate embodiments consistent with the present application and, together with the specification, serve to explain the principles of the present application.

[0026] Figure 1 is a schematic diagram of an IR Drop phenomenon according to an embodiment of the present application.

[0027] Figure 2 is a flowchart of a gray scale compensation method according to an embodiment of the present application.

[0028] Figure 3 is a schematic diagram of a table lookup process according to an embodiment of the present application.

[0029] Figure 4 is a flowchart of determining a compensation coefficient according to an embodiment of the present application.

[0030] Figure 5 is a schematic diagram of a gray scale compensation device according to an embodiment of the present application. DETAILED DESCRIPTION

[0031] The exemplary embodiments will be described in detail herein with reference to the attached drawings. In the following description, like reference numerals refer to like elements, unless indicated otherwise. The following description of exemplary embodiments is not representative of all possible embodiments consistent with the present application. Instead, it is merely an example of apparatus and methods consistent with some aspects of the present application as detailed in the appended claims.

[0032] The phenomenon of IR Drop (voltage drop) on the display panel can cause the brightness to be inconsistent at the same voltage drop level, even if the gray scale is the same. In the related art, an IRC algorithm is usually used to eliminate the IR Drop phenomenon, so that the brightness of the display panel is more uniform. However, the floating point operation involved in the algorithm significantly increases the demand for hardware resources and the execution time of the clock cycle when implemented using FPGA.

[0033] In view of this, the present application provides a gray scale compensation method, which can convert floating point operations in the algorithm or data path to fixed point operations (i.e., fixed-point), thereby reducing the use of hardware resources such as logic cells, memories, and improving system performance.

[0034] Because floating point operations involve accurate representation and calculation of floating point numbers, more hardware resources and clock cycles are required for execution, while fixed point operations use fixed bit width integers to represent numbers, and similar functions can be achieved by using simpler algorithms and hardware structures. Therefore, in FPGA design, converting floating point operations to fixed point operations can reduce the complexity, cost and power consumption of the design.

[0035] In FPGA, a lookup table (LUT) is a basic logic resource, which is usually used to implement Boolean logic functions, and the LUT method is suitable for mapping inputs to discrete output values. For the lookup table method, the input range and output range of the function need to be determined first. Then, each possible value of the input is mapped to an output value, and these mapping relationships are stored in the LUT of the FPGA. When the input arrives, the FPGA looks up the corresponding output value of the input in the LUT and outputs the value. Secondly, it can estimate the value of any point by interpolation between known data points. Therefore, in the present application, the calculations involved in the algorithm are split according to the calculation flow and mapped to multiple LUT tables, which are provided to the FPGA for calculation and interpolation.

[0036] The following embodiments will specifically illustrate the method provided by the present application in conjunction with the accompanying drawings.

[0037] Figure 2 is a flowchart of a gray scale compensation method according to an embodiment of the present application, as Figure 2As shown, the gray scale compensation method provided by the present application can include the following steps 201 to 204.

[0038] In step 201, the actual current of each pixel point is determined according to the global average current of the image to be displayed on the display panel and the column current weight of each pixel point.

[0039] Wherein, the global average current is determined according to the sum of the currents of all pixel points, and the current of each pixel point is determined by the gray scale value of the pixel point in the first current lookup table constructed in advance; the column current weight is determined according to the average value of the currents of the pixel points in the same column.

[0040] In step 202, for each pixel point in the image to be displayed, the target current of the pixel point is determined in the second current lookup table constructed in advance according to the maximum gray scale component in the R, G and B channels.

[0041] In step 203, the compensation coefficient of each pixel point is determined in a set of compensation coefficient lookup tables constructed in advance according to the actual current and the target current of each pixel point.

[0042] In step 204, the target gray scale value of each pixel point is determined according to the compensation coefficient and the gray scale value of each pixel point.

[0043] From the above steps 201 to 204, it can be seen that the present application maps the process involving floating point operation in the algorithm into a plurality of LUT tables, which are the first current lookup table, the second current lookup table, and a set of compensation coefficient lookup tables. In the calculation process, when floating point operation is involved, the corresponding output value is obtained by looking up the table, so as to realize the purpose of converting floating point operation into fixed point operation, and reduce the design complexity of FPGA.

[0044] That is, the present application determines the actual current of each pixel point according to the global average current of the image to be displayed on the display panel and the column current weight of each pixel point; wherein the global average current is determined according to the sum of the currents of all pixel points, and the current of each pixel point is determined by the gray scale value of the pixel point in a first current lookup table constructed in advance; for each pixel point in the image to be displayed, the target current of the pixel point is determined in a second current lookup table constructed in advance according to the maximum gray scale component in the R, G and B three channels thereof; the compensation coefficient of each pixel point is determined in a set of compensation coefficient lookup tables constructed in advance according to the actual current and the target current of each pixel point; and the target gray scale value of each pixel point is determined according to the compensation coefficient and the gray scale value of each pixel point. That is, the present application splits the calculation involved in the algorithm into a plurality of lookup tables according to the calculation flow and provides the lookup tables to the FPGA, so as to realize the purpose of converting the floating-point operation of the algorithm into fixed-point operation, and reduce the complexity, cost and power consumption of the design in the FPGA.

[0045] In the present embodiment, in order to be compatible with the input signal source of 12 bits of part of the display panel, and to improve the precision in the FPGA and reduce quantization error, in the case that the image to be displayed on the display panel is 8 bits, the image to be displayed is converted into 12 bits.

[0046] In an example, the 8-bit image to be displayed can be converted into 12 bits through bit operation. Specifically, the original 8-bit image data is read, the gray scale value of each pixel is left shifted by 4 bits, the low 4 bits after left shift are filled with 0, and the processed data is stored as 12-bit image format.

[0047] In another example, the 8-bit image to be displayed can be converted into 12 bits through the method of Dither dithering. Specifically, first, the 8-bit image data is converted into discrete values in the gray scale or color space. Then, a dithering algorithm is applied to introduce small color changes in the image, which can be random, ordered or based on error diffusion. Through the processing of the dithering algorithm, the image will visually present smoother color transition and higher color depth effect. Finally, the processed image data is saved as 12-bit image format.

[0048] The input bit number of LUT in FPGA is usually 4 bits or 6 bits, for example, a 4-input LUT is actually a 4-bit address bit, 1-bit data bit memory, and can store 16-bit data. When the bit number of input data is much larger than the input of a LUT, a plurality of LUTs are cascaded to realize the logic. However, cascading will cause delay, which restricts the operation frequency of the system, so that using a LUT with fewer inputs can better save area and resources. Based on the above reasons, when processing 12-bit image data, two LUTs are cascaded to reduce the delay, that is, an 8-bit LUT table is constructed. When looking up the table, since the gray scale value is 12 bits, the high 8 bits in the 12 bits are used for table lookup, and the low 4 bits are used for interpolation, so as to obtain the value corresponding to the 12-bit gray scale value.

[0049] In the following embodiment, the construction process of the first current lookup table is first described.

[0050] In this embodiment, according to the correlation between the gray scale value and the current value, all values of the gray scale value in a preset range are traversed to obtain the first current lookup table; wherein the preset range is [0, 256].

[0051] For example, the correlation between the gray scale value and the current value can refer to the following formula (1).

[0052]

[0053] In the above formula, i sP(x,y) represents the current value at the pixel point P(x, y), cw P represents the influence of the current at the pixel point P on the pressure drop, g P represents the exponential coefficient of the power relationship between the gray scale value at the pixel point P and the current load.

[0054] By traversing all values of [0, 256], the first current lookup table between the gray scale value and the current value can be obtained.

[0055] It should be noted that since the 8-bit image data is 0-255, the 8-bit is shifted to the left by four bits, that is, multiplied by 16, and the maximum number of 8 bits is 255*16=4080, and the maximum value of 12 bits is 4095. In order to prevent the occurrence of out-of-range data in the calculation process, the preset range is set to [0, 256], that is, 257 numbers are generated, and the 257th number is used to interpolate the value between 4080 and 4095.

[0056] In some embodiments, the R, G and B channels corresponding to the same pixel point can be compensated respectively, in which case, according to the correlation between the gray scale component and the current value of each channel, all values of the gray scale value in the preset range are traversed to obtain the lookup table corresponding to each channel.

[0057] The relationship between the gray scale component and the current value of each channel can be seen from the following formulas (1-1), (1-2) and (1-3).

[0058]

[0059] In the above formulas, i sR(x,y) represents the current value of the R channel at the pixel point P(x, y), i sG(x,y) represents the current value of the G channel at the pixel point P(x, y), i sB(x,y) represents the current value of the B channel at the pixel point P(x, y), cw R represents the influence of the R channel on the pressure drop, cw G represents the influence of the G channel on the pressure drop, cw B represents the influence of the B channel on the pressure drop, g R represents the exponential coefficient of the power relationship between the gray scale value of the R channel and the current load, g G represents the exponential coefficient of the power relationship between the gray scale value of the G channel and the current load, g B represents the exponential coefficient of the power relationship between the gray scale value of the B channel and the current load. Among them, the parameter values of cw R , cw G , cw B , g R , g G and g B need to be obtained by actual measurement or calculation.

[0060] According to the above formulas, all values of [0, 256] are traversed respectively, and the lookup table LUT00 of R(x, y) and i sR(x,y) , the lookup table LUT01 of G(x, y) and i sG(x,y) , and the lookup table LUT02 of B(x, y) and i sB(x,y) can be obtained.

[0061] R(x, y) i sR(xy) ]] 0 0 1 3 2 6 ... ... 256 2424

[0062] LUT00

[0063] G(x, y) i sG(xy) ]]> 0 0 1 1 2 1 ... ... 256 721

[0064] LUT01

[0065] B(x, y) i sB(xy) ]]> 0 0 1 1 2 1 ... ... 256 950

[0066] LUT02

[0067] In calculating the actual current of each pixel point, the global average current of the image to be displayed and the column current weight of each pixel point need to be calculated, that is, according to the gray scale value of each pixel point in the image to be displayed, the current of each pixel point is determined in the first current lookup table constructed in advance; the global average current is determined by dividing the total current of all pixel points by the number of pixels; the column average current is determined according to the total current of all pixel points in each column and the number of pixels in the column; the column current weight is determined according to the preset power of the column average current, and the column current weights corresponding to the pixel points in the same column are the same; the actual current of each pixel point is obtained according to the product of the global average current and the column current weight of each pixel point.

[0068] After determining the current of each pixel point in the first current lookup table constructed in advance according to the gray scale value of each pixel point, the global average current can be determined by dividing the total current of all pixel points by the number of pixels.

[0069] Still taking the compensation of the gray scale component of each channel as an example, the global average current can be calculated according to the following formula (2).

[0070]

[0071] wherein, I s represents the sum of the currents of all pixel points in the circuit, also known as global current estimation; h represents the number of rows of the image, w represents the number of columns of the image, i sm represents the global average current. i sm is a scalar, representing the pressure drop level of the current image.

[0072] In the case where the current of each pixel point is known, the column average current can be determined according to the total current of all pixel points in each column and the number of pixels in the column, and the column current weight can be determined according to the preset power of the column average current.

[0073] wherein, the column average current can be determined by formula (3).

[0074]

[0075] wherein, i sl represents the column average current, and c represents the number of channels.

[0076] In some embodiments, the value of is the column current weight i sl , that is, the preset power can be set to In this embodiment, the preset power can be set according to the gamma value of the screen, for example, when the gamma of the screen is 2.4, the preset power can be set to This embodiment is not limited in this regard.

[0077] Since the number of LUT addresses is 256, but the processed image data is 12 bits, the number needs to be truncated and interpolated when looking up the table. The following embodiments will be combined with the above-mentioned embodiments to introduce the lookup table process in detail. Figure 3 The lookup table process will be introduced in detail.

[0078] Figure 3 is a schematic diagram of a lookup table process according to an embodiment of the present application. As shown in the figure, the current of each pixel point in the image to be displayed is determined in the pre-constructed first current lookup table according to the gray scale value of each pixel point in the image to be displayed, including the following steps 301 to 305. Figure 3

[0079] In step 301, the first candidate current corresponding to the high 8 bits of the 12-bit gray scale value of the pixel point is obtained from the pre-constructed first current lookup table.

[0080] In step 302, the high 8-bit value is subjected to a +1 operation to obtain the second candidate current corresponding to the value after the +1 operation.

[0081] In step 303, if the first candidate current is greater than the second candidate current, step 304 is executed, otherwise step 305 is executed.

[0082] In step 304, the difference between the first candidate current and the second candidate current is obtained, and the product of the difference and the low 4 bits of the 12-bit gray scale value is subjected to a bit operation to obtain a first interpolation current, and the current of the pixel point is obtained according to the first candidate current and the first interpolation current.

[0083] In step 305, the difference between the second candidate current and the first candidate current is obtained, and the product of the difference and the low 4 bits of the 12-bit gray scale value is subjected to a bit operation to obtain a second interpolation current, and the current of the pixel point is obtained according to the first candidate current and the second interpolation current.

[0084] In this embodiment, the high 8 bits (i.e. 0-255) of the 12-bit number are intercepted for lookup table, and the low 4 bits are used for interpolation.

[0085] For example, assuming that the 12-bit number is 1382, the high 8 bits correspond to the number 86, and the low 4 bits correspond to the number 6. The first candidate current (denoted as V0) and the second candidate current (denoted as V1) corresponding to the 86th and 87th addresses in the first current lookup table are looked up.

[0086] If V0>V1, the value of (V0-V1)*6 / 16 (here, the operation of dividing by 16 is realized by right shifting 4 bits) is calculated and rounded to obtain a first interpolation current, denoted as V', and the current V of the pixel point is V0-V'.​

[0087] If V0 < V1, calculate the value of (V1 - V0) * 6 / 16 and round it to obtain the second interpolation current, denoted as V’, and finally the current V of this pixel is V = V0 + V’.

[0088] It should be noted that in the above table lookup method, 0 to 256 in the first current lookup table are the addresses of 12-bit data, rather than the gray scale values. All subsequent table lookup operations use the above table lookup method.

[0089] In this embodiment, the construction process of the second current lookup table is similar to that of the first current lookup table, and the correlation relationship between the maximum gray scale component and the target current can be seen in formula (4).

[0090]

[0091] where, i s ′ represents the target current at the pixel point (x, y), max c (x, y) represents the maximum gray scale component in the R, G, and B channels of the pixel point with coordinates (x, y), cw c represents the weight of the maximum gray scale component in the three channels, g c represents the exponential coefficient of the power relationship between the maximum gray scale component in the three channels and the current load.

[0092] For example, by traversing [0, 256], the mapping table LUT03 of max c (x, y) and i s ′ can be constructed.

[0093] max c (x,y)]]> i s ′ ]] 0 0 1 0 2 0 ... ... 255 1023 256 1024

[0094] LUT03

[0095] Given the second current lookup table, for each pixel point in the to-be-displayed image, its target current can be determined in the second current lookup table according to the maximum gray scale component in its R, G, and B channels.

[0096] For the sake of easy understanding, in the following embodiments, the process of calculating the compensation coefficient will be described first, then it will be introduced that in this embodiment, in order to achieve fixed-point operation, the calculation process is split and mapped into multiple compensation coefficient lookup tables, and finally the use of multiple compensation coefficient lookup tables will be introduced.

[0097] It should also be noted that the following embodiments use the calculation process of the compensation coefficients for the three channels R, G, and B as an example for illustration. The calculation process of the compensation coefficients for pixels is similar to that of any channel, and will not be repeated in this embodiment.

[0098] The calculation formulas for the compensation coefficients of the R, G, and B channels are shown in formulas (5-1), (5-2), and (5-3) below.

[0099]

[0100] In the formula, ratioR(x,y) represents the compensation coefficient of the R channel at pixel (x,y), and will be referred to as ratioR; ratioG(x,y) represents the compensation coefficient of the G channel at pixel (x,y), and will be referred to as ratioG; ratioB(x,y) represents the compensation coefficient of the B channel at pixel (x,y), and will be referred to as ratioB; i s ′ (x,y) This represents the target current at pixel (x, y), which will be referred to as i hereafter. s ′ i s(x,y) This represents the actual current at pixel (x, y), which will be referred to as i hereafter. s L(1,1) represents the lowest brightness; L(1,0) represents the highest brightness; g 0R The exponential coefficient representing the power relationship between the grayscale value of channel R and the current load when the voltage drop is at its maximum; g 1R The exponential coefficient representing the power relationship between the grayscale value of channel R and the current load when the voltage drop is minimum; g 0G The exponential coefficient representing the power relationship between the grayscale value of channel G and the current load when the voltage drop is at its maximum; g 1G The exponential coefficient representing the power relationship between the grayscale value of channel G and the current load when the voltage drop is minimum; g 0B The exponential coefficient representing the power relationship between the grayscale value of channel B and the current load when the voltage drop is at its maximum; g 1B The exponential coefficient representing the power relationship between the grayscale value of channel B and the current load when the voltage drop is minimum; g R =RminG,g G =GminG、g B =BminG, RminG, GminG, and BminG represent the exponential coefficients of the relationship between the grayscale values ​​of the respective channels R, G, and B and the power of the current load when the voltage drop is at its maximum.

[0101] grayscale p in i s The brightness is as follows:

[0102] L(p)=L model(p,i s )

[0103] when i s When i = 0, the highest brightness is achieved; when i = 0, the highest brightness is achieved. s When the value is 1, the lowest brightness is achieved.

[0104] L1 represents the brightness of a single pixel when the voltage drop is at its maximum.

[0105] make:

[0106]

[0107] Equations (6-1), (6-2), and (6-3) were obtained after measuring the brightness, and g1 and g0 were also obtained by brightness fitting.

[0108] Based on equations (6-1), (6-2), and (6-3), equations (5-1), (5-2), and (5-3) can be decomposed into:

[0109]

[0110] In equations (7-1), (7-2), and (7-3) above Equivalent to

[0111] This embodiment converts the floating-point operations involved in equations (7-1), (7-2), and (7-3) into fixed-point operations, first calculating LR. 1 / 0 LG 1 / 0 LB 1 / 0 .

[0112] By iterating through all values ​​in [0, 256] according to the formula, we can obtain R, G, B and LR. 1 / 0 LG 1 / 0 LB 1 / 0 The first compensation coefficient lookup tables are LUT04, LUT05, and LUT06.

[0113]

[0114]

[0115] LUT04

[0116] G LG 1 / 0 ]]> 0 0 1 3871 2 3370 ... ... 256 1278

[0117] LUT05

[0118] B LB 1 / 0 ]]> 0 0 1 2387 2 2197 ... ... 256 1228

[0119] LUT06

[0120] Secondly, calculation

[0121] (1-i s ′ )+i s ′ *LR 1 / 0 The floating-point number takes values ​​in the range [0,1]. This range is divided into 256 equal intervals, and the nodes of each interval are calculated. Multiply the calculated floating-point result by 2 12 This yields a fixed-point mapping table.

[0122] In this embodiment, (1-i) s ′ )+i s ′ *LR 1 / 0 The second compensation coefficient lookup table is constructed based on the following steps: For the first current with a value range of [0,1], the value range is divided into 256 nodes at equal intervals; an exponential operation is performed on each node at each interval, and the result of the exponential operation is shifted 12 bits to the left to obtain the first coefficient corresponding to each node; the second compensation coefficient lookup table is constructed based on each node and the first coefficient corresponding to each node.

[0123] That is, the value of the first current between 0 and 1 is first divided into 256 equal values, and then an exponential operation is performed. (x ranges from [0,1]), and then the result of the exponentiation operation is fixed-point converted to 12 bits to obtain the final second compensation coefficient lookup table.

[0124] This embodiment uses nonlinear transformation to make the distribution of input data in different ranges more evenly mapped to the output range, thereby enhancing the dynamic range and color performance of the color channels.

[0125]

[0126] LUT07

[0127] Similarly, the mapping table between the G channel and the B channel can be obtained as follows:

[0128]

[0129] LUT08

[0130]

[0131] LUT09

[0132] The above All are 12-bit quantized values. The left half of the multiplication in equations (7-1), (7-2) and (7-3) can be obtained from tables LUT07, LUT08 and LUT09.

[0133] Then, calculate This part of the calculation is similar to the calculation steps above, and the constructed third compensation coefficient lookup table is as follows.

[0134]

[0135] LUT10

[0136]

[0137] LUT11

[0138]

[0139] LUT12

[0140] in, All are 12-bit quantized values. According to tables LUT10, LUT11, and LUT12, the right half of the multiplication in equations (7-1), (7-2), and (7-3) can be obtained.

[0141] Figure 4 This is a flowchart illustrating the determination of compensation coefficients according to an embodiment of the present invention, such as... Figure 4 As shown, after constructing the first compensation coefficient lookup table, the second compensation coefficient lookup table, and the third compensation coefficient lookup table through the above steps, the process of determining the compensation coefficient of each pixel based on the actual current and the target current of each pixel may include the following steps 401 to 406.

[0142] In step 401, for each pixel, the brightness adjustment ratio of the grayscale value of the pixel when the contrast changes is obtained from the pre-constructed first compensation coefficient lookup table.

[0143] The calculation process according to equations (6-1), (6-2), and (6-3) essentially compares the "weighted" brightness ratio of the image at its lowest and highest brightness levels. This ratio reflects the relative change in image brightness under different Gamma values ​​(i.e., different contrast conditions). Therefore, LR... 1 / 0 LG 1 / 0 LB 1 / 0 This is called the brightness adjustment ratio when the contrast changes.

[0144] LR can be obtained from the first compensation coefficient lookup tables LUT04, LUT05, and LUT06. 1 / 0 LG 1 / 0 LB1 / 0 The value of .

[0145] In step 402, a first current for controlling the actual brightness of the pixel is calculated based on the correlation between the target current of the pixel and the adjustment ratio.

[0146] According to formulas (7-1), (7-2), and (7-3), the relationship between the target current of a pixel and the adjustment ratio is (1-i) / (7-1). s ′ )+i s ′ *LR 1 / 0 、(1-i s ′ )+i s ′ *LG 1 / 0 、(1-i s ′ )+i s ′ *LB 1 / 0 Based on the above correlation, given the target current of the pixel and the adjustment ratio, the first current used to control the actual brightness of the pixel can be calculated.

[0147] In step 403, the first coefficient corresponding to the first current is obtained from the pre-constructed second compensation coefficient lookup table.

[0148] According to the second compensation coefficient lookup tables LUT07, LUT08, and LUT09, given the first current, the first coefficient corresponding to the first current can be obtained.

[0149] In step 404, a second current for controlling the actual brightness of the pixel is calculated based on the correlation between the actual current of the pixel and the adjustment ratio.

[0150] According to formulas (7-1), (7-2), and (7-3), the relationship between the actual current of a pixel and the adjustment ratio is (1-i) / (7-1). s )+i s *LR 1 / 0 、(1-i s )+i s *LG 1 / 0 、(1-i s )+i s *LB 1 / 0 Based on the above correlation, given the actual current of the pixel and the adjustment ratio, a second current used to control the actual brightness of the pixel can be calculated.

[0151] In step 405, the second coefficient corresponding to the second current is obtained from the pre-constructed third compensation coefficient lookup table.

[0152] According to the third compensation coefficient lookup tables LUT10, LUT11, and LUT12, given the second current, the second coefficient corresponding to the second current can be obtained.

[0153] In step 406, the compensation coefficient of the pixel is calculated based on the product of the first coefficient and the second coefficient.

[0154] The product of the first and second coefficients is 24 bits. The resulting number is then shifted 12 bits to the right and rounded to obtain a 12-bit output.

[0155] As can be seen from steps 401 to 406, given the actual current and target current of each pixel, the compensation coefficient of each pixel can be obtained through multiple searches in a pre-built set of compensation coefficient lookup tables.

[0156] In this embodiment, in order to improve the accuracy of the compensation coefficient, after determining the compensation coefficient of each pixel, the compensation coefficient can also be modified using the actual current of the pixel. Specifically, this includes: obtaining the correction coefficient corresponding to the actual current of each pixel in a pre-constructed correction coefficient lookup table; and using the correction coefficient to correct the compensation coefficient of each pixel to obtain the corrected compensation coefficient.

[0157] Given the global average current and the column current weight corresponding to each pixel, the two numbers can be multiplied and shifted 12 bits to the right to obtain the actual current of the pixel. The calculated compensation coefficient is then corrected for error based on a lookup table of the pre-built actual current and the correction coefficient scale1.

[0158] For example, the correction coefficient lookup table is shown in the table below:

[0159] i s ]] scale1 0 2048 1 1905 2 1833 ... ... 256 2048

[0160] In some embodiments, correcting the compensation coefficient of each pixel using the correction coefficient to obtain a corrected compensation coefficient may include: if the compensation coefficient of the pixel is greater than or equal to a preset value, obtaining the difference between the compensation coefficient and the preset value, obtaining the product of the difference and the correction coefficient, calculating the quotient of the product and the preset value, and using the sum of the quotient and the preset value as the corrected compensation coefficient. If the compensation coefficient of the pixel is less than the preset value, obtaining the difference between the preset value and the compensation coefficient, obtaining the product of the difference and the correction coefficient, and using the difference between the preset value and the product as the corrected compensation coefficient.

[0161] Specifically, after obtaining scale1 from the compensation coefficient lookup table, the compensation coefficients of the pixels are corrected.

[0162] For example, assuming a preset value of 2048, taking the compensation coefficient Ratio_R of the R channel as an example, if Ratio_R>=2048, then the following calculation is performed:

[0163] ①delta_R=Ratio_R-2048

[0164] ②scale_delta_R=delta_R*scale1 / 2048

[0165] ③Ratio_R=2048+scale_delta_R

[0166] If Ratio_R < 2048, then:

[0167] ①delta_R=2048-Ratio_R

[0168] ②scale_delta_R=delta_R*scale1

[0169] ③Ratio_R=2048-scale_delta_R

[0170] After correcting the compensation coefficient using the above embodiments, the target grayscale value of each pixel is determined based on the corrected compensation coefficient and grayscale value of each pixel.

[0171] Taking the compensation for each channel as an example, the target grayscale components corresponding to each channel are calculated according to the following formulas (8-1), (8-2) and (8-3).

[0172] resR = R*ratio_R (8-1)

[0173] resG = G*ratio_G (8-2)

[0174] resB = B*ratio_B (8-3)

[0175] In the formula, resR represents the target grayscale component of the R channel, resG represents the target grayscale component of the G channel, resB represents the target grayscale component of the B channel, ratio_R represents the compensation coefficient after correction for the R channel, ratio_G represents the compensation coefficient after correction for the G channel, and ratio_B represents the compensation coefficient after correction for the B channel.

[0176] After shifting the above results 11 bits to the right, we get a 13-bit product. We then truncate the lower 12 bits as the target grayscale component.

[0177] Based on the same inventive concept, this embodiment also provides a grayscale compensation device. Figure 5 This is a schematic diagram of a grayscale compensation device according to an embodiment of the present invention, as shown below. Figure 5 The apparatus shown includes:

[0178] The actual current determination unit 501 is used to determine the actual current of each pixel based on the global average current of the image to be displayed on the display panel and the column current weight of each pixel; wherein, the global average current is determined based on the sum of the currents of all pixels, and the current of each pixel is determined by the grayscale value of the pixel in a pre-constructed first current lookup table; the column current weight is determined based on the average current of each pixel in the same column.

[0179] The target current determination unit 502 is used to determine the target current of each pixel in the image to be displayed based on the maximum grayscale component in its R, G and B channels in a pre-built second current lookup table.

[0180] The compensation coefficient determination unit 503 is used to determine the compensation coefficient of each pixel based on the actual current and target current of each pixel in a pre-built set of compensation coefficient lookup tables.

[0181] The compensation unit 504 is used to determine the target grayscale value of each pixel based on the compensation coefficient and grayscale value of each pixel.

[0182] In some embodiments, the actual current determination unit is specifically configured to: determine the current of each pixel in a pre-constructed first current lookup table based on the grayscale value of each pixel in the image to be displayed; determine the global average current by dividing the sum of the currents of all pixels by the number of pixels; determine the column average current by dividing the sum of the currents of all pixels in each column by the number of pixels in that column; determine the column current weight by a preset power of the column average current, wherein the column current weights of pixels in the same column are the same; and obtain the actual current of each pixel by multiplying the global average current by the column current weight of each pixel.

[0183] In some embodiments, the actual current determination unit is specifically used to obtain, for each pixel in the image to be displayed, the first candidate current corresponding to the high 8 bits of the 12-bit grayscale value of the pixel from a pre-constructed first current lookup table, and to perform a 1-increment operation on the high 8 bits to obtain the second candidate current corresponding to the value after the 1-increment operation.

[0184] If the first candidate current is greater than the second candidate current, the difference between the first candidate current and the second candidate current is obtained, and bitwise operations are performed on the product of the difference and the lower 4 bits of the 12-bit grayscale value to obtain the first interpolation current. The current of the pixel is obtained based on the first candidate current and the first interpolation current.

[0185] If the first candidate current is less than the second candidate current, the difference between the second candidate current and the first candidate current is obtained. Bitwise operations are performed on the product of the difference and the lower 4 bits of the 12-bit grayscale value to obtain the second interpolated current. The current of the pixel is obtained based on the first candidate current and the second interpolated current.

[0186] In some embodiments, the first current lookup table is constructed based on the following steps: according to the correlation between grayscale values ​​and current values, all values ​​of grayscale values ​​within a preset range are traversed to obtain the first current lookup table; wherein, the preset range is [0, 256].

[0187] In some embodiments, the compensation coefficient determining unit is specifically configured to, for each pixel, obtain the brightness adjustment ratio of the grayscale value of the pixel when the contrast changes from a pre-constructed first compensation coefficient lookup table; calculate a first current for controlling the actual brightness of the pixel based on the correlation between the target current of the pixel and the adjustment ratio; obtain a first coefficient corresponding to the first current from a pre-constructed second compensation coefficient lookup table; calculate a second current for controlling the actual brightness of the pixel based on the correlation between the actual current of the pixel and the adjustment ratio; obtain a second coefficient corresponding to the second current from a pre-constructed third compensation coefficient lookup table; and calculate the compensation coefficient of the pixel based on the product of the first coefficient and the second coefficient.

[0188] In some embodiments, the second compensation coefficient lookup table is constructed based on the following steps: for a first current with a value range of [0,1], the value range is divided into 256 nodes at equal intervals; an exponential operation is performed on each node at each interval, and the result of the exponential operation is shifted 12 bits to the left to obtain the first coefficient corresponding to each node; and a second compensation coefficient lookup table is constructed based on each node and the first coefficient corresponding to each node.

[0189] In some embodiments, the compensation coefficient determining unit is further configured to, after determining the compensation coefficient of each pixel, obtain the correction coefficient corresponding to the actual current of each pixel from a pre-constructed correction coefficient lookup table; and use the correction coefficient to correct the compensation coefficient of each pixel to obtain the corrected compensation coefficient.

[0190] In some embodiments, the compensation coefficient determining unit is specifically configured to: if the compensation coefficient of the pixel is greater than or equal to a preset value, obtain the difference between the compensation coefficient and the preset value, obtain the product of the difference and the correction coefficient, calculate the quotient of the product and the preset value, and use the sum of the quotient and the preset value as the corrected compensation coefficient; if the compensation coefficient of the pixel is less than the preset value, obtain the difference between the preset value and the compensation coefficient, obtain the product of the difference and the correction coefficient, and use the difference between the preset value and the product as the corrected compensation coefficient.

[0191] This embodiment may also include a display panel, which can be any product or component with display function, such as electronic paper, mobile phone, tablet computer, television, laptop computer, digital photo frame, or navigator.

[0192] It should be understood that the present invention is not limited to the precise structure described above and shown in the accompanying drawings, and various modifications and changes can be made without departing from its scope. The scope of the invention is limited only by the appended claims.

Claims

1. A gray scale compensation method, characterized by, The method comprises: According to the global average current of the image to be displayed on the display panel and the column current weight of each pixel point, the actual current of each pixel point is determined; wherein the global average current is determined according to the current sum of all pixel points, and the current of each pixel point is determined by the gray value of the pixel point in the first current lookup table constructed in advance; the column current weight is determined according to the average value of the currents of the pixels in the same column; For each pixel point in the image to be displayed, the target current of the pixel point is determined in the second current lookup table constructed in advance according to the maximum gray component in the R, G and B three channels thereof; According to the actual current and the target current of each pixel point, the compensation coefficient of each pixel point is determined in a group of compensation coefficient lookup tables constructed in advance; According to the compensation coefficient and the gray value of each pixel point, the target gray value of each pixel point is determined.

2. The method of claim 1, wherein, Before determining the actual current of each pixel point, the method further comprises: If the image to be displayed is 8-bit, the image to be displayed is converted to 12-bit.

3. The method of claim 1, wherein, The method of determining the actual current of each pixel point according to the global average current of the image to be displayed on the display panel and the column current weight of each pixel point comprises: According to the gray value of each pixel point in the image to be displayed, the current of each pixel point is determined in the first current lookup table constructed in advance; The global average current is determined by dividing the current sum of all pixel points by the number of pixels; The column average current is determined according to the current sum of all pixel points in each column and the number of pixels in the column; The column current weight is determined according to the preset power of the column average current, and the column current weights corresponding to the pixels in the same column are the same; The actual current of each pixel point is obtained by multiplying the global average current by the column current weight of each pixel point.

4. The method of claim 3, wherein, The method of determining the current of each pixel point in the first current lookup table constructed in advance according to the gray value of each pixel point in the image to be displayed comprises: For each pixel point in the image to be displayed, the first candidate current corresponding to the high 8 bits of the 12-bit gray value of the pixel point is obtained from the first current lookup table constructed in advance, and the second candidate current corresponding to the gray value of the high 8 bits after the add 1 operation is obtained; If the first candidate current is greater than the second candidate current, the difference between the first candidate current and the second candidate current is obtained, the product of the difference and the low 4 bits of the 12-bit gray value is operated, the first interpolation current is obtained, and the current of the pixel point is obtained according to the first candidate current and the first interpolation current; If the first candidate current is less than the second candidate current, the difference between the second candidate current and the first candidate current is obtained, the product of the difference and the low 4 bits of the 12-bit gray value is operated, the second interpolation current is obtained, and the current of the pixel point is obtained according to the first candidate current and the second interpolation current.

5. The method of claim 1, wherein, The first current lookup table is constructed based on the following steps: According to the correlation between the gray value and the current value, all values of the gray value in a preset range are traversed to obtain a first current lookup table; wherein the preset range is [0, 256].

6. The method of claim 1, wherein, The compensation coefficient of each pixel point is determined in a pre-constructed set of compensation coefficient lookup tables according to the actual current and the target current of each pixel point, including: For each pixel point, the adjustment ratio of the luminance of the gray value of the pixel point when the contrast changes is obtained in a pre-constructed first compensation coefficient lookup table; According to the correlation between the target current of the pixel point and the adjustment ratio, a first current for controlling the actual luminance of the pixel point is calculated; In a pre-constructed second compensation coefficient lookup table, a first coefficient corresponding to the first current is obtained; According to the correlation between the actual current of the pixel point and the adjustment ratio, a second current for controlling the actual luminance of the pixel point is calculated; In a pre-constructed third compensation coefficient lookup table, a second coefficient corresponding to the second current is obtained; The compensation coefficient of the pixel point is calculated according to the product of the first coefficient and the second coefficient.

7. The method of claim 6, wherein, The second compensation coefficient lookup table is constructed based on the following steps: For the first current with a value range of [0, 1], the value range is equally divided into 256 nodes; Exponential operation is performed on each interval node, and the exponential operation result is shifted left by 12 bits to obtain the first coefficient corresponding to each node; According to each node and the first coefficient corresponding to each node, a second compensation coefficient lookup table is constructed.

8. The method of claim 1, wherein, After determining the compensation coefficient of each pixel point, the method further includes: In a pre-constructed correction coefficient lookup table, a correction coefficient corresponding to the actual current of each pixel point is obtained; The compensation coefficient of each pixel point is corrected using the correction coefficient to obtain a corrected compensation coefficient.

9. The method of claim 8, wherein, The compensation coefficient of each pixel point is corrected using the correction coefficient to obtain a corrected compensation coefficient, including: If the compensation coefficient of the pixel point is greater than or equal to a preset value, the difference between the compensation coefficient and the preset value is obtained, the product of the difference and the correction coefficient is obtained, the quotient of the product and the preset value is calculated, and the sum of the quotient and the preset value is taken as the corrected compensation coefficient; If the compensation coefficient of the pixel point is less than the preset value, the difference between the preset value and the compensation coefficient is obtained, the product of the difference and the correction coefficient is obtained, and the difference between the preset value and the product is taken as the corrected compensation coefficient.

10. A gray scale compensation device, characterized by, The device includes: An actual current determination unit is configured to determine an actual current of each pixel point according to a global average current of a to-be-displayed image on a display panel and a column current weight of each pixel point; wherein the global average current is determined according to a total sum of currents of all pixel points, and the current of each pixel point is determined by a gray value of the pixel point in a pre-constructed first current lookup table; and the column current weight is determined according to an average value of currents of pixels in the same column. A target current determination unit is configured to determine, for each pixel in the image to be displayed, a target current of the pixel in a second current lookup table according to a maximum gray scale component in R, G and B channels of the pixel. A compensation coefficient determination unit is configured to determine, for each pixel, a compensation coefficient of the pixel in a set of compensation coefficient lookup tables according to an actual current and the target current of the pixel. A compensation unit is configured to determine, for each pixel, a target gray scale value of the pixel according to the compensation coefficient and a gray scale value of the pixel.

11. A computer readable storage medium having stored thereon a computer program, characterized in that The program is executed by a processor to implement the method of any one of claims 1-9.

12. An electronic device, comprising: Comprise: A processor; A memory for storing processor-executable instructions; Wherein the processor is configured to implement the method of any one of claims 1-9.

13. A computer program product comprising a computer program and instructions, characterized in that, The computer program / instructions are executed by a processor to implement the method of any one of claims 1-9.

Citation Information

Patent Citations

  • Display panel pixel current compensation method and system

    CN105304024A

  • Image display total current prediction method, display device and storage medium

    CN109872668A