Image processing method and device, electronic equipment and readable storage medium
By obtaining and utilizing the grayscale gain curve corresponding to different screen loads, the terminal screen is accurately compensated, which solves the problem of terminal screen burning and improves the display effect.
Patent Information
- Application Number
- CN202311103595.9
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2023-08-29
- Publication Date
- 2025-02-28
- Estimated Expiration
- 2043-08-29
AI Technical Summary
When the terminal screen displays the same image for a long time, the pixel points will age or be damaged, resulting in inaccurate grayscale compensation and screen burning.
The grayscale gain curve corresponding to different screen loads is obtained, the target grayscale gain curve of the target screen load is determined based on multiple curves, and the grayscale gain curve in the compensated image is used to compensate.
Through accurate grayscale compensation, the grayscale compensation inaccurate caused by screen load and voltage drop is avoided, and the screen burning phenomenon is effectively avoided, while improving the display effect of the terminal screen.
Smart Images

Figure CN119541405A_ABST
Abstract
Description
Technical Field
[0001] The present disclosure relates to the field of terminal display technology, and in particular to an image processing method, device, electronic device and readable storage medium. Background Art
[0002] With the widespread use of terminal devices such as computers and mobile phones, the phenomenon of screen burn-in is becoming more and more common. Screen burn-in refers to the phenomenon that the terminal screen displays the same image for too long, causing the pixels to age or become damaged, making the pixels unable to display colors normally, and appearing permanently dim or obviously distorted.
[0003] In the related art, a fixed compensation value is used to compensate the grayscale of an image displayed on a terminal screen to avoid screen burn-in. However, the screen load of different images displayed on the terminal screen is different, resulting in different voltage drops (Integrated Resistance Drop, iR drop). The difference in voltage drops will have a significant impact on the grayscale compensation of the image, resulting in lower accuracy of the grayscale compensation of the image, and screen burn-in will also occur. Summary of the invention
[0004] In order to overcome the problems existing in the related art, the present disclosure provides an image processing method, device, electronic device and readable storage medium.
[0005] According to a first aspect of an embodiment of the present disclosure, there is provided an image processing method, including:
[0006] Obtaining grayscale gain curves corresponding to different screen loads, wherein the grayscale gain curves are used to represent the relationship between different grayscales and grayscale gain values;
[0007] According to the plurality of grayscale gain curves, a target grayscale gain curve corresponding to a target screen load is obtained, wherein the target screen load is a screen load required for a terminal to display an image to be compensated;
[0008] The target grayscale gain curve is used to compensate the grayscale in the image to be compensated to obtain a compensated image.
[0009] Optionally, using the target grayscale gain curve to compensate the grayscale in the image to be compensated to obtain a compensated image includes:
[0010] Based on the target grayscale gain curve, determining a target grayscale gain value corresponding to the grayscale to be compensated in the image to be compensated;
[0011] The target grayscale gain value is used to compensate the grayscale to be compensated, so as to obtain a compensated grayscale of the compensated image.
[0012] Optionally, using the target grayscale gain value to compensate the grayscale to be compensated to obtain a compensated grayscale of the compensated image includes:
[0013] Determining an initial compensation value corresponding to the grayscale to be compensated according to a pre-stored relationship between the grayscale and the compensation value;
[0014] Using the target grayscale gain value to correct the initial compensation value to obtain a target compensation value;
[0015] The target compensation value is used to compensate the grayscale to be compensated to obtain the compensated grayscale.
[0016] Optionally, the target grayscale gain value is used to correct the initial compensation value to obtain a target compensation value, including:
[0017] The target grayscale gain value and the pixel brightness gain value are used to correct the initial compensation value to obtain the target compensation value.
[0018] Optionally, obtaining a target grayscale gain curve corresponding to a target screen load according to the plurality of grayscale gain curves includes:
[0019] Obtaining the target screen load according to the pixel brightness gain value and the average grayscale of the image to be compensated displayed by the terminal;
[0020] A target grayscale gain curve corresponding to the target screen load is obtained according to the plurality of grayscale gain curves.
[0021] Optionally, obtaining a target grayscale gain curve corresponding to a target screen load according to the plurality of grayscale gain curves includes:
[0022] Filtering the target grayscale gain curve from the plurality of grayscale gain curves, or,
[0023] Interpolate the plurality of screen loads and the grayscale gain curves corresponding to the plurality of screen loads to obtain a target grayscale gain curve corresponding to the target screen load.
[0024] Optionally, the method further comprises:
[0025] Determine a first brightness value of a grayscale before screen burn-in and a second brightness value of a grayscale after screen burn-in of the terminal under the screen load;
[0026] A grayscale gain value corresponding to the grayscale is obtained according to the first brightness value and the second brightness value, and a plurality of the grayscales and the grayscale gain values corresponding to the grayscales constitute a grayscale gain curve corresponding to the screen load.
[0027] According to a second aspect of an embodiment of the present disclosure, there is provided an image processing apparatus, including:
[0028] An acquisition module is configured to acquire grayscale gain curves corresponding to different screen loads, wherein the grayscale gain curves are used to represent the relationship between different grayscales and grayscale gain values;
[0029] A target grayscale gain curve determination module is configured to obtain a target grayscale gain curve corresponding to a target screen load according to the plurality of grayscale gain curves, wherein the target screen load is a screen load required for the terminal to display the image to be compensated;
[0030] The compensation module is configured to use the target grayscale gain curve to compensate the grayscale in the image to be compensated to obtain a compensated image.
[0031] According to a third aspect of an embodiment of the present disclosure, there is provided an electronic device, including:
[0032] processor;
[0033] a memory for storing processor-executable instructions;
[0034] Wherein, the processor is configured to:
[0035] Execute the steps of the image processing method provided in the first aspect of the present disclosure.
[0036] According to a fourth aspect of an embodiment of the present disclosure, a computer-readable storage medium is provided, on which computer program instructions are stored. When the program instructions are executed by a processor, the steps of the image processing method provided in the first aspect of the present disclosure are implemented.
[0037] The technical solution provided by the embodiments of the present disclosure may have the following beneficial effects:
[0038] Different grayscale gain curves are designed for different screen loads. Since different screen loads correspond to different voltage drops, different voltage drops can also be considered to correspond to different grayscale gain curves. When the target screen load required for the terminal to display the image to be compensated changes, that is, when the voltage drop changes, the grayscale in the image to be compensated can be compensated according to the grayscale gain values in different target grayscale gain curves.
[0039] Firstly, since the influence of the voltage drop caused by the screen load is taken into consideration, different screen loads and voltage drops correspond to different grayscale gain curves. Therefore, when the voltage drop and the screen load are different, different grayscale gain values in the grayscale gain curves are used to accurately compensate for each grayscale in the compensated image, thereby avoiding the inaccurate grayscale compensation caused by the screen load and voltage drop, and avoiding the burn-in phenomenon. Secondly, since the compensation for each grayscale is a compensation measure carried out after considering the influence of the screen load and voltage drop, different target screen loads will adopt different grayscale gain curves for compensation, so the grayscale brightness after compensation will not be inconsistent, thereby improving the display effect of the terminal screen.
[0040] It is to be understood that the foregoing general description and the following detailed description are exemplary and explanatory only and are not restrictive of the present disclosure. BRIEF DESCRIPTION OF THE DRAWINGS
[0041] The accompanying drawings, which are incorporated in and constitute a part of this specification, illustrate embodiments consistent with the present disclosure and, together with the description, serve to explain the principles of the present disclosure.
[0042] Figure 1 The figure is a flowchart of an image processing method according to an exemplary embodiment.
[0043] Figure 2 is a schematic diagram showing a screen burn-in phenomenon according to an exemplary embodiment.
[0044] Figure 3 is a schematic diagram showing blocks of different gray levels according to an exemplary embodiment.
[0045] Figure 4 is a schematic diagram of a grayscale gain curve according to an exemplary embodiment.
[0046] Figure 5 is a histogram of grayscale proportions according to an exemplary embodiment.
[0047] Figure 6 is a schematic diagram of a grayscale gain curve according to an exemplary embodiment.
[0048] Figure 7 is a schematic diagram of a grayscale gain curve according to an exemplary embodiment.
[0049] Figure 8 The diagram is a schematic diagram showing a method of compensating an image to be compensated into a compensated image according to an exemplary embodiment.
[0050] Fig. 9 is a block diagram of an image processing apparatus according to an exemplary embodiment.
[0051] Fig.10 is a block diagram of an image processing apparatus according to an exemplary embodiment. DETAILED DESCRIPTION
[0052] Exemplary embodiments will be described in detail herein, examples of which are shown in the accompanying drawings. When the following description refers to the drawings, the same numbers in different drawings represent the same or similar elements unless otherwise indicated. The embodiments described in the following exemplary embodiments do not represent all embodiments consistent with the present disclosure. Instead, they are merely examples of devices and methods consistent with some aspects of the present disclosure as detailed in the appended claims.
[0053] It should be noted that all actions of acquiring signals, information or data in the present disclosure are carried out in compliance with the relevant data protection laws and policies of the country where the device is located and with the authorization given by the owner of the corresponding device.
[0054] With the widespread use of terminal devices such as computers and mobile phones, the phenomenon of screen burn-in is becoming more and more common. Screen burn-in refers to the phenomenon that the terminal screen displays the same image for too long, causing the pixels to age or become damaged, leaving the outline, traces or shadows of the image after the pixel displays the image for a long time. For example, see Figure 2 As shown in the figure, the terminal screen displays a "sun" icon in the upper left corner of the previous frame. Due to pixel damage, the "sun" icon will also be displayed in the upper left corner of the next frame, and even in the upper left corner of all subsequent frames. This phenomenon is called screen burn-in. The causes of terminal screen burn-in include: displaying the same image for too long, screen brightness is too high, temperature is too high, etc.
[0055] In the related art, a fixed compensation value is used to compensate the grayscale of the image displayed on the terminal screen to avoid screen burn-in. However, the screen load of different images displayed on the terminal screen is different. The difference in screen load will lead to different voltage drops. The voltage drop refers to the voltage drop after the current passes through the wire or component. It can also be understood as the amount of power loss. The voltage drop U = IR, I is the current flowing into the circuit, R is the load of the wire and the component, and R remains unchanged. The difference in voltage drop will have two negative effects: (1) It has a greater impact on the grayscale compensation of the image, causing the compensation value to change. After the compensation value changes, the grayscale compensated by the compensation value will also change, making the accuracy of the grayscale compensation of the image lower, and the screen burn-in phenomenon will also occur; (2) It has a greater impact on the display effect of the image.
[0056] For example, see Figure 3 As shown, Figure 3There are blocks A to D with different grayscales, and the grayscales of blocks A to D decrease in sequence. When the terminal calculates the grayscale of the pixels in each block, it adjusts the grayscale background image to white, that is, the overall background image of blocks A to D is adjusted to white. White has the highest brightness, so the required screen load is the largest. Figure 3 The grayscale of block A is 255, which also appears white. The display area of block A is smaller than the display area of the entire white background image, so the screen load of block A is smaller, and the voltage drop corresponding to block A is smaller than the voltage drop corresponding to the entire white background image. The power loss of block A is smaller than the power loss of the white background image. Since the power supply of the terminal is the same, the power supply current input to block A is greater than the power supply current input to the white background image, which causes the display brightness of block A to be greater than the display brightness of the white background image, so that the display brightness of block A is improved. Similarly, the brightness of other blocks with different grayscales such as blocks B to D will also be improved to varying degrees. When the display brightness of blocks A to D is increased while the display brightness of other normal pixels in the image is not increased, the brightness of the image display will be uneven, with block A having the brightest display brightness, followed by block B, block C and block D, and the display effect of the terminal screen will be reduced. In addition, the increase in display brightness will also cause the compensation value to change, resulting in inaccurate grayscale after compensation based on the compensation value, and screen burn-in will also occur.
[0057] In order to reduce the negative impact of poor display effect caused by voltage drop, the relevant technology will also reduce the overall grayscale brightness of the entire image, making the overall picture brightness darker, thereby reducing the voltage drop and making the display brightness of the picture more uniform. However, the reduction in overall picture brightness will affect the user experience.
[0058] Based on this, Figure 1 A flowchart of an image processing method according to an exemplary embodiment is shown as follows: Figure 1 As shown, the image processing method is used in a terminal and includes the following steps.
[0059] In step S11, grayscale gain curves corresponding to different screen loads are obtained, where the grayscale gain curves are used to represent the relationship between different grayscales and grayscale gain values.
[0060] Screen load refers to the computing load generated when rendering and processing the image displayed on the terminal screen during the image processing process. The screen load increases when the terminal performs tasks such as image or video rendering, animation playback, and graphics processing. The size of the screen load depends on factors such as image complexity, resolution, frame rate, and image quality.
[0061] In the present disclosure, the screen load is positively correlated with the screen brightness ratio. The greater the screen brightness ratio, the greater the screen load. For example, at a screen load of 1%, assuming that there are 100 pixels in the image displayed by the terminal, then the grayscale of one pixel is 255 (white), and the remaining 99 pixels are 0 (black). At this time, the overall screen load of the terminal screen is small, and the screen brightness ratio is small.
[0062] See also Figure 4 As shown in the figure, the grayscale gain curve is the relationship between different grayscales and different grayscale gain values. In image processing, color images are converted into grayscale images to simplify the image processing process. Grayscale is also called grayscale. Unlike color images, grayscale images are single-channel images that only contain brightness information but not color information. The grayscale of each pixel in a grayscale image is used to represent the brightness level of the pixel, usually expressed in grayscales from 0 to 255. A smaller grayscale indicates that the pixel is darker, while a larger grayscale indicates that the pixel is brighter. The grayscale gain value is a parameter for adjusting the grayscale, which is used to compensate for the grayscale and thus adjust the grayscale brightness.
[0063] In the present disclosure, different grayscale gain curves are designed for different screen loads. For example, a screen load of 1% corresponds to one grayscale gain curve, and a screen load of 100% corresponds to another grayscale gain curve.
[0064] In step S12, a target grayscale gain curve corresponding to a target screen load is obtained according to the plurality of grayscale gain curves, where the target screen load is a screen load required for a terminal to display an image to be compensated.
[0065] A target grayscale gain curve corresponding to a target screen load can be screened out from the grayscale gain curves corresponding to multiple screen loads; or the grayscale and gain values in the grayscale gain curves corresponding to multiple screen loads can be linearly interpolated to obtain a target grayscale gain curve corresponding to the target screen load.
[0066] The target screen load is the screen load required when the terminal displays the image to be compensated, which can also be understood as the screen load currently required by the terminal; the image to be compensated is the image displayed by the terminal that needs to be compensated, which can also be regarded as the current frame image that the terminal currently needs to process.
[0067] In step S13, the target grayscale gain curve is used to compensate the grayscale in the image to be compensated to obtain a compensated image.
[0068] For the image to be compensated, the image to be compensated is a grayscale image, and each pixel in the image to be compensated has its own corresponding grayscale. Therefore, the target grayscale gain curve corresponding to the target screen load required for the terminal to display the image to be compensated can be used to compensate each grayscale in the image to be compensated.
[0069] When using the target grayscale gain curve to compensate the grayscale in the image to be compensated, for any pixel in the image to be compensated, the target grayscale consistent with the grayscale of the pixel is first found from the target grayscale gain curve, and then the target grayscale gain value corresponding to the target grayscale is used to compensate the grayscale of the pixel, so that a compensated image is obtained.
[0070] For example, see Figure 4 The target grayscale gain curve shown shows that the grayscale gain value corresponding to grayscale 100 is 10, the grayscale gain value corresponding to grayscale 101 is 11, the grayscale gain value corresponding to grayscale 102 is 12, and the grayscale gain value corresponding to grayscale 103 is 13. If the grayscale of a pixel in the image to be compensated is 100, the grayscale gain value of 10 will be used to compensate the grayscale 100, so as to obtain the compensated grayscale of the pixel.
[0071] After the compensated image is obtained, since the compensated image is a grayscale image, if it is to be displayed to the user, it is necessary to convert the grayscale image into a color image.
[0072] Through the above technical solution, different grayscale gain curves are designed for different screen loads. Since different screen loads correspond to different voltage drops, different voltage drops can also be considered to correspond to different grayscale gain curves. When the terminal displays the current image to be compensated, the target screen load required for the terminal to display the image to be compensated is determined, and the target grayscale gain curve corresponding to the target screen load is determined. The grayscale in the image to be compensated is compensated by each grayscale gain value in the target grayscale gain curve, thereby obtaining a compensated image.
[0073] In this process, firstly, since the influence of the voltage drop caused by the screen load is taken into consideration, different screen loads and voltage drops correspond to different grayscale gain curves. Therefore, when the voltage drop and the screen load are different, different grayscale gain values in the grayscale gain curves are used to accurately compensate for each grayscale in the compensated image, thereby avoiding the inaccurate grayscale compensation caused by the screen load and voltage drop, and avoiding the burn-in phenomenon; secondly, since the compensation for each grayscale is performed after considering the influence of the screen load and voltage drop, the brightness of the compensated grayscale will not be inconsistent, thereby improving the display effect of the terminal screen; thirdly, there is no need to reduce the overall brightness of the picture to reduce the influence of the voltage drop, thereby improving the user experience.
[0074] Some specific embodiments and optional embodiments involved in the above steps S11 to S13 are introduced below.
[0075] In an optional embodiment, the grayscale gain curves corresponding to different screen loads can be obtained in the following manner.
[0076] Determine a first brightness value of the grayscale of the terminal before screen burn-in and a second brightness value of the grayscale after screen burn-in under the screen load; obtain a grayscale gain value corresponding to the grayscale based on the first brightness value and the second brightness value, and multiple grayscales and grayscale gain values corresponding to the grayscales constitute a grayscale gain curve corresponding to the screen load.
[0077] The brightness correction coefficient may be determined according to the first brightness value, the second brightness value and the Gamma value, and then the grayscale gain value corresponding to the grayscale is obtained by subtracting a preset value from the brightness correction coefficient. The preset value may be 1.
[0078] We can first assume that the screen load is 1%, that is, the screen brightness accounts for 1%, light up 1% of the screen area, and then determine the first brightness value of the grayscale of each pixel in the 1% screen area before the screen is burned in and the second brightness value of the grayscale of each pixel in the 1% screen area after the screen is burned in; for each grayscale, calculate the brightness correction coefficient based on the first brightness value, the second brightness value and the Gamma value; then subtract the preset value 1 from the brightness correction coefficient to obtain the grayscale gain value corresponding to each grayscale. The brightness correction coefficient is calculated using the following formula:
[0079] a=(L_after / L_before)^(1 / γ)
[0080] Where a is the brightness correction coefficient, L_after is the first brightness value of the grayscale before screen burn-in, L_before is the second brightness value of the grayscale after screen burn-in, and γ is the Gamma value.
[0081] Gamma value is a non-linear parameter used to adjust the brightness response area of the screen. Gamma is a non-linear adjustment parameter that describes the brightness of images in displays, photographic equipment, and image processing software. In image processing, a lower gamma value will make the image brighter, and a higher gamma value will make the image darker. By adjusting the gamma value, the brightness value of each pixel on the image will be close to the brightness value in the real scene. Normally, the gamma value of the screen is 2.2.
[0082] It can be understood that the grayscale gain curve may be a curve when the screen load is small and the pixel brightness gain value is maximum.
[0083] Through the above method 1, the grayscale gain value corresponding to each grayscale when the screen load is 1% can be calculated. Similarly, the screen load can be set to 100% to calculate the grayscale gain value corresponding to each grayscale when the screen load is 100%.
[0084] In a specific embodiment, the target screen load is calculated in the following way:
[0085] The target screen load is obtained according to a pixel brightness gain value (DBV) and an average grayscale of the image to be compensated displayed on the terminal.
[0086] See also Figure 5 The terminal shown shows the proportion of each gray scale when the image to be compensated is displayed. Figure 5 The horizontal axis is the grayscale, and the vertical axis is the number of pixels occupied by the grayscale in the image to be compensated. The average grayscale can be obtained based on the grayscale, the number of pixels occupied by the grayscale, and the weight corresponding to the grayscale; then the target screen load required for the terminal to display the image to be compensated can be obtained based on the average grayscale and the pixel brightness gain value.
[0087] Obtaining the average grayscale according to the grayscale, the number of pixels occupied by the grayscale and the weight corresponding to the grayscale includes: multiplying the same grayscale by the weight corresponding to the same grayscale, and then multiplying by the number of pixels occupied by the same grayscale to obtain a sub-average grayscale corresponding to the same grayscale; and then adding multiple sub-average grayscales to obtain the average grayscale.
[0088] For example, see Figure 5 As shown, assuming that the image to be compensated has 50 grayscales, the number of pixels occupied by 50 grayscales is 3000, and the corresponding weight is 0.1; the number of pixels occupied by 100 grayscales is 4500, and the corresponding weight is 0.2; the number of pixels occupied by 150 grayscales is 3000, and the corresponding weight is 0.7, then the final average grayscale = 50*3000*0.1+100*4500*0.2+150*3000*0.7.
[0089] Obtaining the target screen load according to the average grayscale and the pixel brightness gain value includes: multiplying the screen grayscale by the pixel brightness gain value to obtain the target screen load.
[0090] Since different users set the terminal brightness bar differently, the pixel brightness gain value will also be different, and the ratio of the terminal brightness bar is positively correlated with the pixel brightness gain value. For example, when the terminal brightness bar has been adjusted to 100% by the user, the corresponding pixel brightness gain value is 0.5; when the terminal brightness bar is adjusted to 50% by the user, the corresponding pixel brightness gain value is 0.25.
[0091] In a specific embodiment, after obtaining the target screen load, it is also necessary to determine the target grayscale gain curve corresponding to the target screen load, including the following two methods:
[0092] Mode 1: Filtering out the target grayscale gain curve from the plurality of grayscale gain curves.
[0093] If there is a grayscale gain curve corresponding to the current target screen load among the multiple grayscale gain curves, the grayscale gain curve corresponding to the target screen load is screened out from the multiple grayscale gain curves as the target grayscale gain curve.
[0094] For example, grayscale gain curves of 1% and 100% screen loads are pre-stored. If the target screen load currently required by the terminal is 1%, the grayscale gain curve corresponding to the 1% screen load is used as the target gain curve.
[0095] Mode 2: interpolating the plurality of screen loads and the grayscale gain curves corresponding to the plurality of screen loads to obtain a target grayscale gain curve corresponding to the target screen load.
[0096] Among multiple grayscale gain curves, if there is no grayscale gain curve corresponding to the current target screen load, at least two pre-stored screen loads and grayscale gain curves corresponding to at least two screen loads are interpolated to obtain a target grayscale gain curve corresponding to the target screen load.
[0097] For example, if the terminal has pre-stored grayscale gain curves for 1% and 100% screen loads, but has not stored a grayscale gain curve for 2% screen load, refer to Figure 6 As shown, the grayscale gain curve when the screen load is 1% is shown. Assuming that there are 3 points (10, 10), (11, 11), and (12, 12) in the grayscale gain curve, it can be determined that the proportional relationship between the grayscale gain value and the grayscale when the screen load is 1% is 1 times; refer to Figure 7 As shown, the grayscale gain curve when the screen load is 100% is shown. Assuming that there are 3 points in the grayscale gain curve, (10, 100), (11, 110), and (12, 120), it can be determined that when the screen load is 100%, the proportional relationship between the grayscale gain value and the grayscale is 10 times. Then, after interpolating the two curves, it can be determined that when the screen load is 2%, the proportional relationship between the grayscale and the grayscale gain value is 2 times. The three points in the grayscale gain curve when the screen load is 2% are (10, 20), (11, 22), and (12, 24).
[0098] It is understandable that the above Figure 6 and Figure 7 This is just a schematic representation of the grayscale gain curve. In fact, the grayscale gain curve is not Figure 6 and Figure 7 A simple linear relationship is shown.
[0099] Through the above two methods, the target grayscale gain curve corresponding to the target screen load can be obtained, so that the target grayscale gain curve matching the current target screen load is used to compensate the image to be compensated, thereby achieving accurate grayscale compensation under different screen loads.
[0100] In a specific embodiment, the image to be compensated may be compensated by the following steps to obtain a compensated image:
[0101] In step S21, based on the target grayscale gain curve, a target grayscale gain value corresponding to the grayscale to be compensated in the image to be compensated is determined.
[0102] After the target grayscale gain curve is obtained, the target grayscale gain value corresponding to the grayscale to be compensated of the pixel point in the image to be compensated can be obtained from the target grayscale gain curve.
[0103] For example, the three points in the grayscale gain curve when the screen load is 2% are (10, 20), (11, 22), and (12, 24). If the grayscale of a pixel in the image to be compensated is 11, then the corresponding target grayscale gain value is 22.
[0104] In step S22, the target grayscale gain value is used to compensate the grayscale to be compensated, so as to obtain the compensated grayscale of the compensated image.
[0105] The initial compensation value corresponding to the grayscale to be compensated can be determined based on the relationship between the pre-stored grayscale and the compensation value; the target compensation value can be obtained by correcting the initial compensation value using the target grayscale gain value, or the target grayscale gain value and the pixel brightness gain value can be used to correct the initial compensation value to obtain the target compensation value; the grayscale to be compensated can be compensated using the target compensation value to obtain the compensated grayscale.
[0106] Both the pixel brightness gain value and the target grayscale gain value are parameters used to adjust the screen brightness. A higher target grayscale gain value and pixel brightness gain value will make the image brighter, while a lower grayscale gain value and pixel brightness gain value will make the image darker. The target grayscale gain value is used to change the brightness intensity of each grayscale level; the pixel brightness gain value is the specific value of the grayscale.
[0107] The gamma value and the maximum grayscale brightness (255) determine the grayscale brightness of the pixel. If the grayscale brightness changes, the gamma value will change. The gamma value is used to calculate the relationship between the pre-stored grayscale and the grayscale compensation value. If the gamma value changes, the relationship between the pre-stored grayscale and the grayscale compensation value will change, which will in turn change the compensated grayscale.
[0108] According to the relationship between the pre-stored grayscale and the compensation value, determining the initial compensation value corresponding to the grayscale to be compensated includes: when the grayscale to be compensated exists in the pre-stored grayscales, directly taking the compensation value corresponding to the grayscale to be compensated in the pre-stored grayscales that is consistent with the grayscale to be compensated as the initial compensation value; when the grayscale to be compensated does not exist in the pre-stored grayscales, obtaining the initial compensation value corresponding to the grayscale to be compensated by an interpolation algorithm according to the relationship between the pre-stored grayscale and the compensation value.
[0109] For example, if grayscale 10 and compensation value 10, and grayscale 100 and compensation value 100 having a corresponding relationship are pre-stored. When the grayscale to be compensated is 20, since grayscale 20 to be compensated does not exist in the pre-stored grayscales, the grayscale 10 and compensation value 10, and the grayscale 100 and compensation value 100 having a corresponding relationship can be interpolated, and the initial compensation value corresponding to the grayscale 20 to be compensated is 20 obtained by the interpolation algorithm.
[0110] The target compensation value is obtained by correcting the initial compensation value using the target grayscale gain value and the pixel brightness gain value, including: calculating a first product of the target grayscale gain value multiplied by the initial compensation value, a second product of the pixel brightness gain value multiplied by the initial compensation value, and then taking the sum of the first product and the second product as the target compensation value.
[0111] For example, if the initial grayscale compensation value of a pixel is 20, the pixel brightness gain value is 0.05, and the target grayscale gain value is 0.05, then the final target compensation value is 20*0.05+20*0.05=2.
[0112] The target compensation value is used to compensate the grayscale to be compensated to obtain the compensated grayscale, including: adding the target compensation value to the grayscale to be compensated to obtain the grayscale value of the compensated grayscale.
[0113] For example, when the target compensation value corresponding to the grayscale 20 to be compensated is 2, the obtained compensated grayscale is 22.
[0114] See also Figure 8 A schematic diagram of compensating the image to be compensated is shown. Figure 5 The histogram shown is used to calculate the average grayscale of the image to be compensated; then the relationship between the stored grayscale and the grayscale gain value is calculated; then the initial compensation value is obtained according to the pre-stored relationship between the grayscale and the grayscale gain value; then the initial compensation value is compensated by using the pixel brightness gain value and the target grayscale gain value to obtain the target compensation value; finally, the image to be compensated is compensated by the target compensation value to obtain a compensated image.
[0115] Fig. 9 is a block diagram of an image processing device according to an exemplary embodiment. Fig. 9The image processing device 900 includes: an acquisition module 910, a target grayscale gain curve determination module 920 and a compensation module 930.
[0116] An acquisition module 910 is configured to acquire grayscale gain curves corresponding to different screen loads, wherein the grayscale gain curves are used to represent the relationship between different grayscales and grayscale gain values;
[0117] The target grayscale gain curve determining module 920 is configured to obtain a target grayscale gain curve corresponding to a target screen load according to the plurality of grayscale gain curves, wherein the target screen load is a screen load required for the terminal to display the image to be compensated;
[0118] The compensation module 930 is configured to use the target grayscale gain curve to compensate the grayscale in the image to be compensated to obtain a compensated image.
[0119] Optionally, the compensation module 930 includes:
[0120] A first determination submodule is configured to determine a target grayscale gain value corresponding to a grayscale to be compensated in the image to be compensated based on the target grayscale gain curve;
[0121] The first compensation submodule is configured to compensate the grayscale to be compensated by using the target grayscale gain value to obtain a compensated grayscale of the compensated image.
[0122] Optionally, the first compensation submodule includes:
[0123] A second determining submodule is configured to determine an initial compensation value corresponding to the grayscale to be compensated according to a pre-stored relationship between the grayscale and the compensation value;
[0124] A first correction submodule is configured to correct the initial compensation value by using the target grayscale gain value to obtain a target compensation value;
[0125] The second compensation submodule is configured to compensate the to-be-compensated grayscale by using the target compensation value to obtain the compensated grayscale.
[0126] Optionally, the first correction submodule includes:
[0127] The second correction submodule is configured to correct the initial compensation value by using the target grayscale gain value and the pixel brightness gain value to obtain the target compensation value.
[0128] Optionally, the target grayscale gain curve determination module 920 includes:
[0129] A third determination submodule is configured to obtain the target screen load according to the pixel brightness gain value and the average grayscale of the image to be compensated displayed by the terminal;
[0130] The fourth determination submodule is configured to obtain a target grayscale gain curve corresponding to the target screen load according to the plurality of grayscale gain curves.
[0131] Optionally, the target grayscale gain curve determination module 920 includes:
[0132] A screening submodule is configured to screen out the target grayscale gain curve from the plurality of grayscale gain curves, or,
[0133] The interpolation submodule is configured to interpolate the multiple screen loads and the grayscale gain curves corresponding to the multiple screen loads to obtain a target grayscale gain curve corresponding to the target screen load.
[0134] Optionally, the image processing device 900 includes:
[0135] A brightness value calculation module is configured to determine a first brightness value of a grayscale before screen burn-in and a second brightness value of a grayscale after screen burn-in of the terminal under the screen load;
[0136] The grayscale gain value calculation module is configured to obtain the grayscale gain value corresponding to the grayscale according to the first brightness value and the second brightness value. The plurality of grayscales and the grayscale gain values corresponding to the grayscales constitute a grayscale gain curve corresponding to the screen load.
[0137] Regarding the device in the above embodiment, the specific manner in which each module performs operations has been described in detail in the embodiment of the method, and will not be elaborated here.
[0138] The present disclosure also provides a computer-readable storage medium on which computer program instructions are stored. When the program instructions are executed by a processor, the steps of the image processing method provided by the present disclosure are implemented.
[0139] Fig.10 1 is a block diagram of an apparatus 1000 for image processing according to an exemplary embodiment. For example, the apparatus 1000 may be a mobile phone, a computer, a digital broadcast terminal, a messaging device, a game console, a tablet device, a medical device, a fitness device, a personal digital assistant, or other electronic device.
[0140] Reference Fig.10, the device 1000 may include one or more of the following components: a processing component 1002 , a memory 1004 , a power component 1006 , a multimedia component 1008 , an audio component 1010 , an input / output interface 1012 , a sensor component 1014 , and a communication component 1016 .
[0141] The processing component 1002 generally controls the overall operation of the device 1000, such as operations associated with display, phone calls, data communications, camera operations, and recording operations. The processing component 1002 may include one or more processors 1020 to execute instructions to complete all or part of the steps of the above-mentioned image processing method. In addition, the processing component 1002 may include one or more modules to facilitate the interaction between the processing component 1002 and other components. For example, the processing component 1002 may include a multimedia module to facilitate the interaction between the multimedia component 1008 and the processing component 1002.
[0142] The memory 1004 is configured to store various types of data to support operations on the device 1000. Examples of such data include instructions for any application or method operating on the device 1000, contact data, phone book data, messages, images, videos, etc. The memory 1004 can be implemented by any type of volatile or non-volatile storage device or a combination thereof, such as static random access memory (SRAM), electrically erasable programmable read-only memory (EEPROM), erasable programmable read-only memory (EPROM), programmable read-only memory (PROM), read-only memory (ROM), magnetic memory, flash memory, magnetic disk or optical disk.
[0143] The power supply component 1006 provides power to the various components of the device 1000. The power supply component 1006 may include a power management system, one or more power supplies, and other components associated with generating, managing, and distributing power for the device 1000.
[0144] The multimedia component 1008 includes a screen that provides an output interface between the device 1000 and the user. In some embodiments, the screen may include a liquid crystal display (LCD) and a touch panel (TP). If the screen includes a touch panel, the screen may be implemented as a touch screen to receive input signals from the user. The touch panel includes one or more touch sensors to sense touch, slide, and gestures on the touch panel. The touch sensor may not only sense the boundaries of the touch or slide action, but also detect the duration and pressure associated with the touch or slide operation. In some embodiments, the multimedia component 1008 includes a front camera and / or a rear camera. When the device 1000 is in an operating mode, such as a shooting mode or a video mode, the front camera and / or the rear camera may receive external multimedia data. Each front camera and rear camera may be a fixed optical lens system or have a focal length and optical zoom capability.
[0145] The audio component 1010 is configured to output and / or input audio signals. For example, the audio component 1010 includes a microphone (MIC), and when the device 1000 is in an operating mode, such as a call mode, a recording mode, and a speech recognition mode, the microphone is configured to receive an external audio signal. The received audio signal can be further stored in the memory 1004 or sent via the communication component 1016. In some embodiments, the audio component 1010 also includes a speaker for outputting audio signals.
[0146] The input / output interface 1012 provides an interface between the processing component 1002 and the peripheral interface modules, which may be keyboards, click wheels, buttons, etc. These buttons may include but are not limited to: a home button, a volume button, a start button, and a lock button.
[0147] The sensor assembly 1014 includes one or more sensors for providing various aspects of the status assessment of the device 1000. For example, the sensor assembly 1014 can detect the open / closed state of the device 1000, the relative positioning of components, such as the display and keypad of the device 1000, the sensor assembly 1014 can also detect the position change of the device 1000 or a component of the device 1000, the presence or absence of user contact with the device 1000, the orientation or acceleration / deceleration of the device 1000, and the temperature change of the device 1000. The sensor assembly 1014 can include a proximity sensor configured to detect the presence of a nearby object without any physical contact. The sensor assembly 1014 can also include an optical sensor, such as a CMOS or CCD image sensor, for use in imaging applications. In some embodiments, the sensor assembly 1014 can also include an accelerometer, a gyroscope sensor, a magnetic sensor, a pressure sensor, or a temperature sensor.
[0148] The communication component 1016 is configured to facilitate wired or wireless communication between the device 1000 and other devices. The device 1000 can access a wireless network based on a communication standard, such as WiFi, 2G or 3G, or a combination thereof. In an exemplary embodiment, the communication component 1016 receives a broadcast signal or broadcast-related information from an external broadcast management system via a broadcast channel. In an exemplary embodiment, the communication component 1016 also includes a near field communication (NFC) module to facilitate short-range communication. For example, the NFC module can be implemented based on radio frequency identification (RFID) technology, infrared data association (IrDA) technology, ultra-wideband (UWB) technology, Bluetooth (BT) technology and other technologies.
[0149] In an exemplary embodiment, the apparatus 1000 may be implemented by one or more application-specific integrated circuits (ASICs), digital signal processors (DSPs), digital signal processing devices (DSPDs), programmable logic devices (PLDs), field programmable gate arrays (FPGAs), controllers, microcontrollers, microprocessors or other electronic components to perform the above-mentioned image processing method.
[0150] In an exemplary embodiment, a non-transitory computer-readable storage medium including instructions is also provided, such as a memory 1004 including instructions, and the instructions can be executed by the processor 1020 of the device 1000 to complete the above-mentioned image processing method. For example, the non-transitory computer-readable storage medium can be a ROM, a random access memory (RAM), a CD-ROM, a magnetic tape, a floppy disk, an optical data storage device, etc.
[0151] In addition to being an independent electronic device, the above-mentioned device can also be a part of an independent electronic device. For example, in one embodiment, the device can be an integrated circuit (IC) or a chip, wherein the integrated circuit can be an IC or a collection of multiple ICs; the chip can include but is not limited to the following types: GPU (Graphics Processing Unit), CPU (Central Processing Unit), FPGA (Field Programmable Gate Array), DSP (Digital Signal Processor), ASIC (Application Specific Integrated Circuit), SOC (System on Chip, SoC), etc. The above-mentioned integrated circuit or chip can be used to execute executable instructions (or codes) to implement the above-mentioned image processing method. The executable instructions can be stored in the integrated circuit or chip, or can be obtained from other devices or equipment, such as the integrated circuit or chip includes a processor, a memory, and an interface for communicating with other devices. The executable instruction may be stored in the memory, and when the executable instruction is executed by the processor, the above-mentioned image processing method may be implemented; alternatively, the integrated circuit or chip may receive the executable instruction through the interface and transmit it to the processor for execution, so as to implement the above-mentioned image processing method.
[0152] Those skilled in the art will readily appreciate other embodiments of the present disclosure after considering the specification and practicing the present disclosure. The present disclosure is intended to cover any variations, uses or adaptations of the present disclosure that follow the general principles of the present disclosure and include common knowledge or customary techniques in the art that are not disclosed in the present disclosure. The description and examples are to be considered as exemplary only, and the true scope and spirit of the present disclosure are indicated by the following claims.
[0153] It should be understood that the present disclosure is not limited to the exact structures that have been described above and shown in the drawings, and that various modifications and changes may be made without departing from the scope thereof. The scope of the present disclosure is limited only by the appended claims.
Claims
1. An image processing method, characterized in that: include: Obtaining grayscale gain curves corresponding to different screen loads, wherein the grayscale gain curves are used to represent the relationship between different grayscales and grayscale gain values; According to the plurality of grayscale gain curves, a target grayscale gain curve corresponding to a target screen load is obtained, wherein the target screen load is a screen load required for a terminal to display an image to be compensated; The target grayscale gain curve is used to compensate the grayscale in the image to be compensated to obtain a compensated image.
2. The method according to claim 1, characterized in that The target grayscale gain curve is used to compensate the grayscale in the image to be compensated to obtain a compensated image, including: Based on the target grayscale gain curve, determining a target grayscale gain value corresponding to the grayscale to be compensated in the image to be compensated; The target grayscale gain value is used to compensate the grayscale to be compensated, so as to obtain a compensated grayscale of the compensated image.
3. The method according to claim 2, characterized in that The target grayscale gain value is used to compensate the grayscale to be compensated to obtain the compensated grayscale of the compensated image, comprising: Determining an initial compensation value corresponding to the grayscale to be compensated according to a pre-stored relationship between the grayscale and the compensation value; Using the target grayscale gain value to correct the initial compensation value to obtain a target compensation value; The target compensation value is used to compensate the grayscale to be compensated to obtain the compensated grayscale.
4. The method according to claim 3, characterized in that The initial compensation value is corrected by using the target grayscale gain value to obtain a target compensation value, comprising: The target grayscale gain value and the pixel brightness gain value are used to correct the initial compensation value to obtain the target compensation value.
5. The method according to claim 1, characterized in that According to the plurality of grayscale gain curves, a target grayscale gain curve corresponding to a target screen load is obtained, including: Obtaining the target screen load according to the pixel brightness gain value and the average grayscale of the image to be compensated displayed by the terminal; A target grayscale gain curve corresponding to the target screen load is obtained according to the plurality of grayscale gain curves.
6. The method according to claim 1, characterized in that According to the plurality of grayscale gain curves, a target grayscale gain curve corresponding to a target screen load is obtained, including: Filtering the target grayscale gain curve from the plurality of grayscale gain curves, or, Interpolate the plurality of screen loads and the grayscale gain curves corresponding to the plurality of screen loads to obtain a target grayscale gain curve corresponding to the target screen load.
7. The method according to claim 1, characterized in that The method further comprises: Determine a first brightness value of a grayscale before screen burn-in and a second brightness value of a grayscale after screen burn-in of the terminal under the screen load; A grayscale gain value corresponding to the grayscale is obtained according to the first brightness value and the second brightness value, and a plurality of the grayscales and the grayscale gain values corresponding to the grayscales constitute a grayscale gain curve corresponding to the screen load.
8. An image processing device, characterized in that: include: An acquisition module is configured to acquire grayscale gain curves corresponding to different screen loads, wherein the grayscale gain curves are used to represent the relationship between different grayscales and grayscale gain values; A target grayscale gain curve determination module is configured to obtain a target grayscale gain curve corresponding to a target screen load according to the plurality of grayscale gain curves, wherein the target screen load is a screen load required for the terminal to display the image to be compensated; The compensation module is configured to use the target grayscale gain curve to compensate the grayscale in the image to be compensated to obtain a compensated image.
9. An electronic device, characterized in that: include: processor; a memory for storing processor-executable instructions; Wherein, the processor is configured to: Execute the steps of any one of the methods of claims 1 to 8.
10. A computer-readable storage medium having computer program instructions stored thereon, characterized in that: When the program instructions are executed by a processor, the steps of the method described in any one of claims 1 to 8 are implemented.
Citation Information
Patent Citations
Method and device for regulating input image according to display system property
CN101051436A
Display device, and method and program for driving display device
CN102239514A
Visual effect compensation method and device for PMOLED display screen and storage medium
CN110570814A
Screen display method and device
CN111355839A
Brightness adjustment method, brightness adjustment device, terminal equipment and storage medium
CN112071267A