Brightness compensation method and device, computer equipment, readable storage medium and program product
By acquiring and calculating the compensation data of each pixel point in the display screen, and combining the interpolation weight to compensate the brightness and color of the AMOLED display screen, the problem of insufficient compensation accuracy of Mura defects in the existing technology is solved, and the brightness and uniform color of the display screen are improved. sex.
Patent Information
- Application Number
- CN202411471751.1
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2024-10-21
- Publication Date
- 2024-12-10
AI Technical Summary
The prior art is unable to accurately calculate compensation data for each pixel point because only a few grayscales are calibrated in AMOLED display screens, resulting in insufficient compensation accuracy of Mura defects and inability to achieve brightness and color uniformity.
By obtaining the compensation data of the actual binding points in the image to be processed at the target brightness, and computing the compensation data of the virtual binding points and other pixel points combined with the interpolation weight, precise compensation at the gray level and brightness level is performed to generate a compensation image.
It achieves higher accuracy compensation for the brightness and color of the AMOLED display, improves the brightness and color uniformity of the display, and improves the visual effect.
Smart Images

Figure CN119107911A_ABST
Abstract
Description
Technical Field
[0001] The present application relates to the field of image processing technology, and in particular to a brightness compensation method, apparatus, computer equipment, computer-readable storage medium, and computer program product. Background Art
[0002] Mura defect compensation for AMOLED displays refers to a technology that uses specific algorithms and data processing to correct uneven screen brightness (i.e., Mura phenomenon) caused by manufacturing processes or material properties, thereby improving display quality.
[0003] The core of mura compensation is to dynamically correct the display parameters of defective areas by calculating and storing compensation data of these areas, so that the brightness and color of the display appear more uniform visually.
[0004] The existing technology only calibrates a few grayscales and cannot accurately calculate compensation data for each pixel, resulting in insufficient accuracy in mura defect compensation. Summary of the invention
[0005] Based on this, it is necessary to provide a brightness compensation method, device, computer equipment, computer-readable storage medium and computer program product that can accurately compensate for the above technical problems.
[0006] In a first aspect, the present application provides a brightness compensation method, the method comprising:
[0007] Acquire the image to be processed and each first compensation data of each actual binding point in the image to be processed at the target brightness; the pixel points in the image to be processed include the actual binding point, the virtual binding point and other pixel points;
[0008] In combination with the interpolation weight and each of the first compensation data, the second compensation data corresponding to each of the virtual binding points and the third compensation data corresponding to the other pixel points are calculated; the interpolation weight is obtained according to the relative position of the actual binding point and the virtual binding point;
[0009] The image to be processed is compensated according to each of the second compensation data and each of the third compensation data to obtain a compensated image.
[0010] In one embodiment, the combining the interpolation weight and each of the first compensation data to calculate the second compensation data corresponding to each of the virtual binding points and the third compensation data corresponding to other pixel points includes:
[0011] Converting the image to be processed from the current brightness to the target brightness, and obtaining first grayscale values corresponding to each of the virtual binding points, each of the actual binding points, and other pixel points at the target brightness;
[0012] Calculating second compensation data corresponding to the virtual binding point according to the interpolation weight and the first compensation data corresponding to each of the actual binding points;
[0013] The relative positions of the other pixels in the binding point are determined according to the first grayscale value, and the third compensation data is obtained by interpolation calculation based on the second compensation data and the first compensation data.
[0014] In one embodiment, the interpolation weight is calculated by:
[0015] Determine a reference actual binding point corresponding to each of the virtual binding points;
[0016] An interpolation calculation is performed according to the first grayscale value corresponding to the reference actual binding point and the first grayscale values corresponding to each of the virtual binding points to obtain the interpolation weight.
[0017] In one embodiment, after converting the image to be processed from the current brightness to the target brightness and obtaining the first grayscale values corresponding to each of the virtual binding points, each of the actual binding points and other pixel points at the target brightness, the method further includes:
[0018] Calculate a first difference between the first grayscale value and the second grayscale value; the second grayscale value is a standard grayscale value corresponding to the target brightness;
[0019] When the first difference satisfies a first difference threshold, correcting the first grayscale value;
[0020] After calculating the second compensation data corresponding to the virtual binding point according to the interpolation weight and the first compensation data corresponding to each actual binding point, the method further includes:
[0021] calculating a second difference between the first compensation data and the second compensation data;
[0022] When the second difference satisfies a second difference threshold, modifying the second compensation data;
[0023] After determining the relative positions of the other pixels in the binding point based on the first grayscale value and obtaining the third compensation data by interpolation calculation based on the second compensation data and the first compensation data, the method further includes:
[0024] calculating a third difference between the first compensation data and the third compensation data;
[0025] When the third difference satisfies a third difference threshold, the third compensation data is corrected.
[0026] In one embodiment, the method of correcting the first grayscale value, and / or the method of correcting the second compensation data, and / or the third compensation data includes:
[0027] Get the current display mode;
[0028] In combination with the current display mode, a correction value is calculated, and the second compensation data and / or the first grayscale value and / or the third compensation data are corrected according to the correction value.
[0029] According to the above method, the correction value includes a first correction value and a second correction value; the calculation method of the correction value includes:
[0030] If the display mode is the first mode, determining a first brightness correction parameter and a first grayscale correction parameter according to the current brightness and the first grayscale value, respectively, and calculating the first correction value according to the first brightness correction parameter and the first grayscale correction parameter;
[0031] If the display mode is the second mode, a second grayscale correction parameter is determined according to the first grayscale value, and the second correction value is calculated according to the second grayscale correction parameter.
[0032] In one embodiment, determining a first brightness correction parameter and a first grayscale correction parameter according to the current brightness and the first grayscale value respectively, and calculating a first correction value according to the first brightness correction parameter and the first grayscale correction parameter, comprises:
[0033] Determining the first brightness correction parameter and the first grayscale correction parameter according to the current brightness and the first grayscale value;
[0034] Based on the brightness correction parameter and the first grayscale correction parameter, interpolation calculation is performed in the grayscale dimension and the brightness dimension respectively to obtain the first correction value.
[0035] In one embodiment, determining a second grayscale correction parameter according to the first grayscale value, and calculating a second correction value according to the second grayscale correction parameter, includes:
[0036] determining the second grayscale correction parameter according to the first grayscale value;
[0037] An interpolation calculation is performed according to the second grayscale correction parameter to obtain the second correction value.
[0038] In one embodiment, converting the image to be processed from the current brightness to the target brightness to obtain the first grayscale value corresponding to each of the virtual binding points, each of the actual binding points and other pixel points at the target brightness includes:
[0039] Calculating the ratio between the current brightness and the target brightness to obtain a conversion coefficient;
[0040] The image to be processed is converted from the current brightness to the target brightness using the conversion coefficient, and the first grayscale values corresponding to each of the virtual binding points, each of the actual binding points and other pixel points at the target brightness are obtained.
[0041] In one embodiment, after compensating the image to be processed according to each of the second compensation data and each of the third compensation data to obtain a compensated image, the method further includes:
[0042] The compensated image is converted from the target brightness to the current brightness using the reciprocal of the conversion coefficient to obtain a target compensated image.
[0043] In a second aspect, the present application provides a brightness compensation device, the device comprising:
[0044] An acquisition module, used for acquiring an image to be processed and first compensation data of an actual binding point in the image to be processed at a target brightness; the pixel points in the image to be processed include the actual binding point and the virtual binding point;
[0045] A compensation calculation module, used to calculate the second compensation data corresponding to each virtual binding point and the third compensation data corresponding to the other pixel points in combination with the interpolation weight and each of the first compensation data; the interpolation weight is obtained according to the relative position of the actual binding point and the virtual binding point;
[0046] A compensation module is used to compensate the image to be processed according to each of the second compensation data and each of the third compensation data to obtain a compensated image.
[0047] In a third aspect, the present application provides a computer device, including a memory and a processor, wherein the memory stores a computer program, and the processor implements the steps of the above method when executing the computer program.
[0048] In a fourth aspect, the present application provides a computer-readable storage medium having a computer program stored thereon, wherein the computer program implements the steps of the above method when executed by a processor.
[0049] In a fifth aspect, the present application provides a computer program product, including a computer program, which implements the steps of the above method when executed by a processor.
[0050] The brightness compensation method, device, computer equipment, computer-readable storage medium and computer program product described above can obtain compensation data of each actual binding point in the image to be processed at the target brightness, and calculate the compensation data of the virtual binding point and other pixel points through interpolation weights, thereby achieving more accurate Mura defect compensation at each grayscale and brightness level, and improving the uniformity of the brightness and color of the display screen. BRIEF DESCRIPTION OF THE DRAWINGS
[0051] In order to more clearly illustrate the technical solutions in the embodiments of the present application or related technologies, the drawings required for use in the embodiments of the present application or related technical descriptions will be briefly introduced below. Obviously, the drawings described below are only some embodiments of the present application. For ordinary technicians in this field, other related drawings can be obtained based on these drawings without paying creative work.
[0052] Figure 1 is a schematic flow chart of a brightness compensation method in one embodiment;
[0053] Figure 2 A schematic diagram of binding points in an image to be processed in an embodiment;
[0054] Figure 3 is a flow chart of a brightness compensation method according to another embodiment;
[0055] Figure 4 is a structural block diagram of a brightness compensation device in one embodiment;
[0056] Figure 5 FIG. 4 is a diagram showing the internal structure of a computer device in one embodiment. DETAILED DESCRIPTION
[0057] In order to make the purpose, technical solution and advantages of the present application more clearly understood, the present application is further described in detail below in conjunction with the accompanying drawings and embodiments. It should be understood that the specific embodiments described herein are only used to explain the present application and are not used to limit the present application.
[0058] In one embodiment, Figure 1 As shown, a brightness compensation method is provided. This embodiment takes the method applied to a terminal as an example for illustration. It can be understood that the method can also be applied to a server, and can also be applied to a system including a terminal and a server, and is implemented through the interaction between the terminal and the server. In this embodiment, the method includes the following steps:
[0059] Step S102, obtaining the image to be processed and first compensation data of each actual binding point in the image to be processed at the target brightness; the pixel points in the image to be processed include the actual binding points and the virtual binding points.
[0060] The image to be processed refers to an image that needs to be compensated for brightness or uniformity, usually an image with Mura defects. Mura refers to visual non-uniformity problems such as brightness and color on the display screen caused by manufacturing process, material non-uniformity or aging. The image to be processed here refers to an image that has these brightness non-uniformities and needs to be compensated.
[0061] Among them, the actual binding points are predefined and calibrated key pixel points in the image. The positions of these pixel points and the corresponding brightness or color information have been obtained through measurement. Usually, these pixel points represent areas with more serious brightness or color deviations in the image, or some representative sampling points. The compensation data of the actual binding points, that is, the first compensation data, is obtained by optically measuring or calculating the image to be processed, and is used to guide the overall compensation of the image. Virtual binding points refer to pixel points that are not directly physically measured or calibrated.
[0062] Optionally, the actual binding point may be determined according to the brightness non-uniformity on the display, for example, by selecting a pixel point with a larger deviation as the actual binding point.
[0063] Optionally, the pixels in the image to be processed can be divided into two categories: actual binding points and virtual binding points. However, this will increase the complexity of the calculation and resource consumption, because the interpolation calculation itself requires a certain amount of calculation cost, especially in the case of high-resolution images. If each pixel is set as a virtual binding point, accurate interpolation calculation needs to be performed for each point, which will greatly increase the amount of calculation.
[0064] Optionally, in other embodiments, the pixels in the image to be processed can be divided into actual binding points, virtual binding points and other pixel points. The compensation data of other pixel points can be regarded as obtained through secondary interpolation calculation, because their compensation data are usually generated based on the existing compensation data of the actual binding points and virtual binding points. It should be noted that although the compensation data of other pixel points are also obtained through interpolation calculation, high-precision interpolation is not required. It means that simple interpolation is required based on the virtual binding points and the actual binding points, which greatly reduces the calculation cost.
[0065] It is explained here that the pixel points used below are actual binding points, virtual binding points and other pixel points.
[0066] Optionally, before compensating the image to be processed, it is necessary to perform brightness calibration on the image to be processed.
[0067] Optionally, a high-precision optical instrument, such as a brightness meter or a camera, can be used to calibrate the image to be processed, and the display screen or image can be scanned to obtain the actual brightness and color information of each pixel. Through these measurements, the area that needs to be compensated can be accurately identified. Optionally, after the calibration is completed, the brightness differences of each actual binding point in the image are determined by the actual measured data, and these differences are the first compensation data. The first compensation data is the compensation data of the actual binding point at the standard brightness, which indicates the brightness adjustment value that needs to be made to these actual binding points in order to achieve uniform brightness. The compensation data of each binding point is usually determined by the deviation from the target brightness.
[0068] Optionally, the first compensation data acquisition step may be to first measure the brightness of the display screen to obtain an actual brightness distribution diagram, and then determine a target brightness value according to design requirements, that is, preset rules, which may be uniform brightness or brightness that meets specific standards. Finally, the difference between the actual brightness and the target brightness is calculated, and this difference is the brightness adjustment required for compensation, that is, the first compensation data for each actual binding point.
[0069] Step S104, combining the interpolation weights and the first compensation data, calculate the second compensation data corresponding to each virtual binding point and the third compensation data corresponding to other pixel points; the interpolation weights are obtained according to the relative positions of the actual binding points and the virtual binding points.
[0070] The second compensation data is the compensation data of the virtual binding point, and the second binding point data is the compensation data of the virtual binding point inferred from the first compensation data by the interpolation algorithm. The second compensation data is mainly used for virtual binding points that have not been directly measured or calibrated. The compensation data of these points are generated by interpolation, which ensures that the brightness or color of the image in these areas transitions smoothly and avoids abrupt brightness or color changes.
[0071] Optionally, the interpolation weight is obtained according to the relative positions of the actual binding point and the virtual binding point within the grayscale value range.
[0072] Exemplarily, assuming that the grayscale values of the actual binding points are 64, 576, and 1024, respectively, the relative relationship between them can be determined by combining the grayscale values of the actual binding points with the grayscale values of the virtual binding points.
[0073] Further, assuming that the virtual binding point is located at a position between the actual binding points 64 and 576, the relative position thereof is determined by calculating the difference between the grayscale value of the virtual binding point and the grayscale value of the actual binding point.
[0074] Optionally, the weights may be interpolated according to the binding point positions. For example, assuming that the first compensation data corresponding to the actual binding points are y1, y2, and y3, the calculation process of the second compensation data is:
[0075] y a =A·y1+B·y2+C·y3 Formula (1)
[0076] Among them, A, B, C are interpolation weights, y a is the first compensation data of the virtual binding point a.
[0077] Since most of the pixels in the image to be processed belong to neither the actual binding point nor the virtual binding point, but these pixels also need brightness or color compensation, the compensation data of other pixels must be calculated using the compensation data of the adjacent actual binding points and virtual binding points.
[0078] Exemplarily, if a certain pixel point is located between two virtual binding points, or between an actual binding point and a virtual binding point, interpolation may be performed using compensation data of the actual binding point and the virtual binding point.
[0079] Step S106, compensating the image to be processed according to each second compensation data and each third compensation data to obtain a compensated image.
[0080] Optionally, each pixel point in the image to be processed is traversed, and corresponding compensation data is applied to each pixel point to perform compensation, and finally a compensated image is generated.
[0081] Exemplarily, assuming that the original grayscale value of a pixel is Gray1 and its compensation data is offset, the compensated grayscale value is Gray_out=Gray1+offset.
[0082] The above brightness compensation method can obtain the compensation data of each actual binding point in the image to be processed at the target brightness, and calculate the compensation data of the virtual binding point and other pixel points through interpolation weights, so as to achieve more accurate Mura defect compensation at each grayscale and brightness level, and improve the uniformity of the brightness and color of the display.
[0083] Furthermore, the above-mentioned combination of interpolation weights and each first compensation data calculates the second compensation data corresponding to each virtual binding point and the third compensation data corresponding to other pixel points, including: converting the image to be processed from the current brightness to the target brightness, and obtaining the first grayscale values corresponding to each virtual binding point, each actual binding point and other pixel points under the target brightness; calculating the second compensation data corresponding to the virtual binding point according to the interpolation weights and the first compensation data corresponding to each actual binding point; and obtaining the third compensation data by interpolating the second compensation data according to the relative position of the first grayscale value in the binding point.
[0084] Since the first compensation data is measured at the target brightness, the brightness of the current image to be processed needs to be adjusted to be consistent with the target brightness before the compensation calculation is performed, so as to ensure that the compensation calculation between the virtual binding point and the actual binding point is based on the same brightness reference.
[0085] Optionally, the grayscale value of each pixel in the image to be processed may be adjusted from the current brightness to the target brightness through a conversion factor to obtain the first grayscale value corresponding to each virtual binding point and each actual binding point under the target brightness.
[0086] Furthermore, since the brightness grading of the display is determined based on a brightness curve, that is, each brightness curve corresponds to a specific brightness level, a conversion factor can be calculated based on the target brightness and the brightness curve corresponding to the current brightness.
[0087] In this embodiment, the relationship between the grayscale value and the brightness value is described. The relationship between the grayscale value and the brightness value can be described by a brightness curve. The grayscale value usually refers to the numerical range of the input signal, representing the brightness intensity of the pixel, while the brightness value is the physical brightness of the display according to the actual output. In other words, the grayscale value represents the brightness of the input image, and the brightness value is the actual brightness output by the display, and a nonlinear relationship is established between the two through the brightness curve.
[0088] Therefore, the brightness curve corresponding to the current brightness and the brightness curve corresponding to the target brightness can be compared to calculate the conversion factor, and the image to be processed can be converted from the current brightness to the target brightness according to the conversion factor.
[0089] After the image to be processed is converted from the current brightness to the target brightness, the grayscale value will also change accordingly, so the first grayscale value corresponding to each virtual binding point, each actual binding point and other pixel points under the target brightness can be obtained.
[0090] In the above embodiment, the interpolation weight can be calculated according to the relative position of the actual binding point and the virtual binding point within the grayscale value range. In this embodiment, the image to be processed is converted from the current brightness to the target brightness, so the relative position relationship between the actual binding point and the virtual binding point can be determined by comparing their first grayscale values at the target brightness.
[0091] Each virtual binding point has a different grayscale value position with its adjacent actual binding point, and the interpolation weight reflects the relative position of the virtual binding point between these actual binding points. The larger the weight, the closer the virtual binding point is to the actual binding point.
[0092] Optionally, for a virtual binding point, assuming it is located between two actual binding points y1 and y2, the interpolation calculation formula is:
[0093] ya =A·y1+(1-A)y2 Formula (2)
[0094] Wherein, y1 and y2 are the first compensation data of two adjacent actual binding points, A is the weight of the virtual binding point relative to the first actual binding point, and 1-A is the weight relative to the second actual binding point.
[0095] Since other pixel points are located outside the actual binding point and the virtual binding point and have no direct calibration compensation data, their compensation data need to be further interpolated and calculated through the second compensation data of the virtual binding point and the first compensation data of the actual binding point.
[0096] That is, the phase positions of other pixels and the actual binding points and virtual binding points, that is, the interpolation weights, are determined based on the first grayscale values corresponding to other pixels. Once the relative positions of the pixels in the binding points are determined, interpolation calculations can be performed based on the compensation data of the adjacent binding points to obtain the third compensation data.
[0097] For example, suppose there is a grayscale value to be compensated x, the corresponding compensation data is y, the pixel point is located between the actual binding point y1 and the virtual binding point ya, the grayscale value of the virtual binding point is a, and the grayscale value of the actual binding point is 64 (assuming the grayscale value of the actual binding point is 64). The formula is as follows:
[0098]
[0099] Among them, y1 is the compensation data corresponding to the actual binding point, ya is the compensation data corresponding to the virtual binding point a, x is the grayscale value to be compensated; a is the grayscale value of the virtual binding point; y is the compensation data of the grayscale value x.
[0100] One point that needs to be explained is that y1-ya represents the amplitude of change in the compensation data between the actual binding point and the virtual binding point a. This value reflects the amount of change in the compensation data in this interval. (xa) / (64-a) is the interpolation weight, which represents the position ratio of the grayscale value x between the virtual binding point and the actual binding point. The closer this ratio is to 1, the closer x is to the actual binding point; the closer the ratio is to 0, the closer x is to the virtual binding point. +ya: Indicates that the final result is adjusted based on the virtual binding point a. Since this embodiment interpolates between the virtual binding point a and the actual binding point, the compensation data starts from ya.
[0101] Optionally, linear interpolation, multi-point interpolation and high-order interpolation may be used for interpolation calculation, which will not be described in detail in this embodiment.
[0102] In addition, since in this embodiment the second compensation data is obtained by interpolating the first compensation data, and the third compensation data is obtained by interpolating the first compensation data and the second compensation data, in order to distinguish the interpolation weights used to calculate the second compensation data and the third compensation data, the interpolation weight used to calculate the first compensation data can be called the first interpolation weight, and the interpolation weight used for calculating the second compensation data can be called the second interpolation weight.
[0103] In the above embodiment, first, by converting the image to be processed to the target brightness, it is ensured that all compensation calculations are performed under a unified brightness reference, so that errors caused by inconsistent brightness can be avoided. Secondly, using the interpolation weight, combined with the actual binding point compensation data, compensation calculations are performed on each virtual binding point to make the brightness or color transition of the virtual binding point smoother. Finally, for other pixel points in the image that do not have direct compensation data, interpolation calculations are further performed using the compensation data of the virtual binding point and the actual binding point. In this way, accurate compensation data can be generated for each pixel.
[0104] Furthermore, in one embodiment, the calculation method of the above-mentioned interpolation weight includes: determining the reference actual binding point corresponding to each virtual binding point; performing interpolation calculation according to the first grayscale value corresponding to the reference actual binding point and the first grayscale value corresponding to each virtual binding point to obtain the interpolation weight.
[0105] In this embodiment, it is first necessary to find a reference actual binding point associated with each virtual binding point. The reference actual binding point refers to the actual binding point adjacent to each virtual binding point. They are closest to the virtual binding point in terms of grayscale value. Usually, the virtual binding point is located between two actual binding points. Therefore, it is necessary to select two actual binding points as reference points, that is, reference actual binding points.
[0106] Exemplarily, if the grayscale value of the virtual binding point is between the two actual binding points G1 and G2, then G1 and G2 are the reference actual binding points of the virtual binding point.
[0107] Optionally, the interpolation weight of the virtual binding point is determined according to the grayscale value distance relative to the reference actual binding point. The larger the weight, the closer the virtual binding point is to the actual binding point; the smaller the weight, the farther the distance is.
[0108] Exemplary, combined Figure 2 , Figure 2 Schematic diagram of binding points in an image to be processed in an embodiment. The grayscale value range of the display is defined as from 0 to 4096, where 0 represents complete black with a brightness of 0 and 4096 represents the brightest white with maximum brightness. Assume that there are 13 binding points, namely [0, a, b, c, d, e, f, g, h, i, j, k, 4096]. Among them, 3 actual binding points can be selected from ak, and the rest are used as virtual binding points.
[0109] Since in this embodiment, there are three actual binding points involved in the interpolation calculation, the compensation data of each virtual binding point is calculated by the weight associated with the compensation data of three undesigned binding points. Therefore, in this embodiment, three interpolation weights A, B, and C are defined, which respectively represent a degree of each actual binding point.
[0110] Specifically, A represents the difference weight between the virtual binding point and the first actual binding point, B represents the difference weight between the virtual binding point and the second actual binding point, and C represents the difference weight between the virtual binding point and the third actual binding point.
[0111] Each binding point has 3 additional registers. For each sub-pixel, there are 13 sets of A, B, and C values. y1, y2, and y3 are the compensation data of the three actual binding points. The registers are used to store the difference weights corresponding to each binding point, so each binding point will have a set of A, B, and C registers, which are used for interpolation calculations when calculating compensation data.
[0112] Assuming that the first grayscale values corresponding to the actual binding points are 64, 576 and 1024 respectively, the corresponding compensation data are y1, y2 and y3 respectively.
[0113] The virtual binding points are a, b, c, and d, and then the compensation values of the virtual binding points are calculated one by one according to the interpolation formula.
[0114] For the virtual binding point a, the weight A is The weight B is The weight C is
[0115] For the virtual binding point b, the weight A is The weight B is The weight C is 0.
[0116] For the virtual binding point c, the weight A is 0 and the weight B is The weight C is
[0117] For the virtual binding point d, the weight A is The weight B is The weight C is
[0118] It should be noted that, when a linear relationship is satisfied, the weights A, B, and C can be calculated according to the above method. However, when a nonlinear relationship is satisfied, the calculation method of the weights A, B, and C is not limited to the above calculation formula. For example, they can be obtained through experiments.
[0119] Since in actual scenarios, it is very likely to be a nonlinear relationship, introducing weights in this embodiment can solve the problem that linear interpolation can only simulate the linear relationship of the compensation data corresponding to each binding point, while in fact the compensation data corresponding to each binding point is a nonlinear relationship.
[0120] In the above calculation process, the virtual binding point is between the first actual binding point 64 and the starting point, so interpolation is performed based on the starting point 0 and the first actual binding point 64. When interpolating, the weight depends not only on the difference in grayscale values, but also on the weight value of the initial point, that is, y0. The virtual binding point d is located between the last actual binding point 1024 and the end point 4096. The interpolation is based on two different actual binding points and is adjusted according to the end point 4096 and its weight value. Among them, the actual binding point 64 is a pixel point with a grayscale value of 64.
[0121] In the above embodiment, by combining the grayscale value position relationship between the virtual binding point and the actual binding point, the smoothness and accuracy of the image brightness or color compensation is ensured.
[0122] In an exemplary embodiment, in combination Figure 3 As shown, Figure 3 FIG. 4 is a flow chart of a brightness compensation method according to an embodiment.
[0123] Step S302, obtaining the image to be processed and first compensation data of each actual binding point in the image to be processed at the target brightness; the pixel points in the image to be processed include actual binding points, virtual binding points and other pixel points.
[0124] Step S304 , converting the image to be processed from the current brightness to the target brightness, and obtaining the first grayscale values corresponding to each virtual binding point, each actual binding point and other pixel points under the target brightness.
[0125] Step S306, determining a reference actual binding point corresponding to each virtual binding point; performing interpolation calculation according to the first grayscale value corresponding to the reference actual binding point and the first grayscale value corresponding to each virtual binding point to obtain an interpolation weight.
[0126] Step S308: Calculate second compensation data corresponding to the virtual binding point according to the interpolation weight and the first compensation data corresponding to each actual binding point.
[0127] Step S310, performing interpolation calculation based on the second compensation data, the first compensation data and the first grayscale values corresponding to other pixels to obtain third compensation data.
[0128] Step S312, compensating the image to be processed according to each second compensation data and each third compensation data to obtain a compensated image.
[0129] In this embodiment, each step is not described in detail, and the specific steps can refer to the steps of the method described in the above embodiment.
[0130] In the above embodiment, the gradual brightness conversion, interpolation weight calculation and superposition of compensation data bring higher image correction quality and more natural brightness transition, and ultimately improve the overall visual effect of the image.
[0131] Errors are introduced due to the conversion of the image to be processed from the current brightness to the target brightness. The brightness curve is used to convert the input grayscale value to the actual brightness value output by the display. This is a nonlinear process, the purpose of which is to adjust the brightness response of the display to match the human eye's perception of brightness. However, due to the different responses of the display at different brightness levels, the conversion accuracy of different display brightnesses when converted to grayscale values through the brightness curve may vary. This difference will increase the error when the display brightness is further away from the calibrated compensation data brightness.
[0132] Therefore, in this embodiment, the converted first grayscale value is also corrected.
[0133] Exemplarily, in one embodiment, after converting the image to be processed from the current brightness to the target brightness and obtaining the first grayscale values corresponding to each virtual binding point, each actual binding point and other pixel points at the target brightness, it also includes: calculating the first difference between the first grayscale value and the second grayscale value; the second grayscale value is the standard grayscale value corresponding to the target brightness; and correcting the first grayscale value when the first difference satisfies the first difference threshold.
[0134] The second grayscale value refers to a standard grayscale value at a target brightness, which is usually a grayscale value that should be obtained under ideal conditions.
[0135] The difference between the first grayscale value and the second grayscale value corresponding to each pixel is calculated as the first difference. This difference reflects the deviation between the converted grayscale value and the standard grayscale value under the target brightness. If the difference is too large, it may mean that the current conversion result is not accurate enough and needs further correction.
[0136] In order to avoid excessive adjustment of each pixel, a first difference threshold needs to be set. The first difference threshold is used to determine whether the converted grayscale value is close enough to the standard grayscale value. Only when the first difference exceeds the first difference threshold, correction is required.
[0137] Optionally, if the calculated first difference exceeds a set first difference threshold, the first grayscale value is corrected to reduce the difference with the standard grayscale value.
[0138] Likewise, the second compensation data and the third compensation data obtained by interpolation calculation need to be corrected.
[0139] Exemplarily, in one embodiment, after calculating the second compensation data corresponding to the virtual binding point based on the interpolation weight and the first compensation data corresponding to each actual binding point, it also includes: calculating the second difference between the first compensation data and the second compensation data; and correcting the second compensation data when the second difference satisfies the second difference threshold.
[0140] The second difference reflects the compensation data of the virtual binding point, that is, the difference between the second compensation data and the compensation data of the actual binding point to which it refers, that is, the first compensation data. This step checks whether there is an error in the compensation of the virtual binding point by calculating the difference between the two data.
[0141] Similarly, in order to avoid unnecessary corrections to each virtual binding point, a second difference threshold needs to be set to determine whether the calculated second compensation data is accurate enough. If the difference value is within the threshold range, it is considered that the compensation data of the virtual binding point is accurate enough and no further correction is required; but if the difference exceeds the threshold, it means that there is a large error in the virtual binding point compensation and further adjustment is required.
[0142] Optionally, when the second difference exceeds a threshold value, the second compensation data needs to be corrected to reduce the compensation error and ensure the accuracy of the final compensation value.
[0143] Exemplarily, in one embodiment, after determining the relative positions of other pixel points in the binding point according to the first grayscale value, and obtaining the third compensation data by interpolation calculation of the second compensation data and the first compensation data, it also includes: calculating the third difference between the first compensation data and the third compensation data; and correcting the third compensation data when the third difference satisfies the third difference threshold.
[0144] The third difference reflects the difference between the first compensation data and the third compensation data, and this difference can help determine the accuracy of the compensation data.
[0145] Similarly, in order to avoid unnecessary corrections to each virtual binding point, a second difference threshold needs to be set to determine whether the calculated second compensation data is accurate enough. If the difference value is within the threshold range, it is considered that the compensation data of the virtual binding point is accurate enough and no further correction is required; but if the difference exceeds the threshold, it means that there is a large error in the virtual binding point compensation and further adjustment is required.
[0146] Optionally, when the third difference exceeds a threshold value, the third compensation data needs to be corrected to reduce the compensation error and ensure the accuracy of the final compensation value.
[0147] Furthermore, in one embodiment, the method for correcting the above-mentioned first grayscale value, and / or the method for correcting the second compensation data, and / or the third compensation data includes: obtaining the current display mode; calculating the correction value in combination with the current display mode, and correcting the second compensation data and / or the first grayscale value and / or the third compensation data according to the correction value.
[0148] Different display modes have a significant impact on the display effect of the image. For example, HDR mode usually needs to deal with a higher brightness range and contrast, while AOD may adjust the overall brightness to adapt to the ambient light. By combining the current display mode, it can ensure that the compensation algorithm adapts to these changes, thereby providing a better visual experience.
[0149] Furthermore, in one embodiment, the correction value includes a first correction value and a second correction value; the calculation method of the correction value includes: if the display mode is the first mode, determining the first brightness correction parameter and the first grayscale correction parameter according to the current brightness and the first grayscale value respectively, and calculating the first correction value according to the first brightness correction parameter and the first grayscale correction parameter; if the display mode is the second mode, determining the second grayscale correction parameter according to the first grayscale value, and calculating the second correction value according to the second grayscale correction parameter.
[0150] In this embodiment, turning off both AOD and HDR is defined as the first mode. Turning on either AOD or HDR is defined as the second mode. In the first mode, the correction value is calculated based on the current brightness and the first grayscale value. In the second mode, the correction value is calculated based on the first grayscale value.
[0151] The first correction value is the result of calculation based on brightness and grayscale in the first mode, and the second correction value is the result of calculation based on grayscale in the second mode.
[0152] Finally, the first brightness correction parameter and the first grayscale correction parameter are combined for calculation to obtain the final first correction value, which will be used to adjust the second compensation data, the first grayscale value or the third compensation data to ensure that the image can still be displayed in the best state when AOD and HDR are turned off.
[0153] In other words, when AOD and HDR are all turned off, the two-dimensional changes in brightness and grayscale are considered to ensure the display effect in normal brightness mode.
[0154] Optionally, based on the current first grayscale value, a second grayscale correction parameter suitable for the current display mode is searched, and the second correction value is calculated according to the second grayscale correction parameter. The second grayscale correction parameter is obtained in the same manner as the first grayscale correction parameter, and will not be described again here.
[0155] Since the AOD and HDR modes only have one gamma, there is no interpolation in two dimensions, so direct linear interpolation is sufficient, that is, interpolation calculations only need to be performed in the grayscale dimension.
[0156] Furthermore, in one embodiment, a first brightness correction parameter and a first grayscale correction parameter are determined according to the current brightness and the first grayscale value, respectively, and a first correction value is calculated according to the first brightness correction parameter and the first grayscale correction parameter, including: searching in a first preset query table according to the current brightness and the first grayscale value to obtain the first brightness correction parameter and the first grayscale correction parameter; and performing interpolation calculations in the grayscale dimension and the brightness dimension based on the brightness correction parameter and the first grayscale correction parameter, respectively, to obtain the first correction value.
[0157] Optionally, interpolation calculation may be performed first in the brightness dimension and then in the grayscale dimension to obtain a first correction value.
[0158] Furthermore, an interpolation calculation is performed based on the first brightness correction parameter to obtain a reference correction value; and the reference correction value and the first grayscale correction value are combined to obtain a first correction value.
[0159] The first brightness correction parameter is a parameter determined according to the current brightness, such as two parameters adjacent to the current brightness in the brightness table, for example, the brightness table is:
[0160] 50% First brightness correction parameter 1 60% First brightness correction parameter 2 60% First brightness correction parameter 3
[0161] Assuming that the current brightness is 60%, the first brightness correction parameter is the first brightness correction parameter 1 and the first brightness correction parameter 3.
[0162] Similarly, the first grayscale correction parameter is a parameter determined according to the first grayscale value, such as two parameters adjacent to the first grayscale value in the grayscale table. The first grayscale correction parameter 1 and the first grayscale correction parameter 3 can be obtained in the same search method as the first brightness correction value.
[0163] Then, a first preset lookup table is searched according to the first brightness correction parameter 1, the first brightness correction parameter 3, the first grayscale correction parameter 1 and the first grayscale correction parameter 3.
[0164] In this embodiment, the first preset query table is a two-dimensional query table. Exemplarily, the two-dimensional query table is shown in Table 1.
[0165] Table 1
[0166]
[0167]
[0168] According to the current brightness and the first grayscale value, the first preset query table is searched to obtain the first brightness correction parameter 1, the first brightness correction parameter 3, and the first grayscale correction parameter is the first grayscale correction parameter 1 and the first grayscale correction parameter 3.
[0169] Exemplarily, the first brightness correction parameter 1, the first brightness correction parameter 3, and the first grayscale correction parameter are the first grayscale correction parameter 1 and the first grayscale correction parameter 3 queried in the first preset query table to obtain the first intermediate parameter. In this embodiment, the first intermediate parameter is c2, c3, d2, and d3.
[0170] Then, interpolation calculation is performed on the brightness dimension to obtain a reference correction value, and then interpolation calculation is performed on the grayscale based on the reference correction value.
[0171] For example, assume that the current brightness is 60%, which is between 50% and 75%. In the brightness dimension, interpolation is performed based on the correction parameters c2, c3 and d2, d3 at 50% and 75% brightness. The reference correction value 1 is shown in formula (4), and the reference correction value 2 is shown in formula (5).
[0172]
[0173] Next, interpolation calculation is performed on the grayscale maintenance to finally obtain the first correction value. Assume that the current grayscale value is 100, which is between 64 and 128. The calculation formula of the first correction value can be shown as formula (6).
[0174]
[0175] Optionally, interpolation calculation may be performed on the grayscale dimension first, and then on the brightness dimension, to finally obtain the first correction value.
[0176] Further, interpolation calculation is performed based on the first grayscale correction parameter to obtain a reference correction value; the reference correction value and the first brightness correction parameter are combined to obtain the first correction value. The specific process can refer to the steps of first interpolating in the brightness dimension and then interpolating in the grayscale in the above embodiment, which will not be described in detail here.
[0177] In the above embodiment, by performing interpolation calculations in two dimensions, namely, grayscale and brightness, respectively, the compensation accuracy can be improved and the balance between brightness and grayscale can be ensured.
[0178] Furthermore, in one embodiment, determining the second grayscale correction parameter according to the first grayscale value, and calculating the second correction value according to the second grayscale correction parameter, includes: determining the second grayscale correction parameter according to the first grayscale value; and performing interpolation calculation according to the second grayscale correction parameter to obtain the second correction value.
[0179] Similarly, the second grayscale correction parameter is a parameter determined according to the second grayscale value, such as two parameters adjacent to the second grayscale value in the grayscale table. The second grayscale correction parameter 1 and the second grayscale correction parameter 3 can be obtained in the same search method as the first brightness correction value.
[0180] Then, the second intermediate parameters are obtained by searching in the second preset lookup table according to the second grayscale correction parameter 1 and the second grayscale correction parameter 3. In this embodiment, the second intermediate parameters are g1 and g3.
[0181] Exemplarily, the second preset lookup table is shown in Table 2.
[0182] Table 2
[0183] Grayscale value Correction parameters 64 g1 128 g2 192 g3 255 g4
[0184] Assume that the first grayscale value is 150, which is between 128 and 192, that is, the second grayscale correction parameter 1 is 128, and the second grayscale correction parameter 3 is 192. Then, the calculation formula of the second correction value is shown in formula (7).
[0185]
[0186] In one embodiment, the image to be processed is converted from the current brightness to the target brightness to obtain the first grayscale values corresponding to each virtual binding point, each actual binding point and other pixel points at the target brightness, including: calculating the ratio between the current brightness and the target brightness to obtain a conversion coefficient; using the conversion coefficient to convert the image to be processed from the current brightness to the target brightness to obtain the first grayscale values corresponding to each virtual binding point, each actual binding point and other pixel points at the target brightness.
[0187] The conversion coefficient is the ratio coefficient used to convert the image from the current brightness to the target brightness. Its function is to adjust the grayscale value of each pixel according to the target brightness so that the image has a consistent display effect at the target brightness.
[0188] For example, the conversion coefficient is gc_ratio, which is calculated from the inverse of a normalized parameter dc_ratio calculated by combining the dimming parameter and the brightness curve, and reflects the ratio between the current brightness and the target brightness.
[0189] For example, assuming the current brightness is 50% and the target brightness is 100%, then:
[0190]
[0191] Then, we can get gc_ratio.
[0192] Then, the grayscale value of each pixel at the current brightness is converted to the target brightness using the conversion coefficient. Specifically, the conversion can be performed using formula (9).
[0193] Gray1=Gray0×gc_ratio formula (9)
[0194] In the above embodiment, the image to be processed is converted from the current brightness to the target brightness through the conversion coefficient.
[0195] Furthermore, in one embodiment, after compensating the image to be processed according to each second compensation data and each third compensation data to obtain the compensated image, the method further includes: using the inverse of the conversion coefficient to convert the compensated image from the target brightness to the current brightness to obtain the target compensated image.
[0196] In addition to compensating the image to be processed, it is also necessary to convert the compensated image from the target brightness back to the current brightness so as to finally obtain the target compensated image under the current brightness condition. This process uses the inverse of the conversion coefficient to convert the image from the target brightness to the current brightness.
[0197] Optionally, use dc_ratio to convert the compensated image from the target brightness to the current brightness.
[0198] In the above embodiment, the compensated image is converted from the target brightness back to the current brightness, ensuring that the image can still present an ideal compensation effect under the brightness conditions actually viewed by the user.
[0199] It should be understood that, although the various steps in the flowcharts involved in the above-mentioned embodiments are displayed in sequence according to the indication of the arrows, these steps are not necessarily executed in sequence according to the order indicated by the arrows. Unless there is a clear explanation in this article, the execution of these steps does not have a strict order restriction, and these steps can be executed in other orders. Moreover, at least a part of the steps in the flowcharts involved in the above-mentioned embodiments can include multiple steps or multiple stages, and these steps or stages are not necessarily executed at the same time, but can be executed at different times, and the execution order of these steps or stages is not necessarily to be carried out in sequence, but can be executed in turn or alternately with other steps or at least a part of the steps or stages in other steps.
[0200] Based on the same inventive concept, the embodiment of the present application further provides a brightness compensation device for implementing the brightness compensation method involved above. The implementation scheme for solving the problem provided by the device is similar to the implementation scheme recorded in the above method, so the specific limitations in the one or more brightness compensation device embodiments provided below can refer to the limitations on the brightness compensation method above, and will not be repeated here.
[0201] In an exemplary embodiment, Figure 4 As shown, a brightness compensation device is provided, including: an acquisition module 410, a compensation calculation module 420 and a compensation module 430, wherein:
[0202] The acquisition module 410 is used to acquire the image to be processed and first compensation data of the actual binding point in the image to be processed at the target brightness; the pixel points in the image to be processed include the actual binding point and the virtual binding point.
[0203] The compensation calculation module 420 is used to calculate the second compensation data corresponding to each virtual binding point and the third compensation data corresponding to the other pixel points in combination with the interpolation weight and each of the first compensation data; the interpolation weight is obtained according to the relative position of the actual binding point and the virtual binding point.
[0204] The compensation module 430 is used to compensate the image to be processed according to each of the second compensation data and each of the third compensation data to obtain a compensated image.
[0205] In one embodiment, the compensation calculation module 420 includes:
[0206] The brightness adjustment unit is used to convert the image to be processed from the current brightness to the target brightness, and obtain the first grayscale value corresponding to each virtual binding point, each actual binding point and other pixel points under the target brightness.
[0207] The second compensation unit is used to calculate the second compensation data corresponding to the virtual binding point according to the interpolation weight and the first compensation data corresponding to each actual binding point.
[0208] The third compensation unit is used to determine the relative positions of other pixel points in the binding point according to the first grayscale value, and obtain third compensation data by interpolation calculation based on the second compensation data and the first compensation data.
[0209] In one embodiment, the compensation calculation module further includes:
[0210] The reference point determination unit is used to determine the reference actual binding point corresponding to each virtual binding point.
[0211] The weight calculation unit is used to perform interpolation calculation according to the first grayscale value corresponding to the reference actual binding point and the first grayscale value corresponding to each virtual binding point to obtain the interpolation weight.
[0212] In one embodiment, the compensation calculation module further includes:
[0213] The first calculation unit is used to calculate a first difference between the first grayscale value and the second grayscale value; the second grayscale value is a standard grayscale value corresponding to a target brightness.
[0214] A first correction unit, configured to correct the first grayscale value when the first difference satisfies a first difference threshold;
[0215] In one embodiment, the compensation calculation module further includes:
[0216] The second calculation unit is used to calculate a second difference between the first compensation data and the second compensation data.
[0217] The second correcting unit is configured to correct the second compensation data when the second difference satisfies a second difference threshold.
[0218] In one embodiment, the compensation calculation module further includes:
[0219] The third calculation unit is used to calculate a third difference between the first compensation data and the third compensation data.
[0220] The third correcting unit corrects the third compensation data when the third difference satisfies a third difference threshold.
[0221] In one embodiment, the first correction unit and / or the second correction unit and / or the third correction unit include:
[0222] The mode acquisition subunit is used to obtain the current display mode.
[0223] The correction value calculation subunit is used to calculate the correction value in combination with the current display mode, and to correct the second compensation data and / or the first grayscale value and / or the third compensation data according to the correction value.
[0224] In one embodiment, the correction value calculation subunit includes:
[0225] The first correction unit is used to determine a first brightness correction parameter and a first grayscale correction parameter according to the current brightness and the first grayscale value respectively if the display mode is the first mode, and calculate a first correction value according to the first brightness correction parameter and the first grayscale correction parameter.
[0226] The second correction unit is used to determine the second grayscale correction parameter according to the first grayscale value if the display mode is the second mode, and calculate the second correction value according to the second grayscale correction parameter.
[0227] In one embodiment, the first correction subunit further includes:
[0228] The first correction parameter subunit is used to determine a first brightness correction parameter and a first grayscale correction parameter according to the current brightness and the first grayscale value.
[0229] The first reference correction unit is used to perform interpolation calculations in the grayscale dimension and the brightness dimension based on the brightness correction parameter and the first grayscale correction parameter to obtain a first correction value.
[0230] In one embodiment, the first correction subunit further includes:
[0231] The second correction parameter subunit is used to determine the second grayscale correction parameter according to the first grayscale value.
[0232] The second correction value calculation unit performs interpolation calculation according to the second grayscale correction parameter to obtain a second correction value.
[0233] In one embodiment, the compensation calculation module further includes:
[0234] The coefficient calculation unit is used to calculate the ratio between the current brightness and the target brightness to obtain the conversion coefficient.
[0235] The first conversion unit is used to convert the image to be processed from the current brightness to the target brightness by using the conversion coefficient, and obtain the first grayscale value corresponding to each virtual binding point, each actual binding point and other pixel points under the target brightness.
[0236] In one embodiment, the compensation calculation module further includes:
[0237] The second conversion unit is used to convert the compensated image from the target brightness to the current brightness by using the inverse of the conversion coefficient to obtain the target compensated image.
[0238] Each module in the above brightness compensation device can be implemented in whole or in part by software, hardware or a combination thereof. Each module can be embedded in or independent of a processor in a computer device in the form of hardware, or can be stored in a memory in a computer device in the form of software, so that the processor can call and execute operations corresponding to each module.
[0239] In an exemplary embodiment, a computer device is provided. The computer device may be a server, and its internal structure diagram may be as shown in FIG. Figure 5As shown. The computer device includes a processor, a memory, an input / output interface (Input / Output, referred to as I / O) and a communication interface. The processor, the memory and the input / output interface are connected through a system bus, and the communication interface is connected to the system bus through the input / output interface. The processor of the computer device is used to provide computing and control capabilities. The memory of the computer device includes a non-volatile storage medium and an internal memory. The non-volatile storage medium stores an operating system, a computer program and a database. The internal memory provides an environment for the operation of the operating system and the computer program in the non-volatile storage medium. The database of the computer device is used to store image data to be processed. The input / output interface of the computer device is used to exchange information between the processor and an external device. The communication interface of the computer device is used to communicate with an external terminal through a network connection. When the computer program is executed by the processor, a brightness compensation method is implemented.
[0240] Those skilled in the art will understand that Figure 5 The structure shown in the figure is only a block diagram of a part of the structure related to the solution of the present application, and does not constitute a limitation on the computer device to which the solution of the present application is applied. The specific computer device may include more or fewer components than those shown in the figure, or combine certain components, or have a different arrangement of components.
[0241] In an exemplary embodiment, a computer device is provided, including a memory and a processor, wherein a computer program is stored in the memory, and the processor implements the following steps when executing the computer program: obtaining first compensation data of an image to be processed and each actual binding point in the image to be processed at a target brightness; the pixel points in the image to be processed include actual binding points, virtual binding points and other pixel points; combining interpolation weights and each first compensation data, calculating second compensation data corresponding to each virtual binding point and third compensation data corresponding to other pixel points; the interpolation weights are obtained according to the relative positions of the actual binding points and the virtual binding points; and compensating the image to be processed according to each second compensation data and each third compensation data to obtain a compensated image.
[0242] In one embodiment, when the processor executes the computer program, the following steps are also implemented: converting the image to be processed from the current brightness to the target brightness, obtaining the first grayscale value corresponding to each virtual binding point, each actual binding point and other pixel points at the target brightness; calculating the second compensation data corresponding to the virtual binding point based on the interpolation weight and the first compensation data corresponding to each actual binding point; determining the relative position of other pixel points in the binding point based on the first grayscale value, and obtaining the third compensation data by interpolating the second compensation data and the first compensation data.
[0243] In one embodiment, when the processor executes the computer program, the following steps are also implemented: determining the reference actual binding point corresponding to each virtual binding point; performing interpolation calculation according to the first grayscale value corresponding to the reference actual binding point and the first grayscale value corresponding to each virtual binding point to obtain an interpolation weight.
[0244] In one embodiment, when the processor executes the computer program, the following steps are also implemented: calculating a first difference between the first grayscale value and the second grayscale value; the second grayscale value is a standard grayscale value corresponding to the target brightness; and when the first difference satisfies a first difference threshold, correcting the first grayscale value.
[0245] In one embodiment, when the processor executes the computer program, the following steps are further implemented: calculating a second difference between the first compensation data and the second compensation data; and correcting the second compensation data when the second difference meets a second difference threshold.
[0246] In one embodiment, when the processor executes the computer program, the following steps are further implemented: calculating a third difference between the first compensation data and the third compensation data; and correcting the third compensation data when the third difference meets a third difference threshold.
[0247] In one embodiment, when the processor executes the computer program, the following steps are also implemented: obtaining the current display mode; calculating the correction value in combination with the current display mode, and correcting the second compensation data and / or the first grayscale value and / or the third compensation data according to the correction value.
[0248] In one embodiment, the processor also implements the following steps when executing the computer program: if the display mode is the first mode, determine the first brightness correction parameter and the first grayscale correction parameter according to the current brightness and the first grayscale value, respectively, and calculate the first correction value according to the first brightness correction parameter and the first grayscale correction parameter; if the display mode is the second mode, determine the second grayscale correction parameter according to the first grayscale value, and calculate the second correction value according to the second grayscale correction parameter.
[0249] In one embodiment, when the processor executes the computer program, the following steps are also implemented: determining a first brightness correction parameter and a first grayscale correction parameter based on the current brightness and the first grayscale value; performing interpolation calculations on the grayscale dimension and the brightness dimension based on the brightness correction parameter and the first grayscale correction parameter, respectively, to obtain a first correction value.
[0250] In one embodiment, when the processor executes the computer program, the following steps are further implemented: determining a second grayscale correction parameter according to the first grayscale value; and performing interpolation calculation according to the second grayscale correction parameter to obtain a second correction value.
[0251] In one embodiment, when the processor executes the computer program, the following steps are also implemented: calculating the ratio between the current brightness and the target brightness to obtain a conversion coefficient; using the conversion coefficient to convert the image to be processed from the current brightness to the target brightness, and obtaining the first grayscale value corresponding to each virtual binding point, each actual binding point and other pixel points at the target brightness.
[0252] In one embodiment, when the processor executes the computer program, the following steps are further implemented: using the reciprocal of the conversion coefficient, converting the compensated image from the target brightness to the current brightness to obtain the target compensated image.
[0253] In one embodiment, a computer-readable storage medium is provided, on which a computer program is stored. When the computer program is executed by a processor, the following steps are implemented: obtaining the first compensation data of the image to be processed and each actual binding point in the image to be processed at the target brightness; the pixel points in the image to be processed include actual binding points, virtual binding points and other pixel points; combining the interpolation weights and the first compensation data, calculating the second compensation data corresponding to each virtual binding point and the third compensation data corresponding to other pixel points; the interpolation weights are obtained according to the relative positions of the actual binding points and the virtual binding points; and the image to be processed is compensated according to the second compensation data and the third compensation data to obtain a compensated image.
[0254] In one embodiment, when the computer program is executed by the processor, the following steps are also implemented: converting the image to be processed from the current brightness to the target brightness to obtain the first grayscale value corresponding to each virtual binding point, each actual binding point and other pixel points at the target brightness; calculating the second compensation data corresponding to the virtual binding point based on the interpolation weight and the first compensation data corresponding to each actual binding point; determining the relative position of other pixel points in the binding point based on the first grayscale value, and obtaining the third compensation data by interpolating the second compensation data and the first compensation data.
[0255] In one embodiment, when the computer program is executed by the processor, the following steps are also implemented: determining the reference actual binding point corresponding to each virtual binding point; performing interpolation calculation according to the first grayscale value corresponding to the reference actual binding point and the first grayscale value corresponding to each virtual binding point to obtain an interpolation weight.
[0256] In one embodiment, when the computer program is executed by a processor, the following steps are also implemented: calculating a first difference between a first grayscale value and a second grayscale value; the second grayscale value is a standard grayscale value corresponding to a target brightness; and correcting the first grayscale value when the first difference satisfies a first difference threshold.
[0257] In one embodiment, when the computer program is executed by the processor, the following steps are further implemented: calculating a second difference between the first compensation data and the second compensation data; and correcting the second compensation data when the second difference meets a second difference threshold.
[0258] In one embodiment, when the computer program is executed by the processor, the following steps are further implemented: calculating a third difference between the first compensation data and the third compensation data; and correcting the third compensation data when the third difference meets a third difference threshold.
[0259] In one embodiment, when the computer program is executed by the processor, the following steps are also implemented: obtaining the current display mode; calculating the correction value in combination with the current display mode, and correcting the second compensation data and / or the first grayscale value and / or the third compensation data according to the correction value.
[0260] In one embodiment, when the computer program is executed by the processor, the following steps are also implemented: if the display mode is the first mode, a first brightness correction parameter and a first grayscale correction parameter are determined according to the current brightness and the first grayscale value, respectively, and a first correction value is calculated according to the first brightness correction parameter and the first grayscale correction parameter; if the display mode is the second mode, a second grayscale correction parameter is determined according to the first grayscale value, and a second correction value is calculated according to the second grayscale correction parameter.
[0261] In one embodiment, when the computer program is executed by the processor, the following steps are also implemented: determining a first brightness correction parameter and a first grayscale correction parameter based on the current brightness and the first grayscale value; performing interpolation calculations on the grayscale dimension and the brightness dimension based on the brightness correction parameter and the first grayscale correction parameter, respectively, to obtain a first correction value.
[0262] In one embodiment, when the computer program is executed by the processor, the following steps are further implemented: determining a second grayscale correction parameter according to the first grayscale value; and performing interpolation calculation according to the second grayscale correction parameter to obtain a second correction value.
[0263] In one embodiment, when the computer program is executed by the processor, the following steps are also implemented: calculating the ratio between the current brightness and the target brightness to obtain a conversion coefficient; using the conversion coefficient to convert the image to be processed from the current brightness to the target brightness, and obtaining the first grayscale value corresponding to each virtual binding point, each actual binding point and other pixel points at the target brightness.
[0264] In one embodiment, when the computer program is executed by the processor, the following steps are further implemented: using the inverse of the conversion coefficient, converting the compensated image from the target brightness to the current brightness to obtain the target compensated image.
[0265] In one embodiment, a computer program product is provided, including a computer program, which implements the following steps when executed by a processor: obtaining first compensation data of an image to be processed and each actual binding point in the image to be processed at a target brightness; the pixel points in the image to be processed include actual binding points, virtual binding points and other pixel points; combining interpolation weights and each first compensation data, calculating second compensation data corresponding to each virtual binding point and third compensation data corresponding to other pixel points; the interpolation weights are obtained according to the relative positions of the actual binding points and the virtual binding points; and the image to be processed is compensated according to each second compensation data and each third compensation data to obtain a compensated image.
[0266] In one embodiment, when the computer program is executed by the processor, the following steps are also implemented: converting the image to be processed from the current brightness to the target brightness to obtain the first grayscale value corresponding to each virtual binding point, each actual binding point and other pixel points at the target brightness; calculating the second compensation data corresponding to the virtual binding point based on the interpolation weight and the first compensation data corresponding to each actual binding point; determining the relative position of other pixel points in the binding point based on the first grayscale value, and obtaining the third compensation data by interpolating the second compensation data and the first compensation data.
[0267] In one embodiment, when the computer program is executed by the processor, the following steps are also implemented: determining the reference actual binding point corresponding to each virtual binding point; performing interpolation calculation according to the first grayscale value corresponding to the reference actual binding point and the first grayscale value corresponding to each virtual binding point to obtain an interpolation weight.
[0268] In one embodiment, when the computer program is executed by a processor, the following steps are also implemented: calculating a first difference between a first grayscale value and a second grayscale value; the second grayscale value is a standard grayscale value corresponding to a target brightness; and correcting the first grayscale value when the first difference satisfies a first difference threshold.
[0269] In one embodiment, when the computer program is executed by the processor, the following steps are further implemented: calculating a second difference between the first compensation data and the second compensation data; and correcting the second compensation data when the second difference meets a second difference threshold.
[0270] In one embodiment, when the computer program is executed by the processor, the following steps are further implemented: calculating a third difference between the first compensation data and the third compensation data; and correcting the third compensation data when the third difference meets a third difference threshold.
[0271] In one embodiment, when the computer program is executed by the processor, the following steps are also implemented: obtaining the current display mode; calculating the correction value in combination with the current display mode, and correcting the second compensation data and / or the first grayscale value and / or the third compensation data according to the correction value.
[0272] In one embodiment, when the computer program is executed by the processor, the following steps are also implemented: if the display mode is the first mode, a first brightness correction parameter and a first grayscale correction parameter are determined according to the current brightness and the first grayscale value, respectively, and a first correction value is calculated according to the first brightness correction parameter and the first grayscale correction parameter; if the display mode is the second mode, a second grayscale correction parameter is determined according to the first grayscale value, and a second correction value is calculated according to the second grayscale correction parameter.
[0273] In one embodiment, when the computer program is executed by the processor, the following steps are also implemented: determining a first brightness correction parameter and a first grayscale correction parameter based on the current brightness and the first grayscale value; performing interpolation calculations on the grayscale dimension and the brightness dimension based on the brightness correction parameter and the first grayscale correction parameter, respectively, to obtain a first correction value.
[0274] In one embodiment, when the computer program is executed by the processor, the following steps are further implemented: determining a second grayscale correction parameter according to the first grayscale value; and performing interpolation calculation according to the second grayscale correction parameter to obtain a second correction value.
[0275] In one embodiment, when the computer program is executed by the processor, the following steps are also implemented: calculating the ratio between the current brightness and the target brightness to obtain a conversion coefficient; using the conversion coefficient to convert the image to be processed from the current brightness to the target brightness, and obtaining the first grayscale value corresponding to each virtual binding point, each actual binding point and other pixel points at the target brightness.
[0276] In one embodiment, when the computer program is executed by the processor, the following steps are further implemented: using the inverse of the conversion coefficient, converting the compensated image from the target brightness to the current brightness to obtain the target compensated image.
[0277] Those skilled in the art can understand that all or part of the processes in the above-mentioned embodiment methods can be completed by instructing the relevant hardware through a computer program, and the computer program can be stored in a non-volatile computer-readable storage medium. When the computer program is executed, it can include the processes of the embodiments of the above-mentioned methods. Among them, any reference to the memory, database or other medium used in the embodiments provided in the present application can include at least one of non-volatile memory and volatile memory. Non-volatile memory can include read-only memory (ROM), magnetic tape, floppy disk, flash memory, optical memory, high-density embedded non-volatile memory, resistive random access memory (ReRAM), magnetic random access memory (MRAM), ferroelectric random access memory (FRAM), phase change memory (PCM), graphene memory, etc. Volatile memory can include random access memory (RAM) or external cache memory, etc. As an illustration and not limitation, RAM can be in various forms, such as static random access memory (SRAM) or dynamic random access memory (DRAM). The database involved in each embodiment provided in this application may include at least one of a relational database and a non-relational database. Non-relational databases may include distributed databases based on blockchains, etc., but are not limited to this. The processor involved in each embodiment provided in this application may be a general-purpose processor, a central processing unit, a graphics processor, a digital signal processor, a programmable logic device, a data processing logic device based on quantum computing, an artificial intelligence (AI) processor, etc., but are not limited to this.
[0278] The technical features of the above embodiments may be combined arbitrarily. To make the description concise, not all possible combinations of the technical features in the above embodiments are described. However, as long as there is no contradiction in the combination of these technical features, they should be considered to be within the scope of this application.
[0279] The above-described embodiments only express several implementation methods of the present application, and the descriptions thereof are relatively specific and detailed, but they cannot be understood as limiting the scope of the present application. It should be pointed out that, for a person of ordinary skill in the art, several variations and improvements can be made without departing from the concept of the present application, and these all belong to the protection scope of the present application. Therefore, the protection scope of the present application shall be subject to the attached claims.
Claims
1. A brightness compensation method, characterized in that: The method comprises: Acquire the image to be processed and each first compensation data of each actual binding point in the image to be processed at the target brightness; the pixel points in the image to be processed include the actual binding point, the virtual binding point and other pixel points; In combination with the interpolation weight and each of the first compensation data, the second compensation data corresponding to each of the virtual binding points and the third compensation data corresponding to the other pixel points are calculated; the interpolation weight is obtained according to the relative position of the actual binding point and the virtual binding point; The image to be processed is compensated according to each of the second compensation data and each of the third compensation data to obtain a compensated image.
2. The method according to claim 1, characterized in that The combining the interpolation weights and the first compensation data to calculate the second compensation data corresponding to each virtual binding point and the third compensation data corresponding to other pixel points includes: Converting the image to be processed from the current brightness to the target brightness, and obtaining first grayscale values corresponding to each of the virtual binding points, each of the actual binding points, and other pixel points at the target brightness; Calculating second compensation data corresponding to the virtual binding point according to the interpolation weight and the first compensation data corresponding to each of the actual binding points; The relative positions of the other pixels in the binding point are determined according to the first grayscale value, and the third compensation data is obtained by interpolation calculation based on the second compensation data and the first compensation data.
3. The method according to claim 2, characterized in that The calculation method of the interpolation weight includes: Determine a reference actual binding point corresponding to each of the virtual binding points; An interpolation calculation is performed according to the first grayscale value corresponding to the reference actual binding point and the first grayscale values corresponding to each of the virtual binding points to obtain the interpolation weight.
4. The method according to claim 2, characterized in that: After converting the image to be processed from the current brightness to the target brightness and obtaining the first grayscale values corresponding to the virtual binding points, the actual binding points and other pixel points at the target brightness, the method further includes: Calculate a first difference between the first grayscale value and the second grayscale value; the second grayscale value is a standard grayscale value corresponding to the target brightness; When the first difference satisfies a first difference threshold, correcting the first grayscale value; After calculating the second compensation data corresponding to the virtual binding point according to the interpolation weight and the first compensation data corresponding to each actual binding point, the method further includes: calculating a second difference between the first compensation data and the second compensation data; When the second difference satisfies a second difference threshold, modifying the second compensation data; After determining the relative positions of the other pixels in the binding point according to the first grayscale value and obtaining the third compensation data by interpolation calculation based on the second compensation data and the first compensation data, the method further includes: calculating a third difference between the first compensation data and the third compensation data; When the third difference satisfies a third difference threshold, the third compensation data is corrected.
5. The method according to claim 4, characterized in that The method of correcting the first grayscale value, and / or the method of correcting the second compensation data, and / or the third compensation data includes: Get the current display mode; In combination with the current display mode, a correction value is calculated, and the second compensation data and / or the first grayscale value and / or the third compensation data are corrected according to the correction value.
6. The method according to claim 5, characterized in that The correction value includes a first correction value and a second correction value; the calculation method of the correction value includes: If the display mode is the first mode, determining a first brightness correction parameter and a first grayscale correction parameter according to the current brightness and the first grayscale value, respectively, and calculating the first correction value according to the first brightness correction parameter and the first grayscale correction parameter; If the display mode is the second mode, a second grayscale correction parameter is determined according to the first grayscale value, and the second correction value is calculated according to the second grayscale correction parameter.
7. The method according to claim 6, characterized in that The determining a first brightness correction parameter and a first grayscale correction parameter according to the current brightness and the first grayscale value respectively, and calculating a first correction value according to the first brightness correction parameter and the first grayscale correction parameter, comprises: Determining the first brightness correction parameter and the first grayscale correction parameter according to the current brightness and the first grayscale value; Based on the brightness correction parameter and the first grayscale correction parameter, interpolation calculation is performed in the grayscale dimension and the brightness dimension respectively to obtain the first correction value.
8. The method according to claim 6, characterized in that The step of determining a second grayscale correction parameter according to the first grayscale value, and calculating a second correction value according to the second grayscale correction parameter, comprises: determining the second grayscale correction parameter according to the first grayscale value; An interpolation calculation is performed according to the second grayscale correction parameter to obtain the second correction value.
9. The method according to claim 2, characterized in that: The step of converting the image to be processed from the current brightness to the target brightness to obtain the first grayscale values corresponding to each of the virtual binding points, each of the actual binding points and other pixel points at the target brightness includes: Calculating the ratio between the current brightness and the target brightness to obtain a conversion coefficient; The image to be processed is converted from the current brightness to the target brightness using the conversion coefficient, and the first grayscale values corresponding to each of the virtual binding points, each of the actual binding points and other pixel points at the target brightness are obtained.
10. The method according to claim 9, characterized in that After compensating the image to be processed according to each of the second compensation data and each of the third compensation data to obtain a compensated image, the method further includes: The compensated image is converted from the target brightness to the current brightness using the reciprocal of the conversion coefficient to obtain a target compensated image.
11. A brightness compensation device, characterized in that: The device comprises: An acquisition module is used to acquire the image to be processed and each first compensation data of each actual binding point in the image to be processed at a target brightness; the pixel points in the image to be processed include the actual binding point, the virtual binding point and other pixel points; A compensation calculation module, used to calculate the second compensation data corresponding to each virtual binding point and the third compensation data corresponding to the other pixel points in combination with the interpolation weight and each of the first compensation data; the interpolation weight is obtained according to the relative position of the actual binding point and the virtual binding point; A compensation module is used to compensate the image to be processed according to each of the second compensation data and each of the third compensation data to obtain a compensated image.
12. A computer device comprising a memory and a processor, wherein the memory stores a computer program, characterized in that: When the processor executes the computer program, the steps of the method according to any one of claims 1 to 10 are implemented.
13. A computer-readable storage medium having a computer program stored thereon, characterized in that: When the computer program is executed by a processor, the steps of the method according to any one of claims 1 to 10 are implemented.
14. A computer program product comprising a computer program, characterized in that When the computer program is executed by a processor, the steps of the method according to any one of claims 1 to 10 are implemented.
Citation Information
Cited By
Display panel current compensation method and system and display panel
CN119851606A
Brightness compensation method and display device
CN120452388A
Brightness compensation method and display device
CN120452388B
