Image compensation method and device, computer equipment, readable storage medium and program product
By calculating the brightness attenuation degree of pixel points in AMOLED display technology and dynamic compensation, the problem of image brightness and color unevenness in AMOLED display technology is solved, and the precise compensation of the image and the improvement of visual experience are achieved.
Patent Information
- Application Number
- CN202510045134.3
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2025-01-10
- Publication Date
- 2025-04-25
AI Technical Summary
In AMOLED display technology, due to the life limitations of organic luminescent materials, the brightness and color of pixels appear uneven, resulting in the phenomenon of "image sticking" and affecting the user's visual experience.
By obtaining the accumulated stress values in the image to be processed, the brightness attenuation degree values of each pixel point in different channels are calculated, and the compensation factor is dynamically calculated based on these values to accurately compensate the image.
Accurate compensation of images is achieved, brightness and color inhomogeneity between pixels are reduced, ‘image sticking’ is avoided, and the user’s visual experience is improved.
Smart Images

Figure CN119893064A_ABST
Abstract
Description
Technical Field
[0001] The present application relates to the field of AMOLED technology, and in particular to an image compensation method, apparatus, computer equipment, computer-readable storage medium, and computer program product. Background Art
[0002] With the rapid development of display technology, AMOLED (Active Matrix Organic Light-Emitting Diode) display technology has gradually become mainstream. This technology is widely used in smart phones, TVs, wearable devices and other fields due to its self-luminous characteristics, high contrast, wide viewing angle and low power consumption. However, the self-luminous characteristics of AMOLED panels also bring some new technical challenges. In particular, due to the life limit of organic light-emitting materials, their electrical properties will gradually deteriorate as the light-emitting time increases, resulting in uneven brightness and color between pixels.
[0003] In AMOLED display technology, the brightness of pixels is controlled by independent organic light-emitting diodes, and the decay rate of each pixel varies depending on the usage load and environmental factors. Especially when a fixed image is displayed for a long time, some pixels will age faster due to continuous light emission, which will lead to the phenomenon of "image sticking", that is, the image leaves "afterimages" on the screen. Even after the display content changes, these afterimages are still visible, seriously affecting the user's visual experience.
[0004] At present, the above problems are solved by pixel balancing, timed refresh and full-screen movement, but the image cannot be accurately compensated. Summary of the invention
[0005] Based on this, it is necessary to provide an image compensation method, device, computer equipment, computer-readable storage medium and computer program product that can accurately compensate images in response to the above technical problems.
[0006] In a first aspect, the present application provides an image compensation method, the method comprising:
[0007] Acquire an image to be processed; the image to be processed carries the accumulated stress value of each pixel point in different channels;
[0008] Based on the accumulated stress value, the brightness attenuation degree value of each pixel point in different channels is obtained;
[0009] According to the brightness attenuation degree value of each pixel point in different channels, the compensation factor of each pixel point is calculated, and each pixel point is compensated according to the compensation factor.
[0010] In one embodiment, obtaining the brightness attenuation value of each pixel in different channels based on the accumulated stress value includes:
[0011] Obtaining a preset lookup table corresponding to different channels; the preset lookup table is generated based on the relationship between the historical cumulative stress value and the current brightness attenuation degree;
[0012] Based on the accumulated stress value, the preset lookup tables corresponding to different channels are searched respectively to obtain the brightness attenuation degree value of each pixel point in different channels.
[0013] In one embodiment, calculating the compensation factor of each pixel point according to the brightness attenuation value of each pixel point in different channels, and compensating each pixel point according to the compensation factor includes:
[0014] Determining the display status of each pixel point according to the brightness attenuation degree value of each pixel point in different channels;
[0015] When the display condition shows that there is color deviation, calculating the attenuation difference of each pixel point in different channels, taking the attenuation difference as the compensation factor, and performing color deviation compensation on each pixel point based on the compensation factor;
[0016] When the display condition is that there is brightness attenuation, a target brightness value is acquired, the target brightness value is used as the compensation factor, and brightness compensation is performed on each of the pixel points based on the compensation factor.
[0017] In one embodiment, calculating the attenuation difference of each pixel point in different channels, using the attenuation difference as the compensation factor, and compensating each pixel point based on the compensation factor includes:
[0018] Determine the maximum attenuation channel and the minimum attenuation channel according to the brightness attenuation degree values of each pixel point in different channels;
[0019] Calculating the attenuation difference according to the maximum attenuation channel and the minimum attenuation channel;
[0020] Based on the attenuation difference, the brightness value corresponding to the maximum attenuation channel is compensated so that the brightness attenuation degree value of the maximum attenuation channel is consistent with the brightness attenuation degree value of the minimum attenuation channel.
[0021] In one embodiment, taking the target brightness value as the compensation factor and performing brightness compensation on each pixel based on the compensation factor includes:
[0022] Based on the target brightness value, the brightness value of each pixel in different channels is compensated.
[0023] In one embodiment, the process of determining the display situation includes:
[0024] When the maximum brightness attenuation value is less than a preset threshold and the difference between the maximum brightness attenuation value and the minimum brightness attenuation value is greater than a difference threshold, or when the maximum brightness attenuation value is greater than the preset threshold and the minimum brightness attenuation value is less than the preset threshold, it is determined that the display condition has color cast;
[0025] When the maximum brightness attenuation value and the minimum brightness attenuation value are both greater than or equal to the preset threshold, it is determined that the display condition has brightness attenuation.
[0026] In one embodiment, the image to be processed is obtained by decompressing image compressed data; the image compressed data includes partition lengths and fragment cumulative stress values corresponding to target pixel block partitions in different channels; before searching in preset lookup tables corresponding to different channels based on the cumulative stress values, the method further includes:
[0027] The compressed image data is decompressed according to the partition length and the segment cumulative stress value to obtain the cumulative stress value of each pixel point in different channels.
[0028] In one embodiment, the compression process of the image compression data includes:
[0029] Get the original image data;
[0030] Dividing the original image data into blocks to obtain a plurality of pixel blocks;
[0031] Calculating the mean value of the accumulated stress of each pixel point in each pixel block in different channels according to the accumulated stress value of each pixel point in each pixel block in different channels;
[0032] According to the cumulative stress mean values of the pixel blocks in different channels, the pixel blocks in different channels are merged respectively to obtain target pixel block partitions in different channels and the fragment cumulative stress values corresponding to the target pixel block partitions;
[0033] The image compression data is obtained by performing compression according to the number of pixel blocks corresponding to the target pixel block partitions of different channels and the fragment cumulative stress values corresponding to the target pixel block partitions of different channels.
[0034] In one embodiment, the merging of the pixel blocks in different channels according to the cumulative stress mean values of the pixel blocks in different channels to obtain target pixel block partitions in different channels and the fragment cumulative stress values corresponding to the target pixel block partitions includes:
[0035] In a first direction, calculating the cumulative stress difference between the pixel block and the adjacent pixel blocks in different channels according to the cumulative stress mean value;
[0036] If the cumulative stress difference is less than a preset threshold, the pixel block is merged with the adjacent pixel block to obtain a reference pixel block partition, and the cumulative stress mean of the reference pixel block partition is calculated, and the cumulative stress difference between the reference pixel block partition and the adjacent pixel block is continued to be calculated based on the cumulative stress mean until the cumulative stress difference is greater than or equal to the preset threshold, so as to obtain the target pixel block partition of different channels and the fragment cumulative stress value corresponding to the target pixel block partition.
[0037] In one embodiment, dividing the original image data into blocks to obtain a plurality of pixel blocks comprises:
[0038] The pixel block is encoded according to a preset interlaced encoding rule.
[0039] In one embodiment, decompressing the compressed image data by using the partition length and the segment cumulative stress value to obtain the cumulative stress value of each pixel in different channels includes:
[0040] Determining the number of the pixel blocks in the target pixel block partition according to the partition length;
[0041] Decompressing the compressed image data according to the number of the pixel blocks and the fragment cumulative stress value to obtain the cumulative stress mean value corresponding to each pixel block in different channels;
[0042] The accumulated stress value of each pixel point in different channels is determined by the average accumulated stress value corresponding to each pixel block in different channels.
[0043] In one embodiment, after obtaining the cumulative stress mean values corresponding to different channels of each pixel block, the method further comprises:
[0044] In the second direction, linear interpolation is performed on the pixel block according to the preset interlaced coding rule.
[0045] In a second aspect, the present application proposes an image compensation device, the device comprising:
[0046] An acquisition module is used to acquire an image to be processed; the image to be processed carries the accumulated stress value of each pixel point in different channels;
[0047] An attenuation determination module, used to obtain a brightness attenuation degree value of each pixel point in different channels based on the accumulated stress value;
[0048] The compensation module is used to calculate the compensation factor of each pixel point according to the brightness attenuation degree value of each pixel point in different channels, and compensate each pixel point according to the compensation factor.
[0049] In a third aspect, the present application proposes a computer device, comprising 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.
[0050] In a fourth aspect, the present application proposes 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.
[0051] In a fifth aspect, the present application proposes a computer program product, comprising a computer program, which implements the steps of the above method when executed by a processor.
[0052] The above-mentioned image compensation method, device, computer equipment, computer-readable storage medium and computer program product first obtain the brightness attenuation degree of each pixel in different channels by accumulating stress values; then, dynamically calculate the compensation factor according to the brightness attenuation degree of each pixel, so that the compensation factor adapts to the current attenuation condition of each pixel, and can accurately compensate the image. BRIEF DESCRIPTION OF THE DRAWINGS
[0053] 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.
[0054] Figure 1 is a schematic flow chart of an image compensation method in one embodiment;
[0055] Figure 2 is a schematic diagram of attenuation of different channels in one embodiment;
[0056] Figure 3 is a flowchart of color cast compensation and brightness compensation steps in one embodiment;
[0057] Figure 4 is a flowchart of steps for compressing image data in one embodiment;
[0058] Figure 5 A flowchart of the steps of compressing image data in another embodiment;
[0059] Figure 6 is a structural block diagram of an image compensation device in one embodiment;
[0060] Figure 7 FIG. 4 is a diagram showing the internal structure of a computer device in one embodiment. DETAILED DESCRIPTION
[0061] 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.
[0062] In one embodiment, Figure 1 As shown, an image compensation method is provided. This embodiment takes the method applied to a terminal as an example for explanation. 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:
[0063] Step S102, obtaining an image to be processed; the image to be processed carries the accumulated stress values of each pixel in different channels.
[0064] Optionally, if the original image data is compressed, the image to be processed is the decompressed image data; if the original image data is not compressed, the image to be processed is the original image data.
[0065] Among them, the image to be processed carries the cumulative stress value of each pixel in different channels, which is an important parameter for quantifying the historical workload of the pixel. The cumulative stress value refers to the total amount of light emitted by the pixel for a long time on a certain channel, such as the cumulative driving current value, the cumulative power consumption value or the cumulative lighting time. The cumulative stress value can reflect the aging degree and brightness attenuation of the pixel, and serve as the basis for evaluating the current state of the pixel.
[0066] Since the luminous efficiency and aging characteristics of the three channels R (red), G (green), and B (blue) in the AMOLED display panel are different, for example, the blue channel tends to age faster, while the green channel is more durable, each channel needs to be independently recorded and carry the corresponding accumulated stress value. Figure 2 , Figure 2 Schematic diagram of attenuation of different channels in one embodiment.
[0067] Step S104, based on the accumulated stress value, obtaining the brightness attenuation degree value of each pixel point in different channels.
[0068] Optionally, the relationship between the accumulated stress value and the brightness attenuation degree can be fitted by an empirical model or a function measured experimentally. For example, a commonly used model is the Stretched Exponential Decay (SED) model:
[0069] Formula (1)
[0070] in, Indicates the current brightness. represents the initial brightness, t represents the cumulative stress value, Indicates the time constant of the material, used to reflect the aging rate, It is a nonlinear parameter related to the aging and degradation characteristics of the material. The brightness attenuation degree of the pixel point in each channel can be calculated by formula (1).
[0071] In other embodiments, the brightness attenuation degree of the pixel point in each channel may also be calculated by a polynomial fitting model or a machine learning model.
[0072] Step S106, calculating the compensation factor of each pixel point according to the brightness attenuation degree value of each pixel point in different channels, and compensating each pixel point according to the compensation factor.
[0073] In this embodiment, the compensation factor corresponding to the pixel is calculated according to the brightness attenuation value of each pixel in different channels, providing a basis for brightness compensation of each pixel. In this way, a targeted compensation factor can be generated according to the actual brightness loss of each pixel, thereby achieving more accurate compensation.
[0074] Optionally, the compensation factor may be calculated by a ratio between the target brightness ratio and the current brightness attenuation degree. For example, the compensation factor may be expressed as the target brightness ratio divided by the current brightness attenuation ratio.
[0075] Optionally, the compensation factor can also be obtained by calculating the difference between the brightness attenuation values of different channels. In some cases, it is necessary not only to compensate the brightness attenuation value of each channel separately, but also to comprehensively consider the attenuation difference between the channels. In particular, when the attenuation difference is too large, it may cause obvious color deviation problems. In this case, the difference value between the channels can be calculated based on the brightness attenuation values of different channels to determine an additional compensation factor for higher brightness compensation of the channel with greater attenuation. For details, please refer to the description in the following embodiment.
[0076] Exemplarily, after the compensation factor is obtained, the compensation operation is completed by enlarging or reducing the ratio of the brightness value based on the current brightness value of the pixel point and the calculated compensation factor, as shown in formula (2):
[0077] Formula (2)
[0078] in, Indicates the brightness value after compensation, Indicates the brightness value before compensation.
[0079] In the above-mentioned image compensation method, firstly, the brightness attenuation degree of each pixel in different channels is obtained by accumulating stress values; then, according to the brightness attenuation degree of each pixel, the compensation factor is dynamically calculated so that the compensation factor adapts to the current attenuation condition of each pixel, and the image can be accurately compensated.
[0080] Furthermore, in order to reduce the amount of calculation in the step of calculating the brightness attenuation degree value of each pixel point in different channels according to the cumulative stress value, in an exemplary embodiment, the above-mentioned method of obtaining the brightness attenuation degree value of each pixel point in different channels based on the cumulative stress value includes: obtaining a preset lookup table corresponding to different channels; the preset lookup table is generated by the relationship between the historical cumulative stress value and the current brightness attenuation degree; based on the cumulative stress value, querying the preset lookup table corresponding to the different channels respectively to obtain the brightness attenuation degree value of each pixel point in different channels.
[0081] First, obtain the preset lookup tables corresponding to different channels, that is, each of the R, G, and B channels corresponds to a preset lookup table. Among them, each preset lookup table is generated based on experiments or simulations, and represents the relationship between the historical cumulative stress value and the current brightness attenuation value. The generation process of the preset lookup table can be completed by fitting the long-term display test data, mapping the nonlinear relationship between the cumulative stress value and the brightness attenuation degree. For example, the lookup table can record the brightness attenuation value under different cumulative stress values.
[0082] During the compensation process, the accumulated stress values are queried in the preset lookup tables corresponding to different channels to quickly obtain the brightness attenuation values of each pixel. Specifically, the accumulated stress values of each pixel are matched through the preset lookup table to locate the corresponding brightness attenuation values. Since the direct correspondence between the accumulated stress values and the brightness attenuation values has been pre-established in each preset lookup table, the results can be obtained through a simple query operation, avoiding complex real-time calculations. This method is particularly suitable for large-scale pixel processing scenarios, greatly improving the real-time performance and efficiency of the system.
[0083] Thus, in this way, the brightness attenuation value can be quickly obtained while ensuring accuracy. Compared with the traditional real-time calculation method, the solution based on the preset lookup table significantly reduces the amount of calculation and hardware resource consumption.
[0084] Further, in an exemplary embodiment, the above-mentioned method calculates the compensation factor of each pixel according to the brightness attenuation degree value of each pixel in different channels, and compensates each pixel according to the compensation factor, including: determining the display condition of each pixel according to the brightness attenuation degree value of each pixel in different channels; when the display condition is that there is color deviation, calculating the attenuation difference of each pixel in different channels, using the attenuation difference as the compensation factor, and compensating each pixel according to the compensation factor; when the display condition is that there is brightness attenuation, obtaining the target brightness value, using the target brightness value as the compensation factor, and performing brightness compensation on each pixel according to the compensation factor.
[0085] First, the display condition of each pixel is determined, and different compensation factors are calculated according to the display condition, and corresponding compensation is performed.
[0086] In this embodiment, the display conditions can be divided into two types, namely, color cast and brightness attenuation. Among them, color cast refers to the large difference in brightness attenuation between different channels, resulting in an imbalance in the color ratio, thereby causing color cast in the display screen. For example, when the attenuation of the blue channel is much higher than that of the red and green channels, the display screen may show an abnormal phenomenon of red and green tones. This situation usually occurs when the usage load of some channels is significantly higher than that of other channels, such as when the screen displays content with high blue light intensity for a long time. Brightness attenuation refers to the fact that the brightness of each channel has been attenuated to a large extent, but the attenuation degree between different channels is relatively close, and no obvious color imbalance is caused. In this case, the display screen becomes darker as a whole, but the color ratio remains basically the same. For example, when the brightness attenuation of the three channels of R, G, and B is 10%, 12%, and 11% respectively, although the overall brightness is reduced, it will not cause significant color cast problems.
[0087] By classifying the display conditions, different compensation strategies can be adopted. Compensate for channels with greater attenuation to restore their brightness to the same level as other channels, thereby correcting color deviation; for brightness attenuation, all channels need to be compensated uniformly to restore the overall brightness to the target level while extending the service life of the display panel as much as possible. In this way, the pertinence and effectiveness of brightness compensation are improved.
[0088] When the display has color deviation, the attenuation difference of each pixel in different channels is calculated, the attenuation difference is used as the compensation factor, and the color deviation of the pixel is compensated according to the compensation factor. In the case of color deviation, the main problem of the picture is the uneven brightness between channels, so it is necessary to dynamically adjust the compensation factor according to the attenuation difference of different channels, so that the channel with greater attenuation can get higher compensation, thereby narrowing the difference between channels.
[0089] Among them, when the display situation is that there is brightness attenuation, the target brightness value is obtained, the target brightness value is used as the compensation factor, and the brightness of each pixel is compensated according to the compensation factor. In the case of brightness attenuation, the main problem of the display is the reduction of the overall brightness, so the goal of compensation is to compensate the brightness of each channel, and the overall brightness level can be effectively restored by compensating all channels with a unified target brightness value.
[0090] Furthermore, the above-mentioned attenuation difference of each pixel point in different channels is calculated, and the attenuation difference is used as a compensation factor to compensate each pixel point, including: determining the maximum attenuation channel and the minimum attenuation channel according to the brightness attenuation degree value of each pixel point in different channels; calculating the attenuation difference according to the maximum attenuation channel and the minimum attenuation channel; based on the attenuation difference, compensating the brightness value corresponding to the maximum attenuation channel to make the brightness attenuation degree value of the maximum attenuation channel consistent with the brightness attenuation degree value of the minimum attenuation channel.
[0091] When the display condition is color shift, firstly, the maximum attenuation channel and the minimum attenuation channel are determined from the brightness attenuation values of each pixel point in different channels, wherein the maximum attenuation channel and the minimum attenuation channel respectively represent the channels with the maximum and minimum brightness attenuation values.
[0092] For example, the brightness attenuation value of a certain pixel point on different channels is 1-(0.91, 0.95, 0.88) = (0.09, 0.05, 0.12), then the maximum attenuation channel is the B channel, and its brightness attenuation value is the largest, and the minimum attenuation channel is the G channel, and its brightness attenuation value is the smallest.
[0093] After determining the maximum brightness attenuation channel and the minimum brightness attenuation channel, the attenuation difference is calculated according to the brightness attenuation degree values corresponding to the maximum brightness attenuation channel and the minimum brightness attenuation channel, and the attenuation difference is used as a compensation factor. The brightness value corresponding to the maximum attenuation channel is compensated by the compensation factor so that the brightness attenuation degree value of the maximum attenuation channel is consistent with the brightness attenuation degree value of the minimum attenuation channel.
[0094] For example, assuming that blue is attenuated by 0.04, red by 0.03, and green by 0.02, where the channel with the largest attenuation is blue and the channel with the smallest attenuation is green, then blue needs to be compensated to be consistent with green. The compensation factor is 0.04-0.02, and the compensation process based on the compensation factor is Gray*(1+(0.04-0.02)).
[0095] Furthermore, the brightness compensation for each pixel point using the target brightness value as a compensation factor includes: based on the target brightness value, compensating the brightness value of each pixel point in different channels.
[0096] When the display condition is that there is brightness attenuation, it is necessary to perform brightness compensation on each channel of each pixel. In the compensation process, compensation is performed through the target brightness value.
[0097] The target brightness value is preset and may be set to 0.02. The specific reason may refer to the description in the following embodiment.
[0098] Exemplarily, the process of compensating the brightness of different channels is Gray*((1-0.02)+current brightness attenuation value).
[0099] Furthermore, in an exemplary embodiment, a process for judging a display condition is provided, including: when the maximum brightness attenuation value is less than a preset threshold and the difference between the maximum brightness attenuation value and the minimum brightness attenuation value is greater than the difference threshold, or the maximum brightness attenuation value is greater than the preset threshold and the minimum brightness attenuation value is less than the preset threshold, it is judged that the display condition has color deviation; when the maximum brightness attenuation value and the minimum brightness attenuation value are both greater than or equal to the preset threshold, it is judged that the display condition has brightness attenuation.
[0100] The preset threshold and the difference threshold are preset, wherein the preset threshold can be set to 0.05, and the difference threshold can be set to 0.015.
[0101] In this embodiment, max(αr, αg, αb) is used to represent the maximum brightness attenuation value, and min(αr, αg, αb) is used to represent the minimum brightness attenuation value.
[0102] The first case, max(αr,αg,αb)<0.05 and max(αr,αg,αb)-min(αr,αg,αb)>0.015: It means that the attenuation of all sub-pixels is low and none of them reaches a high attenuation level. However, there is a large attenuation difference, and the difference threshold exceeds 0.015, which will cause color deviation.
[0103] The second case, max(αr, αg, αb)>0.05 and min(αr, αg, αb)<0.05: it means that at least one sub-pixel has a higher attenuation degree, while the other sub-pixel has a lower attenuation degree, which may also cause color deviation.
[0104] In the above two cases, the sub-pixel with the largest attenuation is adjusted to be consistent with the sub-pixel with the smallest attenuation. This is to eliminate color deviation and ensure that the attenuation of sub-pixels of different colors is close, so as to maintain color balance and accuracy.
[0105] In the third case, when max(αr,αg,αb)>=0.05 and min(αr,αg,αb)>=0.05, it means that the attenuation of all sub-pixels is high and the attenuation difference between them is not large. In this case, the brightness of the entire display may have decreased, and overall brightness compensation is required.
[0106] It should be noted that the preset threshold, difference threshold and target brightness value are set to 0.05, 0.015 and 0.02 respectively for the following reasons:
[0107] The preset threshold is set to 0.05, which means that when the brightness attenuation reaches or exceeds 5%, it is determined whether compensation is needed. When the brightness attenuation of a pixel is light, for example, the attenuation is less than 5%, this brightness change is usually difficult to be detected by the human eye and will not have a significant impact on the display effect, so there is no need for immediate compensation. Setting the preset threshold to 0.05 can avoid triggering compensation too early, reduce unnecessary compensation operations, and save computing resources and hardware power consumption.
[0108] The difference threshold is set to 0.015, which means that color cast is only considered to exist when the brightness attenuation difference between channels exceeds 0.015. The human eye has a certain tolerance range for color perception. Only when the brightness attenuation difference between different channels reaches a certain level, such as 0.015, will obvious color cast be perceived.
[0109] Among them, the target brightness value is set to 0.02, which means that the brightness is compensated to a state with an attenuation degree of 2%, that is, the compensated brightness is 98% of the initial brightness. If the brightness is directly compensated to 100%, that is, it is fully restored to the initial brightness, the pixel needs to withstand a higher driving current or power output, which may accelerate its aging and affect the life of the display. Setting the target brightness value to 0.02, that is, compensation to 98%, is a compromise between brightness recovery and pixel life, which can moderately reduce the burden on pixels and delay aging. Compensation to 98% is enough for the human eye to perceive brightness recovery without affecting the uniformity of the overall picture. Excessive compensation, such as 100% or insufficient compensation will lead to brightness unevenness and affect the user experience, so 98% is considered to be a more ideal target brightness.
[0110] In an exemplary embodiment, in combination with FIG. 3, Figure 3 A flowchart of the steps of color cast compensation and brightness compensation is provided.
[0111] The pseudo code of the compensation process is as follows:
[0112] If max(αr,αg,αb)<0.05;
[0113] If max(αr,αg,αb)-min(αr,αg,αb)>0.015,
[0114] Compensate the max sub-pixel to match the min sub-pixel
[0115] Else max(αr,αg,αb)>0.05,
[0116] If min(αr,αg,αb)<0.05,
[0117] Compensate the max sub-pixel to match the min sub-pixel
[0118] else
[0119] Compensate each sub-pixel to an attenuation level of 0.02
[0120] Among them, when max(αr,αg,αb)<0.05 is satisfied, it is further determined whether max(αr,αg,αb)-min(αr,αg,αb)>0.015 is satisfied. If so, it means that there is color deviation, and color deviation compensation is performed. Otherwise, it means that the attenuation of each channel is basically uniform, and there is no obvious color deviation in the displayed image, and no other operations are required. When max(αr,αg,αb)>0.05 is satisfied, it is further determined whether min(αr,αg,αb)<0.05 is satisfied. If so, it means that there is color deviation, otherwise brightness compensation is performed.
[0121] Furthermore, in an exemplary embodiment, an image data decompression method is provided, by decompressing the image compressed data to obtain the image data to be processed. This is because the original image data usually includes a large amount of pixel information, and each pixel may need to store the brightness value or cumulative stress value of the three channels of R, G, and B. If compression is not performed, the overall data volume is very large, especially for high-resolution display screens, such as 4K or 8K resolution, the storage space required is exponentially increasing.
[0122] For example, assuming that the resolution of a display screen is 2560×1600, each pixel needs to store 3 channels×32 bits, and the storage requirement when not compressed is: 2560×1600×3×32bit≈49.15MB (per frame). The amount of original image data is large, which will occupy a large amount of transmission bandwidth and increase the burden of decoding and calculation, thereby affecting the processing speed. Therefore, the original image data will be compressed in this application.
[0123] To facilitate understanding of the compression and decompression process, in this application, the compression of original image data into image compressed data is first described, and then the process of decompressing the image compressed data into original image data is described.
[0124] Optionally, in an exemplary embodiment, the compression process of the above-mentioned image compression data includes: acquiring original image data; dividing the original image data into blocks to obtain multiple pixel blocks; calculating the cumulative stress mean of each pixel block in different channels according to the cumulative stress value of each pixel point in each pixel block in different channels; merging the pixel blocks in different channels according to the cumulative stress mean of each pixel block in different channels to obtain target pixel block partitions in different channels and the fragment cumulative stress value corresponding to the target pixel block partitions; compressing according to the number of pixel blocks corresponding to the target pixel block partitions in different channels and the fragment cumulative stress value corresponding to the target pixel block partitions in different channels to obtain image compression data.
[0125] Optionally, the original image data may be divided into blocks according to a preset block rule. Exemplarily, the preset block rule may be 4*4 or 2*2 block division, and the pixel data may be divided into smaller processing units through block division, so that the system can manage and process the image information more efficiently.
[0126] In this embodiment, the original image data is divided into 2*2 blocks to obtain multiple pixel blocks. This is because the 2*2 block division can accurately capture the local change characteristics and ensure the accuracy of the compensation effect. For example, assuming that the original image data is 4*4, it can be divided into 2*2 blocks to obtain 4 2*2 pixel blocks.
[0127] Afterwards, the mean cumulative stress values corresponding to different channels of each pixel point in each pixel block are calculated according to the cumulative stress values corresponding to different channels of each pixel block. For example, assuming that a pixel block is composed of 2×2 pixels, and each pixel point has a corresponding cumulative stress value in the three channels of R, G, and B, the system can sum up the cumulative stress values of all R channel pixels in the pixel block and divide them by the total number of pixels to obtain the mean cumulative stress value of the R channel. The same method can be used to calculate the mean cumulative stress values of the G and B channels.
[0128] After obtaining the cumulative stress mean values corresponding to each pixel block in different channels, the pixels are merged according to the cumulative stress mean values to obtain the target pixel block partitions of different channels. The target pixel block partitions include multiple similar pixel blocks. The pixel blocks are merged and a representative target pixel block partition is used to represent the entire area, thereby greatly reducing the storage space occupied. In addition, the target pixel block partition can be used to uniformly calculate the cumulative stress value and brightness compensation parameters, avoiding repeated operations on each pixel block and improving compensation efficiency.
[0129] Since the cumulative stress mean values corresponding to each pixel block in different channels are different, the final merging results of each channel are also different. For example, on the R channel, 3 pixel blocks can be merged into one target pixel block partition, while on the G channel, 2 pixel blocks can be merged into one target pixel block partition, and on the B channel, one pixel block is used as a target pixel block partition. This is due to the difference in the distribution of the cumulative stress values of the same pixel block in different channels.
[0130] In this way, the target pixel block partitions in different channels and the fragment cumulative stress values corresponding to the target pixel block partitions can be obtained.
[0131] The fragment cumulative stress value is obtained according to the cumulative stress mean corresponding to each pixel block in the target pixel block partition. For example, the target pixel block partition includes 3 pixel blocks, and the cumulative stress mean of each pixel block on the R channel is 121, 134, and 156. Then the fragment cumulative stress mean is the mean of the cumulative stress mean, that is, (121+134+156) / 3=137.
[0132] In other embodiments, the fragment cumulative stress value may be obtained by adding, weighted averaging or other operations according to the corresponding cumulative stress mean values in each pixel block in the target pixel block partition, which is not limited in the present embodiment.
[0133] Finally, the target pixel block partitions of different channels and the fragment cumulative stress values corresponding to the target pixel block partitions of different channels can be obtained. In this way, compression is performed according to the number of pixel blocks included in the target pixel block partitions and the fragment cumulative stress values to obtain a target compressed image.
[0134] For example, assuming that on the R channel, the target pixel block partition includes 3 pixel blocks, and the fragment cumulative stress value corresponding to the target pixel block partition is 137, it can be compressed into the form of (3, 137). The other channels are similar and will not be described in detail here.
[0135] In this way, the original image can be compressed into the form of (BN, V) from different channel dimensions, where BN represents the number of pixel blocks and V represents the cumulative stress value of the fragment.
[0136] Furthermore, in one embodiment, the above-mentioned method of merging pixel blocks in different channels according to the cumulative stress mean values of each pixel block in different channels to obtain target pixel block partitions in different channels and fragment cumulative stress values corresponding to the target pixel block partitions includes: in a first direction, calculating the cumulative stress difference between the pixel block and the adjacent pixel blocks in different channels according to the cumulative stress mean values; if the cumulative stress difference value is less than a preset threshold value, merging the pixel block with the adjacent pixel blocks to obtain a reference pixel block partition, and calculating the cumulative stress mean value of the reference pixel block partition, and continuing to calculate the cumulative stress difference value between the reference pixel block partition and the adjacent pixel blocks according to the cumulative stress mean value until the cumulative stress difference value is greater than or equal to the preset threshold value, thereby obtaining the target pixel block partitions in different channels and fragment cumulative stress values corresponding to the target pixel block partitions.
[0137] The first direction is the lateral direction; the cumulative stress difference refers to the difference in the cumulative stress mean values between two adjacent pixel blocks in the lateral direction.
[0138] During the merging process, the cumulative stress difference between two adjacent pixel block partitions is compared in the lateral direction. If the cumulative stress difference is less than a preset threshold, it is determined that the two pixel block partitions are similar in cumulative stress characteristics and may be in an area with a similar brightness attenuation degree. The two adjacent pixel block partitions are then merged to obtain a reference pixel block partition, and the cumulative stress mean corresponding to the reference pixel block partition is calculated based on the cumulative stress mean values corresponding to the two pixel block partitions. After that, the cumulative stress difference between the reference pixel block partition and the adjacent pixel block partition is continued to be compared. If the cumulative stress difference is less than a preset threshold, the merging is continued until the cumulative stress difference is greater than or equal to the preset threshold, and the merging is stopped to obtain the target pixel block partition and the cumulative stress value of the fragment corresponding to the target pixel block partition.
[0139] Exemplarily, taking the R channel as an example, there are the following pixel blocks:
[0140] Block 00, Block 01, Block 02, Block 03, Block 04,
[0141] Block 10, Block 11, Block 12, Block 13, Block 14,
[0142] Compare block 00 with block 01. If block 00 and block 01 meet the merging condition, that is, the cumulative stress difference between block 00 and block 01 is less than the preset threshold, then block 00 and block 01 are merged, and the cumulative stress mean of block 00 and block 01 is calculated as the cumulative stress mean of the reference pixel block partition. After that, compare the cumulative stress difference between block 02 and the reference pixel block partition. If the merging condition is met, then merge block 02 with the reference pixel block partition and update the cumulative stress mean. Repeat the process horizontally and backward until the merging condition is not met.
[0143] Other pixel channels are similar to the R channel and are not described in detail in this embodiment.
[0144] Furthermore, since most images have highly correlated content in adjacent areas, some fragments of data may be deleted. Therefore, in this embodiment, a preset interlaced encoding method is used to encode each image block to further compress the original image data.
[0145] The preset interlaced encoding method refers to a method of regularly sampling and storing image data by line to reduce the amount of data storage and improve transmission or processing efficiency. It can be achieved by only saving image data every preset number of lines and reconstructing the missing line data through an interpolation algorithm when necessary.
[0146] Exemplarily, after the original image data is divided into blocks, the following data blocks exist:
[0147] Row 0: Block 00, Block 01, Block 02, Block 03, Block 04, Block 05
[0148] Row 1: Block 10, Block 11, Block 12, Block 13, Block 14, Block 15
[0149] Row 2: Block 20, Block 21, Block 22, Block 23, Block 24, Block 25
[0150] Row 3: Block 30, Block 31, Block 32, Block 33, Block 34, Block 35
[0151] If the preset interlaced encoding is to save odd-numbered line data, then the data of line 1 and line 3 are saved; if the preset interlaced encoding is to save even-numbered line data, then the data of line 0 and line 2 are saved.
[0152] In summary, combined with Figure 4 , the compression process of image data includes the following steps:
[0153] Step S402, obtaining original image data.
[0154] Step S404, dividing the original image data into blocks to obtain a plurality of pixel blocks.
[0155] Step S406: Encode the pixel block according to a preset interlaced encoding rule.
[0156] Step S408 , according to the cumulative stress mean values of each pixel block in different channels, the pixel blocks in different channels are merged respectively to obtain target pixel block partitions in different channels and the fragment cumulative stress values corresponding to the target pixel block partitions.
[0157] Step S410 , compressing is performed according to the number of pixel blocks corresponding to the target pixel block partitions of different channels and the fragment accumulated stress values corresponding to the target pixel block partitions of different channels to obtain image compression data.
[0158] In this way, each row of data in different channel dimensions of the original image data can be compressed into the form of (BN, V).
[0159] In an exemplary embodiment, in combination Figure 5 As shown, Figure 5 The figure is a flow chart of steps for compressing image data in one embodiment.
[0160] 1) Initialize the pack package. Taking the R sub-pixel as an example, new_v=0, new_l=0; new_pack_idx=0; where v represents the mean of a partition, l represents the number of 2x2 blocks, and pack_idx represents the index value of the current partition.
[0161] 2) Read the amount of data for a row from the memory at address address. You can set a maximum number of packs per row, such as 256. Parse the packet data, BN, and cumulative value V, and place them in order (4bit+32bit)x3(R+G+B), and store them in local_buffer[c_num][pack_num][v_num]. Each row is fixedly allocated with 256 target pixel block partitions. The information of each target pixel block partition is the BN (4bit) containing several 2x2blocks and the cumulative value V (32bit). A total of 36*256bit is required, 4x256bit is used to store BN, and 32x256bit is used to store V. Each target pixel block partition is stored in order.
[0162] 3) Taking the r channel as an example, the pseudo code is as follows:
[0163] if line_start, / / Judge whether it is the starting position of a line, that is, the first pixel of a line
[0164] address = address+line_pitch*py / / Calculate the address of the historical accumulated data storage of this line according to the coordinates of this line
[0165] initial pack / / Read the historical accumulated information corresponding to the row from the above address and store it in local_buffer. The accumulated information is stored in fragments, such as 256 fragments of information
[0166] L = local_buffer[0][pack_idx][0]
[0167] V = local_buffer[0][pack_idx][1]
[0168] if(px>ST+L) pack_idx++; ST += L; / / The pixel belongs to the next segment of the history (the previous pixel index px exceeds the end position ST + L of the current segment)
[0169] pv = pv + V
[0170] if abs(pre_pv - pv) < th new_L++; pre_pv = sum / new_L; / / pre_pv = sum / new_L; / / If the new cumulative value of the current pixel and the new cumulative mean value of the pixels in the previously unmerged area are less than the set threshold, then the pixel can be merged; calculate the mean value of the already merged area
[0171] else
[0172] Temp_local_buffer[0][new_pack_idx][0] = new_L; / / Record the cumulative value of the new segment, after accumulating this frame
[0173] Temp_local_buffer[0][new_pack_idx][1] = pv; / / Record the cumulative value of the new segment, after accumulating this frame
[0174] new_pack_idx++; / / Next segment index
[0175] pre_pv = pv; / / At the end of scanning a line, write the new segment information to memory
[0176] if line_end,
[0177] write Temp_local_buffer data to memory at address, cover history data
[0178] In this embodiment, when the merging condition is met, that is, the difference is less than the preset threshold th, it indicates that the pixel is similar in characteristics to the previous pixel and is suitable for merging. At this time, the length of the current line segment is increased (new_L++). When the merging condition is not met, that is, the difference is not less than the threshold th, it indicates that the current pixel is significantly different in characteristics from the previous pixel and is not suitable for merging. At this time, the current line segment ends, its information is recorded, and a new line segment starts.
[0179] Correspondingly, the corresponding decoding method is that the image compression data is decompressed by the partition length and the fragment cumulative stress value to obtain the cumulative stress value of each pixel point in different channels, including: determining the number of pixel blocks in the target pixel block partition according to the partition length; decompressing the image compression data according to the number of pixel blocks and the fragment cumulative stress value to obtain the cumulative stress mean value corresponding to each pixel block in different channels; determining the cumulative stress value of each pixel point in different channels through the cumulative stress mean value corresponding to each pixel block in different channels.
[0180] First, according to the partition length, that is, BN, the number of pixel blocks in the target pixel block partition can be determined. Then, the cumulative stress mean corresponding to each pixel block can be generated according to the segment cumulative stress value, and then the cumulative stress mean corresponding to each pixel point can be generated according to the cumulative stress mean corresponding to each pixel block.
[0181] For example, taking the R channel as an example, assuming that a row of data is compressed into the form of (2, 10), it can be determined that the row of data includes 2 pixel blocks, and the cumulative stress mean corresponding to each pixel block is 10, that is, pixel block 1, whose corresponding cumulative stress mean is 10, and pixel block 2, whose corresponding cumulative stress mean is 10. Because, when calculating the cumulative stress mean corresponding to each pixel block, the cumulative stress values corresponding to each pixel point in the pixel block are averaged. Therefore, the cumulative stress mean corresponding to the pixel block is also the cumulative stress value corresponding to each pixel point in the pixel block. Similarly, the same decompression is performed on other pixel channels.
[0182] Furthermore, after the pixel block is obtained, the pixel block is encoded using a preset interlaced encoding method, and corresponding decoding is also required during decompression.
[0183] Therefore, in an exemplary embodiment, after obtaining the accumulated stress mean values corresponding to different channels of each pixel block, linear interpolation is performed on the pixel block in the second direction according to a preset interlaced coding rule.
[0184] In this embodiment, linear interpolation is performed on each pixel block in the second direction according to a preset interlaced coding rule to obtain a pixel block before coding. The second direction is a longitudinal direction.
[0185] Continuing with the example in the above embodiment, the data block after encoding is:
[0186] Row 0: Block 00, Block 01, Block 02, Block 03, Block 04, Block 05
[0187] Row 2: Block 20, Block 21, Block 22, Block 23, Block 24, Block 25
[0188] Then, the value is obtained by linear interpolation of the values of the upper and lower rows, which is actually the average of the upper and lower rows. For example, block 10 is calculated by the average of block 00 and block 20.
[0189] In an exemplary embodiment, an image compensation method is provided.
[0190] During the aging compensation process of the OLED panel, the display device needs to continuously record the accumulated stress value of each pixel. These historical data are not only huge, but also continue to grow over time. If the original data is stored directly, the storage space of the device may be exhausted quickly. Therefore, it is necessary to compress the original image data and compress the original image data into (BN, V). The specific compression process can refer to the description of the original image compression process in the above embodiment, which will not be elaborated in detail in this embodiment.
[0191] For example, the number of data blocks BN, the storage limit of each row is 256, and the cumulative value is 32 bits. A total of 4.5B (4 + 32) * 256 * 1600 * 3 / 2 = 2764800Byte = 2.7648MB is required. In addition, since most images have highly related content in adjacent areas, some fragments of data can be deleted, so interlaced encoding is proposed. If the data of the i-th row and i+2 rows are saved, the i+1th row is obtained by interpolating the data of the i-th and i+2 rows. The compression ratio is further improved.
[0192] Therefore, in the image compensation process, firstly, the image compression data is obtained, and the image data to be processed can be obtained by decoding and decompressing the image compression data, that is, the accumulated stress value of each pixel in different channels can be obtained.
[0193] After the accumulated stress values of each pixel in different channels are obtained, the brightness attenuation degree of each pixel in different channels is determined by querying a preset lookup table, wherein each channel corresponds to one preset lookup table, and the channels are not shared.
[0194] Afterwards, the compensation factor corresponding to each pixel is determined according to the brightness attenuation degree of each pixel in different channels, and each pixel is compensated according to the compensation factor. For the specific compensation process, reference can be made to the description of the embodiment of compensating pixels in the above embodiment.
[0195] In this embodiment, firstly, by compressing the original image data, on the one hand, the data storage is reduced, the storage resources are saved, and thus the chip occupied area is reduced; on the other hand, the adaptive partition length plays a role in retaining the data details to a certain extent; secondly, the color shift caused by the inconsistent attenuation degree of each pixel in different channels is compensated, so as to further improve the display effect and enhance the visual experience; furthermore, in the compensation process, the compensation factor can be adaptively selected, which not only controls the aggravation of sub-pixel aging, but also slows down the further expansion of the sub-pixel attenuation difference.
[0196] 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.
[0197] Based on the same inventive concept, the embodiment of the present application also provides an image compensation device for implementing the above-mentioned image compensation method. The implementation solution provided by the device to solve the problem is similar to the implementation solution recorded in the above-mentioned method, so the specific limitations in one or more image compensation device embodiments provided below can refer to the limitations of the image compensation method above, and will not be repeated here.
[0198] In an exemplary embodiment, Figure 6 As shown, an image compensation device is provided, including: an acquisition module 610, an attenuation determination module 620 and a compensation module 630, wherein:
[0199] The acquisition module 610 is used to acquire the image to be processed; the image to be processed carries the accumulated stress value of each pixel point in different channels.
[0200] The attenuation determination module 620 is used to obtain the brightness attenuation degree value of each pixel point in different channels based on the accumulated stress value.
[0201] The compensation module 630 is used to calculate the compensation factor of each pixel point according to the brightness attenuation degree value of each pixel point in different channels, and compensate each pixel point according to the compensation factor.
[0202] In one embodiment, the attenuation determination module 620 includes:
[0203] The lookup table acquisition unit is used to obtain the preset lookup table corresponding to different channels; the preset lookup table is generated based on the relationship between the historical accumulated stress value and the current brightness attenuation degree.
[0204] The search unit is used to search in preset search tables corresponding to different channels based on the accumulated stress value to obtain the brightness attenuation value of each pixel point in different channels.
[0205] In one embodiment, the compensation module 630 includes:
[0206] The display calculation unit is used to determine the display status of each pixel point according to the brightness attenuation degree value of each pixel point in different channels.
[0207] The color deviation compensation unit is used to calculate the attenuation difference of each pixel in different channels when the display situation shows color deviation, use the attenuation difference as a compensation factor, and perform color deviation compensation on each pixel based on the compensation factor.
[0208] The brightness compensation unit is used to obtain a target brightness value when the display condition is that there is brightness attenuation, use the target brightness value as a compensation factor, and perform brightness compensation on each pixel based on the compensation factor.
[0209] In one embodiment, the color shift compensation unit includes:
[0210] The channel determination subunit is used to determine the maximum attenuation channel and the minimum attenuation channel according to the brightness attenuation degree value of each pixel point in different channels.
[0211] The difference calculation subunit is used to calculate the attenuation difference according to the maximum attenuation channel and the minimum attenuation channel.
[0212] The first compensation subunit is used to compensate the brightness value corresponding to the maximum attenuation channel based on the attenuation difference, so that the brightness attenuation degree value of the maximum attenuation channel is consistent with the brightness attenuation degree value of the minimum attenuation channel.
[0213] In one embodiment, the brightness compensation unit includes:
[0214] The second compensation subunit is used to compensate the brightness value of each pixel in different channels based on the target brightness value.
[0215] In one embodiment, the compensation module 630 further includes a judgment unit, which includes:
[0216] The first judgment subunit is used to determine that the display situation has color cast when the maximum brightness attenuation value is less than a preset threshold and the difference between the maximum brightness attenuation value and the minimum brightness attenuation value is greater than the difference threshold, or the maximum brightness attenuation value is greater than the preset threshold and the minimum brightness attenuation value is less than the preset threshold.
[0217] The second judgment subunit is used to judge that the display condition is that brightness attenuation exists when the maximum brightness attenuation degree value and the minimum brightness attenuation degree value are both greater than or equal to a preset threshold value.
[0218] In one embodiment, the image to be processed is obtained by decompressing image compressed data; the image compressed data includes partition lengths and fragment accumulated stress values corresponding to target pixel block partitions in different channels, and the device further includes:
[0219] The decompression module is used to decompress the compressed image data through the partition length and the fragment cumulative stress value to obtain the cumulative stress value of each pixel in different channels.
[0220] In one embodiment, the above device further includes a compression module, and the compression module includes:
[0221] The original image acquisition unit is used to acquire original image data.
[0222] The blocking unit is used to block the original image data to obtain multiple pixel blocks.
[0223] The mean value calculation unit is used to calculate the mean value of the accumulated stress of each pixel block in different channels according to the accumulated stress value of each pixel point in each pixel block in different channels.
[0224] The block merging unit is used to merge pixel blocks in different channels according to the cumulative stress mean values of each pixel block in different channels, so as to obtain target pixel block partitions in different channels and the fragment cumulative stress values corresponding to the target pixel block partitions.
[0225] The data compression unit is used to compress the image according to the number of pixel blocks corresponding to the target pixel block partitions of different channels and the fragment accumulated stress values corresponding to the target pixel block partitions of different channels to obtain image compression data.
[0226] In one embodiment, the block merging unit includes:
[0227] The difference calculation subunit is used to calculate the cumulative stress difference between the pixel block and the adjacent pixel blocks in different channels according to the cumulative stress mean value in the first direction.
[0228] The merging subunit is used to merge the pixel block with the adjacent pixel block if the cumulative stress difference is less than a preset threshold, obtain a reference pixel block partition, and calculate the cumulative stress mean of the reference pixel block partition, and continue to calculate the cumulative stress difference between the reference pixel block partition and the adjacent pixel block according to the cumulative stress mean until the cumulative stress difference is greater than or equal to the preset threshold, thereby obtaining the target pixel block partition of different channels and the fragment cumulative stress value corresponding to the target pixel block partition.
[0229] In one embodiment, the compression module further includes:
[0230] The encoding unit is used to encode the pixel block according to a preset interlaced encoding rule.
[0231] In one embodiment, the decompression module includes:
[0232] The quantity determination unit is used to determine the quantity of pixel blocks in the target pixel block partition according to the partition length.
[0233] The pixel block calculation unit is used to decompress the image compressed data according to the number of pixel blocks and the fragment cumulative stress value, and obtain the cumulative stress mean value corresponding to each pixel block in different channels.
[0234] The sub-pixel calculation unit is used to determine the cumulative stress value of each pixel point in different channels through the cumulative stress mean value corresponding to each pixel block in different channels.
[0235] In one embodiment, the decompression module further includes:
[0236] The decoding unit is used to perform linear interpolation on the pixel block in the second direction according to a preset interlaced coding rule.
[0237] Each module in the above-mentioned image 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 the operations corresponding to each module above.
[0238] 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 7As shown. The computer device includes a processor, a memory, an input / output interface (Input / Output, referred to as I / O) and a communication interface. Among them, 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. Among them, 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 historical cumulative stress value data. 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, an image compensation method is implemented.
[0239] Those skilled in the art will understand that Figure 7 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.
[0240] 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 steps of the method in any one of the above embodiments when executing the computer program.
[0241] 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 steps of the method in any one of the above embodiments are implemented.
[0242] In one embodiment, a computer program product is provided, comprising a computer program, which implements the steps of the method in any one of the above embodiments when executed by a processor.
[0243] A person of ordinary skill in the art can understand that all or part of the processes in the above-mentioned embodiment method 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.
[0244] 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.
[0245] 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 construed as limiting the scope of the present application. It should be noted that, for a person of ordinary skill in the art, several modifications 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. An image compensation method, characterized in that: The method comprises: Acquire an image to be processed; the image to be processed carries the accumulated stress value of each pixel point in different channels; Based on the accumulated stress value, the brightness attenuation degree value of each pixel point in different channels is obtained; According to the brightness attenuation degree value of each pixel point in different channels, the compensation factor of each pixel point is calculated, and each pixel point is compensated according to the compensation factor.
2. The method according to claim 1, characterized in that The obtaining, based on the accumulated stress value, the brightness attenuation degree value of each pixel point in different channels includes: Obtaining a preset lookup table corresponding to different channels; the preset lookup table is generated based on the relationship between the historical cumulative stress value and the current brightness attenuation degree; Based on the accumulated stress value, the preset lookup tables corresponding to different channels are searched respectively to obtain the brightness attenuation degree value of each pixel point in different channels.
3. The method according to claim 1, characterized in that The step of calculating the compensation factor of each pixel point according to the brightness attenuation degree value of each pixel point in different channels, and compensating each pixel point according to the compensation factor comprises: Determining the display status of each pixel point according to the brightness attenuation degree value of each pixel point in different channels; When the display condition shows that there is color deviation, calculating the attenuation difference of each pixel point in different channels, taking the attenuation difference as the compensation factor, and performing color deviation compensation on each pixel point based on the compensation factor; When the display condition is that there is brightness attenuation, a target brightness value is acquired, the target brightness value is used as the compensation factor, and brightness compensation is performed on each of the pixel points based on the compensation factor.
4. The method according to claim 3, characterized in that The calculating the attenuation difference of each pixel point in different channels, taking the attenuation difference as the compensation factor, and compensating each pixel point based on the compensation factor, comprises: Determine the maximum attenuation channel and the minimum attenuation channel according to the brightness attenuation degree values of each pixel point in different channels; Calculating the attenuation difference according to the maximum attenuation channel and the minimum attenuation channel; Based on the attenuation difference, the brightness value corresponding to the maximum attenuation channel is compensated so that the brightness attenuation degree value of the maximum attenuation channel is consistent with the brightness attenuation degree value of the minimum attenuation channel.
5. The method according to claim 3, characterized in that: The step of using the target brightness value as the compensation factor and performing brightness compensation on each pixel based on the compensation factor includes: Based on the target brightness value, the brightness value of each pixel in different channels is compensated.
6. The method according to claim 3, characterized in that: The process of judging the display situation includes: When the maximum brightness attenuation value is less than a preset threshold and the difference between the maximum brightness attenuation value and the minimum brightness attenuation value is greater than a difference threshold, or when the maximum brightness attenuation value is greater than the preset threshold and the minimum brightness attenuation value is less than the preset threshold, it is determined that the display condition has color cast; When the maximum brightness attenuation value and the minimum brightness attenuation value are both greater than or equal to the preset threshold, it is determined that the display condition has brightness attenuation.
7. The method according to claim 1, characterized in that The image to be processed is obtained by decompressing image compression data; the image compression data includes partition lengths and fragment cumulative stress values corresponding to target pixel block partitions in different channels; before searching in preset lookup tables corresponding to different channels based on the cumulative stress values, the method further includes: The compressed image data is decompressed by using the partition length and the segment cumulative stress value to obtain the cumulative stress value of each pixel point in different channels.
8. The method according to claim 7, characterized in that The compression process of the image compression data includes: Get the original image data; Dividing the original image data into blocks to obtain a plurality of pixel blocks; Calculating the mean value of the accumulated stress of each pixel point in each pixel block in different channels according to the accumulated stress value of each pixel point in each pixel block in different channels; According to the cumulative stress mean values of the pixel blocks in different channels, the pixel blocks in different channels are merged respectively to obtain target pixel block partitions in different channels and the fragment cumulative stress values corresponding to the target pixel block partitions; The image compression data is obtained by performing compression according to the number of pixel blocks corresponding to the target pixel block partitions of different channels and the fragment cumulative stress values corresponding to the target pixel block partitions of different channels.
9. The method according to claim 8, characterized in that The step of merging the pixel blocks in different channels according to the accumulated stress mean values of the pixel blocks in different channels to obtain target pixel block partitions in different channels and the fragment accumulated stress values corresponding to the target pixel block partitions includes: In a first direction, calculating the cumulative stress difference between the pixel block and the adjacent pixel blocks in different channels according to the cumulative stress mean value; If the cumulative stress difference is less than a preset threshold, the pixel block is merged with the adjacent pixel block to obtain a reference pixel block partition, and the cumulative stress mean of the reference pixel block partition is calculated, and the cumulative stress difference between the reference pixel block partition and the adjacent pixel block is continued to be calculated based on the cumulative stress mean until the cumulative stress difference is greater than or equal to the preset threshold, so as to obtain the target pixel block partition of different channels and the fragment cumulative stress value corresponding to the target pixel block partition.
10. The method according to claim 8, characterized in that After dividing the original image data into blocks to obtain a plurality of pixel blocks, the method includes: The pixel block is encoded according to a preset interlaced encoding rule.
11. The method according to claim 8, characterized in that Decompressing the compressed image data by using the partition length and the segment cumulative stress value to obtain the cumulative stress value of each pixel in different channels includes: Determining the number of the pixel blocks in the target pixel block partition according to the partition length; Decompressing the compressed image data according to the number of the pixel blocks and the fragment cumulative stress value to obtain the cumulative stress mean value corresponding to each pixel block in different channels; The accumulated stress value of each pixel point in different channels is determined by the average accumulated stress value corresponding to each pixel block in different channels.
12. The method according to claim 10, characterized in that After obtaining the cumulative stress mean values corresponding to different channels of each pixel block, the method further comprises: In the second direction, linear interpolation is performed on the pixel block according to the preset interlaced coding rule.
13. An image compensation device, characterized in that: The device comprises: An acquisition module is used to acquire an image to be processed; the image to be processed carries the accumulated stress value of each pixel point in different channels; An attenuation determination module, used to obtain a brightness attenuation degree value of each pixel point in different channels based on the accumulated stress value; The compensation module is used to calculate the compensation factor of each pixel point according to the brightness attenuation degree value of each pixel point in different channels, and compensate each pixel point according to the compensation factor.
14. A computer device comprising a memory and a processor, wherein the memory stores a computer program, wherein: When the processor executes the computer program, the steps of the method according to any one of claims 1 to 12 are implemented.
15. 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 12 are implemented.
16. 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 12 are implemented.