Gray scale compensation method, gray scale compensation device, electronic device, medium and product
Patent Information
- Application Number
- CN202510556682.2
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2025-04-29
- Publication Date
- 2026-10-30
AI Technical Summary
[0002]在相关技术中,因制程瑕疵或材料应力等情况的存在,显示面板显示一画面时可能存在灰阶失真的情况,即显示设备输出的灰阶与输入信号的实际灰阶存在偏差,且因不同像素点的灰阶失真情况不同,故画面中不同像素的发光亮度间可能存在较大的、能够被人眼感知到的差异,一定程度上影响用户的显示设备使用体验
Smart Images

Figure CN123016853A_ABST
Abstract
Description
Technical Field
[0001] This application relates to the field of display technology, and in particular to a grayscale compensation method, grayscale compensation device, electronic device, computer-readable storage medium, and computer program product. Background Technology
[0002] In related technologies, due to process defects or material stress, grayscale distortion may occur when a display panel displays an image. That is, there is a deviation between the grayscale output by the display device and the actual grayscale of the input signal. Since the grayscale distortion of different pixels is different, there may be a large difference in the brightness of different pixels in the image that can be perceived by the human eye, which will affect the user's display device experience to a certain extent. Summary of the Invention
[0003] This application provides a grayscale compensation method, a grayscale compensation device, an electronic device, a computer-readable storage medium, and a computer program product.
[0004] This application provides a grayscale compensation method, including:
[0005] Multiple preset gray levels and the brightness of a first pixel corresponding to each preset gray level are obtained, wherein the brightness of the first pixel is used to indicate the brightness of the pixels in the display panel when the display panel displays the image of the preset gray level;
[0006] Based on the preset grayscale and the brightness of the first pixel, a target grayscale is determined among the multiple preset grayscales;
[0007] Based on the target gray level, determine the gray level compensation data;
[0008] Based on the grayscale compensation data, the display panel is controlled to perform grayscale compensation.
[0009] Thus, in this embodiment, grayscale compensation data can be determined based on the target grayscale to control the display panel to perform grayscale compensation. This can, to a certain extent, avoid significant differences in the brightness, color, and other attributes of various pixels on the display panel, and maintain the consistency of brightness, color, and other attributes of various pixels on the display panel to a certain extent. Furthermore, compared to the method of pre-calculating and storing grayscale compensation data for each pixel at each grayscale, the method of determining grayscale compensation data through the target grayscale can achieve the acquisition and storage of grayscale compensation data with relatively low difficulty. Moreover, by acquiring and determining the target grayscale among multiple preset grayscales based on multiple preset grayscales and the brightness of the first pixel corresponding to each preset grayscale, the effectiveness and reliability of the target grayscale can be guaranteed to a certain extent, thus further ensuring the effective performance of grayscale compensation.
[0010] In some embodiments of this application, the preset grayscale includes multiple first grayscales, and the brightness of the first pixel includes the brightness of the multiple first pixels in the display panel when the display panel displays an image of the first grayscale. Determining a target grayscale among the multiple preset grayscales based on the preset grayscale and the brightness of the first pixel includes:
[0011] Based on the first gray level and the multiple first luminances corresponding to the first gray level, determine the first gray level-luminance mapping data;
[0012] The target gray level is determined based on the first gray-level-brightness mapping data.
[0013] Thus, in this embodiment of the application, the first gray level-brightness mapping data can be determined based on the first gray level and the multiple first brightness levels corresponding to the first gray level, and the target gray level can be determined based on the first gray level-brightness mapping data, thereby realizing the determination of the target gray level.
[0014] In some embodiments of this application, the preset grayscale includes multiple second grayscales, the brightness of the first pixel includes the second brightness of the first pixel when the display panel displays an image of the second grayscale, and determining the target grayscale based on the first grayscale-brightness mapping data includes:
[0015] Based on the first gray level, the first brightness, the second gray level, and the second brightness, determine the second gray level-brightness mapping data;
[0016] The target gray level is determined based on the first gray-to-brightness mapping data and the second gray-to-brightness mapping data.
[0017] Thus, in this embodiment of the application, the second gray-level-brightness mapping data can be determined based on the first gray level, the first brightness, the second gray level, and the second brightness, and the target gray level can be determined based on the first gray-level-brightness mapping data and the second gray-level-brightness mapping data, thereby realizing the determination of the target gray level.
[0018] In some embodiments of this application, determining the target grayscale based on the first grayscale-luminance mapping data and the second grayscale-luminance mapping data includes:
[0019] Based on the second grayscale and the first grayscale-brightness mapping data, determine the first target brightness corresponding to the second grayscale;
[0020] Based on the first target brightness and the second grayscale-brightness mapping data, determine the first compensation grayscale corresponding to the first target brightness;
[0021] The target gray level is determined from among a plurality of second gray levels based on the second gray level and the first compensated gray level.
[0022] Thus, in this embodiment of the application, a first target brightness corresponding to the second gray level can be determined based on the second gray level and the first gray level-brightness mapping data, and a first compensation gray level corresponding to the first target brightness can be determined based on the first target brightness and the second gray level-brightness mapping data, and the target gray level among a plurality of second gray levels can be determined based on the second gray level and the first compensation gray level, so that the target gray level can be determined based on the second gray level and the first compensation gray level corresponding to the second gray level.
[0023] In some embodiments of this application, determining the target gray level among a plurality of second gray levels based on the second gray level and the first compensated gray level includes:
[0024] The multiple second gray levels are divided into multiple gray level combinations.
[0025] Based on the first compensation gray level corresponding to the second gray level, one of the second gray levels in each gray level combination is determined as the target gray level.
[0026] Thus, in this embodiment of the application, multiple second gray levels can be divided into multiple gray level combinations, and a second gray level in each gray level combination can be determined as the target gray level according to the first compensation gray level corresponding to the second gray level, so that the target gray level can be determined based on multiple gray level combinations.
[0027] In some embodiments of this application, determining one of the second gray levels within each gray level combination as the target gray level based on a first compensation gray level corresponding to the second gray level includes:
[0028] Based on one of the second gray levels in each of the gray level combinations, multiple candidate gray level groups are determined;
[0029] Based on the second gray level in the candidate gray level group and the first compensated gray level corresponding to the second gray level, determine the first mapping data between gray levels corresponding to the candidate gray level group;
[0030] The target gray level is determined based on the first mapping data between gray levels corresponding to each candidate gray level group.
[0031] Thus, in this embodiment of the application, multiple candidate grayscale groups can be determined based on one of the second grayscales in each grayscale combination, and the first inter-grayscale mapping data corresponding to the candidate grayscale groups can be determined based on the second grayscale in the candidate grayscale groups and the first compensation grayscale corresponding to the second grayscale. The target grayscale can be determined based on the first inter-grayscale mapping data corresponding to each candidate grayscale group, so that the target grayscale can be determined based on the first inter-grayscale mapping data corresponding to each candidate grayscale group.
[0032] In some embodiments of this application, the first grayscale mapping data includes multiple first sub-mapping data, and determining the first grayscale mapping data corresponding to the candidate grayscale group based on the second grayscale within the candidate grayscale group and the first compensated grayscale corresponding to the second grayscale includes:
[0033] Based on two adjacent second gray levels within the candidate gray level group and the first compensated gray level corresponding to the second gray level, the first sub-mapping data of the two second gray levels is determined to determine the first mapping data between the gray levels.
[0034] Thus, in this embodiment of the application, the first sub-mapping data between two second gray levels can be determined based on two adjacent second gray levels within the candidate gray level group and the first compensation gray level corresponding to the second gray level, thereby obtaining the first mapping data between gray levels corresponding to the candidate gray level group.
[0035] In some embodiments of this application, determining the target gray level based on the first mapping data between gray levels corresponding to each candidate gray level group includes:
[0036] Based on the first mapping data between gray levels, determine the second compensated gray level corresponding to the second gray level in the candidate gray level group;
[0037] Based on the first compensated gray level and the second compensated gray level corresponding to each second gray level in the candidate gray level group, a target gray level group is determined among the multiple candidate gray level groups.
[0038] The second gray level within the target gray level group is determined as the target gray level.
[0039] Thus, in this embodiment of the application, the second compensation gray level corresponding to the second gray level in the candidate gray level group can be determined according to the first mapping data between gray levels, and the first compensation gray level and the second compensation gray level corresponding to each second gray level in the candidate gray level group can be determined to form a target gray level group in a plurality of candidate gray level groups, and the second gray level in the target gray level group can be determined as the target gray level, so that the target gray level can be determined according to the first compensation gray level and the second compensation gray level corresponding to the second gray level.
[0040] In some embodiments of this application, determining a target grayscale group among multiple candidate grayscale groups based on the first compensated grayscale and the second compensated grayscale corresponding to each second grayscale in the candidate grayscale group includes:
[0041] Among the multiple candidate grayscale groups, the candidate grayscale group with the smallest grayscale error is determined as the target grayscale group, wherein the grayscale error is used to indicate the deviation between the first compensated grayscale and the second compensated grayscale corresponding to the second grayscale in the candidate grayscale group.
[0042] Thus, in this embodiment, the candidate grayscale group with the smallest grayscale error among multiple candidate grayscale groups can be determined as the target grayscale group. This, to a certain extent, ensures the effectiveness and reliability of the target grayscale group and the target grayscale.
[0043] In some embodiments of this application, determining grayscale compensation data based on the target grayscale includes:
[0044] Based on multiple third gray levels and the brightness of the third pixel corresponding to each third gray level, third gray level-brightness mapping data is determined, wherein the brightness of the third pixel is used to indicate the brightness of the pixels in the display panel when the display panel displays the image of the third gray level;
[0045] Based on multiple third gray levels, multiple third pixel brightness levels, the target gray level, and the brightness of the fourth pixel corresponding to the target gray level, fourth gray level-brightness mapping data is determined, wherein the brightness of the fourth pixel is used to indicate the brightness of the pixels in the display panel when the display panel displays the image of the target gray level;
[0046] The grayscale compensation data is determined based on the third grayscale-brightness mapping data and the fourth grayscale-brightness mapping data.
[0047] Thus, in this embodiment of the application, third gray-level-brightness mapping data can be determined based on multiple third gray levels and the brightness of the third pixel corresponding to each third gray level, and fourth gray-level-brightness mapping data can be determined based on multiple third gray levels, multiple third pixel brightness, target gray level, and the brightness of the fourth pixel corresponding to the target gray level, and gray-level compensation data can be determined based on the third gray-level-brightness mapping data and the fourth gray-level-brightness mapping data, so that the gray-level compensation data can be determined based on the third gray-level-brightness mapping data and the fourth gray-level-brightness mapping data.
[0048] In some embodiments of this application, determining the grayscale compensation data based on the third grayscale-luminance mapping data and the fourth grayscale-luminance mapping data includes:
[0049] Based on the target grayscale and the third grayscale-brightness mapping data, determine the second target brightness corresponding to the target grayscale;
[0050] Based on the second target brightness and the fourth grayscale-brightness mapping data, a third compensation grayscale corresponding to the target grayscale is determined;
[0051] The grayscale compensation data is determined based on the target grayscale and the third compensation grayscale.
[0052] Thus, in this embodiment of the application, a second target brightness corresponding to the target gray level can be determined based on the target gray level and the third gray level-brightness mapping data, and a third compensation gray level corresponding to the target gray level can be determined based on the second target brightness and the fourth gray level-brightness mapping data, and gray level compensation data can be determined based on the target gray level and the third compensation gray level, so that the gray level compensation data can be determined based on the target gray level and the first compensation gray level of the target gray level.
[0053] In some embodiments of this application, determining the grayscale compensation data based on the target grayscale and the third compensation grayscale includes:
[0054] Based on the target gray level and the third compensation gray level corresponding to the target gray level, determine the second mapping data between gray levels;
[0055] The grayscale compensation data is determined based on the second mapping data between grayscale levels.
[0056] Thus, in this embodiment of the application, the second mapping data between gray levels can be determined based on each target gray level and the third compensation gray level corresponding to each target gray level, and the gray level compensation data can be determined based on the second mapping data between gray levels, so that the gray level compensation data can be determined based on the second mapping data between gray levels.
[0057] In some embodiments of this application, the second mapping data between gray levels includes multiple second mapping sub-data, and determining the second mapping data between gray levels based on the target gray level and the third compensated gray level corresponding to the target gray level includes:
[0058] Based on two adjacent target gray levels among the multiple target gray levels, and the third compensation gray level corresponding to the target gray level, multiple second mapping sub-data are determined to obtain the second mapping data between the gray levels.
[0059] Thus, in this embodiment of the application, multiple second mapping sub-data can be determined based on two adjacent target gray levels among the multiple target gray levels and the third compensation gray level corresponding to the target gray level to obtain the second mapping data between gray levels, thereby obtaining the second mapping data between gray levels.
[0060] In some embodiments of this application, the third pixel brightness includes the third brightness of a pixel in the display panel when the display panel displays the image of the third grayscale. The step of determining the third grayscale-brightness mapping data based on multiple third grayscales and the third pixel brightness corresponding to each third grayscale includes:
[0061] Based on the statistical values of the third grayscale and the third brightness of each pixel in the display panel, determine the third grayscale-brightness mapping data; and / or,
[0062] The third grayscale-brightness mapping data is determined based on each of the third grayscale levels and the third brightness of the second pixel in the display panel.
[0063] Thus, in this embodiment of the application, the third grayscale-brightness mapping data can be determined based on the statistical value of the third brightness of each third grayscale and each pixel in the display panel, and / or based on the third brightness of each third grayscale and the second pixel in the display panel, thereby realizing the determination of the third grayscale-brightness mapping data.
[0064] In some embodiments of this application, the fourth grayscale-luminance mapping data includes multiple data points, with each pixel corresponding to one of the fourth grayscale-luminance mapping data points. Determining the grayscale compensation data based on the third grayscale-luminance mapping data and the fourth grayscale-luminance mapping data includes:
[0065] Based on the third grayscale-luminance mapping data and the fourth grayscale-luminance mapping data for each pixel, the grayscale compensation data for each pixel is determined.
[0066] Thus, in this embodiment of the application, the grayscale compensation data of each pixel can be determined based on the third grayscale-brightness mapping data and the fourth grayscale-brightness mapping data of each pixel, thereby realizing the determination of the grayscale compensation data of each pixel.
[0067] In some embodiments of this application, controlling the display panel to perform grayscale compensation based on the grayscale compensation data includes:
[0068] Based on the input grayscale of the target pixel in the display panel and the grayscale compensation data corresponding to the target pixel, a fourth compensation grayscale corresponding to the target pixel is determined;
[0069] Based on the fourth compensation grayscale, the display panel is controlled to perform grayscale compensation for the target pixel.
[0070] Thus, in this embodiment of the application, a fourth compensation gray level corresponding to the target pixel can be determined based on the input gray level of the target pixel in the display panel and the gray level compensation data corresponding to the target pixel, and the display panel can be controlled to perform gray level compensation for the target pixel based on the fourth compensation gray level, thereby completing the gray level compensation of each pixel.
[0071] This application provides a grayscale compensation device, including:
[0072] The acquisition module is used to acquire multiple preset gray levels and the brightness of a first pixel corresponding to each preset gray level, wherein the brightness of the first pixel is used to indicate the brightness of the pixels in the display panel when the display panel displays the image of the preset gray level;
[0073] The node grayscale determination module is used to determine a target grayscale among multiple preset grayscales based on the preset grayscale and the brightness of the first pixel.
[0074] The compensation data determination module is used to determine grayscale compensation data based on the target grayscale.
[0075] The compensation module is used to control the display panel to perform grayscale compensation based on the grayscale compensation data.
[0076] This application provides an electronic device, including a memory and a processor. The memory stores a computer program, which, when executed by the processor, implements the grayscale compensation method described above.
[0077] This application provides a computer-readable storage medium storing a computer program that, when executed by one or more processors, implements the grayscale compensation method described above.
[0078] This application provides a computer program product, including a computer program / instruction, which, when executed by a processor, implements the grayscale compensation method described above.
[0079] The grayscale compensation device, electronic device, computer-readable storage medium, and computer program product provided in this application can determine grayscale compensation data based on a target grayscale to control the display panel to perform grayscale compensation. This can, to a certain extent, avoid significant differences in the brightness, color, and other attributes of individual pixels in the display panel, and maintain the consistency of these attributes to a certain degree. Furthermore, compared to pre-calculating and storing grayscale compensation data for each pixel at each grayscale, determining grayscale compensation data through a target grayscale reduces the difficulty of acquiring and storing the data. Moreover, by acquiring and determining the target grayscale among multiple preset grayscales based on multiple preset grayscales and the brightness of the first pixel corresponding to each preset grayscale, the effectiveness and reliability of the target grayscale can be guaranteed to a certain extent, thus further ensuring the effectiveness of grayscale compensation.
[0080] Additional aspects and advantages of embodiments of this application will be set forth in part in the description which follows, and in part will be obvious from the description, or may be learned by practice of embodiments of this application. Attached Figure Description
[0081] The above and / or additional aspects and advantages of this application will become apparent and readily understood from the description of the embodiments taken in conjunction with the following drawings, wherein:
[0082] Figure 1 This is a flowchart illustrating the grayscale compensation method in some embodiments of this application;
[0083] Figure 2 This is a flowchart illustrating the grayscale compensation method in some embodiments of this application;
[0084] Figure 3 This is a schematic diagram illustrating application scenarios in some embodiments of this application;
[0085] Figure 4 This is a flowchart illustrating the grayscale compensation method in some embodiments of this application;
[0086] Figure 5 This is a schematic diagram illustrating application scenarios in some embodiments of this application;
[0087] Figure 6 This is a flowchart illustrating the grayscale compensation method in some embodiments of this application;
[0088] Figure 7 This is a flowchart illustrating the grayscale compensation method in some embodiments of this application;
[0089] Figure 8 This is a flowchart illustrating the grayscale compensation method in some embodiments of this application;
[0090] Figure 9 This is a schematic diagram illustrating application scenarios in some embodiments of this application;
[0091] Figure 10 This is a flowchart illustrating the grayscale compensation method in some embodiments of this application;
[0092] Figure 11 This is a flowchart illustrating the grayscale compensation method in some embodiments of this application;
[0093] Figure 12 This is a flowchart illustrating the grayscale compensation method in some embodiments of this application;
[0094] Figure 13 This is a flowchart illustrating the grayscale compensation method in some embodiments of this application;
[0095] Figure 14 This is a flowchart illustrating the grayscale compensation method in some embodiments of this application;
[0096] Figure 15 This is a flowchart illustrating the grayscale compensation method in some embodiments of this application. Detailed Implementation
[0097] The embodiments of this application are described in detail below. Examples of the embodiments are shown in the accompanying drawings, wherein the same or similar reference numerals denote the same or similar elements or elements having the same or similar functions throughout. The embodiments described below with reference to the accompanying drawings are exemplary and are only used to explain the embodiments of this application, and should not be construed as limiting the embodiments of this application.
[0098] In related technologies, the Mura phenomenon refers to the uneven brightness or color caused by factors such as manufacturing defects or material aging. Specifically, it manifests as a significant difference in the luminous brightness of each sub-pixel in the display screen under the same external environment, which can be perceived by the human eye.
[0099] Furthermore, to enable electronic devices with display functions, such as displays, to stably display images with uniform brightness and color, compensation can be applied to each sub-pixel to meet display standards. However, due to limitations in Flash memory capacity and manpower, it is usually impossible to pre-generate the grayscale compensation amount for all gray levels of the stored pixels, thus making it difficult to achieve the expected grayscale compensation effect for pixels at different gray levels.
[0100] Based on the issues mentioned above, please refer to Figure 1 This application provides a grayscale compensation method, including:
[0101] 01: Obtain multiple preset gray levels and the brightness of the first pixel corresponding to each preset gray level. The brightness of the first pixel is used to indicate the brightness of the pixels in the display panel when the display panel displays the image of the preset gray level.
[0102] 02: Determine the target gray level among multiple preset gray levels based on the preset gray level and the brightness of the first pixel;
[0103] 03: Determine the grayscale compensation data based on the target grayscale;
[0104] 04: Based on the grayscale compensation data, control the display panel to perform grayscale compensation.
[0105] This application provides a grayscale compensation device. The grayscale compensation determination method of this application can be implemented by the grayscale compensation device of this application. Specifically, the grayscale compensation device includes an acquisition module, a node grayscale determination module, a compensation data determination module, and a compensation module. The acquisition module acquires multiple preset grayscale levels and the brightness of a first pixel corresponding to each preset grayscale level. The brightness of the first pixel is used to indicate the brightness of pixels in the display panel when displaying an image of the preset grayscale level. The node grayscale determination module determines a target grayscale level among the multiple preset grayscale levels based on the preset grayscale levels and the brightness of the first pixel. The compensation data determination module determines grayscale compensation data based on the target grayscale level. The compensation module controls the display panel to perform grayscale compensation based on the grayscale compensation data.
[0106] This application also provides an electronic device, which includes a memory and a processor. The position determination method of the electronic device according to this application can be implemented by the electronic device according to this application. Specifically, the memory stores a computer program, and the processor is used to acquire multiple preset gray levels and the brightness of a first pixel corresponding to each preset gray level, and to determine a target gray level among the multiple preset gray levels based on the preset gray levels and the brightness of the first pixel, and to determine gray level compensation data based on the target gray level, and to control the display panel to perform gray level compensation based on the gray level compensation data, wherein the brightness of the first pixel is used to indicate the brightness of the pixels in the display panel when the display panel displays an image of the preset gray level.
[0107] Specifically, in this embodiment, the electronic device (or grayscale compensation device) can acquire a plurality of preset grayscale levels, and acquire the brightness of each pixel in the image when the display panel displays an image with a grayscale size of the preset grayscale level, i.e., the brightness of the first pixel. Next, the electronic device can determine one or more representative grayscale levels from the plurality of preset grayscale levels, i.e., the target grayscale level, based on the preset grayscale levels and the brightness of the first pixel. Then, the electronic device can determine compensation data applicable to each pixel at different grayscale levels, i.e., grayscale compensation data, based on the target grayscale level. Finally, the electronic device can perform grayscale compensation on the pixels in the display panel at an appropriate time based on the compensation data for each pixel at different grayscale levels, so that the display panel can display an image with uniform brightness.
[0108] Thus, in this embodiment, grayscale compensation data can be determined based on the target grayscale to control the display panel to perform grayscale compensation. This can, to a certain extent, avoid significant differences in the brightness, color, and other attributes of various pixels in the display panel, and maintain the consistency of the brightness, color, and other attributes of various pixels in the display panel to a certain extent. Furthermore, compared to the method of pre-calculating and storing the grayscale compensation data of pixels at each grayscale, the method of determining the grayscale compensation data through the target grayscale can achieve the acquisition and storage of grayscale compensation data with relatively low difficulty. In addition, by acquiring and determining the target grayscale among multiple preset grayscales based on multiple preset grayscales and the brightness of the first pixel corresponding to each preset grayscale, the effectiveness and reliability of the target grayscale can be guaranteed to a certain extent, thereby further ensuring the effective performance of grayscale compensation.
[0109] In one example, multiple preset gray levels are multiple pre-defined gray level values, such as the five gray level values of 64, 92, 128, 192, and 230, or the 21 gray level values of 30, 40, 50, ..., 230.
[0110] In one example, the brightness of the first pixel is the brightness value of each pixel in the image actually displayed on the panel when the display panel shows an image with a grayscale value of 'preset grayscale'.
[0111] In one example, the process of obtaining the brightness of the first pixel may include: given that multiple preset grayscale values are 64, 92, 128, 192, and 230, the electronic device may cause the display panel to sequentially display images of five different grayscale values, namely 64, 92, 128, 192, and 230. Furthermore, when the display panel displays an image with a specific grayscale value, an imaging device (such as a camera) captures the actual display image of the display panel, and the brightness of each pixel in the image is detected to determine the brightness of the pixel corresponding to each of the five grayscale values (64, 92, 128, 192, and 230). For example, when the display panel displays an image with a grayscale value of 64, the brightness of each pixel on the display panel is determined, thereby completing the acquisition of the brightness of the first pixel.
[0112] In one example, an electronic device can determine a representative preset gray level, i.e., a target gray level, from multiple preset gray levels based on the preset gray level and the brightness of the first pixel corresponding to the preset gray level.
[0113] In one example, an electronic device can determine the target gray level by clustering. For example, a preset gray level can be used as x, and the brightness of the first pixel corresponding to the preset gray level can be used as y. This yields multiple gray level-brightness (x,y) coordinate points. These multiple coordinate points are then clustered (e.g., K-means clustering) to determine multiple cluster centers. The target gray level is then determined based on the x component of the gray level-brightness (x,y) coordinate point corresponding to the cluster center, or the preset gray level that is closest to the x component.
[0114] In one example, grayscale compensation data can represent the deviation between the expected input grayscale and the actual input grayscale of each pixel when each pixel in the display panel presents a specific brightness. For example, ideally, if the display panel displays an image with a grayscale of G1, the brightness of each pixel in the display image is B1. However, in reality, when the panel displays an image with a grayscale of G1, the brightness of some pixels in the display image may be different from B1, such as B2. Therefore, to make the brightness of some pixels in the display image all B1, the grayscale of some pixels can be adjusted from G1 to G2 so that the brightness of some pixels in the display image is B2. Thus, G2, or the deviation between G2 (corresponding to the actual input grayscale) and G1 (corresponding to the expected input grayscale), can be understood as the grayscale compensation data in the embodiments of this application.
[0115] In one example, after determining the target grayscale, the electronic device can determine a grayscale-brightness mapping relationship R1 based on the brightness of each pixel when the display panel shows an image with a grayscale value of 'target grayscale'. Then, it detects the brightness of each pixel when the display panel shows an image with a grayscale value of 'non-target grayscale' and determines a new grayscale-brightness mapping relationship R2. Finally, when controlling the display panel to display an image with a grayscale value of X1, the electronic device determines the true brightness B3 of the pixels in the image when the display panel displays an image with a grayscale value of X1 based on R1, and then determines the grayscale value of the image displayed on the display panel when the pixel brightness is B3 based on B3 and R2, thus obtaining the grayscale compensation data, i.e., X2 or X2-X1.
[0116] Furthermore, when performing grayscale compensation on pixels, the electronic device can control the display panel to display a grayscale of size X2, so that the pixels in the display screen have a brightness of size B3.
[0117] In a device, the electronic device is a display panel, or a device that includes a display panel.
[0118] Please see Figure 2 In some embodiments of this application, the preset grayscale includes multiple first grayscales, and the brightness of the first pixel includes the brightness of the multiple first pixels in the display panel when the display panel displays an image of the first grayscale. Therefore, step 02 includes:
[0119] 020: Determine the first grayscale-brightness mapping data based on the first grayscale and the multiple first brightness levels corresponding to the first grayscale;
[0120] 021: Determine the target gray level based on the first gray level-brightness mapping data.
[0121] The node grayscale determination module in this application embodiment is further configured to determine first grayscale-brightness mapping data based on the first grayscale and multiple first brightness levels corresponding to the first grayscale, and to determine the target grayscale based on the first grayscale-brightness mapping data.
[0122] The processor in this application embodiment is further configured to determine first grayscale-brightness mapping data based on the first grayscale and a plurality of first brightness corresponding to the first grayscale, and to determine a target grayscale based on the first grayscale-brightness mapping data.
[0123] Specifically, to reduce the difficulty of determining the target grayscale, in this embodiment, the electronic device can determine the mapping relationship between grayscale and brightness, i.e., the first grayscale-brightness mapping data, based on a plurality of pre-set first grayscales and the brightness value of each first pixel in the display panel when the display panel shows a screen with a grayscale value of 'first grayscale'. Furthermore, the electronic device can determine the target grayscale based on the first grayscale-brightness mapping data.
[0124] In one example, the first gray level refers to a set of gray level values.
[0125] In one example, the first gray level consists of five gray levels: 64, 92, 128, 192, and 230.
[0126] In one example, the first pixel can be understood as the pixel located at a pre-specified position. For example, please refer to... Figure 3 , Figure 3 This is a schematic diagram illustrating application scenarios in some embodiments of this application, such as... Figure 3 As shown, when the display panel displays a screen with a grayscale value of 'first grayscale', it groups multiple pixels in the display panel into 5x5 groups (i.e., each 5x5 group of pixels forms a pixel matrix), and takes the top-left pixel in each group as the first pixel, or takes the pixel at position (1,1) in each pixel matrix as the first pixel. Figure 3 The solid black dots in the middle.
[0127] It is understandable that the first pixel can be divided by the energy. Figure 3 In addition to the scenarios shown, other scenarios can also be configured. For example, please refer to [link / reference needed]. Figure 3 After dividing the image into multiple 5x5 pixel matrices, the pixel at position (3,3) in each pixel matrix is taken as the first pixel, that is, the pixel at the center of the matrix is taken as the first pixel.
[0128] It's also understandable that the size "5*5" can be set or adjusted according to the actual situation, such as setting it to 3*3, 7*7, etc.
[0129] In one example, the first brightness is the brightness value of each first pixel in the image when the display panel displays an image with a grayscale value of 'first grayscale'. For example, if the first grayscale includes five grayscale values: 64, 92, 128, 192, and 230, the electronic device can cause the display panel to sequentially display images of five different grayscale values, which are 64, 92, 128, 192, and 230 respectively. Furthermore, when the display panel displays an image with a specific grayscale value, an imaging device (such as a camera) captures the actual display image of the display panel, and the brightness of each first pixel in that image is measured to determine the brightness of the pixel corresponding to each of the five grayscale values: 64, 92, 128, 192, and 230. For example, the brightness of the first pixel in the display panel when it displays an image with a grayscale value of 64 is obtained from this first brightness.
[0130] In one example, the first grayscale-brightness mapping data is used to map the first grayscale to the first brightness statistic.
[0131] In one example, the process of obtaining the first gray-level-brightness mapping data includes: when the first gray level includes five gray level values of 64, 92, 128, 192, and 230, and the number of the first pixel is P, the electronic device can make the display panel display images of five different gray levels in sequence, and these five gray levels are 64, 92, 128, 192, and 230 respectively.
[0132] Next, when the display panel displays an image with a specific grayscale value, an image capture device (such as a camera) captures the actual display image on the display panel, and the brightness of each first pixel in the image is measured to determine the first brightness corresponding to each of the five grayscale values: 64, 92, 128, 192, and 230. For example, when the display panel displays an image with a grayscale value of 64, the brightness of all first pixels in the display panel is calculated. Then, the statistical value of the brightness of all first pixels, such as the average value, is obtained. Thus, (64, B) 64 ), B 64 To display an image with a grayscale value of 64 on the display panel, determine the brightness of all first pixels in the display screen, and then determine the statistical value of the brightness of all first pixels.
[0133] Next, statistical values of the brightness of each first gray level and the corresponding first pixel are calculated, such as (64, B). 64 (92,B) 92 (128,B) 128 (192,B) 192 ) and (230,B 230 The first gray-level-brightness mapping data is obtained by fitting a power-law equation. The first gray-level-brightness mapping data is shown in the following formula:
[0134]
[0135] In the formula, L 第一目标 This represents the brightness value of a pixel in the display panel when the display panel shows an image with a grayscale value of Gray. k1 and Υ1 represent the coefficients obtained from the fitting.
[0136] In one example, an electronic device can determine one or more values from a plurality of grayscale values as a target grayscale based on first grayscale-luminance mapping data. For example, when the display panel displays an image with a grayscale value of G3, the brightness B4 of each first pixel is detected, and based on the first grayscale-luminance mapping data and G3, B5 corresponding to G3 is determined. If the difference between the "statistical value of the brightness B4 of the first pixel" and B5 is less than a preset value, then G3 is taken as the target grayscale.
[0137] Thus, in this embodiment of the application, the first gray level-brightness mapping data can be determined based on the first gray level and the multiple first brightness levels corresponding to the first gray level, and the target gray level can be determined based on the first gray level-brightness mapping data, thereby realizing the determination of the target gray level.
[0138] Please see Figure 4 In some embodiments of this application, the preset grayscale includes multiple second grayscales, and the brightness of the first pixel includes the second brightness of the first pixel when the display panel displays an image of the second grayscale. Therefore, step 021 includes:
[0139] 0210: Determine the second grayscale-brightness mapping data based on the first grayscale, the first brightness, the second grayscale, and the second brightness;
[0140] 0211: Determine the target gray level based on the first gray-level-brightness mapping data and the second gray-level-brightness mapping data.
[0141] The node grayscale determination module in this application embodiment is further used to determine the second grayscale-brightness mapping data based on the first grayscale, the first brightness, the second grayscale, and the second brightness, and to determine the target grayscale based on the first grayscale-brightness mapping data and the second grayscale-brightness mapping data.
[0142] The processor in this embodiment is further configured to determine second grayscale-brightness mapping data based on the first grayscale, the first brightness, the second grayscale, and the second brightness, and to determine a target grayscale based on the first grayscale-brightness mapping data and the second grayscale-brightness mapping data.
[0143] Specifically, in the embodiments of this application, the electronic device can determine the second gray-level-brightness mapping data based on multiple first gray levels, statistical values corresponding to each first gray level, multiple second gray levels, and second brightness corresponding to each second gray level. Furthermore, the electronic device can determine the target gray level based on the previously determined first gray-level-brightness mapping data and the second gray-level-brightness mapping data.
[0144] In one example, multiple second gray levels are multiple pre-defined gray level values, such as 30, 40, 50, ..., 230, which are 21 gray level values.
[0145] In one example, multiple first gray levels do not completely overlap with multiple second gray levels. For example, the multiple first gray levels are 64, 92, 128, 192, and 230 respectively, and the multiple second gray levels are 30, 40, 50, ..., 230, which are 21 gray level values.
[0146] In one example, the second brightness refers to the brightness value of each pixel in the image that the display panel actually displays when the display panel shows an image with a grayscale value of 'second grayscale'.
[0147] In one example, the second grayscale-brightness mapping data is used to map the second grayscale to the display brightness of a pixel.
[0148] In one example, the first gray level and its corresponding statistical value are as described above (64, B). 64 (92,B) 92 (128,B) 128 (192,B) 192 ) and (230,B 230 The process of acquiring the second grayscale-brightness mapping data can include: Given multiple first grayscale values of 64, 92, 128, 192, and 230, with P being the number of first pixels, and multiple second grayscale values of 30, 40, 50, ..., 230, with N ranging from these 21 grayscale values, the electronic device can display images of five different grayscale values sequentially on the display panel. These five grayscale values are 64, 92, 128, 192, and 230. Then, when the display panel displays an image with a specific grayscale value, a camera (such as a camera) captures the actual display image on the display panel, and brightness detection is performed on each first pixel in the image to determine the first brightness corresponding to each of the five grayscale values of 64, 92, 128, 192, and 230. This yields the (64, B...)... 64 (92,B) 92 (128,B) 128 (192,B) 192 ) and (230,B 230 ).
[0149] Then, the control display panel sequentially displays 21 images with grayscale values of 30, 40, 50, ..., 230. When the display panel displays an image with a specific grayscale value, a shooting device (such as a camera) captures the actual display screen of the display panel and performs brightness detection on the first pixel in the screen, thereby obtaining 21*P first brightness values, where P is the number of first pixels.
[0150] Then, for the P first brightness values when the grayscale is N, combined with (64, B) 64 (92,B) 92 (128,B) 128 (192,B) 192 ) and (230,B 230 The mapping relationship between grayscale and brightness is fitted to obtain the second grayscale-brightness mapping data when the grayscale is N. Specifically, it can be expressed as follows:
[0151]
[0152] In the formula, L 1-N This represents the brightness of the pixels on the display panel when the grayscale value is N and the display panel shows an image with a grayscale value of Gray. 1(i,j) Υ 1(i,j) This represents the fitting coefficient of the pixel located in the i-th row and j-th column of the display panel.
[0153] It is understandable that when N takes the value of 30, 40, 50, ..., 230, there are 21 gray levels. When N takes the value of 30, 40, 50, ..., 230, there are 21 formulas (2) above.
[0154] In one example, see Figure 5 , Figure 5 This is a schematic diagram illustrating an application scenario in some embodiments of this application, namely, the second grayscale-brightness mapping data can be obtained through... Figure 5 The curve representation in the text.
[0155] In one example, an electronic device can determine one or more values from a plurality of second gray levels as the target gray level based on first gray-to-brightness mapping data and second gray-to-brightness mapping data. For example, for a certain second gray level G4, based on G4 and the first gray-to-brightness mapping data, the brightness B6 corresponding to G4 is determined, and then based on B6 and the second gray-to-brightness mapping data, the brightness G5 corresponding to B6 is determined. If the difference between G4 and G5 is less than a preset value, then G4 is taken as the target gray level.
[0156] Thus, in this embodiment of the application, the second gray-level-brightness mapping data can be determined based on the first gray level, the first brightness, the second gray level, and the second brightness, and the target gray level can be determined based on the first gray-level-brightness mapping data and the second gray-level-brightness mapping data, thereby realizing the determination of the target gray level.
[0157] Please see Figure 6 In some embodiments of this application, step 0211 includes:
[0158] 02110: Determine the first target brightness corresponding to the second gray level based on the second gray level and the first gray level-brightness mapping data;
[0159] 02111: Based on the first target brightness and the second grayscale-brightness mapping data, determine the first compensation grayscale corresponding to the first target brightness;
[0160] 02112: Determine the target gray level among multiple second gray levels based on the second gray level and the first compensated gray level.
[0161] The node grayscale determination module in this application embodiment is further configured to determine a first target brightness corresponding to the second grayscale based on the second grayscale and the first grayscale-brightness mapping data, and to determine a first compensation grayscale corresponding to the first target brightness based on the first target brightness and the second grayscale-brightness mapping data, and to determine a target grayscale among a plurality of second grayscales based on the second grayscale and the first compensation grayscale.
[0162] The processor in this embodiment is further configured to determine a first target brightness corresponding to the second gray level based on the second gray level and the first gray level-brightness mapping data, and to determine a first compensation gray level corresponding to the first target brightness based on the first target brightness and the second gray level-brightness mapping data, and to determine a target gray level among a plurality of second gray levels based on the second gray level and the first compensation gray level.
[0163] Specifically, in the embodiments of this application, one or more of the multiple second gray levels can be determined as the target gray level based on the second gray level, the first gray level-brightness mapping data, and the second gray level-brightness mapping data.
[0164] For example, let multiple first gray levels be 64, 92, 128, 192, 230, and multiple second gray levels be 30, 40, 50, ..., 230, totaling 21 gray level values. Let the value of N be within these 21 gray level values. Combining the above formulas (1) and (2), the process of obtaining the target gray level may include:
[0165] Substituting N into formula (1), that is, setting Gray in formula (1) to be equal to N, we obtain L corresponding to N. 第一目标 That is, the brightness of the first target. Let L be the value corresponding to N. 第一目标 For L 第一目标(N) .
[0166] L 第一目标(N) Substituting into formula (2), that is, setting L1 in formula (2) to equal L 第一目标(N) Then we get L 第一目标(N) The corresponding Gray, i.e., the first compensated gray level. Let L 第一目标(N) The corresponding Gray is N1.
[0167] Finally, based on N and N1 corresponding to N, one or more of the 21 grayscale values of 30, 40, 50, ..., 230 are determined as the target grayscale.
[0168] It is understandable that when the second gray level has 21 gray level values (30, 40, 50, ..., 230), formula (2) has 21 possible cases, i.e., formula (2) with N taking values of 30, 40, 50, ..., 230 in sequence. Therefore, when L1 in these 21 formulas (2) is equal to L... 第一目标(N)Then, we can solve for the 21 N1 values when N takes the values 30, 40, 50, ..., 230 in sequence, or the 21 N values correspond to the 21 N1 values.
[0169] Furthermore, in one example, for any N, the average difference between N and the 21 corresponding N1 values can be calculated, and the gray level with the smallest average difference among the 21 gray level values of 30, 40, 50, ..., 230 can be taken as the target gray level.
[0170] Thus, in this embodiment of the application, a first target brightness corresponding to the second gray level can be determined based on the second gray level and the first gray level-brightness mapping data, and a first compensation gray level corresponding to the first target brightness can be determined based on the first target brightness and the second gray level-brightness mapping data, and a target gray level among multiple second gray levels can be determined based on the second gray level and the first compensation gray level, so that the target gray level can be determined based on the second gray level and the first compensation gray level corresponding to the second gray level.
[0171] Please see Figure 7 In some embodiments of this application, step 02112 includes:
[0172] 021120: Divide multiple second gray levels into multiple gray level combinations;
[0173] 021121: Based on the first compensation gray level corresponding to the second gray level, determine one second gray level in each gray level combination as the target gray level.
[0174] The node grayscale determination module in this application embodiment is also used to divide multiple second grayscales into multiple grayscale combinations, and to determine one second grayscale in each grayscale combination as the target grayscale according to the first compensation grayscale corresponding to the second grayscale.
[0175] The processor in this embodiment is further configured to perform a division process on a plurality of second gray levels to divide the plurality of second gray levels into a plurality of gray level combinations, and to determine a second gray level in each gray level combination as a target gray level according to a first compensation gray level corresponding to the second gray level.
[0176] Specifically, in this embodiment, a plurality of pre-defined second gray levels are divided into multiple groups to obtain multiple gray level combinations. Then, based on the first compensation gray level corresponding to each second gray level, one second gray level within each gray level combination is determined as the target gray level.
[0177] In one example, the grayscale combination includes three, namely [30,70], [80,150] and [160,230].
[0178] In one example, multiple first gray levels are 64, 92, 128, 192, and 230, and multiple second gray levels are 30, 40, 50, ..., 230, totaling 21 gray level values. The process of obtaining the gray level combination may include: excluding the starting gray level (i.e., 0-20) and the ending gray level (i.e., 240-250), defining gray levels 30 to 70 as low gray levels, gray levels 80 to 150 as medium gray levels, and gray levels 150 to 230 as high gray levels, thereby obtaining three gray level combinations, namely [30,70], [80,150], and [160,230].
[0179] In one example, a second gray level in each gray level combination can be determined as the target gray level based on the first compensation gray level of each second gray level in each gray level combination.
[0180] Thus, in this embodiment of the application, multiple second gray levels can be divided into multiple gray level combinations, and a second gray level in each gray level combination can be determined as the target gray level according to the first compensation gray level corresponding to the second gray level, so that the target gray level can be determined based on multiple gray level combinations.
[0181] Please see Figure 8 In some embodiments of this application, step 021121 includes:
[0182] 0211210: Determine multiple candidate grayscale groups based on a second grayscale level in each grayscale combination;
[0183] 0211211: Based on the second gray level within the candidate gray level group and the first compensated gray level corresponding to the second gray level, determine the first mapping data between gray levels corresponding to the candidate gray level group;
[0184] 0211212: Determine the target gray level based on the first mapping data between gray levels corresponding to each candidate gray level group.
[0185] The node grayscale determination module in this application embodiment is further configured to determine multiple candidate grayscale groups based on a second grayscale in each grayscale combination, and to determine the first grayscale mapping data between grayscales corresponding to the candidate grayscale groups based on the second grayscale in the candidate grayscale groups and the first compensation grayscale corresponding to the second grayscale, and to determine the target grayscale based on the first grayscale mapping data between grayscales corresponding to each candidate grayscale group.
[0186] The processor in this embodiment is further configured to determine multiple candidate grayscale groups based on a second grayscale in each grayscale combination, and to determine first inter-grayscale mapping data corresponding to the candidate grayscale groups based on the second grayscale in the candidate grayscale groups and the first compensation grayscale corresponding to the second grayscale, and to determine the target grayscale based on the first inter-grayscale mapping data corresponding to each candidate grayscale group.
[0187] Specifically, in this embodiment, the electronic device can construct multiple candidate grayscale groups based on a second grayscale level in each grayscale combination. Then, based on the second grayscale level in each candidate grayscale group and the first compensation grayscale level corresponding to the second grayscale level, the first inter-grayscale mapping data corresponding to the candidate grayscale group is determined. Finally, the electronic device can determine all the second grayscale levels in one or more candidate grayscale groups as the target grayscale level based on the first inter-grayscale mapping data corresponding to each candidate grayscale group.
[0188] In one example, multiple second gray levels are 21 gray level values: 30, 40, 50, ..., 230. Excluding the starting gray level (i.e., 0-20) and the ending gray level (i.e., 240-250), gray levels 30-70 are defined as low gray levels, gray levels 80-150 are defined as medium gray levels, and gray levels 150-230 are defined as high gray levels. Thus, three gray level combinations are obtained: [30,70], [80,150], and [160,230]. Then, by extracting a second gray level from each of the three gray level combinations [30,70], [80,150], and [160,230], multiple candidate gray level groups can be obtained, such as [30,80,150], [30,80,160], ..., [30,80,230], [30,90,150], ..., [30,90,230], [30,120,150], ..., [30,120,230], ..., [30,150,230], etc.
[0189] In one example, "the first mapping data between gray levels corresponding to the candidate gray level group" can be used to indicate the mapping relationship between the second gray level and the first compensated gray level in the candidate gray level group.
[0190] For example, please see Figure 9 , Figure 9 This is a schematic diagram illustrating an application scenario in some embodiments of this application. Specifically, it assumes a candidate grayscale group is [30, 90, 220], and the first compensated grayscale corresponding to 30 is N1_. 30 The first compensated gray level corresponding to 90 is N1_ 90 The first compensated gray level corresponding to 220 is N1_ 220 Thus, (30, N1_ 30 (90,N1_) 90 (220,N1_) 220 By plotting these three points on a pre-defined XY coordinate system, we can obtain... Figure 9 The curve shown, Figure 9 This is a schematic diagram illustrating application scenarios in some embodiments of this application.
[0191] Furthermore, regarding (30, N1_ 30 (90,N1_) 90(220,N1_) 220 These three points, when fitted using a linear equation, yield the following equation (i.e., the first mapping data between gray levels):
[0192] G2 = a·G1 + b (3)
[0193] In the formula, G2 represents the compensated gray level (corresponding to the first compensated gray level and N1 mentioned above). G1 represents the input gray level (corresponding to the second gray level and N mentioned above). a and b are the coefficients obtained from the fitting.
[0194] In one example, the electronic device can set the second gray level in one or more candidate gray level groups as the target gray level based on the first mapping data between gray levels corresponding to each candidate gray level group.
[0195] Thus, in this embodiment of the application, multiple candidate grayscale groups can be determined based on a second grayscale in each grayscale combination, and the first inter-grayscale mapping data corresponding to the candidate grayscale groups can be determined based on the second grayscale in the candidate grayscale groups and the first compensation grayscale corresponding to the second grayscale. The target grayscale can be determined based on the first inter-grayscale mapping data corresponding to each candidate grayscale group, so that the target grayscale can be determined based on the first inter-grayscale mapping data corresponding to each candidate grayscale group.
[0196] In some embodiments of this application, the first mapping data between gray levels includes multiple first sub-mapping data, and therefore, step 0211211 includes:
[0197] Based on two adjacent second gray levels within the candidate gray level group, and the first compensation gray level corresponding to the second gray level, the first sub-mapping data of the two second gray levels is determined to determine the first mapping data between gray levels.
[0198] The node grayscale determination module in this application embodiment is further used to determine the first sub-mapping data of the two second grayscales based on two adjacent second grayscales within the candidate grayscale group and the first compensation grayscale corresponding to the second grayscales to determine the first mapping data between grayscales.
[0199] The processor in this embodiment is further configured to determine first sub-mapping data of two second gray levels based on two adjacent second gray levels within a candidate gray level group and a first compensation gray level corresponding to the second gray level, to determine first mapping data between gray levels.
[0200] Specifically, in this embodiment of the application, a mapping relationship between two adjacent second gray levels and their corresponding first compensation gray levels within a candidate gray level group can be fitted. Finally, based on the mapping relationship between any two adjacent second gray levels within the candidate gray level group, the first mapping data between gray levels can be determined.
[0201] For example, using the above (30, N1_ 30 (90,N1_) 90 (220,N1_) 220 Taking these three points as an example, for (30, N1_ 30 (90,N1_) 90 (220,N1_) 220 These three points are fitted using a linear equation (30, N1_). 30 (90,N1_) 90 From this, we can obtain the following equation (i.e., the first sub-mapping data), which is:
[0202] G2=a1·G1+b1 (4)
[0203] In the formula, a1 and b1 are the values obtained through (30, N1_ 30 (90,N1_) 90 The coefficients obtained from the fitting.
[0204] And, using linear equations to fit (90, N1_ 90 (220,N1_) 220 The mapping relationship between these two points can be expressed by the following equation (i.e., the first sub-mapping data):
[0205] G2 = a2·G1 + b2 (5)
[0206] In the formula, a2 and b2 are the values obtained through (90, N1_ 90 (220,N1_) 220 The coefficients obtained from the fitting.
[0207] Therefore, the first mapping data between gray levels of the candidate gray level group [30,90,220] can be expressed by the above formulas (4) and (5).
[0208] Thus, in this embodiment of the application, the first sub-mapping data between two second gray levels can be determined based on two adjacent second gray levels within the candidate gray level group and the first compensation gray level corresponding to the second gray level, thereby obtaining the first mapping data between gray levels corresponding to the candidate gray level group.
[0209] Please see Figure 10 In some embodiments of this application, step 0211212 includes:
[0210] 02112120: Based on the first mapping data between gray levels, determine the second compensation gray level corresponding to the second gray level in the candidate gray level group;
[0211] 02112121: Determine the target gray level group among multiple candidate gray level groups based on the first compensated gray level and the second compensated gray level corresponding to each second gray level in the candidate gray level group.
[0212] 02112122: Determine the second gray level in the target gray level group as the target gray level.
[0213] The node grayscale determination module in this application embodiment is further configured to determine the second compensation grayscale corresponding to the second grayscale in the candidate grayscale group based on the first mapping data between grayscales, and to determine the target grayscale group in multiple candidate grayscale groups based on the first compensation grayscale and the second compensation grayscale corresponding to each second grayscale in the candidate grayscale group, and to determine the second grayscale in the target grayscale group as the target grayscale.
[0214] The processor in this embodiment is further configured to determine the second compensation gray level corresponding to the second gray level in the candidate gray level group based on the first mapping data between gray levels, and to determine the target gray level group in the multiple candidate gray level groups based on the first compensation gray level and the second compensation gray level corresponding to each second gray level in the candidate gray level group, and to determine the second gray level in the target gray level group as the target gray level.
[0215] Specifically, in the embodiments of this application, the second compensation gray level corresponding to the second gray level in the candidate gray level group can be determined according to the first mapping data between gray levels corresponding to the candidate gray level group. Then, according to the first compensation gray level and the second compensation gray level corresponding to each second gray level in the candidate gray level group, one or more of the multiple candidate gray level groups can be determined as the target gray level group. Finally, the second gray level in the target gray level group can be determined as the target gray level.
[0216] For example, taking the above formulas (4) and (5) as examples, assuming that the multiple second gray levels are 21 gray level values of 30, 40, 50, ..., 230, then for the second gray levels less than or equal to 90, that is, the 7 second gray levels of 30, 40, 50, ..., 90, these 7 second gray levels are substituted into formula (4) to obtain the second compensation gray levels of these 7 second gray levels. For the second gray levels greater than 90 and less than or equal to 230, that is, the 14 second gray levels of 100, 110, ..., 230, these 14 second gray levels are substituted into formula (5) to obtain the second compensation gray levels of these 14 second gray levels.
[0217] Next, for the 21 grayscale values of 30, 40, 50, ..., 230, the sum of the differences between the first compensated grayscale and the second compensated grayscale corresponding to each grayscale value is used to determine whether the sum is less than or equal to a preset value. If so, the candidate grayscale group [30, 90, 220] corresponding to formulas (4) and (5) is taken as the target grayscale group, and then 30, 90 and 220 are taken as the target grayscale.
[0218] Thus, in this embodiment of the application, the second compensation gray level corresponding to the second gray level in the candidate gray level group can be determined according to the first mapping data between gray levels, and the target gray level group in multiple candidate gray level groups can be determined according to the first compensation gray level and the second compensation gray level corresponding to each second gray level in the candidate gray level group, and the second gray level in the target gray level group can be determined as the target gray level, so that the target gray level can be determined according to the first compensation gray level and the second compensation gray level corresponding to the second gray level.
[0219] In some embodiments of this application, step 02112121 includes:
[0220] Among multiple candidate grayscale groups, the candidate grayscale group with the smallest grayscale error is determined as the target grayscale group. The grayscale error is used to indicate the deviation between the first compensated grayscale and the second compensated grayscale corresponding to the second grayscale in the candidate grayscale group.
[0221] The node grayscale determination module in this application embodiment is further used to determine the candidate grayscale group with the smallest grayscale error among multiple candidate grayscale groups as the target grayscale group, wherein the grayscale error is used to indicate the deviation between the first compensated grayscale and the second compensated grayscale corresponding to the second grayscale in the candidate grayscale group.
[0222] The processor in this embodiment is further configured to determine the candidate grayscale group with the smallest grayscale error among a plurality of candidate grayscale groups as the target grayscale group, wherein the grayscale error is used to indicate the deviation between the first compensated grayscale and the second compensated grayscale corresponding to the second grayscale in the candidate grayscale group.
[0223] Specifically, in the embodiments of this application, the electronic device can calculate the deviation value between the first compensated gray level and the second compensated gray level corresponding to each second gray level in the candidate gray level group, and take the candidate gray level group with the smallest deviation value as the target gray level group.
[0224] In one example, suppose there are 21 second gray levels: 30, 40, 50, ..., 230. Candidate gray level groups include [30, 80, 150], [30, 80, 160], ..., [30, 80, 230], [30, 90, 150], ..., [30, 90, 230], [30, 120, 150], ..., [30, 120, 230], ..., [30, 150, 230], etc. Then the gray level error (ERR) of any candidate gray level group can be calculated using the following formula:
[0225]
[0226] In the formula, G represents the second gray level, and the value range of G is the interval consisting of 21 gray level values: 30, 40, 50, ..., 230. M represents the height of the target display screen. N represents the width of the target display screen.
[0227] Finally, the ERR of each candidate grayscale group is compared, and the candidate grayscale group with the smallest ERR [30,80,150] is taken as the target grayscale group. The values of a1, b1, a2, and b2 corresponding to [30,80,150] are calculated to be 1.08, -1.04, 1.014, and 3.88, respectively. The first compensated grayscale corresponding to [30,80,150] can be expressed as the set [31,85,156].
[0228] Thus, in this embodiment, the candidate grayscale group with the smallest grayscale error among multiple candidate grayscale groups can be determined as the target grayscale group. This, to a certain extent, ensures the effectiveness and reliability of the target grayscale group and the target grayscale.
[0229] Please see Figure 11 In some embodiments of this application, step 03 includes:
[0230] 030: Based on multiple third gray levels and the brightness of the third pixel corresponding to each third gray level, determine the third gray level-brightness mapping data, wherein the brightness of the third pixel is used to indicate the brightness of the pixels in the display panel when the display panel displays the third gray level image;
[0231] 031: Determine the fourth grayscale-brightness mapping data based on multiple third grayscale levels, multiple third pixel brightness, target grayscale, and the fourth pixel brightness corresponding to the target grayscale level. The fourth pixel brightness is used to indicate the brightness of the pixels in the display panel when the display panel displays the image of the target grayscale level.
[0232] 032: Determine the grayscale compensation data based on the third grayscale-brightness mapping data and the fourth grayscale-brightness mapping data.
[0233] The compensation data determination module in this application embodiment is further configured to determine third grayscale-brightness mapping data based on multiple third grayscale levels and the brightness of the third pixel corresponding to each third grayscale level, and to determine fourth grayscale-brightness mapping data based on multiple third grayscale levels, multiple third pixel brightness, target grayscale, and the brightness of the fourth pixel corresponding to the target grayscale level, and to determine grayscale compensation data based on the third grayscale-brightness mapping data and the fourth grayscale-brightness mapping data. The brightness of the third pixel is used to indicate the brightness of the pixels in the display panel when the display panel displays a third grayscale image, and the brightness of the fourth pixel is used to indicate the brightness of the pixels in the display panel when the display panel displays a target grayscale image.
[0234] The processor in this embodiment is further configured to determine third grayscale-brightness mapping data based on a plurality of third grayscales and the brightness of a third pixel corresponding to each third grayscale, and to determine fourth grayscale-brightness mapping data based on a plurality of third grayscales, a plurality of third pixel brightnesses, a target grayscale, and the brightness of a fourth pixel corresponding to the target grayscale, and to determine grayscale compensation data based on the third grayscale-brightness mapping data and the fourth grayscale-brightness mapping data, wherein the third pixel brightness is used to indicate the brightness of pixels in the display panel when the display panel displays a third grayscale image, and the fourth pixel brightness is used to indicate the brightness of pixels in the display panel when the display panel displays a target grayscale image.
[0235] Specifically, in this embodiment, the electronic device can determine the mapping relationship between gray levels and pixel brightness based on the brightness of pixels in the display panel when displaying an image with a gray level of "third gray level," thereby determining the third gray level-brightness mapping data. Next, the electronic device can calculate the mapping relationship between gray levels and pixel brightness again based on the third gray level, the brightness of pixels in the display panel when displaying an image with a gray level of "third gray level," and the brightness of pixels in the display panel when displaying an image with a gray level of "target gray level," thereby determining the fourth gray level-brightness mapping data. Finally, the electronic device can determine the gray level compensation data for each pixel in the display panel based on the third and fourth gray level-brightness mapping data.
[0236] In one example, the third gray level is the same as the first gray level.
[0237] In one example, the multiple third gray levels are 64, 92, 128, 192, and 230 gray levels respectively.
[0238] In one example, the brightness of the third pixel is the brightness value of each pixel in the actual image displayed on the panel when the display panel shows an image with a grayscale value of 'preset grayscale'.
[0239] In one example, the target gray level can be expressed as one of the following gray level combinations: [30,80,150], [30,80,160], ..., [30,80,230], [30,90,150], ..., [30,90,230], [30,120,150], ..., [30,120,230], ... [30,150,230]. For ease of explanation, the combination [30,80,150] will be used as an example to represent this. Alternatively, the target gray level can be any of the three gray level values: 30, 80, and 150.
[0240] In one example, let the multiple third gray levels be 64, 92, 128, 192, and 230 respectively, and the multiple target gray levels be 30, 80, and 150 respectively. By combining the multiple third gray levels and the multiple target gray levels, we can obtain a total of 8 gray levels: 30, 64, 80, 92, 128, 150, 192, and 230.
[0241] Next, the electronic device can cause the display panel to sequentially display images of eight different gray levels, namely 30, 64, 80, 92, 128, 150, 192, and 230; and when the display panel displays an image of a specific gray level value, a shooting device (such as a camera) captures the actual display image of the display panel, and performs brightness detection on each pixel in the image to determine the brightness of the pixel corresponding to each of the eight gray level values of 30, 64, 80, 92, 128, 150, 192, and 230, thereby completing the acquisition of the brightness of the third pixel and the brightness of the fourth pixel.
[0242] For example, regarding grayscale 30, please refer to the documentation again. Figure 3 First, the brightness of the pixel at position (1,1) in each pixel matrix of the display panel is detected, followed by the pixels at positions (1,2), (1,3)...(1,5), (2,1), (2,2),...(2,5),...(5,5). A total of 25 shots are required, for a total of 25*8=200 shots.
[0243] Next, for the five grayscale values (i.e., the third grayscale) of 64, 92, 128, 192, and 230, and when the display panel shows "five images with grayscale values of 64, 92, 128, 192, and 230 respectively", the brightness values of each pixel in the actual display image are obtained as follows: "the brightness value of the pixel at grayscale 64", "the brightness value of the pixel at grayscale 92", "the brightness value of the pixel at grayscale 128", "the brightness value of the pixel at grayscale 192", and "the brightness value of the pixel at grayscale 230".
[0244] Next, for the statistical values (such as median, mode, and mean) of the pixel brightness values at grayscale 64, 92, 128, 192, and 230, a power-law equation is used for fitting to obtain the third grayscale-brightness mapping data. The third grayscale-brightness mapping data is shown in the following formula:
[0245]
[0246] In the formula, L 第二目标This represents the brightness value of a pixel in the display panel when the display panel shows an image with a grayscale value of Gray. k2 and Υ3 represent the coefficients obtained from the fitting.
[0247] Furthermore, taking grayscale value 30 out of 30, 80, and 150 as an example, based on the statistical values of the pixel brightness at grayscale 64, 92, 128, 192, and 230, and combined with the pixel brightness at grayscale 30, a mapping relationship between grayscale and brightness is fitted to obtain the fourth grayscale-brightness mapping data for grayscale 30. This can be expressed as the following formula:
[0248]
[0249] In the formula, L 2-N This represents the brightness of the pixels on the display panel when the grayscale value is N and the display panel shows an image with a grayscale value of Gray. 2(i,j) Υ 2(i,j) This represents the fitting coefficient of the pixel located in the i-th row and j-th column of the display panel.
[0250] Then, in a similar manner, the fourth gray-level-luminance mapping data when the gray level is 80 and the fourth gray-level-luminance mapping data when the gray level is 90 are determined.
[0251] Finally, the electronic device can determine the grayscale compensation data of each pixel in the display panel based on the third grayscale-brightness mapping data and the fourth grayscale-brightness mapping data, such as by calculating the grayscale compensation data in a manner similar to formulas (4) and (5) in the aforementioned content, the first compensation grayscale, and the second compensation grayscale.
[0252] Thus, in this embodiment of the application, third gray-level-brightness mapping data can be determined based on multiple third gray levels and the brightness of the third pixel corresponding to each third gray level, and fourth gray-level-brightness mapping data can be determined based on multiple third gray levels, multiple third pixel brightness, target gray level, and the brightness of the fourth pixel corresponding to the target gray level, and gray-level compensation data can be determined based on the third gray-level-brightness mapping data and the fourth gray-level-brightness mapping data, so that the gray-level compensation data can be determined based on the third gray-level-brightness mapping data and the fourth gray-level-brightness mapping data.
[0253] Please see Figure 12 In some embodiments of this application, step 032 includes:
[0254] 0320: Determine the second target brightness corresponding to the target grayscale based on the target grayscale and the third grayscale-brightness mapping data;
[0255] 0321: Based on the second target brightness and the fourth grayscale-brightness mapping data, determine the third compensation grayscale corresponding to the target grayscale;
[0256] 0322: Determine the grayscale compensation data based on the target grayscale and the third compensation grayscale.
[0257] The compensation data determination module in this application embodiment is further configured to determine a second target brightness corresponding to the target gray level based on the target gray level and the third gray level-brightness mapping data, and to determine a third compensation gray level corresponding to the target gray level based on the second target brightness and the fourth gray level-brightness mapping data, and to determine gray level compensation data based on the target gray level and the third compensation gray level.
[0258] The processor in this embodiment is further configured to determine a second target brightness corresponding to the target gray level based on the target gray level and the third gray level-brightness mapping data, and to determine a third compensation gray level corresponding to the target gray level based on the second target brightness and the fourth gray level-brightness mapping data, and to determine gray level compensation data based on the target gray level and the third compensation gray level.
[0259] Specifically, in this embodiment of the application, the compensation gray level of the pixels in the display panel can be determined by the third gray-to-brightness mapping data and the fourth gray-to-brightness mapping data, and the gray level compensation data of each pixel in the display panel can be determined by the target gray level and the compensation gray level.
[0260] For example, suppose multiple target gray levels are 30, 80, and 150 respectively. Combining the above formulas (7) and (8), taking 30 as an example among the three gray levels of 30, 80, and 150, we have:
[0261] First, let Gray in formula (7) equal 30, then we get the L corresponding to the grayscale value of 30. 第二目标 That is, the brightness of the second target. Let N correspond to L. 第二目标 For L 第二目标(30) .
[0262] Next, L 第二目标(30) Substituting into formula (8), that is, setting L2 in formula (8) to equal L 第二目标(30) Then we get L 第二目标(30) The corresponding Gray, i.e. the third compensated gray level, is the third compensated gray level of the gray level value of 30.
[0263] Similarly, the third compensation gray level for the gray level value of 50 and the third compensation gray level for the gray level value of 150 can be determined.
[0264] Finally, the electronic device can determine the grayscale compensation data based on the target grayscale and the corresponding third compensation grayscale, such as by determining the grayscale compensation data based on the mapping relationship between the target grayscale and the third compensation grayscale.
[0265] Thus, in this embodiment of the application, a second target brightness corresponding to the target gray level can be determined based on the target gray level and the third gray level-brightness mapping data, and a third compensation gray level corresponding to the target gray level can be determined based on the second target brightness and the fourth gray level-brightness mapping data, and gray level compensation data can be determined based on the target gray level and the third compensation gray level, so that the gray level compensation data can be determined based on the target gray level and the first compensation gray level of the target gray level.
[0266] Please see Figure 13 In some embodiments of this application, step 0322 includes:
[0267] 03220: Determine the second mapping data between gray levels based on the target gray level and the third compensation gray level corresponding to the target gray level;
[0268] 03221: Determine grayscale compensation data based on the second mapping data between grayscale levels.
[0269] The compensation data determination module in this application embodiment is further configured to determine the second mapping data between gray levels based on the target gray level and the third compensation gray level corresponding to the target gray level, and to determine the gray level compensation data based on the second mapping data between gray levels.
[0270] The processor in this embodiment is further configured to determine second mapping data between gray levels based on the target gray level and the third compensation gray level corresponding to the target gray level, and to determine gray level compensation data based on the second mapping data between gray levels.
[0271] Specifically, in this embodiment, the electronic device can determine second mapping data between gray levels based on each target gray level and the corresponding third compensation gray level, to characterize the mapping relationship between the target gray level and the third compensation gray level. Furthermore, the electronic device can determine gray level compensation data based on the second mapping data between gray levels, or use the second mapping data between gray levels as gray level compensation data.
[0272] For example, suppose there are multiple target gray levels, namely 30, 80, and 150, and the third compensation gray levels for gray levels 30, 50, and 150 are already determined. By fitting a linear equation to the mapping relationship between the three gray levels (30, 80, and 150) and the third compensation gray levels for gray levels 30, 50, and 150, we can obtain the following equation (i.e., the second mapping data between gray levels):
[0273] G4 = a·G3 + b (9)
[0274] In the formula, G4 represents the compensated gray level (corresponding to the third compensated gray level). G3 represents the input gray level (corresponding to the target gray level). a and b are the coefficients obtained from the fitting.
[0275] Furthermore, when performing grayscale compensation, the grayscale value of the current image can be substituted into G3 in formula (8) to solve for G4, and the display panel can be controlled to display the current image with a grayscale value of G4, thereby completing the grayscale compensation.
[0276] Thus, in this embodiment of the application, the second mapping data between gray levels can be determined based on each target gray level and the third compensation gray level corresponding to each target gray level, and the gray level compensation data can be determined based on the second mapping data between gray levels, so that the gray level compensation data can be determined based on the second mapping data between gray levels.
[0277] In some embodiments of this application, the second mapping data between gray levels includes multiple mapping sub-data, and step 03220 includes:
[0278] Based on two adjacent target gray levels among multiple target gray levels, and the third compensation gray level corresponding to the target gray level, multiple second mapping sub-data are determined to obtain the second mapping data between gray levels.
[0279] The compensation data determination module in this application embodiment is further used to determine multiple second mapping sub-data based on two adjacent target gray levels among multiple target gray levels and the third compensation gray level corresponding to the target gray level to obtain second mapping data between gray levels.
[0280] The processor in this embodiment is further configured to determine multiple second mapping sub-data based on two adjacent target gray levels among multiple target gray levels and the third compensation gray level corresponding to the target gray level to obtain second mapping data between gray levels.
[0281] Specifically, in order to ensure the effectiveness of the second mapping data between gray levels, in this embodiment of the application, the mapping relationship between two adjacent target gray levels and the third compensation gray levels corresponding to these two target gray levels can be fitted to obtain the second mapping data between gray levels.
[0282] For example, suppose there are multiple target gray levels, namely 30, 80, and 150, and the third compensation gray levels for gray levels 30, 50, and 150 are already determined. By fitting a linear equation to the mapping relationship between the three gray levels (30 and 80) and the third compensation gray levels for gray levels 30 and 50, we can obtain the following equation (i.e., the second sub-mapping data):
[0283] G4 = a3·G3 + b3 (10)
[0284] In the formula, a3 and b3 are coefficients obtained by fitting "the three gray levels of 30 and 80", "the third compensation gray level of the gray level of 30 and the third compensation gray level of the gray level of 50".
[0285] And, using linear equations to fit (90, N1_ 90 (220,N1_) 220 The mapping relationship between these two points can be expressed by the following equation (i.e., the first sub-mapping data):
[0286] G4 = a4·G3 + b4 (11)
[0287] In the formula, a4 and b4 are coefficients obtained by fitting "the three gray levels of 80 and 150", "the third compensation gray level of the gray level of 80 and the third compensation gray level of the gray level of 150".
[0288] Therefore, the first mapping data between gray levels of the candidate gray level group [30,80,150] can be expressed by the above formulas (10) and (11).
[0289] Thus, in this embodiment of the application, multiple second mapping sub-data can be determined based on two adjacent target gray levels among multiple target gray levels and the third compensation gray level corresponding to the target gray level to obtain second mapping data between gray levels, thereby obtaining second mapping data between gray levels.
[0290] In some embodiments of this application, the brightness of the third pixel includes the third brightness of the pixels in the display panel when the display panel displays an image of the third grayscale. Therefore, step 030 includes:
[0291] Based on the statistical values of the third grayscale and the third brightness of each pixel in the display panel, determine the third grayscale-brightness mapping data; and / or,
[0292] The third grayscale-brightness mapping data is determined based on each third grayscale and the third brightness of the second pixel in the display panel.
[0293] The compensation data determination module in this application embodiment is further configured to determine third grayscale-brightness mapping data based on the statistical value of the third brightness of each third grayscale and each pixel in the display panel, and / or to determine third grayscale-brightness mapping data based on the third brightness of each third grayscale and the second pixel in the display panel.
[0294] The processor in this application embodiment is further configured to determine third grayscale-brightness mapping data based on statistical values of the third brightness of each third grayscale and each pixel in the display panel, and / or to determine third grayscale-brightness mapping data based on the third grayscale and the third brightness of each second pixel in the display panel.
[0295] Specifically, in the embodiments of this application, the third grayscale-brightness mapping data can be determined based on the brightness of each pixel in the display panel, or the third grayscale-brightness mapping data can be determined based on the brightness of a specific pixel in the display panel.
[0296] For example, suppose the third gray levels are 64, 92, 128, 192, and 230 respectively. Please refer to [the documentation / reference needed]. Figure 3 In one example, when the electronic device controls the display panel to take five images with grayscale values of 64, 92, 128, 192, and 230 in sequence, it can first take the brightness of the pixel at position (1,1) in each pixel matrix, followed by the pixels at positions (1,2), (1,3), ... (1,5), (2,1), (2,2), ... (2,5), ... (5,5). Each third grayscale corresponds to 25 shots, and five third grayscales correspond to 125 (i.e., 25*5) shots.
[0297] In another example, when the electronic device controls the display panel to capture five images with grayscale values of 64, 92, 128, 192, and 230 in sequence, it can capture the brightness of the pixel at position (1,1) (i.e., the second pixel) in each pixel matrix. The brightness values of the pixels at other positions (1,2), (1,3)...(1,5), (2,1), (2,2),...(2,5),...(5,5) are all replaced by the brightness of the pixel at position (1,1). Thus, each third grayscale corresponds to one capture, and five third grayscales correspond to five (i.e., 1*5) captures.
[0298] Understandably, the second pixel can be set according to the actual situation, so as to... Figure 3 For example, the second pixel can be the pixel at position (1,1) in each pixel matrix, or it can be the pixel at position (3,3) in each pixel combination.
[0299] In addition, it is understandable that, in order to ensure the validity of the fourth grayscale-brightness mapping data, the fourth grayscale-brightness mapping data can be determined based on the brightness of each pixel in the display panel.
[0300] Thus, in this embodiment of the application, the third grayscale-brightness mapping data can be determined based on the statistical value of the third brightness of each third grayscale and each pixel in the display panel, and / or based on the third brightness of each third grayscale and the second pixel in the display panel, thereby realizing the determination of the third grayscale-brightness mapping data.
[0301] In some embodiments of this application, the fourth grayscale-luminance mapping data includes multiple data points, with each pixel corresponding to one fourth grayscale-luminance mapping data point. Therefore, step 032 includes:
[0302] Based on the third grayscale-luminance mapping data and the fourth grayscale-luminance mapping data for each pixel, determine the grayscale compensation data for each pixel.
[0303] The compensation data determination module in this application embodiment is further configured to determine the grayscale compensation data for each pixel based on the third grayscale-brightness mapping data and the fourth grayscale-brightness mapping data for each pixel.
[0304] The processor in this embodiment is further configured to determine grayscale compensation data for each pixel based on the third grayscale-luminance mapping data and the fourth grayscale-luminance mapping data for each pixel.
[0305] Specifically, in the embodiments of this application, for grayscale compensation of each pixel, the electronic device can determine the grayscale compensation data of each pixel based on the third grayscale-brightness mapping data and the fourth grayscale-brightness mapping data of each pixel.
[0306] For example, suppose multiple third gray levels are 64, 92, 128, 192, and 230, and multiple target gray levels are 30, 80, and 150. Combining the multiple third gray levels and the multiple target gray levels yields eight gray levels: 30, 64, 80, 92, 128, 150, 192, and 230. The process of obtaining gray level compensation data can then include:
[0307] First, the electronic device can cause the display panel to sequentially display images at eight different gray levels, namely 30, 64, 80, 92, 128, 150, 192, and 230. Then, when the display panel displays an image at a specific gray level, a photographic device (such as a camera) captures the actual display image on the panel, and the brightness of each pixel in the image is measured to determine the brightness of the pixel corresponding to each of the eight gray levels (30, 64, 80, 92, 128, 150, 192, and 230). This completes the acquisition of the brightness of the third and fourth pixels. For example, regarding gray level 30, please refer to [the relevant documentation / reference needed]. Figure 3First, the brightness of the pixel at position (1,1) in each pixel matrix of the display panel is detected, followed by the pixels at positions (1,2), (1,3)...(1,5), (2,1), (2,2),...(2,5),...(5,5). A total of 25 shots are required, for a total of 25*8=200 shots.
[0308] Next, for the five grayscale values (i.e., the third grayscale) of 64, 92, 128, 192, and 230, and when the display panel shows "five images with grayscale values of 64, 92, 128, 192, and 230 respectively", the brightness values of each pixel in the actual display image are obtained, resulting in "the brightness value of the pixel at grayscale 64", "the brightness value of the pixel at grayscale 92", "the brightness value of the pixel at grayscale 128", "the brightness value of the pixel at grayscale 192", and "the brightness value of the pixel at grayscale 230".
[0309] Next, for the statistical values (such as median, mode, and mean) of the pixel brightness values at grayscale 64, 92, 128, 192, and 230, a power-law equation is used for fitting to obtain the third grayscale-brightness mapping data. The third grayscale-brightness mapping data is shown in the following formula:
[0310]
[0311] Furthermore, taking grayscale value 30 (out of 30, 80, and 150) as an example, based on the statistical values of "the brightness value of a pixel at grayscale 64," "the brightness value of a pixel at grayscale 92," "the brightness value of a pixel at grayscale 128," "the brightness value of a pixel at grayscale 192," and "the brightness value of a pixel at grayscale 230," and combined with "the brightness value of the pixel in the i-th row and j-th column of the display panel at grayscale 30," a mapping relationship between grayscale and brightness is fitted. This yields the fourth grayscale-brightness mapping data for the pixel in the i-th row and j-th column at grayscale 30, which can be expressed as the following formula:
[0312]
[0313] Then, based on formulas (7) and (12), the electronic device can calculate the third compensated gray level of the pixel in the i-th row and j-th column when the gray level is 30. That is, let Gray in formula (7) be 30 to obtain the corresponding L. 第二目标 Then the L 第二目标 Substituting L into formula (12) 2_30The third compensated gray level of the pixel in the i-th row and j-th column when the gray level is 30 is obtained by solving for Gray in formula (12).
[0314] Then, in a similar manner, the third compensated gray level of the pixel in the i-th row and j-th column when the gray level is 80 and the third compensated gray level of the pixel in the i-th row and j-th column when the gray level is 150 are obtained.
[0315] Finally, based on the three target gray levels of 30, 80, and 150, and the "third compensation gray level of the pixel in the i-th row and j-th column when the gray level is 30", "third compensation gray level of the pixel in the i-th row and j-th column when the gray level is 80", and "third compensation gray level of the pixel in the i-th row and j-th column when the gray level is 150", the mapping relationship between the target gray levels and the third compensation gray level is fitted to obtain the second mapping data between the gray levels of the pixel in the i-th row and j-th column. Specifically, this can be expressed by the following two formulas:
[0316] G4 = a 3(i,j) ·G3+b 3(i,j) (13)
[0317] G4 = a 4(i,j) ·G3+b 4(i,j) (14)
[0318] In the formula, a 3(i,j) b 3(i,j) The coefficients a are obtained by fitting the target gray levels 30 and 80, and the third compensation gray level of the pixel in the i-th row and j-th column when the gray level is 30 and the third compensation gray level of the pixel in the i-th row and j-th column when the gray level is 80. 4(i,j) b 4(i,j) The coefficients are obtained by fitting the target gray levels of 80 and 150, as well as the "third compensation gray level of the pixel in the i-th row and j-th column when the gray level is 80" and the "third compensation gray level of the pixel in the i-th row and j-th column when the gray level is 150". It can be understood that the determination process of formulas (13) and (14) can refer to the relevant content of the aforementioned formulas (9), (10) and (11).
[0319] Therefore, the grayscale compensation data of the pixel in the i-th row and j-th column can be determined based on the second mapping data between grayscale values of the pixel in the i-th row and j-th column.
[0320] In one example, the electronic device can fit the coefficients for each pixel, i.e., a. 3(i,j) b 3(i,j) a 4(i,j) b 4(i,j) All are stored in Flash, and then the electronic device can use the data stored in Flash to... 3(i,j) b 3(i,j) a 4(i,j)b 4(i,j) In actual display, grayscale compensation and correction are performed on the pixels.
[0321] Thus, in this embodiment of the application, the grayscale compensation data of each pixel can be determined based on the third grayscale-brightness mapping data and the fourth grayscale-brightness mapping data of each pixel, thereby realizing the determination of the grayscale compensation data of each pixel.
[0322] Please see Figure 14 In some embodiments of this application, step 04 includes:
[0323] 040: Based on the input grayscale of the target pixel in the display panel and the grayscale compensation data corresponding to the target pixel, determine the fourth compensation grayscale corresponding to the target pixel;
[0324] 041: Based on the fourth compensation gray level, control the display panel to perform gray level compensation for the target pixel.
[0325] The compensation module in this application embodiment is further configured to determine a fourth compensation gray level corresponding to the target pixel based on the input gray level of the target pixel in the display panel and the gray level compensation data corresponding to the target pixel, and to control the display panel to perform gray level compensation for the target pixel based on the fourth compensation gray level.
[0326] The processor in this embodiment is further configured to determine a fourth compensation gray level corresponding to the target pixel based on the input gray level of the target pixel in the display panel and the gray level compensation data corresponding to the target pixel, and to control the display panel to perform gray level compensation for the target pixel based on the fourth compensation gray level.
[0327] Specifically, in the embodiments of this application, grayscale compensation data can be used to determine the compensation grayscale corresponding to the input grayscale of a pixel, and then the electronic device can control the display panel to perform display work according to the supplementary grayscale.
[0328] For example, taking the above formulas (13) and (14) as examples, if the display panel displays an image and the gray level of the pixel at position (i,j) in the image is N3, if N3 is less than or equal to 80, then N3 can be substituted into G3 in formula (13) to solve for N4 (i.e., the fourth compensation gray level) corresponding to N3. Then, the electronic device can control the display panel to set the gray level of the pixel at position (i,j) to N4, or control the gray level of the pixel to be increased by (N4-N3) based on N3, thereby completing the gray level compensation.
[0329] Similarly, if N3 is greater than 80, N3 can be substituted into G3 in formula (14) to solve for N4 (i.e., the fourth compensation gray level) corresponding to N3. Then, the electronic device can control the display panel to set the gray level of the pixel at position (i,j) to N4, or control the gray level of the pixel to be increased by (N4-N3) based on N3, thereby completing the gray level compensation.
[0330] In one example, the electronic device can fit the coefficients for each pixel, i.e., a. 3(i,j) b 3(i,j) a 4(i,j) b 4(i,j) All are stored in Flash memory, and then electronic devices can read the data in Flash memory. 3(i,j) b 3(i,j) a 4(i,j) b 4(i,j) Thus, the N4 (i.e. the fourth compensated gray level) corresponding to the above N3 is calculated.
[0331] Thus, in this embodiment of the application, a fourth compensation gray level corresponding to the target pixel can be determined based on the input gray level of the target pixel in the display panel and the gray level compensation data corresponding to the target pixel, and the display panel can be controlled to perform gray level compensation for the target pixel based on the fourth compensation gray level, thereby completing the gray level compensation of each pixel.
[0332] For details regarding certain embodiments of this application, please refer to the accompanying documentation. Figure 3 , Figure 5 and Figure 15 , Figure 15 This is a flowchart illustrating the grayscale compensation method in some embodiments of this application, as shown below. Figure 15 As shown, the grayscale compensation method provided in this application may include the following five steps:
[0333] First, determine the target brightness value: capture a 5-dot image with grayscale levels of 64, 92, 128, 192, and 230, i.e. Figure 3 As shown, the pixel at position (1, 1) is used to replace the 5*5 pixels. Then, the grayscale brightness of the 5-dot image is extracted, and the target brightness values for these five grayscale levels are determined by calculating the average, median, and mode of the brightness of the captured pixels.
[0334] Next, the target brightness values across all grayscale levels were determined: the target values corresponding to grayscale levels 64, 92, 128, 192, and 230 were subjected to gamma fitting (L... N =k(N / 255) γ To obtain the target value for the entire grayscale range of 0 to 255;
[0335] Then, the key gray levels for compensation coefficients are determined: 5-dot images of 21 gray levels (30, 60, 80, 90, 100, ..., 230) are captured, and the gray level brightness of each 5-dot image is extracted. Let a gray level greater than 92 and less than 128 be X. By inserting X into the gray level sequence, the input gray level sequence becomes 64, 92, X, 128, 192, 230. The gamma curve corresponding to all captured pixels is fitted to obtain the following result: Figure 5 The Gamma curve corresponding to pixel (i,j) shown is L. N(i,j) =k (i,j) (N / 255) γ(i,j) At the same time, based on the target value, the compensation grayscale of the shooting pixel (i,j) corresponding to 30, 60, 80, 90, 100, ..., 230 is calculated.
[0336] Then, the gray levels are grouped to obtain a series of key gray level sequences, such as [30,80,150], [30,80,160], ..., [30,80,230]; [30,90,150], ..., [30,90,230]; [30,120,150] ... [30,120,230];
[0337] Subsequently, the input grayscale and compensation grayscale are generated to determine the compensation coefficient. Each set of KB coefficients obtains the compensation grayscale corresponding to all grayscales of the captured pixel. The input compensation grayscale is used to obtain the predicted brightness value. Finally, the brightness error of all grayscales is obtained. The grayscale combination with the smallest error is found. This grayscale combination is the key grayscale of the compensation coefficient.
[0338] Next, the compensation grayscale for the key grayscale is generated: based on the grayscale combination with the smallest error, a full-pixel image is captured, the brightness of all pixels is extracted, and a first-level compensation and a second-level compensation logic is used to determine the compensation grayscale for the key grayscale.
[0339] Finally, the KB coefficients of the key grayscale and the compensation grayscale are generated and stored in Flash, so that full-pixel grayscale compensation can be performed through the KB coefficients in Flash.
[0340] This application also provides a computer-readable storage medium storing a computer program that, when executed by one or more processors, implements the grayscale control method described above.
[0341] This application also provides a computer program product, including a computer program / instruction, which, when executed by a processor, implements the grayscale control method described above.
[0342] In this specification, the terms "specifically," "furthermore," "particularly," "understandably," etc., refer to specific features, structures, materials, or characteristics described in connection with embodiments or examples that are included in at least one embodiment or example of this application. In this specification, the illustrative expressions of the above terms do not necessarily refer to the same embodiment or example. Furthermore, the specific features, structures, materials, or characteristics described may be combined in any suitable manner in one or more embodiments or examples. Moreover, without contradiction, those skilled in the art can combine and integrate the different embodiments or examples described in this specification, as well as the features of different embodiments or examples.
[0343] Any process or method described in the flowchart or otherwise herein can be understood as representing a module, segment, or portion of code comprising one or more executable instructions for implementing a particular logical function or process, and the scope of the preferred embodiments of this application includes additional implementations in which functions may be performed not in the order shown or discussed, including substantially simultaneously or in reverse order depending on the function involved, as will be understood by those skilled in the art to which embodiments of this application pertain.
[0344] Although embodiments of this application have been shown and described above, it is understood that the above embodiments are exemplary and should not be construed as limiting this application. Those skilled in the art can make changes, modifications, substitutions and variations to the above embodiments within the scope of this application.
Claims
1. A grayscale compensation method, characterized in that, include: Multiple preset gray levels and the brightness of a first pixel corresponding to each preset gray level are obtained, wherein the brightness of the first pixel is used to indicate the brightness of the pixels in the display panel when the display panel displays the image of the preset gray level; Based on the preset grayscale and the brightness of the first pixel, a target grayscale is determined among the multiple preset grayscales; Based on the target gray level, determine the gray level compensation data; Based on the grayscale compensation data, the display panel is controlled to perform grayscale compensation.
2. The method according to claim 1, characterized in that, The preset grayscale includes multiple first grayscales, and the brightness of the first pixel includes the brightness of the multiple first pixels in the display panel when the display panel displays an image of the first grayscale. Determining a target grayscale among the multiple preset grayscales based on the preset grayscale and the brightness of the first pixel includes: Based on the first gray level and the multiple first luminances corresponding to the first gray level, determine the first gray level-luminance mapping data; The target gray level is determined based on the first gray-level-brightness mapping data.
3. The method according to claim 2, characterized in that, The preset grayscale includes multiple second grayscales, and the brightness of the first pixel includes the second brightness of the first pixel when the display panel displays an image of the second grayscale. Determining the target grayscale based on the first grayscale-brightness mapping data includes: Based on the first gray level, the first brightness, the second gray level, and the second brightness, determine the second gray level-brightness mapping data; The target gray level is determined based on the first gray-to-brightness mapping data and the second gray-to-brightness mapping data.
4. The method according to claim 3, characterized in that, Determining the target grayscale based on the first grayscale-brightness mapping data and the second grayscale-brightness mapping data includes: Based on the second grayscale and the first grayscale-brightness mapping data, determine the first target brightness corresponding to the second grayscale; Based on the first target brightness and the second grayscale-brightness mapping data, determine the first compensation grayscale corresponding to the first target brightness; The target gray level is determined from among a plurality of second gray levels based on the second gray level and the first compensated gray level.
5. The method according to claim 4, characterized in that, The step of determining the target gray level among multiple second gray levels based on the second gray level and the first compensated gray level includes: The multiple second gray levels are divided into multiple gray level combinations. Based on the first compensation gray level corresponding to the second gray level, one of the second gray levels in each gray level combination is determined as the target gray level.
6. The method according to claim 5, characterized in that, The step of determining one of the second gray levels within each gray level combination as the target gray level based on the first compensation gray level corresponding to the second gray level includes: Based on one of the second gray levels in each of the gray level combinations, multiple candidate gray level groups are determined; Based on the second gray level in the candidate gray level group and the first compensated gray level corresponding to the second gray level, determine the first mapping data between gray levels corresponding to the candidate gray level group; The target gray level is determined based on the first mapping data between gray levels corresponding to each candidate gray level group.
7. The method according to claim 6, characterized in that, The first mapping data between gray levels includes multiple first sub-mapping data. Determining the first mapping data between gray levels corresponding to the candidate gray level group based on the second gray level within the candidate gray level group and the first compensated gray level corresponding to the second gray level includes: Based on two adjacent second gray levels within the candidate gray level group and the first compensated gray level corresponding to the second gray level, the first sub-mapping data of the two second gray levels is determined to determine the first mapping data between the gray levels.
8. The method according to claim 6, characterized in that, The step of determining the target gray level based on the first mapping data between gray levels corresponding to each candidate gray level group includes: Based on the first mapping data between gray levels, determine the second compensated gray level corresponding to the second gray level in the candidate gray level group; Based on the first compensated gray level and the second compensated gray level corresponding to each second gray level in the candidate gray level group, a target gray level group is determined among the multiple candidate gray level groups. The second gray level within the target gray level group is determined as the target gray level.
9. The method according to claim 8, characterized in that, The step of determining the target grayscale group among multiple candidate grayscale groups based on the first compensated grayscale and the second compensated grayscale corresponding to each second grayscale in the candidate grayscale group includes: Among the multiple candidate grayscale groups, the candidate grayscale group with the smallest grayscale error is determined as the target grayscale group, wherein the grayscale error is used to indicate the deviation between the first compensated grayscale and the second compensated grayscale corresponding to the second grayscale in the candidate grayscale group.
10. The method according to claim 1, characterized in that, The step of determining grayscale compensation data based on the target grayscale includes: Based on multiple third gray levels and the brightness of the third pixel corresponding to each third gray level, third gray level-brightness mapping data is determined, wherein the brightness of the third pixel is used to indicate the brightness of the pixels in the display panel when the display panel displays the image of the third gray level; Based on multiple third gray levels, multiple third pixel brightness levels, the target gray level, and the brightness of the fourth pixel corresponding to the target gray level, fourth gray level-brightness mapping data is determined, wherein the brightness of the fourth pixel is used to indicate the brightness of the pixels in the display panel when the display panel displays the image of the target gray level; The grayscale compensation data is determined based on the third grayscale-brightness mapping data and the fourth grayscale-brightness mapping data.
11. The method according to claim 10, characterized in that, The step of determining the grayscale compensation data based on the third grayscale-brightness mapping data and the fourth grayscale-brightness mapping data includes: Based on the target grayscale and the third grayscale-brightness mapping data, determine the second target brightness corresponding to the target grayscale; Based on the second target brightness and the fourth grayscale-brightness mapping data, a third compensation grayscale corresponding to the target grayscale is determined; The grayscale compensation data is determined based on the target grayscale and the third compensation grayscale.
12. The method according to claim 11, characterized in that, The step of determining the grayscale compensation data based on the target grayscale and the third compensation grayscale includes: Based on the target gray level and the third compensation gray level corresponding to the target gray level, determine the second mapping data between gray levels; The grayscale compensation data is determined based on the second mapping data between grayscale levels.
13. The method according to claim 12, characterized in that, The second mapping data between gray levels includes multiple second mapping sub-data. Determining the second mapping data between gray levels based on the target gray level and the corresponding third compensated gray level includes: Based on two adjacent target gray levels among the multiple target gray levels, and the third compensation gray level corresponding to the target gray level, multiple second mapping sub-data are determined to obtain the second mapping data between the gray levels.
14. The method according to claim 10, characterized in that, The third pixel brightness includes the third brightness of pixels in the display panel when the display panel displays the third grayscale image. Determining the third grayscale-brightness mapping data based on multiple third grayscales and the third pixel brightness corresponding to each third grayscale includes: Based on the statistical values of the third grayscale and the third brightness of each pixel in the display panel, determine the third grayscale-brightness mapping data; and / or, The third grayscale-brightness mapping data is determined based on each of the third grayscale levels and the third brightness of the second pixel in the display panel.
15. The method according to claim 10, characterized in that, The fourth grayscale-luminance mapping data includes multiple data sets, with each pixel corresponding to one set of the fourth grayscale-luminance mapping data. Determining the grayscale compensation data based on the third grayscale-luminance mapping data and the fourth grayscale-luminance mapping data includes: Based on the third grayscale-luminance mapping data and the fourth grayscale-luminance mapping data for each pixel, the grayscale compensation data for each pixel is determined.
16. The method according to claim 15, characterized in that, The step of controlling the display panel to perform grayscale compensation based on the grayscale compensation data includes: Based on the input grayscale of the target pixel in the display panel and the grayscale compensation data corresponding to the target pixel, a fourth compensation grayscale corresponding to the target pixel is determined; Based on the fourth compensation grayscale, the display panel is controlled to perform grayscale compensation for the target pixel.
17. A grayscale compensation device, characterized in that, include: The acquisition module is used to acquire multiple preset gray levels and the brightness of a first pixel corresponding to each preset gray level, wherein the brightness of the first pixel is used to indicate the brightness of the pixels in the display panel when the display panel displays the image of the preset gray level; The node grayscale determination module is used to determine a target grayscale among multiple preset grayscales based on the preset grayscale and the brightness of the first pixel. The compensation data determination module is used to determine grayscale compensation data based on the target grayscale. The compensation module is used to control the display panel to perform grayscale compensation based on the grayscale compensation data.
18. An electronic device, characterized in that, The method includes a memory and a processor, wherein the memory stores a computer program, which, when executed by the processor, implements the method according to any one of claims 1-16.
19. A computer-readable storage medium, characterized in that, The computer-readable storage medium stores a computer program that, when executed by one or more processors, implements the method according to any one of claims 1-16.
20. A computer program product comprising a computer program / instructions, characterized in that, When the computer program / instructions are executed by the processor, they implement the method described in any one of claims 1-16.