Compensation method and device of image data, terminal and storage medium

By determining the color mixing and primary color compensation coefficients in AMOLED display technology, image data is compensated, solving the display effect problem caused by IR Drop and achieving high-quality image display and color calibration.

CN116362980BActive Publication Date: 2026-06-05BEIJING XIAOMI MOBILE SOFTWARE CO LTD

Patent Information

Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
BEIJING XIAOMI MOBILE SOFTWARE CO LTD
Filing Date
2021-12-27
Publication Date
2026-06-05

AI Technical Summary

Technical Problem

The AMOLED display technology suffers from IR drop, which affects image display quality, especially due to voltage drop caused by voltage division and current fluctuations in the metal interconnects of the power network.

Method used

By determining the color mixing compensation coefficient and the primary color compensation coefficient, the image data is compensated, and the display effect is improved using a pure software method, reducing the brightness difference caused by changes in display position and area.

Benefits of technology

It achieves IR drop compensation in AMOLED display technology through pure software, which improves the display effect and visual experience of the image and ensures the accuracy of color calibration.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN116362980B_ABST
    Figure CN116362980B_ABST
Patent Text Reader

Abstract

The disclosure provides a compensation method and device of image data, a terminal and a storage medium. The method comprises: determining a color mixing compensation coefficient and a base color compensation coefficient corresponding to a preset gray scale according to first image data of a first type of image and / or second image data of a second type of image; wherein the pixel display ratio of the first type of image is greater than the pixel display ratio of the second type of image; the first image data and the second image data both comprise image data corresponding to a plurality of first gray scales, and the plurality of first gray scales comprise the preset gray scale; determining an initial compensation coefficient according to a second gray scale in input data of a to-be-displayed image and the color mixing compensation coefficient; correcting the initial compensation coefficient according to the pixel display ratio of the input data to obtain a target compensation coefficient; and compensating the input data according to the target compensation coefficient and the base color compensation coefficient to obtain output data. The technical scheme of the embodiment of the disclosure can improve the visual experience of the display panel.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] This disclosure relates to the field of data processing technology, and in particular to a method, apparatus, terminal and storage medium for compensating image data. Background Technology

[0002] AMOLED (Active-matrix organic light-emitting diode) display technology is prone to IR drop.

[0003] The static IR drop phenomenon is mainly caused by the voltage drop across the metal interconnects of the power network, due to the inherent resistance of these interconnects. Current flowing through the internal power interconnects generates a voltage drop. Therefore, static IR drop is primarily related to the structure and interconnection details of the power network. Thus, static IR drop mainly considers the resistive effect; analyzing the influence of resistance is sufficient. Dynamic IR drop, on the other hand, is the voltage drop caused by current fluctuations during circuit switching. This phenomenon occurs at the clock trigger edge. The clock edge transition not only triggers a large number of transistor switching but also causes transitions in combinational logic circuits, often generating a large current across the entire chip in a short period. This instantaneous large current causes the IR drop phenomenon. Furthermore, the more transistors switching, the easier it is to trigger dynamic IR drop. Figure 1 and Figure 2 As shown, where, Figure 1 This is a schematic diagram of the structure of an OLED display panel. Figure 2 for Figure 1 The pixel driving circuit (OLED pixel circuit) is located within the dashed box. Figure 1 and Figure 2 As can be seen, because the ELVDD (drive voltage) trace is a metal trace, it is subject to IRDrop. In practical applications, IR Drop often affects the display effect of the image. Summary of the Invention

[0004] This disclosure provides a method, apparatus, terminal, and storage medium for compensating image data.

[0005] According to a first aspect of this disclosure, an image data compensation method is provided, the method comprising:

[0006] Based on the first image data of the first type of image and / or the second image data of the second type of image, determine the color mixing compensation coefficient and the primary color compensation coefficient corresponding to the preset gray level; wherein, the pixel display ratio of the first type of image is greater than the pixel display ratio of the second type of image; both the first image data and the second image data include image data corresponding to multiple first gray levels, and the multiple first gray levels include the preset gray level;

[0007] The initial compensation coefficient is determined based on the second gray level in the input data of the image to be displayed and the color mixing compensation coefficient.

[0008] Based on the pixel display ratio of the input data, the initial compensation coefficient is corrected to obtain the target compensation coefficient;

[0009] The input data is compensated based on the target compensation coefficient and the primary color compensation coefficient to obtain the output data.

[0010] In some embodiments, the first image data includes a plurality of first color mixing brightness corresponding to the first grayscale, the color coordinates of the preset grayscale corresponding to the color mixing, and the primary color brightness corresponding to the preset grayscale primary color;

[0011] The step of determining the color mixing compensation coefficient and the primary color compensation coefficient based on the image data of the first type of image and / or the image data of the second type of image includes:

[0012] Based on the brightness of the color mixing corresponding to the preset gray level in the first color mixing brightness, and the color coordinates, determine the proportion of the primary color in the color mixing corresponding to the preset gray level;

[0013] The primary color compensation coefficient is determined based on the ratio, the brightness of the mixed color corresponding to the preset grayscale, and the brightness of the primary color.

[0014] In some embodiments, determining the primary color compensation coefficient based on the ratio, the brightness of the mixed color corresponding to the preset grayscale, and the brightness of the primary color includes:

[0015] The target brightness is obtained by multiplying the ratio by the brightness of the mixed color corresponding to the preset gray level;

[0016] The primary color compensation coefficient is obtained by dividing the target brightness by the primary color brightness.

[0017] In some embodiments, the first image data includes a plurality of first color mixing brightness corresponding to the first grayscale; the second image data includes a plurality of second color mixing brightness corresponding to the first grayscale.

[0018] The step of determining the color mixing compensation coefficient and the primary color compensation coefficient based on the image data of the first type of image and the image data of the second type of image includes:

[0019] The target grayscale is determined based on the first color mixing brightness and the second color mixing brightness;

[0020] The color mixing compensation coefficient is obtained based on the target gray level and the gray level corresponding to the first color mixing brightness.

[0021] In some embodiments, determining the target grayscale based on the first color mixing brightness and the second color mixing brightness includes:

[0022] The target gray level is determined based on the fact that the first color mixing brightness is equal to the product of the second color mixing brightness and the gray level ratio; wherein, the gray level ratio is the nth power of the ratio of the target gray level to the gray level corresponding to the first color mixing brightness; wherein, n is a first preset value greater than 0; and / or,

[0023] The step of obtaining the color mixing compensation coefficient based on the target grayscale and the grayscale corresponding to the first color mixing brightness includes:

[0024] The color mixing compensation coefficient is obtained by dividing the target gray level by the gray level corresponding to the first color mixing brightness.

[0025] In some embodiments, determining the initial compensation coefficient based on the first gray level in the input data of the image to be displayed and the color mixing compensation coefficient includes:

[0026] Based on the multiple first gray levels and the second gray level, determine the gray level range of the second gray level among the multiple first gray levels;

[0027] Determine the color mixing compensation coefficient corresponding to the upper limit value of the grayscale range to obtain the upper limit coefficient; and determine the color mixing compensation coefficient corresponding to the lower limit value of the grayscale range to obtain the lower limit coefficient;

[0028] The initial compensation coefficient is determined based on the upper limit coefficient, the lower limit coefficient, and the second gray level.

[0029] In some embodiments, determining the initial compensation coefficient based on the upper limit coefficient, the lower limit coefficient, and the second grayscale includes:

[0030] The initial compensation coefficient is determined based on the sum of the lower limit coefficient and the coefficient product; wherein the coefficient product is the product of the first coefficient and the second coefficient, the first coefficient is the quotient obtained by dividing the difference between the upper limit coefficient and the lower limit coefficient by the difference between the upper limit value and the lower limit value, and the second coefficient is the difference between the second gray level and the lower limit value.

[0031] In some embodiments, the initial compensation coefficient is corrected according to the pixel display ratio of the input data to obtain the target compensation coefficient, including:

[0032] The target compensation coefficient is determined based on the sum of the initial compensation coefficient and the correction value; wherein the correction value is the product of the first correction value and the second correction value, the first correction value is the quotient obtained by dividing the difference between the second preset value and the initial compensation coefficient by the difference between the second preset value and the third preset value, and the second correction coefficient is the difference between the display ratio and the third preset value.

[0033] In some embodiments, the input data includes primary color input data corresponding to the primary color, and the output data includes primary color output data corresponding to the primary color;

[0034] The step of compensating the input data according to the target compensation coefficient and the primary color compensation coefficient to obtain output data includes:

[0035] The primary color output data is determined by multiplying the primary color input data with the primary color compensation coefficient and the target coefficient.

[0036] According to a third aspect of this disclosure, an image data compensation apparatus is provided, the apparatus comprising:

[0037] The first determining module is used to determine the color mixing compensation coefficient and the primary color compensation coefficient of the primary color corresponding to the preset gray level based on the first image data of the first type of image and / or the second image data of the second type of image; wherein, the pixel display ratio of the first type of image is greater than the pixel display ratio of the second type of image; both the first image data and the second image data include image data corresponding to multiple first gray levels, and the multiple first gray levels include the preset gray level;

[0038] The second determining module is used to determine the initial compensation coefficient based on the second gray level in the input data of the image to be displayed and the color mixing compensation coefficient.

[0039] The correction module is used to correct the initial compensation coefficient according to the pixel display ratio of the input data to obtain the target compensation coefficient;

[0040] The compensation module is used to compensate the input data according to the target compensation coefficient and the primary color compensation coefficient to obtain output data.

[0041] In some embodiments, the first image data includes a plurality of first color mixing brightness corresponding to the first grayscale, the color coordinates of the preset grayscale corresponding to the color mixing, and the primary color brightness corresponding to the preset grayscale primary color;

[0042] The first determining module is used for:

[0043] Based on the brightness of the color mixing corresponding to the preset gray level in the first color mixing brightness, and the color coordinates, determine the proportion of the primary color in the color mixing corresponding to the preset gray level;

[0044] The primary color compensation coefficient is determined based on the ratio, the brightness of the mixed color corresponding to the preset grayscale, and the brightness of the primary color.

[0045] In some embodiments, the first determining module is configured to:

[0046] The target brightness is obtained by multiplying the ratio by the brightness of the mixed color corresponding to the preset gray level;

[0047] The primary color compensation coefficient is obtained by dividing the target brightness by the primary color brightness.

[0048] In some embodiments, the first image data includes a plurality of first color mixing brightness corresponding to the first grayscale; the second image data includes a plurality of second color mixing brightness corresponding to the first grayscale.

[0049] The first determining module is used for:

[0050] The target grayscale is determined based on the first color mixing brightness and the second color mixing brightness;

[0051] The color mixing compensation coefficient is obtained based on the target gray level and the gray level corresponding to the first color mixing brightness.

[0052] In some embodiments, the first determining module is configured to:

[0053] The target gray level is determined based on the fact that the first color mixing brightness is equal to the product of the second color mixing brightness and the gray level ratio; wherein, the gray level ratio is the nth power of the ratio of the target gray level to the gray level corresponding to the first color mixing brightness; wherein, n is a first preset value greater than 0; and / or,

[0054] The step of obtaining the color mixing compensation coefficient based on the target grayscale and the grayscale corresponding to the first color mixing brightness includes:

[0055] The color mixing compensation coefficient is obtained by dividing the target gray level by the gray level corresponding to the first color mixing brightness.

[0056] In some embodiments, the second determining module is configured to:

[0057] Based on the multiple first gray levels and the second gray level, determine the gray level range of the second gray level among the multiple first gray levels;

[0058] Determine the color mixing compensation coefficient corresponding to the upper limit value of the grayscale range to obtain the upper limit coefficient; and determine the color mixing compensation coefficient corresponding to the lower limit value of the grayscale range to obtain the lower limit coefficient;

[0059] The initial compensation coefficient is determined based on the upper limit coefficient, the lower limit coefficient, and the second gray level.

[0060] In some embodiments, the second determining module is configured to:

[0061] The initial compensation coefficient is determined based on the sum of the lower limit coefficient and the coefficient product; wherein the coefficient product is the product of the first coefficient and the second coefficient, the first coefficient is the quotient obtained by dividing the difference between the upper limit coefficient and the lower limit coefficient by the difference between the upper limit value and the lower limit value, and the second coefficient is the difference between the second gray level and the lower limit value.

[0062] In some embodiments, the correction module is configured to:

[0063] The target compensation coefficient is determined based on the sum of the initial compensation coefficient and the correction value; wherein the correction value is the product of the first correction value and the second correction value, the first correction value is the quotient obtained by dividing the difference between the second preset value and the initial compensation coefficient by the difference between the second preset value and the third preset value, and the second correction coefficient is the difference between the display ratio and the third preset value.

[0064] In some embodiments, the compensation module is configured to:

[0065] The step of compensating the input data according to the target compensation coefficient and the primary color compensation coefficient to obtain output data includes:

[0066] The primary color output data is determined by multiplying the primary color input data with the primary color compensation coefficient and the target coefficient.

[0067] According to a third aspect embodiment of this disclosure, a terminal is provided, comprising:

[0068] processor;

[0069] Memory used to store processor-executable instructions;

[0070] The processor is configured to execute the steps of the method described in the first aspect embodiment.

[0071] According to a fourth aspect of this disclosure, a computer-readable storage medium is provided having a computer program stored thereon, wherein when the instructions in the storage medium are executed by a processor of an electronic device, the electronic device is enabled to perform the steps of the method described in the first aspect of the disclosure.

[0072] The technical solutions provided by the embodiments of this disclosure may include the following beneficial effects:

[0073] As can be seen from the above embodiments, this disclosure obtains color mixing compensation coefficients and primary color compensation coefficients through first image data and second image data. Then, it uses the color mixing compensation coefficients to determine the initial compensation coefficients of the image to be displayed. Next, it corrects the initial compensation coefficients according to the pixel display ratio of the input data of the image to be displayed, obtaining the target compensation coefficients. The output data is then compensated using the target compensation coefficients and primary color compensation coefficients, improving the image display effect and achieving IR Drop compensation through pure software. This pure software compensation method can reduce the impact of changes in display position and display area on the display effect, ensuring that the image does not experience brightness differences due to loading differences at different display positions and display areas, thus improving the visual experience.

[0074] Furthermore, when compensating the input data in this embodiment, both the color mixing compensation coefficient and the primary color compensation coefficient are taken into account. This can also effectively ensure that the sum of the brightness of the primary colors is close to the color mixing brightness of the same gray level, thus providing a guarantee for the color calibration of the terminal.

[0075] It should be understood that the above general description and the following detailed description are exemplary and explanatory only, and are not intended to limit this disclosure. Attached Figure Description

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

[0077] Figure 1 This is a schematic diagram of the structure of a display panel;

[0078] Figure 2 yes Figure 1 A schematic diagram of the pixel driving circuit structure at the dashed box in the middle;

[0079] Figure 3 This is one of the flowcharts illustrating an image data compensation method according to an exemplary embodiment;

[0080] Figure 4 This is one of the schematic diagrams illustrating the image display effect of a terminal display panel according to an exemplary embodiment;

[0081] Figure 5 This is a second schematic diagram illustrating the image display effect of a terminal display panel according to an exemplary embodiment;

[0082] Figure 6 This is the third schematic diagram illustrating the image display effect of a terminal display panel according to an exemplary embodiment;

[0083] Figure 7 This is a second flowchart illustrating an image data compensation method according to an exemplary embodiment;

[0084] Figure 8 This is a schematic diagram of the structure of an image data compensation device according to an exemplary embodiment;

[0085] Figure 9 This is a block diagram illustrating the structural composition of a terminal according to an exemplary embodiment. Detailed Implementation

[0086] Exemplary embodiments will now be described in detail, examples of which are illustrated in the accompanying drawings. When the following description relates to the drawings, unless otherwise indicated, the same numerals in different drawings denote the same or similar elements. The embodiments described in the following exemplary embodiments do not represent all embodiments consistent with this disclosure. Rather, they are merely examples of apparatuses consistent with some aspects of this disclosure as detailed in the appended claims.

[0087] The first aspect of this disclosure provides a method for compensating image data, such as... Figure 3 As shown, the method includes:

[0088] Step S110: Determine the color mixing compensation coefficient and the primary color compensation coefficient of the primary color corresponding to the preset gray level based on the first image data of the first type of image and / or the second image data of the second type of image; wherein, the pixel display ratio of the first type of image is greater than the pixel display ratio of the second type of image; both the first image data and the second image data include image data corresponding to multiple first gray levels, and the multiple first gray levels include the preset gray level;

[0089] Step S120: Determine the initial compensation coefficient based on the second gray level in the input data of the image to be displayed and the color mixing compensation coefficient;

[0090] Step S130: Based on the pixel display ratio of the input data, correct the initial compensation coefficient to obtain the target compensation coefficient;

[0091] Step S140: Compensate the input data according to the target compensation coefficient and the primary color compensation coefficient to obtain the output data.

[0092] In this embodiment of the disclosure, grayscale refers to dividing the brightness variation of the display panel from its brightest to its darkest point into several parts. The more grayscale levels there are, the more delicate the image effect that the display panel can present.

[0093] Open Pixel Ratio (OPR) refers to the percentage of active pixels (pixels) on a terminal's display panel when displaying a specific image, out of the total number of pixels on the screen. Active pixels are those that are lit up, while inactive pixels are those that are not lit. OPR represents the percentage of the display area of ​​the image relative to the total area of ​​the display panel.

[0094] Terminals include, but are not limited to, mobile phones, laptops, tablets, televisions, wearable devices, or home appliances, medical terminals, or vehicle terminals with display panels.

[0095] In step S110, without limitation, the pixel display ratio of the first type of image is greater than 60%, 70%, 80%, 85%, or 90% of the pixel display ratio of the second type of image. A sufficiently large difference in the pixel display ratios of the two types of images helps to further ensure the accuracy of the compensation results and improve the display effect.

[0096] In some embodiments, the pixel display ratio of the first type of image is 100%. In this case, the pixel display ratio of the second type of image can be any value of 13%, 15%, 20%, or 30%, or any value between any two of these.

[0097] Primary colors include three monochrome colors: red (R), green (G), and blue (B). Color mixing generally refers to the color formed by the combined use of the three primary colors (RGB) in a white grayscale image. It typically includes three mixed colors: gray, white, or black. Generally, the higher the gray level, the whiter the color. For example, for a display panel with 255 gray levels, the mixed color corresponding to gray level 0 is black, and the mixed color corresponding to gray level 255 is white.

[0098] Generally, the more first gray levels there are, the more accurate the compensation effect will be, but the larger the amount of data to be processed and the larger the storage space required to store the data. Taking into account both display effect and storage capacity, "multiple" in multiple first gray levels can be 4, 5, 6, 8 or 10, etc. But it is not limited to this.

[0099] Multiple first gray levels cover a grayscale range as large as possible to improve compensation accuracy. For example, if the display panel has 255 grayscale levels, the multiple first grayscale levels can include 23, 54, 125, 190, and 255, etc.

[0100] In some embodiments, the preset grayscale refers to the maximum grayscale of the terminal display panel. For example, if the display panel has 255 grayscale levels, then the preset grayscale is 255.

[0101] In some embodiments, the first image data includes a plurality of first color mixing brightness corresponding to the first grayscale, the color coordinates of the preset grayscale corresponding to the color mixing, and the base color brightness of the preset grayscale corresponding to the base color; and / or, the second image data includes a plurality of second color mixing brightness corresponding to the first grayscale.

[0102] In some embodiments, determining the color mixing compensation coefficient and the primary color compensation coefficient corresponding to the preset grayscale based on the first image data of the first type of image and / or the second image data of the second type of image includes:

[0103] The primary color compensation coefficient is determined based on the first mixed color brightness, the color coordinates, and the primary color brightness.

[0104] In some embodiments, determining the color mixing compensation coefficient and the primary color compensation coefficient corresponding to the preset grayscale based on the first image data of the first type of image and / or the second image data of the second type of image includes:

[0105] The color mixing compensation coefficient is determined based on the first color mixing brightness and the second color mixing brightness.

[0106] In steps S110 and S120, the number of color mixing compensation coefficients is the same as the number of first gray levels.

[0107] The primary color compensation coefficients include three: R primary color compensation coefficient, G primary color compensation coefficient, and B primary color compensation coefficient.

[0108] Both input and output data include, but are not limited to, the second grayscale of the image to be displayed, the pixel display ratio, and the primary color input data; among which, the primary color input data includes, but is not limited to, the brightness of the three primary colors.

[0109] In steps S110 and S130, in practical applications, the display problems caused by IR Drop are related not only to grayscale but also to the display area, i.e., to the pixel display ratio of the image. This embodiment of the present disclosure considers both grayscale and pixel display ratio when compensating for input data, further improving compensation accuracy and display effect.

[0110] Compared to hardware-based compensation for IR drop, which involves adding compensation lines to the existing pixel circuitry and connecting these lines to the outside of the screen for external voltage compensation, this disclosure uses a purely software-based method for compensation. This avoids impacting the terminal bezel size due to the added compensation lines and reduces the impact of changes in display position and area on image quality. It ensures that the image does not exhibit brightness differences due to loading variations at different display positions and areas, thus improving the visual experience.

[0111] In step S140, the target compensation coefficient includes information about the color mixing compensation coefficient. Based on the target compensation coefficient and the primary color compensation coefficient, the input data is compensated to obtain the output data. This compensation method takes into account both the color mixing compensation coefficient and the primary color compensation coefficient, and can also effectively ensure that the sum of the brightness of the primary colors is close to the color mixing brightness of the same grayscale, providing a guarantee for the color calibration of the terminal.

[0112] Non-limiting, the application scenarios of the compensation method in this disclosure embodiment include: when the terminal 10 has partially lit images in the application scenario (such as... Figure 4 As shown), when the user performs operations such as zooming in, zooming out, and moving the illuminated image, such as... Figure 5 As shown, this ensures that the image will not have brightness differences due to loading differences at different positions and in different areas, thus providing users with a better visual experience.

[0113] The application scenarios of the compensation method in this disclosure also include: after the terminal performs color calibration through RGB primary color correction, when the calibrated parameters are applied to color mixing (represented by W), the calibration will not fail due to a large difference between the sum of the RGB brightness and the brightness after color mixing. For example... Figure 6 As shown, the sum of the brightness of the three primary colors of RGB after correction is close to the brightness of the mixed white.

[0114] According to some other optional embodiments, the first image data includes a plurality of first color mixing brightness corresponding to the first gray level, the color coordinates of the preset gray level corresponding to the color mixing, and the primary color brightness of the preset gray level corresponding to the primary color.

[0115] The step of determining the color mixing compensation coefficient and the primary color compensation coefficient based on the image data of the first type of image and / or the image data of the second type of image includes:

[0116] Based on the brightness of the color mixing corresponding to the preset gray level in the first color mixing brightness, and the color coordinates, determine the proportion of the primary color in the color mixing corresponding to the preset gray level;

[0117] The primary color compensation coefficient is determined based on the ratio, the brightness of the mixed color corresponding to the preset grayscale, and the brightness of the primary color.

[0118] In this embodiment of the disclosure, the primary color compensation coefficient is determined based on the proportion of the primary color in the color mixing, the brightness of the mixed color, and the brightness of the primary color. This can further ensure that the sum of the brightness of the three RGB primary colors is close to the brightness of the mixed color (W) of the same gray level, and further provide a guarantee for the color calibration of the terminal.

[0119] In color mixing, the sum of the proportions of the three primary colors equals 1.

[0120] According to some other optional embodiments, determining the primary color compensation coefficient based on the ratio, the brightness of the mixed color corresponding to the preset grayscale, and the brightness of the primary color includes:

[0121] The target brightness is obtained by multiplying the ratio by the brightness of the mixed color corresponding to the preset gray level;

[0122] The primary color compensation coefficient is obtained by dividing the target brightness by the primary color brightness.

[0123] In a specific example, the preset grayscale is 255, and L255 represents the brightness of the mixed color corresponding to the preset grayscale. Lr, Lg, and Lb represent the brightness of the primary colors, where Lr is the brightness of R255, Lg is the brightness of G255, and Lb is the brightness of B255. Let 'a' represent the proportion of the R primary color in the mixed color W255, 'b' represent the proportion of the G primary color in the mixed color W255, and 'c' represent the proportion of the B primary color in the mixed color W255. Let Lr-d represent the target brightness of the R primary color, Lg-d represent the target brightness of the G primary color, and Lb-d represent the target brightness of the G primary color. Then, Lr-d = L255*a, Lg-d = L255*b, and Lb-d = L255*c.

[0124] Let α-r represent the R primary color compensation coefficient, α-g represent the G primary color compensation coefficient, and α-b represent the B primary color compensation coefficient. Then α-r = Lr-d / Lr, α-g = Lg-d / Lg, and α-b = Lb-d / Lb.

[0125] According to some other optional embodiments, the first image data includes a plurality of first color mixing brightness corresponding to the first grayscale; the second image data includes a plurality of second color mixing brightness corresponding to the first grayscale.

[0126] The step of determining the color mixing compensation coefficient and the primary color compensation coefficient based on the image data of the first type of image and the image data of the second type of image includes:

[0127] The target grayscale is determined based on the first color mixing brightness and the second color mixing brightness;

[0128] The color mixing compensation coefficient is obtained based on the target gray level and the gray level corresponding to the first color mixing brightness.

[0129] The first and second mixed-color brightness are obtained from images with the same grayscale but different pixel display ratios. If the mixed-color brightness of images with the same grayscale but different pixel display ratios is the same, it indicates that different display areas will not cause a brightness difference. In practical applications, this ensures display quality even when the image is enlarged or reduced. However, if the mixed-color brightness of images with the same grayscale but different pixel display ratios is different, brightness compensation is required to ensure display quality.

[0130] In this embodiment of the disclosure, the target grayscale value is the compensated grayscale value. The color mixing compensation coefficient is the compensation coefficient corresponding to the second type of image with a smaller pixel display ratio.

[0131] According to some other optional embodiments, determining the target grayscale based on the first color mixing brightness and the second color mixing brightness includes:

[0132] The target gray level is determined based on the fact that the first color mixing brightness is equal to the product of the second color mixing brightness and the gray level ratio; wherein, the gray level ratio is the nth power of the ratio of the target gray level to the gray level corresponding to the first color mixing brightness; wherein, n is a first preset value greater than 0; and / or,

[0133] The step of obtaining the color mixing compensation coefficient based on the target grayscale and the grayscale corresponding to the first color mixing brightness includes:

[0134] The color mixing compensation coefficient is obtained by dividing the target gray level by the gray level corresponding to the first color mixing brightness.

[0135] Taking the OPR of the first type of image as 100%, the OPR of the second type of image as 15%, and n as 2.2, let's take the color compensation coefficient for the second gray level (255) at an OPR of 15% as an example: Based on L255 (the brightness of the first color mixing corresponding to gray level 255) and L255' (the brightness of the second color mixing corresponding to gray level 255), calculate the gray level required to be displayed at an OPR of 15% when these two brightness levels are the same: L255 = L255' * (x / 255) 2.2 x is the compensated gray level (i.e., the target gray level), thus obtaining the compensation coefficient for gray level 255 at OPR 15%: β1 = x / 255. The compensation coefficients for other second gray levels at OPR 15% are derived similarly.

[0136] According to some other optional embodiments, determining the initial compensation coefficient based on the first gray level in the input data of the image to be displayed and the color mixing compensation coefficient includes:

[0137] Based on the multiple first gray levels and the second gray level, determine the gray level range of the second gray level among the multiple first gray levels;

[0138] Determine the color mixing compensation coefficient corresponding to the upper limit value of the grayscale range to obtain the upper limit coefficient; and determine the color mixing compensation coefficient corresponding to the lower limit value of the grayscale range to obtain the lower limit coefficient;

[0139] The initial compensation coefficient is determined based on the upper limit coefficient, the lower limit coefficient, and the second gray level.

[0140] In practical applications, the two first gray levels with the smallest differences between the second gray level and multiple first gray levels can be determined. This determines the range of the second gray level within which it falls; these two first gray levels are the upper and lower limits of the gray level range, respectively. Then, the initial compensation coefficient is determined based on the color compensation coefficients corresponding to the upper and lower limits.

[0141] Without limitation, the initial compensation coefficient can be obtained by interpolation calculation using the upper limit coefficient, the lower limit coefficient, and the second gray level.

[0142] According to some other optional embodiments, determining the initial compensation coefficient based on the upper limit coefficient, the lower limit coefficient, and the second grayscale includes:

[0143] The initial compensation coefficient is determined based on the sum of the lower limit coefficient and the coefficient product; wherein the coefficient product is the product of the first coefficient and the second coefficient, the first coefficient is the quotient obtained by dividing the difference between the upper limit coefficient and the lower limit coefficient by the difference between the upper limit value and the lower limit value, and the second coefficient is the difference between the second gray level and the lower limit value.

[0144] In a specific example, let Gx represent the second gray level, the upper limit of the gray level range be denoted as j (one of the multiple first gray levels), the lower limit be denoted as i (one of the multiple first gray levels), the upper limit coefficient βi (i.e. the color compensation coefficient corresponding to gray level i) and βj (i.e. the color compensation coefficient corresponding to gray level j), then the initial compensation coefficient βx = βi + (βj - βi) / (ji) * (Gx - i).

[0145] According to some other optional embodiments, the initial compensation coefficient is corrected based on the pixel display ratio of the input data to obtain the target compensation coefficient, including:

[0146] The target compensation coefficient is determined based on the sum of the initial compensation coefficient and the correction value; wherein the correction value is the product of the first correction value and the second correction value, the first correction value is the quotient obtained by dividing the difference between the second preset value and the initial compensation coefficient by the difference between the second preset value and the third preset value, and the second correction coefficient is the difference between the display ratio and the third preset value.

[0147] Correcting the initial compensation coefficient based on the pixel display ratio helps to further improve compensation accuracy and reduce the impact of changes in display area on display effect.

[0148] In a specific example, let S represent the pixel display ratio of the input data of the image to be displayed. Then the target compensation coefficient βxs = βx + (1-βx) / (1-0.15)*(S-0.15). Where 1 is the second preset value and 0.15 is the third preset value.

[0149] According to some other optional embodiments, the input data includes primary color input data corresponding to the primary color, and the output data includes primary color output data corresponding to the primary color;

[0150] The step of compensating the input data according to the target compensation coefficient and the primary color compensation coefficient to obtain output data includes:

[0151] The primary color output data is determined by multiplying the primary color input data with the primary color compensation coefficient and the target coefficient.

[0152] The input data for the image to be displayed is represented by `data input`, and the output data for the image to be displayed is represented by `dataoutput`. Here, `R-output` represents the R primary color output data, `R-input` represents the R primary color input data, `G-output` represents the G primary color output data, `G-input` represents the G primary color input data, `B-output` represents the B primary color output data, and `B-input` represents the B primary color input data. `α-r` represents the R primary color compensation coefficient, `α-g` represents the G primary color compensation coefficient, `α-b` represents the B primary color compensation coefficient, and `βxs` represents the target compensation coefficient. Therefore, `R-output = R-input * βxs * α-r`; `G-output = G-input * βxs * α-g`; `B-output = B-input * βxs * α-b`.

[0153] In a specific example, such as Figure 7 As shown, the image data compensation methods include:

[0154] Step S210: Measure the first image data of the first type of image and / or the second image data of the second type of image; wherein the OPR of the first type of image is 100%, and the OPR of the second type of image is 15%; the first image data includes the first color mixing brightness corresponding to multiple first gray levels, the color coordinates of the color mixing corresponding to the preset gray levels in the multiple first gray levels, and the base color brightness of the base color corresponding to the preset gray levels; the second image data includes the second color mixing brightness corresponding to multiple first gray levels.

[0155] For example: The first color mixing brightness includes the brightness of W32, W64, W128, W192, and W255, recorded as L32, L64, L128, L192, and L255 respectively; the color coordinates of the preset grayscale corresponding to the color mixing are the color coordinates of W255, recorded as Wx and Wy. The primary color brightness of the preset grayscale corresponding to the primary colors are the brightness of R255, G255, and B255, recorded as Lr, Lg, and Lb respectively. The second color mixing brightness includes the brightness of W32, W64, W128, W192, and W255 at 15% OPR (OPR refers to the area displaying the corresponding grayscale on a pure black background), recorded as L32', L64', L128', L192', and L255'.

[0156] Step S220: Determine the color mixing compensation coefficient and the primary color compensation coefficient corresponding to the preset grayscale based on the first image data of the first type of image and / or the second image data of the second type of image;

[0157] Following the example in step S210: The process of determining the primary color compensation coefficients includes: calculating the proportions a, b, and c of monochromatic R, G, and B in white light based on L255, Wx, and Wy; where a+b+c=1; from these proportions, the target brightness values ​​corresponding to R, G, and B can be obtained, i.e., Lr-d=L255*a, Lg-d=L255*b, Lb-d=L255*c; after obtaining the target brightness values ​​of the primary colors, and combining them with the measured brightness values ​​of the primary colors, the primary color compensation coefficients are finally obtained: α-r=Lr-d / Lr, α-g=Lg-d / Lg, α-b=Lb-d / Lb.

[0158] The process of determining the color mixing compensation coefficient includes: calculating the grayscale values ​​required for OPR15% when L255 and L255' are the same: L255 = L255' * (x / 255) 2.2 x is the compensated grayscale value, thus obtaining the compensation coefficient for grayscale 255 at OPR 15%: β1 = x / 255. Following the steps above, the color mixing compensation coefficients for grayscale 32 / 64 / 128 / 192 at OPR 15% are obtained sequentially: β5, β4, β3, β2.

[0159] In practical applications, the three primary color compensation coefficients α-r, α-g, and α-b, and the five color mixing compensation coefficients β5, β4, β3, β2, and β1 can be stored in the storage space for subsequent compensation of the input data of the image to be displayed.

[0160] Step S230: Based on the pixel display ratio of the input data, correct the initial compensation coefficient to obtain the target compensation coefficient;

[0161] Following the example in step S220: Based on the content of the image to be displayed, obtain the display area ratio S (i.e., OPR) and the corresponding gray level Gx of the image to be displayed. Determine the gray level range [i,j] where Gx is located, where i or j is taken from the above multiple first gray levels, including: 32, 64, 128, 192, 255. Based on the compensation coefficients βi and βj of the above multiple first gray levels, obtain the initial compensation coefficient corresponding to the gray level through interpolation: βx=βi+(βj-βi) / (ji)*(Gx-i). Then, based on the display area ratio S, the above initial compensation coefficient is corrected again to obtain the target compensation coefficient: βxs=βx+(1-βx) / (1-0.15)*(S-0.15).

[0162] Step S240: Compensate the input data according to the target compensation coefficient and the primary color compensation coefficient to obtain the output data.

[0163] Following the example in step S230: The input data of the image to be displayed is represented by `data input`, and the output data of the image to be displayed is represented by `data output`. Wherein, R-output represents the R primary color output data, R-input represents the R primary color input data, G-output represents the G primary color output data, G-input represents the G primary color input data, B-output represents the B primary color output data, and B-input represents the B primary color input data. α-r represents the R primary color compensation coefficient, α-g represents the G primary color compensation coefficient, α-b represents the B primary color compensation coefficient, and βxs represents the target compensation coefficient. Therefore, R-output = R-input * βxs * α-r; G-output = G-input * βxs * α-g; B-output = B-input * βxs * α-b.

[0164] When the image data compensation function in the terminal is turned off, that is, the compensation operation in steps S210 to S240 is not performed, data output = data input.

[0165] In practical applications, to achieve more precise compensation, more first gray levels (32, 64, 128, 192, 255) can be added to the five first gray levels (32, 64, 128, 192, 255) in the example above for data measurement and corresponding compensation coefficient calculation. Alternatively, more color mixing can be added to refine the compensation coefficients for a single color. This requires more storage space to store the relevant data. Therefore, appropriate data selection should be made based on the target result, computation time, and storage capacity.

[0166] A second aspect of this disclosure provides an image data compensation device, such as... Figure 8 As shown, the device 300 includes:

[0167] The first determining module 310 is used to determine the color mixing compensation coefficient and the primary color compensation coefficient of the primary color corresponding to the preset gray level based on the first image data of the first type of image and / or the second image data of the second type of image; wherein, the pixel display ratio of the first type of image is greater than the pixel display ratio of the second type of image; both the first image data and the second image data include image data corresponding to multiple first gray levels, and the multiple first gray levels include the preset gray level;

[0168] The second determining module 320 is used to determine the initial compensation coefficient based on the second gray level in the input data of the image to be displayed and the color mixing compensation coefficient.

[0169] Correction module 330 is used to correct the initial compensation coefficient according to the pixel display ratio of the input data to obtain the target compensation coefficient;

[0170] The compensation module 340 is used to compensate the input data according to the target compensation coefficient and the primary color compensation coefficient to obtain output data.

[0171] According to some other optional embodiments, the first image data includes a plurality of first color mixing brightness corresponding to the first gray level, the color coordinates of the preset gray level corresponding to the color mixing, and the primary color brightness of the preset gray level corresponding to the primary color.

[0172] The first determining module is used for:

[0173] Based on the brightness of the color mixing corresponding to the preset gray level in the first color mixing brightness, and the color coordinates, determine the proportion of the primary color in the color mixing corresponding to the preset gray level;

[0174] The primary color compensation coefficient is determined based on the ratio, the brightness of the mixed color corresponding to the preset grayscale, and the brightness of the primary color.

[0175] According to some other alternative embodiments, the first determining module is configured to:

[0176] The target brightness is obtained by multiplying the ratio by the brightness of the mixed color corresponding to the preset gray level;

[0177] The primary color compensation coefficient is obtained by dividing the target brightness by the primary color brightness.

[0178] According to some other optional embodiments, the first image data includes a plurality of first color mixing brightness corresponding to the first grayscale; the second image data includes a plurality of second color mixing brightness corresponding to the first grayscale.

[0179] The first determining module is used for:

[0180] The target grayscale is determined based on the first color mixing brightness and the second color mixing brightness;

[0181] The color mixing compensation coefficient is obtained based on the target gray level and the gray level corresponding to the first color mixing brightness.

[0182] According to some other alternative embodiments, the first determining module is configured to:

[0183] The target gray level is determined based on the fact that the first color mixing brightness is equal to the product of the second color mixing brightness and the gray level ratio; wherein, the gray level ratio is the nth power of the ratio of the target gray level to the gray level corresponding to the first color mixing brightness; wherein, n is a first preset value greater than 0; and / or,

[0184] The step of obtaining the color mixing compensation coefficient based on the target grayscale and the grayscale corresponding to the first color mixing brightness includes:

[0185] The color mixing compensation coefficient is obtained by dividing the target gray level by the gray level corresponding to the first color mixing brightness.

[0186] According to some other alternative embodiments, the second determining module is configured to:

[0187] Based on the multiple first gray levels and the second gray level, determine the gray level range of the second gray level among the multiple first gray levels;

[0188] Determine the color mixing compensation coefficient corresponding to the upper limit value of the grayscale range to obtain the upper limit coefficient; and determine the color mixing compensation coefficient corresponding to the lower limit value of the grayscale range to obtain the lower limit coefficient;

[0189] The initial compensation coefficient is determined based on the upper limit coefficient, the lower limit coefficient, and the second gray level.

[0190] According to some other alternative embodiments, the second determining module is configured to:

[0191] The initial compensation coefficient is determined based on the sum of the lower limit coefficient and the coefficient product; wherein the coefficient product is the product of the first coefficient and the second coefficient, the first coefficient is the quotient obtained by dividing the difference between the upper limit coefficient and the lower limit coefficient by the difference between the upper limit value and the lower limit value, and the second coefficient is the difference between the second gray level and the lower limit value.

[0192] According to some other alternative embodiments, the correction module is configured to:

[0193] The target compensation coefficient is determined based on the sum of the initial compensation coefficient and the correction value; wherein the correction value is the product of the first correction value and the second correction value, the first correction value is the quotient obtained by dividing the difference between the second preset value and the initial compensation coefficient by the difference between the second preset value and the third preset value, and the second correction coefficient is the difference between the display ratio and the third preset value.

[0194] According to some other alternative embodiments, the compensation module is used for:

[0195] The step of compensating the input data according to the target compensation coefficient and the primary color compensation coefficient to obtain output data includes:

[0196] The primary color output data is determined by multiplying the primary color input data with the primary color compensation coefficient and the target coefficient.

[0197] A third aspect of this disclosure provides an electronic device, including:

[0198] processor;

[0199] Memory used to store processor-executable instructions;

[0200] The processor is configured to execute the steps of the method described in the first aspect embodiment.

[0201] A fourth aspect of this disclosure provides a computer-readable storage medium having a computer program stored thereon, wherein when the instructions in the storage medium are executed by a processor of an electronic device, the electronic device is able to perform the steps of the method described in the first embodiment.

[0202] In an exemplary embodiment, the multiple modules in the printing apparatus may be implemented by one or more central processing units (CPUs), graphics processing units (GPUs), baseband processors (BPs), application-specific integrated circuits (ASICs), DSPs, programmable logic devices (PLDs), complex programmable logic devices (CPLDs), field-programmable gate arrays (FPGAs), general-purpose processors, controllers, microcontrollers (MCUs), microprocessors, or other electronic components to perform the aforementioned method.

[0203] Figure 9 This is a block diagram illustrating an electronic device 800 according to an exemplary embodiment. For example, device 800 may be a mobile phone, computer, digital broadcasting terminal, messaging device, game console, tablet device, medical device, fitness equipment, personal digital assistant, etc.

[0204] Reference Figure 9 The device 800 may include one or more of the following components: a processing component 802, a memory 804, a power supply component 806, a multimedia component 808, an audio component 810, an input / output (I / O) interface 812, a sensor component 814, and a communication component 816.

[0205] Processing component 802 typically controls the overall operation of device 800, such as operations associated with display, telephone calls, data communication, camera operation, and recording. Processing component 802 may include one or more processors 820 to execute instructions to perform all or part of the steps of the methods described above. Furthermore, processing component 802 may include one or more modules to facilitate interaction between processing component 802 and other components. For example, processing component 802 may include a multimedia module to facilitate interaction between multimedia component 808 and processing component 802.

[0206] Memory 804 is configured to store various types of data to support the operation of device 800. Examples of such data include instructions for any application or method operating on device 800, contact data, phonebook data, messages, pictures, videos, etc. Memory 804 can be implemented by any type of volatile or non-volatile storage device or a combination thereof, such as static random access memory (SRAM), electrically erasable programmable read-only memory (EEPROM), erasable programmable read-only memory (EPROM), programmable read-only memory (PROM), read-only memory (ROM), magnetic storage, flash memory, magnetic disk, or optical disk.

[0207] Power supply component 806 provides power to various components of device 800. Power supply component 806 may include a power management system, one or more power sources, and other components associated with generating, managing, and distributing power to device 800.

[0208] Multimedia component 808 includes a screen that provides an output interface between the device 800 and the user. In some embodiments, the screen may include a liquid crystal display (LCD) and a touch panel (TP). If the screen includes a touch panel, the screen may be implemented as a touchscreen to receive input signals from the user. The touch panel includes one or more touch sensors to sense touches, swipes, and gestures on the touch panel. The touch sensors may sense not only the boundaries of the touch or swipe action but also the duration and pressure associated with the touch or swipe operation. In some embodiments, multimedia component 808 includes a front-facing camera and / or a rear-facing camera. When the device 800 is in an operating mode, such as a shooting mode or a video mode, the front-facing camera and / or the rear-facing camera may receive external multimedia data. Each front-facing camera and rear-facing camera may be a fixed optical lens system or have focal length and optical zoom capabilities.

[0209] Audio component 810 is configured to output and / or input audio signals. For example, audio component 810 includes a microphone (MIC) configured to receive external audio signals when device 800 is in an operating mode, such as call mode, recording mode, and voice recognition mode. The received audio signals may be further stored in memory 804 or transmitted via communication component 816. In some embodiments, audio component 810 also includes a speaker for outputting audio signals.

[0210] I / O interface 812 provides an interface between processing component 802 and peripheral interface modules, such as keyboards, click wheels, buttons, etc. These buttons may include, but are not limited to, home buttons, volume buttons, power buttons, and lock buttons.

[0211] Sensor assembly 814 includes one or more sensors for providing status assessments of various aspects of device 800. For example, sensor assembly 814 may detect the on / off state of device 800, the relative positioning of components such as the display and keypad of device 800, changes in the position of device 800 or a component of device 800, the presence or absence of user contact with device 800, the orientation or acceleration / deceleration of device 800, and temperature changes of device 800. Sensor assembly 814 may include a proximity sensor configured to detect the presence of nearby objects without any physical contact. Sensor assembly 814 may also include a light sensor, such as a CMOS or CCD image sensor, for use in imaging applications. In some embodiments, sensor assembly 814 may also include an accelerometer, a gyroscope, a magnetometer, a pressure sensor, or a temperature sensor.

[0212] Communication component 816 is configured to facilitate wired or wireless communication between device 800 and other devices. Device 800 can access wireless networks based on communication standards, such as WiFi, 4G, or 5G, or combinations thereof. In one exemplary embodiment, communication component 816 receives broadcast signals or broadcast-related information from an external broadcast management system via a broadcast channel. In one exemplary embodiment, communication component 816 also includes a near-field communication (NFC) module to facilitate short-range communication. For example, the NFC module may be implemented based on radio frequency identification (RFID) technology, Infrared Data Association (IrDA) technology, ultra-wideband (UWB) technology, Bluetooth (BT) technology, and other technologies.

[0213] In an exemplary embodiment, the apparatus 800 may be implemented by one or more application-specific integrated circuits (ASICs), digital signal processors (DSPs), digital signal processing devices (DSPDs), programmable logic devices (PLDs), field-programmable gate arrays (FPGAs), controllers, microcontrollers, microprocessors, or other electronic components to perform the methods described above.

[0214] In an exemplary embodiment, a non-transitory computer-readable storage medium including instructions is also provided, such as a memory 804 including instructions, which can be executed by a processor 820 of the device 800 to perform the above-described method. For example, the non-transitory computer-readable storage medium may be a ROM, random access memory (RAM), CD-ROM, magnetic tape, floppy disk, and optical data storage device, etc.

[0215] The methods disclosed in the several method embodiments provided in this disclosure can be arbitrarily combined without conflict to obtain new method embodiments.

[0216] The features disclosed in the several device embodiments provided in this disclosure can be arbitrarily combined without conflict to obtain new product embodiments.

[0217] The features disclosed in the several method or device embodiments provided in this disclosure can be arbitrarily combined without conflict to obtain new method embodiments or product embodiments.

[0218] Other embodiments of this disclosure will readily occur to those skilled in the art upon consideration of the specification and practice of the invention disclosed herein. This disclosure is intended to cover any variations, uses, or adaptations of this disclosure that follow the general principles of this disclosure and include common knowledge or customary techniques in the art not disclosed herein. The specification and examples are to be considered exemplary only, and the true scope and spirit of this disclosure are indicated by the following claims.

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

Claims

1. A method for compensating image data, characterized in that, The method includes: Based on the first image data of the first type of image and / or the second image data of the second type of image, determine the color mixing compensation coefficient and the primary color compensation coefficient corresponding to the preset gray level; wherein, the pixel display ratio of the first type of image is greater than the pixel display ratio of the second type of image; both the first image data and the second image data include image data corresponding to multiple first gray levels, and the multiple first gray levels include the preset gray level; The initial compensation coefficient is determined based on the second gray level in the input data of the image to be displayed and the color mixing compensation coefficient. The step of determining the initial compensation coefficient based on the second grayscale in the input data of the image to be displayed and the color mixing compensation coefficient includes: Based on the multiple first gray levels and the second gray level, determine the gray level range of the second gray level among the multiple first gray levels; Determine the color mixing compensation coefficient corresponding to the upper limit value of the grayscale range to obtain the upper limit coefficient; and determine the color mixing compensation coefficient corresponding to the lower limit value of the grayscale range to obtain the lower limit coefficient; The initial compensation coefficient is determined based on the upper limit coefficient, the lower limit coefficient, and the second gray level; Based on the pixel display ratio of the input data, the initial compensation coefficient is corrected to obtain the target compensation coefficient; The step of correcting the initial compensation coefficient based on the pixel display ratio of the input data to obtain the target compensation coefficient includes: The target compensation coefficient is determined based on the sum of the initial compensation coefficient and the correction value; wherein the correction value is the product of the first correction value and the second correction value, the first correction value is the quotient obtained by dividing the difference between the second preset value and the initial compensation coefficient by the difference between the second preset value and the third preset value, and the second correction value is the difference between the display ratio and the third preset value. The input data is compensated based on the target compensation coefficient and the primary color compensation coefficient to obtain the output data.

2. The method according to claim 1, characterized in that, The first image data includes a first color mixing brightness corresponding to multiple first gray levels, the color coordinates of the preset gray levels corresponding to the color mixing, and the primary color brightness of the preset gray levels corresponding to the primary colors; The step of determining the color mixing compensation coefficient and the primary color compensation coefficient based on the image data of the first type of image and / or the image data of the second type of image includes: Based on the brightness of the color mixing corresponding to the preset gray level in the first color mixing brightness, and the color coordinates, determine the proportion of the primary color in the color mixing corresponding to the preset gray level; The primary color compensation coefficient is determined based on the ratio, the brightness of the mixed color corresponding to the preset grayscale, and the brightness of the primary color.

3. The method according to claim 2, characterized in that, The step of determining the primary color compensation coefficient based on the ratio, the brightness of the mixed color corresponding to the preset grayscale, and the brightness of the primary color includes: The target brightness is obtained by multiplying the ratio by the brightness of the mixed color corresponding to the preset gray level; The primary color compensation coefficient is obtained by dividing the target brightness by the primary color brightness.

4. The method according to claim 1, characterized in that, The first image data includes a plurality of first color mixing luminances corresponding to the first grayscale; the second image data includes a plurality of second color mixing luminances corresponding to the first grayscale. The step of determining the color mixing compensation coefficient and the primary color compensation coefficient based on the image data of the first type of image and the image data of the second type of image includes: The target grayscale is determined based on the first color mixing brightness and the second color mixing brightness; The color mixing compensation coefficient is obtained based on the target gray level and the gray level corresponding to the first color mixing brightness.

5. The method according to claim 4, characterized in that, The step of determining the target grayscale based on the first color mixing brightness and the second color mixing brightness includes: The target gray level is determined based on the fact that the first color mixing brightness is equal to the product of the second color mixing brightness and the gray level ratio; wherein, the gray level ratio is the nth power of the ratio of the target gray level to the gray level corresponding to the first color mixing brightness; wherein, n is a first preset value greater than 0; and / or, The step of obtaining the color mixing compensation coefficient based on the target grayscale and the grayscale corresponding to the first color mixing brightness includes: The color mixing compensation coefficient is obtained by dividing the target gray level by the gray level corresponding to the first color mixing brightness.

6. The method according to claim 1, characterized in that, The step of determining the initial compensation coefficient based on the upper limit coefficient, the lower limit coefficient, and the second gray level includes: The initial compensation coefficient is determined based on the sum of the lower limit coefficient and the coefficient product; wherein the coefficient product is the product of the first coefficient and the second coefficient, the first coefficient is the quotient obtained by dividing the difference between the upper limit coefficient and the lower limit coefficient by the difference between the upper limit value and the lower limit value, and the second coefficient is the difference between the second gray level and the lower limit value.

7. The method according to claim 1, characterized in that, The input data includes the primary color input data corresponding to the primary color, and the output data includes the primary color output data corresponding to the primary color. The step of compensating the input data according to the target compensation coefficient and the primary color compensation coefficient to obtain output data includes: The primary color output data is determined by multiplying the primary color input data with the primary color compensation coefficient and the target compensation coefficient.

8. An image data compensation device, characterized in that, The device includes: The first determining module is used to determine the color mixing compensation coefficient and the primary color compensation coefficient of the primary color corresponding to the preset gray level based on the first image data of the first type of image and / or the second image data of the second type of image; wherein, the pixel display ratio of the first type of image is greater than the pixel display ratio of the second type of image; both the first image data and the second image data include image data corresponding to multiple first gray levels, and the multiple first gray levels include the preset gray level; The second determining module is used to determine the initial compensation coefficient based on the second gray level in the input data of the image to be displayed and the color mixing compensation coefficient. The second determining module is configured to: determine the grayscale range of the second grayscale in the plurality of first grayscales based on the plurality of first grayscales and the second grayscale; determine the color mixing compensation coefficient corresponding to the upper limit value of the grayscale range to obtain the upper limit coefficient; and the color mixing compensation coefficient corresponding to the lower limit value of the grayscale range to obtain the lower limit coefficient; and determine the initial compensation coefficient based on the upper limit coefficient, the lower limit coefficient, and the second grayscale; The correction module is used to correct the initial compensation coefficient according to the pixel display ratio of the input data to obtain the target compensation coefficient; The correction module is used to: determine the target compensation coefficient based on the sum of the initial compensation coefficient and the correction value; wherein the correction value is the product of the first correction value and the second correction value, the first correction value is the quotient obtained by dividing the difference between the second preset value and the initial compensation coefficient by the difference between the second preset value and the third preset value, and the second correction value is the difference between the display ratio and the third preset value; The compensation module is used to compensate the input data according to the target compensation coefficient and the primary color compensation coefficient to obtain output data.

9. The apparatus according to claim 8, characterized in that, The first image data includes a first color mixing brightness corresponding to multiple first gray levels, the color coordinates of the preset gray levels corresponding to the color mixing, and the primary color brightness of the preset gray levels corresponding to the primary colors; The first determining module is used for: Based on the brightness of the color mixing corresponding to the preset gray level in the first color mixing brightness, and the color coordinates, determine the proportion of the primary color in the color mixing corresponding to the preset gray level; The primary color compensation coefficient is determined based on the ratio, the brightness of the mixed color corresponding to the preset grayscale, and the brightness of the primary color.

10. The apparatus according to claim 9, characterized in that, The first determining module is used for: The target brightness is obtained by multiplying the ratio by the brightness of the mixed color corresponding to the preset gray level; The primary color compensation coefficient is obtained by dividing the target brightness by the primary color brightness.

11. The apparatus according to claim 8, characterized in that, The first image data includes a plurality of first color mixing luminances corresponding to the first grayscale; the second image data includes a plurality of second color mixing luminances corresponding to the first grayscale. The first determining module is used for: The target grayscale is determined based on the first color mixing brightness and the second color mixing brightness; The color mixing compensation coefficient is obtained based on the target gray level and the gray level corresponding to the first color mixing brightness.

12. The apparatus according to claim 11, characterized in that, The first determining module is used for: The target gray level is determined based on the fact that the first color mixing brightness is equal to the product of the second color mixing brightness and the gray level ratio; wherein, the gray level ratio is the nth power of the ratio of the target gray level to the gray level corresponding to the first color mixing brightness; wherein, n is a first preset value greater than 0; and / or, The step of obtaining the color mixing compensation coefficient based on the target grayscale and the grayscale corresponding to the first color mixing brightness includes: The color mixing compensation coefficient is obtained by dividing the target gray level by the gray level corresponding to the first color mixing brightness.

13. The apparatus according to claim 12, characterized in that, The second determining module is used for: The initial compensation coefficient is determined based on the sum of the lower limit coefficient and the coefficient product; wherein the coefficient product is the product of the first coefficient and the second coefficient, the first coefficient is the quotient obtained by dividing the difference between the upper limit coefficient and the lower limit coefficient by the difference between the upper limit value and the lower limit value, and the second coefficient is the difference between the second gray level and the lower limit value.

14. The apparatus according to claim 8, characterized in that, The compensation module is used for: The input data includes the primary color input data corresponding to the primary color, and the output data includes the primary color output data corresponding to the primary color. The step of compensating the input data according to the target compensation coefficient and the primary color compensation coefficient to obtain output data includes: The primary color output data is determined by multiplying the primary color input data with the primary color compensation coefficient and the target compensation coefficient.

15. A terminal, characterized in that, include: processor; Memory used to store processor-executable instructions; The processor is configured to perform the steps of the method according to any one of claims 1 to 7.

16. A computer-readable storage medium having a computer program stored thereon, characterized in that, When the instructions in the storage medium are executed by the processor of the electronic device, the electronic device is able to perform the steps of the method according to any one of claims 1 to 7.