Grayscale value compensation method, device and equipment

By obtaining the sample color coordinates and brightness of the display screen collection point, and calculating the compensation grayscale value, the problem of uneven chromaticity changes inside the display screen is solved, and the data accuracy and correction efficiency are improved.

CN118411968BActive Publication Date: 2024-09-20HANGZHOU HIKVISION DIGITAL TECHNOLOGY CO LTD
View PDF 0 Cites 0 Cited by

Patent Information

Application Number
CN202410864607.8
Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
Filing Date
2024-06-28
Publication Date
2024-09-20
Estimated Expiration
2044-06-28

AI Technical Summary

Technical Problem

Uneven chromaticity changes at multiple points inside the monitor screen lead to inconsistent visual effects for the human eye, and color coordinate fluctuations lead to inconsistent colors.

Method used

By obtaining the sample color coordinates and sample brightness of multiple sample blocks at each collection point on the display screen, the unit gray-scale color coordinate change and unit gray-scale brightness change of the gray-scale value interval are determined, which is used to calculate the target gray-scale value. Compensate the grayscale value, thereby reducing or increasing the grayscale value to achieve the optimal value.

Benefits of technology

It solves the problem of uneven chromaticity changes at multiple points inside the monitor screen, reduces data collection time, improves production and on-site correction efficiency, and uses real screen data to improve data accuracy.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN118411968B
    Figure CN118411968B
Patent Text Reader

Abstract

The present application provides a grayscale value compensation method, device and equipment, the method comprising: for each acquisition point of the display screen, obtaining the sample color coordinates and sample brightness of multiple sample blocks centered on the acquisition point, the grayscale values ​​of the multiple sample blocks change at an interval of n; for two sample blocks with a grayscale value interval of n, based on the sample color coordinates of the two sample blocks, the sample brightness of the two sample blocks and the interval n, determining the unit grayscale color coordinate change and the unit grayscale brightness change corresponding to the grayscale value interval; wherein the grayscale value interval is the interval of the grayscale values ​​of the two sample blocks; the unit grayscale color coordinate change and the unit grayscale brightness change corresponding to the grayscale value interval are used to determine the compensation grayscale value corresponding to the target grayscale value within the grayscale value interval. Through the technical solution of the present application, the problem of uneven chromaticity changes at multiple points inside the display screen is solved, and the data acquisition time can be reduced and the data accuracy can be improved.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present application relates to the field of screen display, and in particular to a grayscale value compensation method, device and equipment. Background Art

[0002] A display screen is a device or appliance used to display images and colors. It can also be called a display screen. It is widely used in mobile phones, computers, televisions, and devices with image or text display functions. When displaying images and colors through a display screen, there is a problem of uneven chromaticity changes at multiple points inside the display screen. When the chromaticity unevenness inside the display screen fluctuates by one percent, the visual effect of the human eye will have inconsistent colors. For example, if the color coordinate x is too large, it will be reddish, and if the color coordinate y is too large, it will be cyan or greenish. Summary of the invention

[0003] The present application provides a grayscale value compensation method, the method comprising:

[0004] For each acquisition point on the display screen, sample color coordinates and sample brightness of a plurality of sample blocks centered at the acquisition point are obtained, and the grayscale values ​​of the plurality of sample blocks vary at intervals n;

[0005] For two sample blocks with a grayscale value interval of n, based on the sample color coordinates of the two sample blocks, the sample brightness of the two sample blocks and the interval n, the unit grayscale color coordinate change and the unit grayscale brightness change corresponding to the grayscale value interval are determined; wherein the grayscale value interval is the interval of grayscale values ​​of the two sample blocks; the unit grayscale color coordinate change and the unit grayscale brightness change corresponding to the grayscale value interval are used to determine the compensation grayscale value corresponding to the target grayscale value located in the grayscale value interval.

[0006] The present application provides a grayscale value compensation device, the device comprising:

[0007] An acquisition module, used for acquiring, for each acquisition point on the display screen, sample color coordinates and sample brightness of a plurality of sample blocks centered at the acquisition point, wherein the grayscale values ​​of the plurality of sample blocks vary at intervals of n;

[0008] a determination module, configured to determine, for two sample blocks with a grayscale value interval of n, a unit grayscale color coordinate change and a unit grayscale brightness change corresponding to a grayscale value interval based on sample color coordinates of the two sample blocks, sample brightness of the two sample blocks and the interval n; wherein the grayscale value interval is an interval of grayscale values ​​of the two sample blocks;

[0009] The unit grayscale color coordinate variation and the unit grayscale brightness variation corresponding to the grayscale value interval are used to determine the compensation grayscale value corresponding to the target grayscale value within the grayscale value interval.

[0010] The present application provides an electronic device, comprising: a processor and a machine-readable storage medium, wherein the machine-readable storage medium stores machine-executable instructions that can be executed by the processor; wherein the processor is used to execute the machine-executable instructions to implement the above-mentioned grayscale value compensation method.

[0011] The present application provides a computer program product, which includes a computer program. When the computer program is executed by a processor, the grayscale value compensation method described above is implemented.

[0012] The present application provides a machine-readable storage medium, which stores machine-executable instructions that can be executed by a processor; wherein the processor is used to execute the machine-executable instructions stored in the machine-readable storage medium to implement the above-mentioned grayscale value compensation method.

[0013] It can be seen from the above technical solutions that in the embodiment of the present application, for each acquisition point of the display screen, the unit grayscale color coordinate change and the unit grayscale brightness change can be determined, and the compensation grayscale value corresponding to the target grayscale value can be determined based on the unit grayscale color coordinate change and the unit grayscale brightness change. In this way, the target grayscale value can be compensated by the compensation grayscale value to solve the problem of uneven chromaticity changes at multiple points inside the display screen, and the target grayscale value of the acquisition point can be made to reach the optimal value by reducing or increasing the grayscale value. Moreover, when determining the unit grayscale color coordinate change and the unit grayscale brightness change, the sample color coordinates and sample brightness of multiple sample blocks are collected at one time, and multiple unit grayscale color coordinate changes and unit grayscale brightness changes are determined based on the sample color coordinates and sample brightness of these sample blocks, which can reduce data acquisition time, improve production and on-site correction efficiency, and use real screen data to improve data accuracy. BRIEF DESCRIPTION OF THE DRAWINGS

[0014] Figure 1 is a flow chart of a grayscale value compensation method in one embodiment of the present application;

[0015] Figure 2 is a schematic diagram of color coordinate x and color coordinate y in one embodiment of the present application;

[0016] Figure 3 is a schematic diagram of a system structure in one embodiment of the present application;

[0017] Figure 4 is a flow chart of a grayscale value compensation method in one embodiment of the present application;

[0018] Figure 5A It is a schematic diagram of dividing sample blocks with the collection point as the center in one implementation of the present application;

[0019] Figure 5B It is a schematic diagram of dividing sample blocks with the collection point as the center in one implementation of the present application;

[0020] Figure 5C It is a schematic diagram of three RGB channels in one embodiment of the present application;

[0021] Figure 6 is a schematic diagram of determining a compensation strategy in one embodiment of the present application;

[0022] Figure 7 is a schematic structural diagram of a grayscale value compensation device in one embodiment of the present application;

[0023] Figure 8 It is a hardware structure diagram of an electronic device in one embodiment of the present application. DETAILED DESCRIPTION

[0024] In the embodiment of the present application, a grayscale value compensation method is proposed. The method can be applied to electronic devices. Figure 1 FIG. 1 is a flow chart of the grayscale value compensation method, which may include:

[0025] Step 101: for each acquisition point on the display screen, obtain sample color coordinates and sample brightness of multiple sample blocks centered at the acquisition point, and the grayscale values ​​of the multiple sample blocks change at an interval of n.

[0026] Step 102: for two sample blocks with a grayscale value interval of n, based on the sample color coordinates of the two sample blocks, the sample brightness of the two sample blocks and the interval n, determine the unit grayscale color coordinate change and the unit grayscale brightness change corresponding to the grayscale value interval; wherein the grayscale value interval is the interval of the grayscale values ​​of the two sample blocks. The unit grayscale color coordinate change and the unit grayscale brightness change corresponding to the grayscale value interval are used to determine the compensation grayscale value corresponding to the target grayscale value within the grayscale value interval.

[0027] Exemplarily, based on the sample color coordinates of the two sample blocks, the sample brightness of the two sample blocks and the interval n, determining the unit grayscale color coordinate change and the unit grayscale brightness change corresponding to the grayscale value interval may include but is not limited to: using the following formula to determine the unit grayscale color coordinate change: ; Use the following formula to determine the unit grayscale brightness change: ;in, Indicates the unit grayscale color coordinate change corresponding to the grayscale value interval, Indicates the unit grayscale brightness change corresponding to the grayscale value interval, and represents the sample color coordinates of two sample blocks, and Represents the sample brightness of a two-sample block.

[0028] Exemplarily, the process of determining the compensated grayscale value corresponding to the target grayscale value based on the unit grayscale color coordinate change and the unit grayscale brightness change corresponding to the grayscale value interval may include but is not limited to: setting the grayscale value of the display screen to a first grayscale value, the initial value of the first grayscale value may be the target grayscale value, and obtaining the real color coordinate and real brightness of the acquisition point of the display screen. Compensating the first grayscale value based on the offset grayscale value corresponding to the real color coordinate to obtain the second grayscale value; determining the compensated color coordinate corresponding to the second grayscale value based on the unit grayscale color coordinate change and the real color coordinate corresponding to the grayscale value interval to which the target grayscale value belongs, and determining the compensated brightness corresponding to the second grayscale value based on the unit grayscale brightness change and the real brightness corresponding to the grayscale value interval to which the target grayscale value belongs. Determine whether the compensation end condition is met; if not, the second grayscale value can be used as the first grayscale value, return to execute the operation of obtaining the real color coordinates and real brightness of the acquisition point of the display screen, and repeat the above steps; if so, based on the compensated color coordinates and compensated brightness corresponding to each second grayscale value, a second grayscale value can be selected from all second grayscale values ​​as the compensated grayscale value corresponding to the target grayscale value.

[0029] Exemplarily, before compensating the first grayscale value based on the offset grayscale value corresponding to the real color coordinate to obtain the second grayscale value, it may also include: calculating the deviation value between the real color coordinate and the configured color coordinate target value; determining the offset grayscale value corresponding to the real color coordinate based on the unit grayscale color coordinate change and the deviation value; wherein the real color coordinate may include the real color coordinate x and the real color coordinate y, the deviation value may include the deviation value ox corresponding to the real color coordinate x and the deviation value oy corresponding to the real color coordinate y, and the unit grayscale color coordinate change may include the unit grayscale color coordinate change Δx and the unit grayscale color coordinate change Δy.

[0030] On this basis, if the first grayscale value is the grayscale value of the R channel, the offset grayscale value ΔR of the R channel can be |ox / Δx|; if the first grayscale value is the grayscale value of the G channel, the offset grayscale value ΔG of the G channel can be |oy / Δy|; if the first grayscale value is the grayscale value of the B channel, the offset grayscale value ΔB of the B channel can be the smaller value between ΔB1 and ΔB2; wherein ΔB1 is |ox / Δx|, and ΔB2 is |oy / Δy|.

[0031] Exemplarily, compensating the first grayscale value based on the offset grayscale value corresponding to the true color coordinate to obtain the second grayscale value may include but is not limited to: based on the relationship between the deviation value ox and 0, and the relationship between the deviation value oy and 0, selecting a candidate offset grayscale value from the offset grayscale value ΔR of the R channel, the offset grayscale value ΔG of the G channel, and the offset grayscale value ΔB of the B channel; and using the candidate offset grayscale value to compensate the first grayscale value to obtain the second grayscale value.

[0032] If the deviation value ox is greater than 0 and the deviation value oy is greater than 0, the candidate offset grayscale value is the offset grayscale value ΔB, and the offset grayscale value ΔB is used to increase the B channel of the first grayscale value; or, the candidate offset grayscale value is the offset grayscale value ΔR and the offset grayscale value ΔG, and the offset grayscale value ΔR is used to reduce the R channel of the first grayscale value, and the offset grayscale value ΔG is used to reduce the G channel of the first grayscale value. Alternatively, if the deviation value ox is greater than 0 and the deviation value oy is less than 0, the candidate offset grayscale value is the offset grayscale value ΔG and the offset grayscale value ΔR, and the offset grayscale value ΔG is used to increase the G channel of the first grayscale value, and the offset grayscale value ΔR is used to reduce the R channel of the first grayscale value; or, the candidate offset grayscale value is the offset grayscale value ΔB and the offset grayscale value ΔR, and the offset grayscale value ΔB is used to reduce the B channel of the first grayscale value, and the offset grayscale value ΔR is used to reduce the R channel of the first grayscale value. Alternatively, if the deviation value ox is greater than 0 and the deviation value oy is equal to 0, the candidate offset grayscale value is the offset grayscale value ΔR, and the offset grayscale value ΔR is used to reduce the R channel of the first grayscale value. Alternatively, if the deviation value ox is less than 0 and the deviation value oy is greater than 0, the candidate offset grayscale value is the offset grayscale value ΔB and the offset grayscale value ΔG, and the offset grayscale value ΔB is used to reduce the B channel of the first grayscale value, and the offset grayscale value ΔG is used to reduce the G channel of the first grayscale value; or, the candidate offset grayscale value is the offset grayscale value ΔR and the offset grayscale value ΔG, and the offset grayscale value ΔR is used to increase the R channel of the first grayscale value, and the offset grayscale value ΔG is used to reduce the G channel of the first grayscale value. Alternatively, if the deviation value ox is less than 0 and the deviation value oy is less than 0, the candidate offset grayscale value is the offset grayscale value ΔB, and the offset grayscale value ΔB is used to reduce the B channel of the first grayscale value; or, the candidate offset grayscale value is the offset grayscale value ΔG and the offset grayscale value ΔR, and the offset grayscale value ΔG is used to increase the G channel of the first grayscale value, and the offset grayscale value ΔR is used to increase the R channel of the first grayscale value. Alternatively, if the deviation value ox is less than 0 and the deviation value oy is equal to 0, the candidate offset grayscale value is the offset grayscale value ΔB and the offset grayscale value ΔG, and the offset grayscale value ΔB is used to reduce the B channel of the first grayscale value, and the offset grayscale value ΔG is used to reduce the G channel of the first grayscale value; or, the candidate offset grayscale value is the offset grayscale value ΔR, and the offset grayscale value ΔR is used to increase the R channel of the first grayscale value. Alternatively, if the deviation value ox is equal to 0 and the deviation value oy is greater than 0, the candidate offset grayscale value is the offset grayscale value ΔG, and the offset grayscale value ΔG is used to reduce the G channel of the first grayscale value. Alternatively, if the deviation value ox is equal to 0 and the deviation value oy is less than 0, the candidate offset grayscale value is the offset grayscale value ΔB and the offset grayscale value ΔR, the offset grayscale value ΔB is used to reduce the B channel of the first grayscale value, and the offset grayscale value ΔR is used to reduce the R channel of the first grayscale value; or, the candidate offset grayscale value is the offset grayscale value ΔG, and the offset grayscale value ΔG is used to increase the G channel of the first grayscale value.

[0033] Exemplarily, based on the compensated color coordinates and compensated brightness corresponding to each second grayscale value, a second grayscale value is selected from all second grayscale values ​​as the compensated grayscale value corresponding to the target grayscale value, which may include but is not limited to: determining the color difference parameter value corresponding to the second grayscale value based on the difference between the compensated color coordinates corresponding to the second grayscale value and the configured color coordinate target value, and the difference between the compensated brightness corresponding to the second grayscale value and the brightness target value; based on the color difference parameter value corresponding to each second grayscale value, taking the second grayscale value corresponding to the smallest color difference parameter value as the compensated grayscale value corresponding to the target grayscale value.

[0034] Exemplarily, the brightness target value is a configured brightness target value; or, the brightness target value is determined based on the maximum grayscale value, the configured coefficient value, the target grayscale value and the minimum brightness value; wherein the minimum brightness value is the minimum value of the compensated brightness corresponding to the second grayscale values ​​of all acquisition points.

[0035] For example, the brightness target value can be determined using the following formula: ;in, represents the brightness target value, Indicates the minimum brightness value, Indicates the maximum grayscale value, represents the target grayscale value, Indicates the coefficient value.

[0036] It can be seen from the above technical solutions that in the embodiment of the present application, for each acquisition point of the display screen, the unit grayscale color coordinate change and the unit grayscale brightness change can be determined, and the compensation grayscale value corresponding to the target grayscale value can be determined based on the unit grayscale color coordinate change and the unit grayscale brightness change. In this way, the target grayscale value can be compensated by the compensation grayscale value to solve the problem of uneven chromaticity changes at multiple points inside the display screen, and the target grayscale value of the acquisition point can be made to reach the optimal value by reducing or increasing the grayscale value. Moreover, when determining the unit grayscale color coordinate change and the unit grayscale brightness change, the sample color coordinates and sample brightness of multiple sample blocks are collected at one time, and multiple unit grayscale color coordinate changes and unit grayscale brightness changes are determined based on the sample color coordinates and sample brightness of these sample blocks, which can reduce data acquisition time, improve production and on-site correction efficiency, and use real screen data to improve data accuracy.

[0037] The above technical solutions of the embodiments of the present application are described below in combination with specific application scenarios.

[0038] When displaying images and colors on a monitor screen, there is a problem of uneven chromaticity at multiple points within the monitor screen. When the chromaticity unevenness within the monitor screen fluctuates by one percent, the visual effect of the human eye will be inconsistent in color, such as if the color coordinate x is too large, it will be reddish, and if the color coordinate y is too large, it will be cyan or greenish. For example, see Figure 2 , which is a schematic diagram of color coordinate x and color coordinate y. The left side is the corresponding relationship between color coordinate x and color, and the right side is the corresponding relationship between color coordinate y and color.

[0039] In view of the above findings, a grayscale value compensation method is proposed in an embodiment of the present application. The target grayscale value can be compensated by compensating the grayscale value to solve the problem of uneven color changes at multiple points inside the display screen. The target grayscale value of the acquisition point can be made to reach the optimal value by reducing or increasing the grayscale value.

[0040] See also Figure 3 As shown, it is a schematic diagram of the system structure of an embodiment of the present application, which may include a display screen (i.e., a display screen), an optical device, and an electronic device. The optical device may be a camera, etc., for collecting an image of the display screen, and determining the color coordinates and brightness of the display screen based on the image. The electronic device may be a server, etc., for implementing a grayscale value compensation method based on the color coordinates and brightness of the display screen.

[0041] See also Figure 4 FIG. 1 is a flow chart of a grayscale value compensation method, which may include:

[0042] Step 401: for each acquisition point on the display screen, obtain sample color coordinates and sample brightness of multiple sample blocks centered on the acquisition point, and the grayscale values ​​of the multiple sample blocks change at intervals n.

[0043] Exemplarily, multiple acquisition points may be set on the display screen, such as M*N acquisition points, where M represents the number of acquisition points in the horizontal direction of the display screen, which may be a positive integer greater than 1, and N represents the number of acquisition points in the vertical direction of the display screen, which may be a positive integer greater than 1. Also, the position information point (px, py) of each acquisition point may be recorded, where px represents the horizontal pixel position of the acquisition point, and py represents the vertical pixel position of the acquisition point. For each acquisition point, the sample color coordinates and sample brightness of multiple sample blocks centered on the acquisition point may be obtained, which is described below.

[0044] First, divide the sample blocks into multiple blocks with the collection point as the center. For example, see Figure 5A As shown in the figure, four sample blocks are divided with the collection point as the center. Figure 5BAs shown, 12 sample blocks are divided with the acquisition point as the center. Of course, more sample blocks (such as 16 sample blocks, etc.) or fewer sample blocks can also be divided, and there is no limitation on this. For the convenience of description, the following takes the division of 4 sample blocks as an example.

[0045] For each sample block, the position information of the sample block block (bx, by, blength, bwidth) can be recorded, where bx represents the horizontal pixel position of the upper left corner (or upper right corner, or lower left corner, or lower right corner) of the sample block, by represents the vertical pixel position of the upper left corner of the sample block, blength represents the horizontal pixel length of the sample block, and bwidth represents the vertical pixel length of the sample block.

[0046] Then, a grayscale value is set for each sample block. Different sample blocks have different grayscale values. The same sample block has the same grayscale value. The grayscale values ​​of multiple sample blocks vary at intervals of n. n can be a positive integer, such as 1, 2, 3, 4, 5, etc. n can also be a decimal. There is no restriction on the interval n. For example, taking the value of n as 5 as an example, the grayscale value of the upper left corner sample block is 255, the grayscale value of the upper right corner sample block is 250, the grayscale value of the lower left corner sample block is 245, and the grayscale value of the lower right corner sample block is 240.

[0047] Then, an image for the display screen is captured by an optical device, the sample color coordinates and sample brightness of each sample block are analyzed by the image, and the sample color coordinates and sample brightness of each sample block are sent to the electronic device. Alternatively, an image for the display screen is captured by an optical device, the image is sent to the electronic device, and the electronic device analyzes the sample color coordinates and sample brightness of each sample block by the image.

[0048] The sample color coordinates may include sample color coordinates x and sample color coordinates y. The sample color coordinates are used to describe the spatial position of the color. In the color space, each color has a specific coordinate value. These coordinate values ​​can help accurately represent and mix colors, which can be represented as sample color coordinates x and sample color coordinates y. Sample color coordinates x and sample color coordinates y are an integral part of color management, providing a standardized representation of color, making it possible to exchange color information between different devices and software.

[0049] The grayscale value of the upper left corner sample block is 255, and the sample color coordinates and sample brightness of the upper left corner sample block are obtained. The grayscale value of the upper right corner sample block is 250, and the sample color coordinates and sample brightness of the upper right corner sample block are obtained. The grayscale value of the lower left corner sample block is 245, and the sample color coordinates and sample brightness of the lower left corner sample block are obtained. The grayscale value of the lower right corner sample block is 240, and the sample color coordinates and sample brightness of the lower right corner sample block are obtained.

[0050] Step 402: for two sample blocks with a grayscale value interval of n, determine the unit grayscale color coordinate change corresponding to the grayscale value interval based on the sample color coordinates of the two sample blocks and the interval n; wherein the grayscale value interval can be the interval of the grayscale values ​​of the two sample blocks, that is, from the minimum grayscale value to the maximum grayscale value.

[0051] For example, the following formula (1) can be used to determine the unit grayscale color coordinate change corresponding to the grayscale value interval. Of course, formula (1) is only an example, and the absolute value can be removed, etc., and there is no limitation on this.

[0052] Formula (1)

[0053] In formula (1), Indicates the unit grayscale color coordinate change corresponding to the grayscale value interval, and Represents the sample color coordinates of these two sample blocks. For example, for the upper left corner sample block and the upper right corner sample block, Indicates the grayscale value interval (250-255] corresponding to the unit grayscale color coordinate change, Indicates the sample color coordinates of the upper left corner sample block, Indicates the sample color coordinates of the upper right corner sample block, and n represents the interval 5. For the upper right corner sample block and the lower left corner sample block, Indicates the unit grayscale color coordinate change corresponding to the grayscale value interval (245-250], Indicates the sample color coordinates of the upper right corner sample block, Indicates the sample color coordinates of the lower left corner sample block, and n represents the interval 5. For the lower left corner sample block and the lower right corner sample block, Indicates the unit grayscale color coordinate change corresponding to the grayscale value interval (240-245], Represents the sample color coordinates of the lower left corner sample block, Represents the sample color coordinates of the lower right corner sample block, and n represents the interval 5.

[0054] In summary, it can be seen that by collecting data once, the unit grayscale color coordinate changes corresponding to multiple grayscale value intervals can be obtained, which can reduce data collection time and improve production and on-site correction efficiency.

[0055] Exemplarily, the sample color coordinates include the sample color coordinates x and the sample color coordinates y, and the unit grayscale color coordinate change includes the unit grayscale color coordinate x change and the unit grayscale color coordinate y change. Substituting the sample color coordinate x into formula (1) obtains the unit grayscale color coordinate x change corresponding to the grayscale value interval, and substituting the sample color coordinate y into formula (1) obtains the unit grayscale color coordinate y change corresponding to the grayscale value interval.

[0056] Step 403: for two sample blocks with a grayscale value interval of n, determine the unit grayscale brightness change corresponding to the grayscale value interval based on the sample brightness of the two sample blocks and the interval n; wherein the grayscale value interval can be the interval of the grayscale values ​​of the two sample blocks, that is, from the minimum grayscale value to the maximum grayscale value.

[0057] For example, the following formula (2) may be used to determine the unit grayscale brightness change corresponding to the grayscale value interval. Of course, formula (2) is only an example, and the absolute value may be removed, etc., and there is no limitation on this.

[0058] Formula (2)

[0059] Indicates the unit grayscale brightness change corresponding to the grayscale value interval, and Indicates the sample brightness of these two sample blocks. For example, for the upper left corner sample block and the upper right corner sample block, Indicates the unit grayscale brightness change corresponding to the grayscale value interval (250-255], Indicates the sample brightness of the upper left corner sample block, Indicates the sample brightness of the upper right corner sample block, and n indicates the interval 5. For the upper right corner sample block and the lower left corner sample block, Indicates the unit grayscale brightness change corresponding to the grayscale value interval (245-250], Indicates the sample brightness of the upper right corner sample block, Represents the sample brightness of the lower left corner sample block, n represents the interval of 5, and so on.

[0060] In summary, it can be seen that by collecting data once, the unit grayscale brightness change in multiple grayscale value intervals can be obtained, which can reduce data collection time and improve production and on-site correction efficiency.

[0061] After the above processing is completed, the grayscale value is reset for each sample block, such as the grayscale value of the upper left corner sample block is 240, the grayscale value of the upper right corner sample block is 235, the grayscale value of the lower left corner sample block is 230, and the grayscale value of the lower right corner sample block is 225. On this basis, the unit grayscale color coordinate change and unit grayscale brightness change corresponding to multiple grayscale value intervals can be obtained. And so on, repeat the above process until the unit grayscale color coordinate change and unit grayscale brightness change corresponding to all grayscale value intervals are obtained.

[0062] Exemplarily, the color of the display screen has three channels, such as RGB and other three channels, see Figure 5C As shown, it is a schematic diagram of three channels such as RGB. Figure 5CThe point represents a sample block, that is, the grayscale value of the R channel, the grayscale value of the G channel, and the grayscale value of the B channel can be set for the sample block.

[0063] On this basis, the grayscale value of the R channel can be set for each sample block (such as the grayscale value of the upper left corner sample block is 255 of the R channel, and so on), so that the unit grayscale color coordinate change and unit grayscale brightness change corresponding to the grayscale value interval of the R channel can be obtained. Then, the grayscale value of the G channel can be set for each sample block (such as the grayscale value of the upper left corner sample block is 255 of the G channel, and so on), so that the unit grayscale color coordinate change and unit grayscale brightness change corresponding to the grayscale value interval of the G channel can be obtained. Then, the grayscale value of the B channel can be set for each sample block (such as the grayscale value of the upper left corner sample block is 255 of the B channel, and so on), so that the unit grayscale color coordinate change and unit grayscale brightness change corresponding to the grayscale value interval of the B channel can be obtained.

[0064] In summary, it can be seen that a multi-image composed of multiple sample blocks can be set to the display screen, and the optical data of each sample block can be obtained by collecting color data with an optical device, and the unit grayscale color coordinate x change can be obtained based on the optical data. , unit grayscale color coordinate y change And the unit grayscale brightness change C represents red, green and blue monochrome, red represents R channel, green represents G channel and blue represents B channel. i represents 0~254, which represents the change from i+1 grayscale to i grayscale, i.e. the grayscale value interval. This step can also be designed as non-continuous acquisition, and the change between points can be at intervals of n grayscales, where n is greater than 1.

[0065] For example, a mixed color can be set for the sample block, that is, the four sample blocks can be set to (255, R, G), (250, R, G), (245, R, G), (240, R, G). In this case, the unit grayscale color coordinate x change of the blue in the mixed color can be obtained: , unit grayscale color coordinate y change And the unit grayscale brightness change The same is true for red and green. From the above process, it can be seen that in determining the change in the unit grayscale color coordinate x of blue , unit grayscale color coordinate y change And the unit grayscale brightness change When , the blue grayscale value is interval of n grayscales, and R and G can be set arbitrarily.

[0066] Step 404, set the grayscale value of the display screen to a first grayscale value, the initial value of the first grayscale value can be a target grayscale value (the target grayscale value represents the grayscale value to be corrected, that is, a certain grayscale value is used as the target grayscale value when correction is required), and obtain the real color coordinates and real brightness of the acquisition point of the display screen.

[0067] Exemplarily, the grayscale value compensation method may involve data collection and grayscale value compensation, and steps 401 to 403 are a data collection process. After the data collection process is completed, a grayscale value compensation process may be performed. In the grayscale value compensation process, the grayscale value of the display screen is first set to a first grayscale value, the initial value of the first grayscale value is a target grayscale value, and the first grayscale value is adjusted in a subsequent process.

[0068] For example, referring to step 401 to step 403, if the interval n is 5, the unit grayscale color coordinate change amount and the unit grayscale brightness change amount corresponding to multiple grayscale value intervals are obtained, such as grayscale value interval (250-255], grayscale value interval (245-250], grayscale value interval (240-245], etc., and so on. When grayscale value compensation is performed on the target grayscale value 255, the initial value of the first grayscale value can be the target grayscale value 255, and the grayscale value interval (250-255] to which the target grayscale value 255 belongs is found. Based on the grayscale value interval (250-255] The corresponding unit grayscale color coordinate change and unit grayscale brightness change are used to determine the compensation grayscale value corresponding to the target grayscale value 255. When grayscale value compensation is performed on the target grayscale value 250, the initial value of the first grayscale value can be the target grayscale value 250, and the grayscale value interval (245-250] to which the target grayscale value 250 belongs is found. Based on the unit grayscale color coordinate change and unit grayscale brightness change corresponding to the grayscale value interval (245-250], the compensation grayscale value corresponding to the target grayscale value 250 is determined, and so on.

[0069] Referring to step 401, a plurality of acquisition points have been set on the display screen, such as M*N acquisition points are set on the display screen, and the position information point (px, py) of each acquisition point is recorded. On this basis, an image of the display screen can be acquired by an optical device, and the color coordinates and brightness of each acquisition point can be analyzed by the image. In order to distinguish them from the sample color coordinates and sample brightness, they can be called the real color coordinates and real brightness of the acquisition point. The real color coordinates can include the real color coordinates x and the real color coordinates y.

[0070] For example, taking a collection point A as an example, assuming that the coordinates of the collection point A are (px, py), the true color coordinate x of the collection point A is recorded as xa, the true color coordinate y is recorded as ya, and the true brightness is recorded as lva.

[0071] Step 405: Calculate the deviation between the actual color coordinates of the acquisition point and the configured color coordinate target value.

[0072] Exemplarily, the color coordinate target value may be pre-configured, and the color coordinate target value is configured based on experience, and there is no restriction on this. For example, the color coordinate x target value may be pre-configured as xt, and the color coordinate y target value may be pre-configured as yt, and there is no restriction on the values ​​of the color coordinate x target value xt and the color coordinate y target value yt.

[0073] Exemplarily, the real color coordinates may include the real color coordinates x and the real color coordinates y, and the deviation value may include the deviation value ox corresponding to the real color coordinates x and the deviation value oy corresponding to the real color coordinates y. For example, the deviation value ox may be ox = xa - xt, and the deviation value oy may be oy = ya - yt.

[0074] Step 406 : determining the offset grayscale value corresponding to the real color coordinate based on the unit grayscale color coordinate variation corresponding to the target grayscale value and the deviation value (the deviation value between the real color coordinate and the color coordinate target value).

[0075] Exemplarily, the unit grayscale color coordinate variation corresponding to the target grayscale value may be the unit grayscale color coordinate variation corresponding to the grayscale value interval to which the target grayscale value belongs.

[0076] Exemplarily, the color of the display screen has three channels, such as RGB. Therefore, when setting the grayscale value of the display screen to the first grayscale value, the first grayscale value of the R channel can be set, the first grayscale value of the G channel can be set, and the first grayscale value of the B channel can be set.

[0077] On this basis, if the first grayscale value is the grayscale value of the R channel, then based on the unit grayscale color coordinate change corresponding to the target grayscale value of the R channel and the deviation value, the offset grayscale value of the R channel corresponding to the real color coordinate is determined. For example, the offset grayscale value ΔR of the R channel can be |ox / Δx|. Among them, ox represents the deviation value ox, Δx represents the unit grayscale color coordinate change Δx, and Δx is the unit grayscale color coordinate x change corresponding to the grayscale value interval to which the target grayscale value of the R channel (such as 255, etc.) belongs. Referring to steps 401-403, the unit grayscale color coordinate x change and the unit grayscale color coordinate y change corresponding to the grayscale value interval (such as the R channel, the G channel, and the B channel) can be obtained. Therefore, the grayscale value interval to which the target grayscale value belongs can be determined first, and then the unit grayscale color coordinate change Δx corresponding to the grayscale value interval can be determined.

[0078] If the first grayscale value is the grayscale value of the G channel, then based on the unit grayscale color coordinate change corresponding to the target grayscale value of the G channel and the deviation value, the offset grayscale value of the G channel corresponding to the real color coordinate is determined. For example, the offset grayscale value ΔG of the G channel may be |oy / Δy|. Wherein, oy represents the deviation value oy, Δy represents the unit grayscale color coordinate change Δy, and Δy is the unit grayscale color coordinate y change corresponding to the grayscale value interval to which the target grayscale value of the G channel belongs, recorded as the unit grayscale color coordinate change Δy.

[0079] If the first grayscale value is the grayscale value of the B channel, then the offset grayscale value of the B channel corresponding to the real color coordinate is determined based on the unit grayscale color coordinate change corresponding to the target grayscale value of the B channel and the deviation value. For example, the offset grayscale value ΔB of the B channel can be the smaller value of ΔB1 and ΔB2, ΔB1 ​​is |ox / Δx|, and ΔB2 is |oy / Δy|. Δx is the unit grayscale color coordinate x change corresponding to the grayscale value interval to which the target grayscale value of the B channel (such as 255, etc.) belongs, and Δy is the unit grayscale color coordinate y change corresponding to the grayscale value interval to which the target grayscale value of the B channel (such as 255, etc.) belongs.

[0080] In summary, the offset grayscale value corresponding to the real color coordinate can be obtained, and the offset grayscale value includes the offset grayscale value of the R channel, the offset grayscale value of the G channel, and the offset grayscale value of the B channel.

[0081] Step 407 : Compensate the first grayscale value based on the offset grayscale value corresponding to the real color coordinate to obtain a second grayscale value, that is, the compensated first grayscale value may be referred to as the second grayscale value.

[0082] Exemplarily, the deviation value may include a deviation value ox corresponding to the real color coordinate x and a deviation value oy corresponding to the real color coordinate y. The offset grayscale value corresponding to the real color coordinate may include an offset grayscale value of the R channel, an offset grayscale value of the G channel, and an offset grayscale value of the B channel. On this basis, based on the relationship between the deviation value ox and 0, and the relationship between the deviation value oy and 0, a compensation strategy may be determined. Based on the compensation strategy, a candidate offset grayscale value may be selected from the offset grayscale value ΔR of the R channel, the offset grayscale value ΔG of the G channel, and the offset grayscale value ΔB of the B channel; the candidate offset grayscale value is used to compensate the first grayscale value to obtain a second grayscale value. For example, if the candidate offset grayscale value is the offset grayscale value ΔR of the R channel, the first grayscale value of the R channel is compensated to obtain the second grayscale value; if the candidate offset grayscale value is the offset grayscale value ΔG of the G channel, the first grayscale value of the G channel is compensated to obtain the second grayscale value; if the candidate offset grayscale value is the offset grayscale value ΔB of the B channel, the first grayscale value of the B channel is compensated to obtain the second grayscale value.

[0083] In one possible implementation, see Figure 6 As shown in Figure 1, it is a schematic diagram for determining the compensation strategy. Figure 6 Shown in FIG. 1 is the relationship between the deviation value ox and 0, and the relationship between the deviation value oy and 0.

[0084] If the deviation value ox is greater than 0 and the deviation value oy is greater than 0, the compensation strategy is the first compensation strategy, i.e., compensation strategy 1, which can increase the B channel, or reduce the R channel or the G channel. Based on this, the candidate offset grayscale value is the offset grayscale value ΔB, and the offset grayscale value ΔB is used to increase the B channel of the first grayscale value. Alternatively, the candidate offset grayscale values ​​are the offset grayscale value ΔR and the offset grayscale value ΔG, and the offset grayscale value ΔR is used to reduce the R channel of the first grayscale value, and the offset grayscale value ΔG is used to reduce the G channel of the first grayscale value.

[0085] If the deviation value ox is greater than 0 and the deviation value oy is less than 0, the compensation strategy is the second compensation strategy, that is, compensation strategy 2, which can increase the G channel and reduce the R channel, or reduce the B channel and reduce the R channel. Based on this, the candidate offset grayscale values ​​are the offset grayscale value ΔG and the offset grayscale value ΔR, the offset grayscale value ΔG is used to increase the G channel of the first grayscale value, and the offset grayscale value ΔR is used to reduce the R channel of the first grayscale value. Alternatively, the candidate offset grayscale values ​​are the offset grayscale value ΔB and the offset grayscale value ΔR, the offset grayscale value ΔB is used to reduce the B channel of the first grayscale value, and the offset grayscale value ΔR is used to reduce the R channel of the first grayscale value.

[0086] If the deviation value ox is greater than 0 and the deviation value oy is equal to 0, the compensation strategy is the third compensation strategy, namely compensation strategy 3, in which the R channel can be reduced. Based on this, the candidate offset grayscale value is the offset grayscale value ΔR, which is used to reduce the R channel of the first grayscale value.

[0087] If the deviation value ox is less than 0 and the deviation value oy is greater than 0, the compensation strategy is the fourth compensation strategy, that is, compensation strategy 4, which can reduce the B channel, reduce the G channel, or increase the R channel and reduce the G channel. Based on this, the candidate offset grayscale value is the offset grayscale value ΔB and the offset grayscale value ΔG, the offset grayscale value ΔB is used to reduce the B channel of the first grayscale value, and the offset grayscale value ΔG is used to reduce the G channel of the first grayscale value. Alternatively, the candidate offset grayscale value is the offset grayscale value ΔR and the offset grayscale value ΔG, the offset grayscale value ΔR is used to increase the R channel of the first grayscale value, and the offset grayscale value ΔG is used to reduce the G channel of the first grayscale value.

[0088] If the deviation value ox is less than 0 and the deviation value oy is less than 0, the compensation strategy is the fifth compensation strategy, i.e., compensation strategy 5, which can reduce the B channel, or increase the R channel or the G channel. Based on this, the candidate offset grayscale value is the offset grayscale value ΔB, and the offset grayscale value ΔB is used to reduce the B channel of the first grayscale value. Alternatively, the candidate offset grayscale value is the offset grayscale value ΔG and the offset grayscale value ΔR, and the offset grayscale value ΔG is used to increase the G channel of the first grayscale value, and the offset grayscale value ΔR is used to increase the R channel of the first grayscale value.

[0089] If the deviation value ox is less than 0 and the deviation value oy is equal to 0, the compensation strategy is the sixth compensation strategy, i.e., compensation strategy 6, which can reduce the B channel, reduce the G channel, or increase the R channel. Based on this, the candidate offset grayscale value is the offset grayscale value ΔB and the offset grayscale value ΔG, the offset grayscale value ΔB is used to reduce the B channel of the first grayscale value, and the offset grayscale value ΔG is used to reduce the G channel of the first grayscale value. Alternatively, the candidate offset grayscale value is the offset grayscale value ΔR, and the offset grayscale value ΔR is used to increase the R channel of the first grayscale value.

[0090] If the deviation value ox is equal to 0 and the deviation value oy is greater than 0, the compensation strategy is the seventh compensation strategy, namely compensation strategy 7, in which the G channel can be reduced. Based on this, the candidate offset grayscale value is the offset grayscale value ΔG, which is used to reduce the G channel of the first grayscale value.

[0091] If the deviation value ox is equal to 0 and the deviation value oy is less than 0, the compensation strategy is the eighth compensation strategy, that is, compensation strategy 8, which can reduce the B channel, reduce the R channel, or increase the G channel. Based on this, the candidate offset grayscale value is the offset grayscale value ΔB and the offset grayscale value ΔR, the offset grayscale value ΔB is used to reduce the B channel of the first grayscale value, and the offset grayscale value ΔR is used to reduce the R channel of the first grayscale value. Alternatively, the candidate offset grayscale value is the offset grayscale value ΔG, and the offset grayscale value ΔG is used to increase the G channel of the first grayscale value.

[0092] If the deviation value ox is equal to 0 and the deviation value oy is equal to 0, the compensation strategy is the ninth compensation strategy, ie, compensation strategy 9. In compensation strategy 9, the first grayscale value may be kept unchanged.

[0093] Exemplarily, in order to realize high-precision operation of the algorithm, when increasing or decreasing the grayscale of RGB, the following strategy can be adopted: only a single grayscale is operated each time. For example, if the B channel of the first grayscale value needs to be reduced, the R channel of the first grayscale value needs to be reduced. Then, in one compensation process, only the B channel of the first grayscale value can be reduced to obtain the second grayscale value, and then steps 408 and 409 are performed. When returning to perform the next compensation process, the R channel of the first grayscale value is reduced, so that only a single grayscale is operated each time.

[0094] When increasing or decreasing the grayscale of RGB, if the increased or decreased grayscale is greater than or equal to 2, the decreased or increased grayscale may be (ΔR, ΔG, ΔB)>>1. For example, when increasing or decreasing the B channel of the first grayscale value based on the offset grayscale value ΔB, if the offset grayscale value ΔB is greater than or equal to 2, ΔB>>1 is used to increase or decrease the B channel of the first grayscale value. When increasing or decreasing the G channel of the first grayscale value based on the offset grayscale value ΔG, if the offset grayscale value ΔG is greater than or equal to 2, ΔG>>1 is used to increase or decrease the G channel of the first grayscale value. When increasing or decreasing the R channel of the first grayscale value based on the offset grayscale value ΔR, if the offset grayscale value ΔR is greater than or equal to 2, ΔR>>1 is used to increase or decrease the R channel of the first grayscale value.

[0095] Step 408, after obtaining the second grayscale value, determine the compensated color coordinates corresponding to the second grayscale value based on the unit grayscale color coordinate change corresponding to the target grayscale value (i.e., the unit grayscale color coordinate change corresponding to the grayscale value interval to which the target grayscale value belongs) and the true color coordinates, and determine the compensated brightness corresponding to the second grayscale value based on the unit grayscale brightness change corresponding to the target grayscale value and the true brightness.

[0096] Exemplarily, after obtaining the second grayscale value, the difference between the second grayscale value and the first grayscale value may be calculated, and the difference between the second grayscale value and the first grayscale value may be referred to as a grayscale value difference.

[0097] The unit grayscale color coordinate change represents the color coordinate change corresponding to the unit grayscale. Based on the grayscale value difference and the unit grayscale color coordinate change, the color coordinate change corresponding to the grayscale value difference can be determined. For example, the product value of the grayscale value difference and the unit grayscale color coordinate change can be used as the color coordinate change corresponding to the grayscale value difference. Then, the compensated color coordinate corresponding to the second grayscale value can be determined based on the real color coordinate and the color coordinate change corresponding to the grayscale value difference. For example, the sum of the real color coordinate and the color coordinate change corresponding to the grayscale value difference is used as the compensated color coordinate.

[0098] When the second grayscale value is greater than the first grayscale value, the grayscale value difference is a positive value, and the color coordinate change corresponding to the grayscale value difference is a positive value. Therefore, the compensated color coordinates may be greater than the real color coordinates.

[0099] When the second grayscale value is less than the first grayscale value, the grayscale value difference is a negative value, and the color coordinate change corresponding to the grayscale value difference is a negative value. Therefore, the compensated color coordinate may be smaller than the real color coordinate.

[0100] The unit grayscale brightness variation represents the brightness variation corresponding to the unit grayscale. Based on the grayscale value difference and the unit grayscale brightness variation, the brightness variation corresponding to the grayscale value difference can be determined. For example, the product value of the grayscale value difference and the unit grayscale brightness variation can be used as the brightness variation corresponding to the grayscale value difference. Then, the compensated brightness corresponding to the second grayscale value can be determined based on the real brightness and the brightness variation corresponding to the grayscale value difference. For example, the sum of the real brightness and the brightness variation corresponding to the grayscale value difference is used as the compensated brightness. When the second grayscale value is greater than the first grayscale value, the grayscale value difference is a positive value, and the brightness variation corresponding to the grayscale value difference is a positive value, so the compensated brightness can be greater than the real brightness. When the second grayscale value is less than the first grayscale value, the grayscale value difference is a negative value, and the brightness variation corresponding to the grayscale value difference is a negative value, so the compensated brightness can be less than the real brightness.

[0101] In summary, after obtaining the second grayscale value, the compensated color coordinates (such as the compensated color coordinates x and the compensated color coordinates y) and the compensated brightness corresponding to the second grayscale value can be obtained and recorded.

[0102] Step 409: Determine whether the compensation end condition is met.

[0103] Exemplarily, if the number of compensations for the first grayscale value (each compensation obtains a second grayscale value) reaches the number threshold, it is determined that the compensation end condition is met; if the number of compensations for the first grayscale value does not reach the number threshold, it is determined that the compensation end condition is not met. Alternatively, after the current compensation process ends, if the difference between the compensated color coordinates corresponding to the second grayscale value and the configured color coordinate target value is less than the first threshold, and the difference between the compensated brightness corresponding to the second grayscale value and the configured brightness target value is less than the second threshold, it is determined that the compensation end condition is met; if the difference between the compensated color coordinates and the color coordinate target value is not less than the first threshold, and / or the difference between the compensated brightness and the brightness target value is not less than the second threshold, it is determined that the compensation end condition is not met. Of course, the above are just two examples of compensation end conditions, and there is no limitation to this.

[0104] If the compensation end condition is not met, the second grayscale value (i.e., the second grayscale value obtained in the current compensation process) can be used as the first grayscale value, and the above steps 404-408 are repeated to obtain a new second grayscale value, record the compensated color coordinates and compensated brightness corresponding to the second grayscale value, and then execute step 409.

[0105] If the compensation end condition is met, step 410 may be executed.

[0106] Step 410 : Based on the compensated color coordinates and compensated brightness corresponding to each second grayscale value, select a second grayscale value from all the second grayscale values ​​as the compensated grayscale value corresponding to the target grayscale value.

[0107] For example, if the initial value of the first grayscale value is the target grayscale value 255, multiple second grayscale values ​​can be obtained through steps 404 to 409, and one second grayscale value can be selected from all the second grayscale values ​​as the compensation grayscale value corresponding to the target grayscale value 255. If the initial value of the first grayscale value is the target grayscale value 250, multiple second grayscale values ​​can be obtained through steps 404 to 409, and one second grayscale value can be selected from all the second grayscale values ​​as the compensation grayscale value corresponding to the target grayscale value 250, and so on.

[0108] Exemplarily, for each second grayscale value, the color difference parameter value corresponding to the second grayscale value can be determined based on the difference between the compensated color coordinates corresponding to the second grayscale value and the color coordinate target value, and the difference between the compensated brightness corresponding to the second grayscale value and the brightness target value.

[0109] For example, the color difference parameter value may be a distance value, and the color difference parameter value may be determined using the following formula: , Indicates i The color difference parameter value corresponding to the second grayscale value, Indicates i The compensated color coordinates corresponding to the second grayscale value, Indicates the color coordinate target value. Indicates i The compensated brightness corresponding to the second grayscale value is Indicates the brightness target value.

[0110] For another example, the difference between the compensated color coordinate corresponding to the second grayscale value and the color coordinate target value ( ) and the difference between the compensated brightness corresponding to the second grayscale value and the brightness target value ( ), as the input data of ΔE2000 algorithm (or other algorithms), to obtain the output data of ΔE2000 algorithm, and the output data of ΔE2000 algorithm is used as the i The color difference parameter value corresponding to the second grayscale value.

[0111] Of course, the above is only an example of determining the color difference parameter value, as long as the color difference parameter value is related to the difference between the compensated color coordinate and the color coordinate target value, and the difference between the compensated brightness and the brightness target value.

[0112] Exemplarily, after obtaining the color difference parameter value corresponding to each second grayscale value, based on the color difference parameter value corresponding to each second grayscale value, the second grayscale value corresponding to the minimum color difference parameter value (i.e., the optimal color difference parameter value) can be used as the compensation grayscale value corresponding to the target grayscale value.

[0113] In the above process, it is necessary to calculate the difference between the compensated color coordinates and the color coordinate target value. The color coordinate target value can be configured based on experience, such as pre-configuring the color coordinate x target value to be xt, pre-configuring the color coordinate y target value to be yt, and there is no restriction on the values ​​of the color coordinate x target value to be xt and the color coordinate y target value to be yt.

[0114] In the above process, it is necessary to calculate the difference between the compensated brightness and the brightness target value. The brightness target value can be a configured brightness target value, that is, the brightness target value lvt is configured based on experience. Alternatively, the brightness target value can be determined based on the maximum grayscale value, the configured coefficient value, the target grayscale value, and the minimum brightness value. For example, when determining the compensated grayscale value corresponding to the maximum grayscale value (such as the target grayscale value is 255), the configured brightness target value is obtained. When determining a non-maximum grayscale value (such as a target grayscale value of 250, 245, etc.), the brightness target value is determined based on the maximum grayscale value, the configured coefficient value, the target grayscale value, and the minimum brightness value.

[0115] For example, the brightness target value can be determined using the following formula (3):

[0116] Formula (3)

[0117] In formula (3), represents the brightness target value, Indicates the maximum grayscale value, such as 255, etc. represents the target grayscale value, that is, when determining the compensation grayscale value corresponding to the target grayscale value 250, is 250. When determining the compensation grayscale value corresponding to the target grayscale value 245, is 245, and so on.

[0118] Indicates the coefficient value, which can be configured based on experience, that is, the gamma value preset by the user.

[0119] Represents the minimum brightness value, and the minimum brightness value is the minimum value of the compensated brightness corresponding to the second grayscale value of all acquisition points. For example, when determining the compensated grayscale value corresponding to the maximum grayscale value, the initial value of the first grayscale value is set to the maximum grayscale value (such as the target grayscale value 255), and multiple second grayscale values ​​can be obtained, and the compensated brightness corresponding to each second grayscale value can be obtained. In other words, for each acquisition point, multiple compensated brightnesses corresponding to the acquisition point can be obtained. On this basis, based on the compensated brightness corresponding to all acquisition points, the minimum value of the compensated brightness can be used as the minimum brightness value .

[0120] In summary, for each target grayscale value, the compensated grayscale value corresponding to the target grayscale value can be obtained by adopting steps 404 to 410, that is, the compensated grayscale values ​​corresponding to all target grayscale values ​​can be obtained.

[0121] Obviously, for each target grayscale value of a collection point (such as any grayscale value between 0 and 255), the grayscale value interval to which the target grayscale value belongs can be determined, and then, based on the unit grayscale color coordinate change and the unit grayscale brightness change corresponding to the grayscale value interval, the compensation grayscale value corresponding to the target grayscale value is determined, so that the compensation grayscale values ​​corresponding to all grayscale values ​​can be obtained.

[0122] In summary, for each acquisition point, the compensation grayscale values ​​corresponding to all grayscale values ​​corresponding to the acquisition point can be obtained. For multiple acquisition points (such as M*N acquisition points), multi-threading can be used to determine the compensation grayscale values ​​corresponding to these acquisition points. Therefore, in theory, the time consumption is the time consumption of single point correction.

[0123] For non-collection points on the display screen, the compensated grayscale values ​​of the non-collection points can be determined based on the compensated grayscale values ​​of the adjacent collection points. For example, multiple adjacent collection points of the non-collection point can be determined first, and based on the compensated grayscale values ​​corresponding to the grayscale value 255 of these adjacent collection points, the compensated grayscale values ​​corresponding to the grayscale value 255 of the non-collection point can be determined, such as performing interpolation operations to obtain the compensated grayscale values ​​of the non-collection points. Based on the compensated grayscale values ​​corresponding to the grayscale value 254 of these adjacent collection points, the compensated grayscale values ​​corresponding to the grayscale value 254 of the non-collection point can be determined, and so on, the compensated grayscale values ​​of each grayscale value of the non-collection point can be obtained.

[0124] In summary, the compensated grayscale value of each grayscale value of each point (collection point or non-collection point) on the display screen can be obtained, so that the grayscale value can be compensated by the compensated grayscale value.

[0125] It can be seen from the above technical solutions that in the embodiment of the present application, the target grayscale value can be compensated by compensating the grayscale value to solve the problem of uneven chromaticity changes at multiple points inside the display screen, and the target grayscale value of the acquisition point can be made to reach the optimal value by reducing or increasing the grayscale value. When determining the unit grayscale color coordinate change and the unit grayscale brightness change, the sample color coordinates and sample brightness of multiple sample blocks are collected at one time, and the unit grayscale color coordinate change and the unit grayscale brightness change corresponding to multiple grayscale value intervals are determined based on the sample color coordinates and sample brightness of these sample blocks, which can reduce the data acquisition time, improve the production and on-site correction efficiency, improve the display effect, solve the problem of too long quantization time, and use the real screen data (sample color coordinates and sample brightness) at the same time to improve data accuracy. In data acquisition, multi-point multi-grayscale correction is adopted, and the relationship between the color brightness data in the grayscale correction and the target data is corrected, and different strategy models are adopted to adaptively select the optimal value. The process does not require repeated measurement and calculation, which reduces time. Compared with single grayscale and single point correction, multi-grayscale and multi-point correction have better effects and solve the problem of uneven chromaticity inside the screen.

[0126] Based on the same application concept as the above method, a grayscale value compensation device is proposed in the embodiment of the present application, see Figure 7 FIG. 1 is a schematic diagram of the structure of the grayscale value compensation device, and the device may include:

[0127] An acquisition module 71 is used to acquire, for each acquisition point on the display screen, sample color coordinates and sample brightness of a plurality of sample blocks centered at the acquisition point, wherein the grayscale values ​​of the plurality of sample blocks vary at intervals n;

[0128] A determination module 72 is used to determine, for two sample blocks with a grayscale value interval of n, a unit grayscale color coordinate change and a unit grayscale brightness change corresponding to the grayscale value interval based on the sample color coordinates of the two sample blocks, the sample brightness of the two sample blocks and the interval n;

[0129] Among them, the grayscale value interval is the interval of grayscale values ​​of the two sample blocks; the unit grayscale color coordinate change and unit grayscale brightness change corresponding to the grayscale value interval are used to determine the compensation grayscale value corresponding to the target grayscale value within the grayscale value interval.

[0130] Exemplarily, the determination module 72 determines the unit grayscale color coordinate change and the unit grayscale brightness change corresponding to the grayscale value interval based on the sample color coordinates of the two sample blocks, the sample brightness of the two sample blocks and the interval n, and is specifically used to:

[0131] The following formula is used to determine the grayscale color coordinate change per unit: ;

[0132] The following formula is used to determine the grayscale brightness change per unit: ;

[0133] in, represents the unit grayscale color coordinate change corresponding to the grayscale value interval, represents the unit grayscale brightness change corresponding to the grayscale value interval, and represents the sample color coordinates of the two sample blocks, and represents the sample brightness of the two sample blocks.

[0134] Exemplarily, the determination module 72 is further configured to determine a compensation grayscale value corresponding to the target grayscale value based on a unit grayscale color coordinate change and a unit grayscale brightness change corresponding to the grayscale value interval.

[0135] The determination module 72 determines the compensation grayscale value corresponding to the target grayscale value based on the unit grayscale color coordinate change and the unit grayscale brightness change corresponding to the grayscale value interval, and is specifically used to:

[0136] Setting the grayscale value of the display screen to a first grayscale value, wherein the initial value of the first grayscale value is a target grayscale value, and obtaining the real color coordinates and the real brightness of the acquisition point of the display screen;

[0137] The first grayscale value is compensated based on the offset grayscale value corresponding to the real color coordinate to obtain a second grayscale value; the compensated color coordinate corresponding to the second grayscale value is determined based on the unit grayscale color coordinate change corresponding to the grayscale value interval to which the target grayscale value belongs and the real color coordinate; and the compensated brightness corresponding to the second grayscale value is determined based on the unit grayscale brightness change corresponding to the grayscale value interval to which the target grayscale value belongs and the real brightness;

[0138] Determine whether the compensation end condition is met; if not, use the second grayscale value as the first grayscale value, and return to execute the operation of obtaining the real color coordinates and the real brightness of the acquisition point on the display screen;

[0139] If so, based on the compensated color coordinates and the compensated brightness corresponding to each second grayscale value, a second grayscale value is selected from all the second grayscale values ​​as the compensated grayscale value corresponding to the target grayscale value.

[0140] Exemplarily, the determination module 72 is further used to calculate the deviation value between the real color coordinate and the configured color coordinate target value before compensating the first grayscale value based on the offset grayscale value corresponding to the real color coordinate to obtain the second grayscale value; determine the offset grayscale value corresponding to the real color coordinate based on the unit grayscale color coordinate change and the deviation value; the real color coordinate includes the real color coordinate x and the real color coordinate y, the deviation value includes the deviation value ox corresponding to the real color coordinate x and the deviation value oy corresponding to the real color coordinate y, and the unit grayscale color coordinate includes the deviation value ox corresponding to the real color coordinate x and the deviation value oy corresponding to the real color coordinate y. The grayscale color coordinate change includes a unit grayscale color coordinate change Δx and a unit grayscale color coordinate change Δy; if the first grayscale value is the grayscale value of the R channel, the offset grayscale value ΔR of the R channel is |ox / Δx|; if the first grayscale value is the grayscale value of the G channel, the offset grayscale value ΔG of the G channel is |oy / Δy|; if the first grayscale value is the grayscale value of the B channel, the offset grayscale value ΔB of the B channel is the smaller value between ΔB1 and ΔB2; wherein ΔB1 is |ox / Δx|, and ΔB2 is |oy / Δy|.

[0141] Exemplarily, when the determination module 72 compensates the first grayscale value based on the offset grayscale value corresponding to the true color coordinate to obtain the second grayscale value, it is specifically used to: based on the relationship between the deviation value ox and 0, and the relationship between the deviation value oy and 0, select a candidate offset grayscale value from the offset grayscale value ΔR of the R channel, the offset grayscale value ΔG of the G channel, and the offset grayscale value ΔB of the B channel; and use the candidate offset grayscale value to compensate the first grayscale value to obtain the second grayscale value.

[0142] If the deviation value ox is greater than 0 and the deviation value oy is greater than 0, then the candidate offset grayscale value is the offset grayscale value ΔB, and the offset grayscale value ΔB is used to increase the B channel of the first grayscale value; or, the candidate offset grayscale value is the offset grayscale value ΔR and the offset grayscale value ΔG, and the offset grayscale value ΔR is used to reduce the R channel of the first grayscale value, and the offset grayscale value ΔG is used to reduce the G channel of the first grayscale value;

[0143] Alternatively, if the deviation value ox is greater than 0 and the deviation value oy is less than 0, the candidate offset grayscale values ​​are the offset grayscale value ΔG and the offset grayscale value ΔR, the offset grayscale value ΔG is used to increase the G channel of the first grayscale value, and the offset grayscale value ΔR is used to reduce the R channel of the first grayscale value; or, the candidate offset grayscale values ​​are the offset grayscale value ΔB and the offset grayscale value ΔR, the offset grayscale value ΔB is used to reduce the B channel of the first grayscale value, and the offset grayscale value ΔR is used to reduce the R channel of the first grayscale value;

[0144] Alternatively, if the deviation value ox is greater than 0 and the deviation value oy is equal to 0, the candidate offset grayscale value is the offset grayscale value ΔR, and the offset grayscale value ΔR is used to reduce the R channel of the first grayscale value;

[0145] Alternatively, if the deviation value ox is less than 0 and the deviation value oy is greater than 0, the candidate offset grayscale values ​​are the offset grayscale value ΔB and the offset grayscale value ΔG, the offset grayscale value ΔB is used to reduce the B channel of the first grayscale value, and the offset grayscale value ΔG is used to reduce the G channel of the first grayscale value; or, the candidate offset grayscale values ​​are the offset grayscale value ΔR and the offset grayscale value ΔG, the offset grayscale value ΔR is used to increase the R channel of the first grayscale value, and the offset grayscale value ΔG is used to reduce the G channel of the first grayscale value;

[0146] Alternatively, if the deviation value ox is less than 0 and the deviation value oy is less than 0, the candidate offset grayscale value is the offset grayscale value ΔB, and the offset grayscale value ΔB is used to reduce the B channel of the first grayscale value; or, the candidate offset grayscale value is the offset grayscale value ΔG and the offset grayscale value ΔR, and the offset grayscale value ΔG is used to increase the G channel of the first grayscale value, and the offset grayscale value ΔR is used to increase the R channel of the first grayscale value;

[0147] Alternatively, if the deviation value ox is less than 0 and the deviation value oy is equal to 0, the candidate offset grayscale value is the offset grayscale value ΔB and the offset grayscale value ΔG, the offset grayscale value ΔB is used to reduce the B channel of the first grayscale value, and the offset grayscale value ΔG is used to reduce the G channel of the first grayscale value; or, the candidate offset grayscale value is the offset grayscale value ΔR, and the offset grayscale value ΔR is used to increase the R channel of the first grayscale value;

[0148] Alternatively, if the deviation value ox is equal to 0 and the deviation value oy is greater than 0, the candidate offset grayscale value is the offset grayscale value ΔG, and the offset grayscale value ΔG is used to reduce the G channel of the first grayscale value;

[0149] Alternatively, if the deviation value ox is equal to 0 and the deviation value oy is less than 0, the candidate offset grayscale value is the offset grayscale value ΔB and the offset grayscale value ΔR, the offset grayscale value ΔB is used to reduce the B channel of the first grayscale value, and the offset grayscale value ΔR is used to reduce the R channel of the first grayscale value; or, the candidate offset grayscale value is the offset grayscale value ΔG, and the offset grayscale value ΔG is used to increase the G channel of the first grayscale value.

[0150] The determination module 72 selects a second grayscale value from all second grayscale values ​​as the compensated grayscale value corresponding to the target grayscale value based on the compensated color coordinates and compensated brightness corresponding to each second grayscale value, and is specifically used to: determine the color difference parameter value corresponding to the second grayscale value based on the difference between the compensated color coordinates corresponding to the second grayscale value and the configured color coordinate target value, and the difference between the compensated brightness corresponding to the second grayscale value and the brightness target value; and based on the color difference parameter value corresponding to each second grayscale value, take the second grayscale value corresponding to the smallest color difference parameter value as the compensated grayscale value corresponding to the target grayscale value.

[0151] Exemplarily, the brightness target value is a configured brightness target value; or, the brightness target value is determined based on the maximum grayscale value, the configured coefficient value, the target grayscale value and the minimum brightness value; wherein the minimum brightness value is the minimum value of the compensated brightness corresponding to the second grayscale values ​​of all acquisition points; wherein, for the correction of other target grayscale values, the method of combining the gamma characteristics can also be used. Regarding the method for determining the target brightness, the brightness target value is determined by the following formula: ; Determine the second compensation grayscale according to the chromaticity strategy, and determine the optimal compensation value according to the brightness and chromaticity of the second compensation grayscale.

[0152] in, represents the brightness target value, represents the minimum brightness value, represents the maximum grayscale value, represents the target grayscale value, represents the coefficient value.

[0153] Based on the same application concept as the above method, an electronic device is proposed in the embodiment of the present application, see Figure 8 As shown, the electronic device includes: a processor 81 and a machine-readable storage medium 82, wherein the machine-readable storage medium 82 stores machine-executable instructions that can be executed by the processor 81; the processor 81 is used to execute the machine-executable instructions to implement the grayscale value compensation method disclosed in the above example of this application.

[0154] Based on the same application concept as the above method, an embodiment of the present application also provides a machine-readable storage medium, on which a number of computer instructions are stored. When the computer instructions are executed by a processor, the grayscale value compensation method disclosed in the above example of the present application can be implemented.

[0155] The above-mentioned machine-readable storage medium may be any electronic, magnetic, optical or other physical storage device, which may contain or store information, such as executable instructions, data, etc. For example, the machine-readable storage medium may be: RAM (Radom Access Memory), volatile memory, non-volatile memory, flash memory, storage drive (such as hard disk drive), solid state drive, any type of storage disk (such as optical disk, DVD, etc.), or similar storage medium, or a combination thereof.

[0156] Based on the same application concept as the above method, an embodiment of the present application further provides a computer program product, wherein the computer program product includes a computer program, and when the computer program is executed by a processor, the grayscale value compensation method disclosed in the above example of the present application is implemented.

[0157] Those skilled in the art will appreciate that the embodiments of the present application may be provided as methods, systems, or computer program products. Therefore, the present application may adopt the form of a complete hardware embodiment, a complete software embodiment, or an embodiment combining software and hardware. Moreover, the embodiments of the present application may adopt the form of a computer program product implemented on one or more computer-usable storage media (including but not limited to disk storage, CD-ROM, optical storage, etc.) containing computer-usable program codes.

[0158] The above is only an embodiment of the present application and is not intended to limit the present application. For those skilled in the art, the present application may have various changes and variations. Any modification, equivalent replacement, improvement, etc. made within the spirit and principle of the present application should be included in the scope of the claims of the present application.

Claims

1. A grayscale value compensation method, It is characterized in that The method comprises: For each acquisition point on the display screen, sample color coordinates and sample brightness of multiple sample blocks centered at the acquisition point are obtained, and the grayscale values ​​of the multiple sample blocks change at an interval of n; for two sample blocks with a grayscale value interval of n, based on the sample color coordinates of the two sample blocks, the sample brightness of the two sample blocks and the interval n, a unit grayscale color coordinate change amount and a unit grayscale brightness change amount corresponding to the grayscale value interval are determined; wherein the grayscale value interval is the interval of the grayscale values ​​of the two sample blocks; the unit grayscale color coordinate change amount for , unit grayscale brightness change for , and represents the sample color coordinates of the two sample blocks, and represents the sample brightness of the two sample blocks; Setting the grayscale value of the display screen to a first grayscale value, wherein the initial value of the first grayscale value is a target grayscale value, and obtaining the real color coordinates and the real brightness of the acquisition point of the display screen; Calculating the deviation between the real color coordinate and the configured color coordinate target value; determining the offset grayscale value corresponding to the real color coordinate based on the unit grayscale color coordinate change and the deviation; The first grayscale value is compensated based on the offset grayscale value corresponding to the real color coordinate to obtain a second grayscale value; the compensated color coordinate corresponding to the second grayscale value is determined based on the unit grayscale color coordinate change corresponding to the grayscale value interval to which the target grayscale value belongs and the real color coordinate; and the compensated brightness corresponding to the second grayscale value is determined based on the unit grayscale brightness change corresponding to the grayscale value interval to which the target grayscale value belongs and the real brightness; Determine whether the compensation end condition is met; if not, use the second grayscale value as the first grayscale value, and return to execute the operation of obtaining the real color coordinates and the real brightness of the acquisition point on the display screen; If so, based on the compensated color coordinates and the compensated brightness corresponding to each second grayscale value, a second grayscale value is selected from all the second grayscale values ​​as the compensated grayscale value corresponding to the target grayscale value.

2. The method according to claim 1, It is characterized in that The real color coordinates include a real color coordinate x and a real color coordinate y, the deviation value includes a deviation value ox corresponding to the real color coordinate x and a deviation value oy corresponding to the real color coordinate y, and the unit grayscale color coordinate change includes a unit grayscale color coordinate change Δx and a unit grayscale color coordinate change Δy; If the first grayscale value is the grayscale value of the R channel, the offset grayscale value ΔR of the R channel is |ox / Δx|; If the first grayscale value is the grayscale value of the G channel, then the offset grayscale value ΔG of the G channel is |oy / Δy|; If the first grayscale value is the grayscale value of the B channel, the offset grayscale value ΔB of the B channel is the smaller value between ΔB1 and ΔB2; wherein ΔB1 is |ox / Δx|, and ΔB2 is |oy / Δy|.

3. The method according to claim 2, It is characterized in that The method of compensating the first grayscale value based on the offset grayscale value corresponding to the real color coordinate to obtain the second grayscale value includes: Based on the relationship between the deviation value ox and 0, and the relationship between the deviation value oy and 0, a candidate offset grayscale value is selected from the offset grayscale value ΔR of the R channel, the offset grayscale value ΔG of the G channel, and the offset grayscale value ΔB of the B channel; The candidate offset grayscale value is used to compensate the first grayscale value to obtain a second grayscale value.

4. The method according to claim 3, It is characterized in that If the deviation value ox is greater than 0 and the deviation value oy is greater than 0, then the candidate offset grayscale value is the offset grayscale value ΔB, and the offset grayscale value ΔB is used to increase the B channel of the first grayscale value; or, the candidate offset grayscale value is the offset grayscale value ΔR and the offset grayscale value ΔG, and the offset grayscale value ΔR is used to reduce the R channel of the first grayscale value, and the offset grayscale value ΔG is used to reduce the G channel of the first grayscale value; Alternatively, if the deviation value ox is greater than 0 and the deviation value oy is less than 0, the candidate offset grayscale values ​​are the offset grayscale value ΔG and the offset grayscale value ΔR, the offset grayscale value ΔG is used to increase the G channel of the first grayscale value, and the offset grayscale value ΔR is used to reduce the R channel of the first grayscale value; or, the candidate offset grayscale values ​​are the offset grayscale value ΔB and the offset grayscale value ΔR, the offset grayscale value ΔB is used to reduce the B channel of the first grayscale value, and the offset grayscale value ΔR is used to reduce the R channel of the first grayscale value; Alternatively, if the deviation value ox is greater than 0 and the deviation value oy is equal to 0, the candidate offset grayscale value is the offset grayscale value ΔR, and the offset grayscale value ΔR is used to reduce the R channel of the first grayscale value; Alternatively, if the deviation value ox is less than 0 and the deviation value oy is greater than 0, the candidate offset grayscale values ​​are the offset grayscale value ΔB and the offset grayscale value ΔG, the offset grayscale value ΔB is used to reduce the B channel of the first grayscale value, and the offset grayscale value ΔG is used to reduce the G channel of the first grayscale value; or, the candidate offset grayscale values ​​are the offset grayscale value ΔR and the offset grayscale value ΔG, the offset grayscale value ΔR is used to increase the R channel of the first grayscale value, and the offset grayscale value ΔG is used to reduce the G channel of the first grayscale value; Alternatively, if the deviation value ox is less than 0 and the deviation value oy is less than 0, the candidate offset grayscale value is the offset grayscale value ΔB, and the offset grayscale value ΔB is used to reduce the B channel of the first grayscale value; or, the candidate offset grayscale value is the offset grayscale value ΔG and the offset grayscale value ΔR, and the offset grayscale value ΔG is used to increase the G channel of the first grayscale value, and the offset grayscale value ΔR is used to increase the R channel of the first grayscale value; Alternatively, if the deviation value ox is less than 0 and the deviation value oy is equal to 0, the candidate offset grayscale value is the offset grayscale value ΔB and the offset grayscale value ΔG, the offset grayscale value ΔB is used to reduce the B channel of the first grayscale value, and the offset grayscale value ΔG is used to reduce the G channel of the first grayscale value; or, the candidate offset grayscale value is the offset grayscale value ΔR, and the offset grayscale value ΔR is used to increase the R channel of the first grayscale value; Alternatively, if the deviation value ox is equal to 0 and the deviation value oy is greater than 0, then the candidate offset grayscale value is the offset grayscale value ΔG, and the offset grayscale value ΔG is used to reduce the G channel of the first grayscale value; Alternatively, if the deviation value ox is equal to 0 and the deviation value oy is less than 0, the candidate offset grayscale value is the offset grayscale value ΔB and the offset grayscale value ΔR, the offset grayscale value ΔB is used to reduce the B channel of the first grayscale value, and the offset grayscale value ΔR is used to reduce the R channel of the first grayscale value; or, the candidate offset grayscale value is the offset grayscale value ΔG, and the offset grayscale value ΔG is used to increase the G channel of the first grayscale value.

5. The method according to claim 1, It is characterized in that The selecting a second grayscale value from all the second grayscale values ​​as the compensated grayscale value corresponding to the target grayscale value based on the compensated color coordinates and the compensated brightness corresponding to each second grayscale value includes: Based on the difference between the compensated color coordinates corresponding to the second grayscale value and the configured color coordinate target value, and the difference between the compensated brightness corresponding to the second grayscale value and the brightness target value, the color difference parameter value corresponding to the second grayscale value is determined; based on the color difference parameter value corresponding to each second grayscale value, the second grayscale value corresponding to the minimum color difference parameter value is used as the compensated grayscale value corresponding to the target grayscale value.

6. The method according to claim 5, It is characterized in that The brightness target value is a configured brightness target value; or, the brightness target value is determined based on the maximum grayscale value, the configured coefficient value, the target grayscale value and the minimum brightness value; wherein the minimum brightness value is the minimum value of the compensated brightness corresponding to the second grayscale values ​​of all acquisition points; The brightness target value is determined by the following formula: ; in, represents the brightness target value, represents the minimum brightness value, represents the maximum grayscale value, represents the target grayscale value, represents the coefficient value.

7. A grayscale value compensation device, It is characterized in that The device comprises: An acquisition module, used for acquiring, for each acquisition point on the display screen, sample color coordinates and sample brightness of a plurality of sample blocks centered at the acquisition point, wherein the grayscale values ​​of the plurality of sample blocks vary at intervals of n; A determination module, for determining, for two sample blocks with a grayscale value interval of n, a unit grayscale color coordinate change and a unit grayscale brightness change corresponding to a grayscale value interval based on the sample color coordinates of the two sample blocks, the sample brightness of the two sample blocks and the interval n; wherein the grayscale value interval is an interval of grayscale values ​​of the two sample blocks; wherein the unit grayscale color coordinate change for , the unit grayscale brightness change for , and represents the sample color coordinates of the two sample blocks, and represents the sample brightness of the two sample blocks; The determination module is further used to determine the compensation grayscale value corresponding to the target grayscale value based on the unit grayscale color coordinate change and the unit grayscale brightness change corresponding to the grayscale value interval; specifically used to: Setting the grayscale value of the display screen to a first grayscale value, wherein the initial value of the first grayscale value is a target grayscale value, and obtaining the real color coordinates and the real brightness of the acquisition point of the display screen; Calculating the deviation between the real color coordinate and the configured color coordinate target value; determining the offset grayscale value corresponding to the real color coordinate based on the unit grayscale color coordinate change and the deviation; The first grayscale value is compensated based on the offset grayscale value corresponding to the real color coordinate to obtain a second grayscale value; the compensated color coordinate corresponding to the second grayscale value is determined based on the unit grayscale color coordinate change corresponding to the grayscale value interval to which the target grayscale value belongs and the real color coordinate; and the compensated brightness corresponding to the second grayscale value is determined based on the unit grayscale brightness change corresponding to the grayscale value interval to which the target grayscale value belongs and the real brightness; Determine whether the compensation end condition is met; if not, use the second grayscale value as the first grayscale value, and return to execute the operation of obtaining the real color coordinates and the real brightness of the acquisition point on the display screen; If so, based on the compensated color coordinates and the compensated brightness corresponding to each second grayscale value, a second grayscale value is selected from all the second grayscale values ​​as the compensated grayscale value corresponding to the target grayscale value.

8. An electronic device, It is characterized in that include: a processor and a machine-readable storage medium storing machine-executable instructions executable by the processor; The processor is used to execute machine executable instructions to implement the method described in any one of claims 1-6.