Image processing method and apparatus, device, and medium
By adjusting the saturation and power consumption of the image, and using FPGA or GPU to process the color channel values of each pixel, the problem of high power consumption of the display screen is solved, achieving the effect of reducing display power consumption and improving user experience.
Patent Information
- Application Number
- PCT/CN2024/105315
- Authority / Receiving Office
- WO · WO
- Patent Type
- Applications
- Current Assignee / Owner
- Filing Date
- 2024-07-12
- Publication Date
- 2026-01-15
AI Technical Summary
The high power consumption of electronic device displays leads to increased negative environmental and climate impacts, and existing technologies struggle to effectively reduce display power consumption.
By adjusting the saturation and power consumption of the image to be displayed, each pixel is processed using an FPGA or GPU to adjust the color channel values of the image in order to reduce the power consumption of the display.
This achieves reduced power consumption in image display, reduced total power consumption in electronic devices, promotes environmental sustainability, and enhances user experience.
Smart Images

Figure CN2024105315_15012026_PF_FP_ABST
Abstract
Description
Image processing methods, apparatus, equipment and media Technical Field
[0001] This invention relates to the field of display technology, and in particular to an image processing method, apparatus, device, and medium. Background Technology
[0002] With the continuous advancement of technology and the digital transformation of society, the use of electronic devices has become increasingly widespread globally. From the initial personal computers and mobile phones to today's smart home devices and wearable devices, electronic devices have become essential tools for people's lives, work, and entertainment. However, it is precisely because of the widespread use of electronic devices that the number of electronic devices worldwide has surged, causing various negative impacts on the environment and climate.
[0003] As one of the core components of electronic devices, the power consumption of the display screen may account for a considerable proportion of the total power consumption of the electronic device. Therefore, reducing the power consumption of the display screen can significantly reduce the total power consumption of the electronic device, thereby effectively promoting environmental sustainability, driving device design innovation, optimizing overall device performance, and improving the user experience.
[0004] Summary of the Invention
[0005] This invention provides an image processing method, apparatus, device, and medium to address the shortcomings of related technologies.
[0006] According to a first aspect of the present invention, an image processing method is provided, the method comprising:
[0007] Obtain a first image to be displayed, the first image including multiple pixels, and for any pixel, the color of the pixel is represented by pixel values on multiple channels;
[0008] Based on the first pixel value of each pixel in the first image across multiple channels, the saturation of the first image is adjusted to obtain the second image;
[0009] Based on the first pixel value of each pixel in the first image across multiple channels and the second pixel value of each pixel in the second image across multiple channels, the second image is adjusted using low power to obtain the target image.
[0010] According to a second aspect of the present invention, an image processing apparatus is provided, the apparatus comprising:
[0011] The acquisition module is used to acquire a first image to be displayed, the first image including multiple pixels, and for any pixel, the color of the pixel is represented by pixel values on multiple channels;
[0012] The first adjustment module is used to adjust the saturation of the first image based on the first pixel value of each pixel in the first image on multiple channels to obtain the second image;
[0013] The second adjustment module is used to perform low-power adjustment on the second image based on the first pixel value of each pixel in the first image in multiple channels and the second pixel value of each pixel in the second image in multiple channels, so as to obtain the target image.
[0014] According to a third aspect of the present invention, a computing device is provided, the computing device including a memory, a processor, and a computer program stored in the memory and executable on the processor, wherein the processor executes the computer program to perform operations as described in the first aspect of the image processing method.
[0015] According to a fourth aspect of the present invention, a computer-readable storage medium is provided, wherein a program is stored on the computer-readable storage medium, and when the program is executed by a processor, it performs the operations performed by the image processing method described in the first aspect.
[0016] According to a fifth aspect of the present invention, a computer program product is provided, the computer program product comprising a computer program that, when executed by a processor, implements the image processing method as described in the first aspect.
[0017] As can be seen from the above embodiments, by acquiring a first image to be displayed, which includes multiple pixels, the color of each pixel can be represented by pixel values on multiple channels. Thus, based on the first pixel values of each pixel in the first image on multiple channels, the saturation of the first image can be adjusted to obtain a second image. Then, based on the first pixel values of each pixel in the first image on multiple channels and the second pixel values of each pixel in the second image on multiple channels, the second image can be adjusted for low power consumption to obtain a target image. The target image has lower power consumption than the first image, thereby reducing the display power consumption of the image.
[0018] It should be understood that the above general description and the following detailed description are exemplary and explanatory only, and are not intended to limit the invention. Attached Figure Description
[0019] The accompanying drawings, which are incorporated in and form part of this specification, illustrate embodiments consistent with the invention and, together with the description, serve to explain the principles of the invention.
[0020] Figure 1 is a schematic diagram of an application scenario of an image processing method according to an embodiment of the present invention.
[0021] Figure 2 is a flowchart illustrating an image processing method according to an embodiment of the present invention.
[0022] Figure 3 is a schematic diagram of a shadow detail retention LUT according to an embodiment of the present invention.
[0023] Figure 4 is a schematic diagram of a low-power mapped LUT according to an embodiment of the present invention.
[0024] Figure 5 is an exemplary flowchart of an image processing procedure according to an embodiment of the present invention.
[0025] Figure 6 is a block diagram of an image processing apparatus according to an embodiment of the present invention.
[0026] Figure 7 is a schematic diagram of the structure of a computing device according to an embodiment of the present invention. Detailed Implementation
[0027] Exemplary embodiments will now be described in detail, examples of which are illustrated in the accompanying drawings. When the following description relates to the drawings, unless otherwise indicated, the same numerals in different drawings denote the same or similar elements. The embodiments described in the following exemplary embodiments do not represent all embodiments consistent with the present invention. Rather, they are merely examples of apparatuses and methods consistent with some aspects of the invention as detailed in the appended claims.
[0028] This invention provides an image processing method that can be used to achieve low-power processing of the displayed image when displaying images through a display screen (or monitor), thereby achieving power reduction of the display screen.
[0029] In some embodiments, the image processing method provided by the present invention can be used to achieve low-power processing of the image displayed on the direct display screen, thereby achieving power reduction processing of the direct display screen. Optionally, the direct display screen can be an organic light-emitting diode (OLED) direct display screen, or a micro light-emitting diode (MicroLED) direct display screen, but is not limited thereto.
[0030] In some embodiments, the image processing method provided by the present invention can be used to achieve low-power processing of a single image when displaying a single image through a display screen (such as a direct display screen); it can also be used to achieve low-power processing of multiple images (such as multiple video frames in a video being played) when displaying multiple images continuously through a display screen (such as playing a video through a display screen), but is not limited thereto.
[0031] In some embodiments, the image processing method provided by the present invention can be used to process various types of images, including but not limited to natural scenery images, architectural images, human figures images, abstract images, object images, scientific and technological images, and so on.
[0032] The aforementioned image processing method can be executed by a computing device. That is, the image processing method provided by this invention can be used to perform low-power processing on the image to be displayed on the screen of the computing device, thereby achieving power reduction of the screen of the computing device. Optionally, the computing device can be a terminal, such as a desktop computer, portable computer, smartphone, tablet computer, smartwatch, desktop computer, advertising machine, all-in-one machine, etc. This invention does not limit the type of computing device.
[0033] Figure 1 is a schematic diagram of an application scenario of an image processing method according to an embodiment of the present invention. The method provided by the present invention can be applied in a computing device with an internal structure as shown in Figure 1. Referring to Figure 1, the computing device may include a host 10, a field programmable gate array (FPGA) 20, and a graphics processing unit (GPU) 30.
[0034] In some embodiments, the host 10 may include a system-on-chip (SOC) for performing general computing tasks, such as operating system management, application execution, data processing, etc., but is not limited thereto.
[0035] In some embodiments, the FPGA20, as a semi-custom digital integrated circuit, has advantages such as high flexibility, short development cycle, and strong processing performance (supporting parallel processing). It can be used to implement complex computing tasks, image processing tasks, etc., but is not limited to these.
[0036] In some embodiments, GPU30 can be used to perform complex image processing tasks, including but not limited to image filtering, special effects processing, image enhancement, and other image processing tasks.
[0037] Optionally, the image processing method provided by this invention can be implemented using an FPGA 20. The FPGA 20 can process each pixel in the image to be displayed in real time, thereby improving processing efficiency when performing low-power image processing.
[0038] In more possible implementations, the image processing method provided by the present invention can also be implemented by a SOC in the host 10, or the image processing method provided by the present invention can also be implemented by a GPU 30.
[0039] The above is merely an exemplary description of the application scenarios of the present invention and does not constitute a limitation on the application scenarios of the present invention. In many possible implementations, the present invention can be applied to the image processing of various types of target images.
[0040] After introducing the application scenarios of the present invention, the image processing method provided by the present invention will be described in detail below with reference to several optional embodiments of the present invention.
[0041] Figure 2 is a flowchart illustrating an image processing method according to an embodiment of the present invention. As shown in Figure 2, the method includes:
[0042] Step 201: Obtain the first image to be displayed. The first image includes multiple pixels. For any pixel, the color of the pixel is represented by the pixel values on multiple channels.
[0043] Optionally, the first image to be displayed can be a red-green-blue (RGB) format image, in which case the multiple channels can include three channels: a red (R) channel, a green (G) channel, and a blue (B) channel. Correspondingly, for any pixel in the first image, the first pixel value of that pixel in the multiple channels can be the pixel value in the R, G, and B channels, i.e., the RGB value of that pixel.
[0044] Optionally, if the first image to be displayed is in RGB format, the RGB image can be converted to Luminance-Chrominance (YUV) format. In this case, the multiple channels can include two channels: a blue chroma (U) channel and a red chroma (V) channel. Accordingly, for any pixel in the first image, the first pixel value of that pixel in the multiple channels can be the pixel value of that pixel in the Y, U, and V channels, that is, the YUV value of that pixel.
[0045] Optionally, if the first image to be displayed is in RGB format, the RGB image can be converted to Hue-Saturation-Value (HSV) format. In this case, these multiple channels can include a Hue (H) channel, a Saturation (S) channel, and a Value (V) channel. Accordingly, for any pixel in the first image, the first pixel value of that pixel in the multiple channels can be the pixel value of that pixel in the H, S, and V channels, that is, the HSV value of that pixel.
[0046] Step 202: Based on the first pixel value of each pixel in the first image across multiple channels, adjust the saturation of the first image to obtain the second image.
[0047] In one possible implementation, the second pixel value of each pixel in the first image can be obtained by adjusting the saturation of the first pixel value across multiple channels. Based on the second pixel value of each pixel across multiple channels, the second image can be determined.
[0048] Taking the first pixel value as an example, which includes the values corresponding to the R, G, and B channels, for any pixel in the first image, the saturation of the first pixel value in the R channel can be adjusted to obtain the second pixel value in the R channel; the saturation of the first pixel value in the G channel can be adjusted to obtain the second pixel value in the G channel; and the saturation of the first pixel value in the B channel can be adjusted to obtain the second pixel value in the B channel.
[0049] In other possible implementations, the first image in RGB format can be converted to YUV format. In this case, the first pixel value includes the corresponding values in the Y, U, and V channels. For any pixel in the first image, the saturation of the first pixel value in the Y channel can be adjusted to obtain the second pixel value in the Y channel; the saturation of the first pixel value in the U channel can be adjusted to obtain the second pixel value in the U channel; and the saturation of the first pixel value in the V channel can be adjusted to obtain the second pixel value in the V channel.
[0050] Optionally, the first image in RGB format can be converted to HSV format. In this case, the first pixel value includes the corresponding values in the H, S, and V channels. For any pixel in the first image, the saturation of the first pixel value in the H channel can be adjusted to obtain the second pixel value in the H channel; the saturation of the first pixel value in the S channel can be adjusted to obtain the second pixel value in the S channel; and the saturation of the first pixel value in the V channel can be adjusted to obtain the second pixel value in the V channel.
[0051] It should be noted that for two pixels with different initial pixel values (i.e., first pixel values), the second pixel values obtained after processing in step 202 may be the same or different; in addition, for two pixels with the same initial pixel values (i.e., first pixel values), the second pixel values obtained after processing in step 202 may be the same or different.
[0052] Step 203: Based on the first pixel value of each pixel in the first image across multiple channels and the second pixel value of each pixel in the second image across multiple channels, perform low-power adjustment on the second image to obtain the target image.
[0053] In one possible implementation, the target pixel value can be obtained by adjusting the second pixel value of each pixel in the second image across multiple channels using low-power methods. Based on the target pixel value of each pixel across multiple channels, the target image can be determined.
[0054] Taking the pixel value, which includes values in the R, G, and B channels, as an example, for any pixel in an image, a low-power adjustment can be performed based on the first and second pixel values of the pixel in the R channel to obtain the target pixel value of the pixel in the R channel; a low-power adjustment can be performed based on the first and second pixel values of the pixel in the G channel to obtain the target pixel value of the pixel in the G channel; a low-power adjustment can be performed based on the first and second pixel values of the pixel in the B channel to obtain the target pixel value of the pixel in the B channel.
[0055] It should be noted that the display power consumption of the target image obtained through the above processing is lower than that of the first image. Furthermore, the content expressed in the target image and the first image will not change. By replacing the display of the first image with the display of the target image, the power consumption of the display screen can be reduced.
[0056] After introducing the basic implementation process of the present invention, the various optional implementation methods of the present invention will be described in detail below.
[0057] In some embodiments, for step 201, when acquiring the first image to be displayed, one first image to be displayed can be acquired, and then the acquired first image can be further processed. Alternatively, multiple first images to be displayed can be acquired, and each of the acquired multiple first images can be processed separately. These multiple first images can be consecutive multi-frame images or multiple independent images; the present invention does not limit this.
[0058] After obtaining the first image to be displayed, the obtained first image can be processed in step 202.
[0059] In some embodiments, when step 202, saturation adjustment of the first image is performed based on the first pixel value of each pixel in the first image across multiple channels to obtain the second image, this can be achieved through the following steps:
[0060] Step 2021: For any pixel in the first image, based on the first pixel value of the pixel in multiple channels and the preset dark detail preservation information, determine the first chroma adjustment parameter and saturation adjustment parameter corresponding to the pixel. The dark detail preservation information is used to determine the mapping relationship between different pixel values and the first chroma adjustment parameter.
[0061] In one possible implementation, a first chroma adjustment parameter and a saturation adjustment parameter can be determined based on the first pixel value of each pixel in the first image across multiple channels, preset dark detail preservation information, and preset first adjustment parameters. That is, a corresponding first chroma adjustment parameter and a corresponding saturation adjustment parameter will be obtained for each pixel.
[0062] It should be noted that the corresponding first chroma adjustment parameters may be the same or different for different pixels; in addition, the corresponding saturation adjustment parameters may be the same or different for different pixels.
[0063] Optionally, the shadow detail preservation information can be a function expression indicating the mapping relationship between different pixel values and the first chroma adjustment parameter. For example, it can be a function expression with pixel values as independent variables and the value of the first chroma adjustment parameter as the dependent variable. Alternatively, the shadow detail preservation information can be a table indicating the mapping relationship between different pixel values and the first chroma adjustment parameter, storing the value of the first chroma adjustment parameter corresponding to each pixel value. Alternatively, the shadow detail preservation information can be a relationship curve indicating the mapping relationship between different pixel values and the first chroma adjustment parameter. For example, it can be a relationship curve with pixel values on the horizontal axis and the first chroma adjustment parameter value on the vertical axis. It should be noted that the shadow detail preservation information can be shared by multiple pixels in the first image.
[0064] It should be noted that the first adjustment parameter can be a parameter value used to indicate the intensity of pixel value saturation adjustment, and the first adjustment parameter can be shared by multiple pixels in the first image.
[0065] In some embodiments, when determining the first chroma adjustment parameter and saturation adjustment parameter corresponding to the pixel based on the first pixel value of the pixel in multiple channels and the preset dark detail preservation information in step 2021, it can be achieved through the following steps:
[0066] Step 2021A: Based on the first pixel value of the pixel in multiple channels and the preset dark detail preservation information, determine the first chromaticity adjustment parameter corresponding to the pixel.
[0067] In one possible implementation, step 2021A can be achieved through the following steps:
[0068] Step 2021A-1: Based on the first pixel value of the pixel in multiple channels, determine the average pixel value and the maximum pixel value of the pixel.
[0069] Taking three channels, R, G, and B, as an example, for any pixel in the first image, the average of the three first pixel values can be determined based on the first pixel value in the R channel (i.e., the original pixel R value), the first pixel value in the G channel (i.e., the original pixel G value), and the first pixel value in the B channel (i.e., the original pixel B value). This average value is then used as the pixel average of the pixel. Finally, the maximum value among these three first pixel values is determined as the pixel maximum value of the pixel.
[0070] Step 2021A-2: Based on the pixel mean, pixel maximum, preset second adjustment parameter, and preset first constant parameter of the pixel, determine the second chromaticity adjustment parameter corresponding to the pixel. The second adjustment parameter is used to indicate the degree of adjustment of the pixel value chromaticity.
[0071] In one possible implementation, step 2021A-2 can be achieved through the following steps:
[0072] Step 2021A-2-1: Determine the absolute value of the difference between the average pixel value and the maximum pixel value.
[0073] Optionally, the difference between the pixel mean and the pixel maximum can be determined, and then the absolute value of the determined difference can be taken to obtain the absolute value of the difference between the pixel mean and the pixel maximum.
[0074] Step 2021A-2-2: Determine the ratio of the absolute value of the difference to the first constant parameter, and use it as the first proportional parameter.
[0075] The first constant parameter can be a constant parameter value set according to actual needs. For example, the first constant parameter can be 127.0, but it is not limited to this.
[0076] Step 2021A-2-3: Determine the product of the second adjustment parameter and the first proportional parameter as the second chromaticity adjustment parameter.
[0077] The first proportional parameter can be an intensity adjustment coefficient, used to adjust the intensity of chromaticity adjustment accordingly. Optionally, the first proportional parameter can be any value between 0 and 10, for example, the value of the first proportional parameter can be 3, but it is not limited to this.
[0078] Optionally, the method for determining the second chromaticity adjustment parameter provided in steps 2021A-2-1 to 2021A-2-3 above can be found in the following relational expression: k=(abs(RGB_max-RGB_avg) / 127.0)*ratio (1)
[0079] Where k represents the second chromaticity adjustment parameter corresponding to the pixel, RGB_max represents the maximum pixel value of the pixel, RGB_avg represents the average pixel value of the pixel, abs() represents the calculation of the absolute value of the difference, 127.0 is the first constant parameter, and ratio represents the first ratio parameter.
[0080] It should be noted that steps 2021A-2-1 to 2021A-2-3 above are described using the processing of a single pixel as an example. The process of determining the second chromaticity adjustment parameters for other pixels is the same as described above, and will not be repeated here.
[0081] It should be noted that when adjusting image chroma and saturation, if low-brightness areas are also adjusted, the pixel values in these areas are already very small and not easily observed by the human eye. Further reducing the pixel values in these low-brightness areas can easily lead to a loss of detail in the darker parts of the image. Therefore, it is advisable to consider chroma and vibrance adjustments that preserve dark details. The specific implementation steps are as follows.
[0082] Step 2021A-3: Based on the maximum pixel value and dark detail preservation information of the pixel, determine the third adjustment parameter corresponding to the pixel.
[0083] The shadow detail preservation information can be a shadow detail preservation lookup table (LUT). Referring to Figure 3, which is a schematic diagram of a shadow detail preservation LUT according to an embodiment of the present invention, the shadow detail preservation LUT can be a curve graph with a horizontal axis range of 0-255 and a vertical axis range of 0-1. Through the shadow detail preservation LUT, each pixel value on the horizontal axis can find a corresponding value on the vertical axis.
[0084] In one possible implementation, for any pixel, the maximum pixel value can be used to find the value corresponding to the maximum pixel value on the vertical axis in the dark detail-preserving LUT, which is then used as the third adjustment parameter for that pixel.
[0085] It should be noted that the value range of the third adjustment parameter is the vertical axis range of the shadow detail preservation LUT, that is, the value range of the third adjustment parameter is 0-1. This invention does not limit the specific value of the third adjustment parameter.
[0086] Step 2021A-4: Based on the third adjustment parameter corresponding to the pixel, the second chromaticity adjustment parameter corresponding to the pixel is weighted to obtain the first chromaticity adjustment parameter corresponding to the pixel.
[0087] In one possible implementation, the third adjustment parameter can be multiplied by the second chroma adjustment parameter to achieve the purpose of weighting the second chroma adjustment parameter based on the third adjustment parameter. The result of the weighting process (i.e. the result obtained through multiplication) is the first chroma adjustment parameter corresponding to that pixel.
[0088] It should be noted that the above process is illustrated using the processing of a single pixel as an example. The process of determining the first chromaticity adjustment parameters for other pixels is similar and will not be repeated here.
[0089] Additionally, it should be noted that step 2021A above is illustrated using the example of implementing the first chromaticity adjustment parameter through processing in the RGB color space. In more possible implementations, the first chromaticity adjustment parameter can also be determined in the YUV or HSV color space. The specific implementation method is the same as the processing in the RGB color space, and will not be elaborated here.
[0090] Step 2021B: Based on the first pixel value of the pixel in multiple channels and the preset first adjustment parameter, determine the saturation adjustment parameter corresponding to the pixel. The first adjustment parameter is used to indicate the adjustment intensity of the pixel value saturation.
[0091] In one possible implementation, step 2021B can be achieved through the following steps:
[0092] Step 2021B-1: Determine the maximum pixel value of the pixel based on the first pixel value of the pixel in multiple channels.
[0093] Taking the three channels R, G, and B as an example, for any pixel in the first image, the maximum value among the three first pixel values can be determined based on the first pixel value of the pixel in the R channel (i.e., the original pixel R value), the first pixel value in the G channel (i.e., the original pixel G value), and the first pixel value in the B channel (i.e., the original pixel B value), and this value is taken as the pixel maximum value.
[0094] It should be noted that before performing step 2021B-1, the computing device may have already completed the calculation of the maximum pixel value. For example, if the calculation of the maximum pixel value was completed during the calculation of the first chromaticity adjustment parameter, then the already calculated maximum pixel value can be reused in step 2021B-1 without recalculating it. That is, in some embodiments, step 2021B-1 is optional.
[0095] Step 2021B-2: Based on the first pixel value and the maximum pixel value of the pixel in each channel, determine a pixel difference to obtain the first pixel difference of the pixel in multiple channels.
[0096] In one possible implementation, for any pixel, the difference between the maximum pixel value and the first pixel value in each channel can be calculated to obtain the first pixel difference of the pixel in each channel.
[0097] Taking the three channels R, G, and B as an example, for any pixel in the first image, the calculation method for the first pixel difference of the pixel in each channel can be found in the following relational expressions: diff1 = RGB_max - R (2) diff2 = RGB_max - G (3) diff3 = RGB_max - B (4)
[0098] Where diff1 represents the first pixel difference of a pixel in the R channel, diff2 represents the first pixel difference of a pixel in the G channel, diff3 represents the first pixel difference of a pixel in the B channel, RGB_max represents the maximum pixel value of a pixel, R represents the first pixel value of a pixel in the R channel, G represents the first pixel value of a pixel in the G channel, and B represents the first pixel value of a pixel in the B channel.
[0099] Step 2021B-3: Determine the maximum pixel difference and the sum of pixel differences among the multiple first pixel differences. The sum of pixel differences is the sum of the first pixel differences among the multiple first pixel differences, excluding the maximum pixel difference.
[0100] Taking the three channels (R, G, B) as an example, we can determine the maximum value among the three first pixel values (diff1, diff2, diff3) as the maximum pixel difference. Furthermore, we can determine the sum of the two remaining first pixel differences (excluding the maximum value) among the three first pixel values (diff1, diff2, diff3) as the pixel difference sum.
[0101] Taking the three channels R, G, and B as an example, for any pixel in the first image, the calculation method for the maximum pixel difference and the sum of pixel differences can be found in the following relational expressions: diff_max=np.max((diff1,diff2,diff3)) (5) diff_mid=diff1+diff2+diff3-diff_max (6)
[0102] Where diff_max represents the maximum pixel difference, diff_mid represents the sum of pixel differences, np.max() represents finding the maximum value, diff1 represents the first pixel difference of a pixel in the R channel, diff2 represents the first pixel difference of a pixel in the G channel, and diff3 represents the first pixel difference of a pixel in the B channel.
[0103] Step 2021B-4: Based on the maximum pixel difference value of the pixel, the sum of pixel differences of the pixel, and the first adjustment parameter corresponding to the pixel, determine the color saturation parameter corresponding to the pixel.
[0104] In one possible implementation, the maximum pixel difference can be exponentially calculated based on the first adjustment parameter, and the sum of the result obtained by the exponentiation and the sum of the pixel differences can be determined as the color saturation parameter.
[0105] Optionally, the maximum pixel difference can be raised to the power of the first adjustment parameter, using the maximum pixel difference as the base and the first adjustment parameter as the power.
[0106] Optionally, the method for determining the color saturation parameter provided in step 2021B-4 can refer to the following relational expression: S=diff_max**alpha+diff_mid (7)
[0107] Where S represents the color saturation parameter, diff_max represents the maximum pixel difference, diff_mid represents the sum of pixel differences, ** represents exponentiation, and alpha represents the first adjustment parameter, which can be any positive integer value. For example, the value of alpha can be 2.
[0108] Step 2021B-5: Normalize the color saturation parameter corresponding to the pixel to the first target range to obtain the saturation adjustment parameter corresponding to the pixel.
[0109] The first target interval can be any range of values, for example, the first target interval can be [1,2], but is not limited to this.
[0110] Taking the first target interval as [1,2] as an example, the method for determining the saturation adjustment parameter of a certain pixel provided in step 2021B-5 can be found in the following relational expression: S0=S / S.max()+1 (8)
[0111] Where S0 represents the saturation adjustment parameter of the pixel, S represents the color saturation parameter of the pixel, and S.max() represents the maximum value of the color saturation parameter among all pixels in the first image.
[0112] It should be noted that the above process is illustrated using the processing of a single pixel as an example. The process of determining the saturation adjustment parameters for other pixels is similar and will not be repeated here.
[0113] Additionally, it should be noted that step 2021B above is illustrated using the example of saturation adjustment parameters achieved through processing in the RGB color space. In other possible implementations, saturation adjustment parameters can also be determined in the YUV or HSV color space. The specific implementation method is the same as the processing in the RGB color space, and will not be elaborated here.
[0114] After determining the first chromaticity adjustment parameter and saturation adjustment parameter for each pixel through the above embodiments, step 2022 can be used to achieve natural saturation adjustment that takes into account human eye color sensitivity and saturation control.
[0115] Step 2022: Based on the first pixel value of the pixel in multiple channels, the first chroma adjustment parameter corresponding to the pixel, and the saturation adjustment parameter corresponding to the pixel, determine the second pixel value of the pixel in multiple channels to obtain the second image after saturation adjustment of the first image.
[0116] Taking the first pixel value as an example, which includes the values corresponding to the R, G, and B channels, for any pixel in the first image, the second pixel value of the pixel in the R channel can be determined based on the first pixel value of the pixel in the R channel, the first chroma adjustment parameter corresponding to the pixel, the saturation adjustment parameter corresponding to the pixel, and the second adjustment parameter corresponding to the R channel; the second pixel value of the pixel in the G channel can be determined based on the first pixel value of the pixel in the G channel, the first chroma adjustment parameter corresponding to the pixel, the saturation adjustment parameter corresponding to the pixel, and the second adjustment parameter corresponding to the G channel; the second pixel value of the pixel in the B channel can be determined based on the first pixel value of the pixel in the B channel, the first chroma adjustment parameter corresponding to the pixel, the saturation adjustment parameter corresponding to the pixel, and the second adjustment parameter corresponding to the B channel.
[0117] In other possible implementations, the first image in RGB format can be converted to YUV format. The first pixel value then includes the values corresponding to the Y, U, and V channels. For any pixel in the first image, the second pixel value in the Y channel can be determined based on the first pixel value in the Y channel, the corresponding first chroma adjustment parameter, the corresponding saturation adjustment parameter, and the corresponding second adjustment parameter in the Y channel. Similarly, the second pixel value in the U channel can be determined based on the first pixel value in the U channel, the corresponding first chroma adjustment parameter, the corresponding saturation adjustment parameter, and the corresponding second adjustment parameter in the U channel. Likewise, the second pixel value in the V channel can be determined based on the first pixel value in the V channel, the corresponding first chroma adjustment parameter, the corresponding saturation adjustment parameter, and the corresponding second adjustment parameter in the V channel.
[0118] Optionally, the first image in RGB format can also be converted to HSV format. In this case, the first pixel value includes the values corresponding to the H, S, and V channels. For any pixel in the first image, the second pixel value in the H channel can be determined based on the first pixel value in the H channel, the first chroma adjustment parameter corresponding to the pixel, the saturation adjustment parameter corresponding to the pixel, and the second adjustment parameter corresponding to the H channel. Similarly, the second pixel value in the S channel can be determined based on the first pixel value in the S channel, the first chroma adjustment parameter corresponding to the pixel, the saturation adjustment parameter corresponding to the pixel, and the second adjustment parameter corresponding to the S channel. Likewise, the second pixel value in the V channel can be determined based on the first pixel value in the V channel, the first chroma adjustment parameter corresponding to the pixel, the saturation adjustment parameter corresponding to the pixel, and the second adjustment parameter corresponding to the V channel.
[0119] It should be noted that the human eye is not sensitive to different colors. In order to ensure that the adjusted pixel values are as close as possible to the original effect, the sensitivity of the human eye to different colors can be taken into account to adjust the pixel values of different channels to different degrees.
[0120] The sensitivity of the human eye to different colors is determined by the photoreceptor cells in the eye (including cone cells and rod cells). Cone cells are primarily responsible for color vision in bright light, while rod cells are better adapted to low-light conditions. Rod cells have lower color sensitivity and mainly provide black-and-white and night vision. Human cone cells can be divided into three types, each more sensitive to specific wavelengths of light: red, green, and blue light, respectively. Studies have shown that the human eye has the most cone cells sensitive to green light, thus exhibiting the highest sensitivity to green. Conversely, the human eye has relatively fewer cone cells sensitive to blue light, and blue light, with its shorter wavelength, is more easily scattered, affecting visual clarity; therefore, the human eye has the lowest sensitivity to blue light.
[0121] In summary, different second adjustment parameters can be set for different channels to adjust the pixel values on different channels to different degrees.
[0122] Each channel can correspond to a second adjustment parameter. Taking the first pixel value as an example, which includes the values corresponding to the R, G, and B channels, there can be three second adjustment parameters: the second adjustment parameter corresponding to the R channel, the second adjustment parameter corresponding to the G channel, and the second adjustment parameter corresponding to the B channel.
[0123] Optionally, the value of the second adjustment parameter can be different for different channels.
[0124] Optionally, the second adjustment parameter corresponding to any channel can be a parameter value used to indicate the degree of pixel value adjustment. It should be noted that the second adjustment parameter corresponding to any channel can be shared by multiple pixels in the first image.
[0125] Optionally, the value range of the second adjustment parameter can be 1-2, but is not limited to this.
[0126] Taking three channels (R, G, and B) as an example, different second adjustment parameters can be set for each of these three channels. For instance, a second adjustment parameter `sens_R` can be set for the R channel, `sens_G` for the G channel, and `sens_B` for the B channel. These three second adjustment parameters can be used to adjust the pixel values of the three channels to different degrees. The values of `sens_R`, `sens_G`, and `sens_B` can all range from 1 to 2, but their values can be different, with `sens_G` > `sens_B` > `sens_R`. For example, the value of `sens_R` could be 1 / 0.9, the value of `sens_G` could be 1 / 0.95, and the value of `sens_B` could be 1 / 0.8.
[0127] In some embodiments, step 2022 can be implemented through the following steps:
[0128] Step 2022A: Determine the maximum pixel value of the pixel based on the first pixel value of the pixel in multiple channels.
[0129] Taking the three channels R, G, and B as an example, for any pixel in the first image, the maximum value among the three first pixel values can be determined based on the first pixel value of the pixel in the R channel (i.e., the original pixel R value), the first pixel value in the G channel (i.e., the original pixel G value), and the first pixel value in the B channel (i.e., the original pixel B value), and this value is taken as the pixel maximum value.
[0130] It should be noted that before performing step S2022A, the computing device may have already calculated the maximum pixel value, such as during the calculation of the first chroma adjustment parameter or the saturation adjustment parameter. In this case, the already calculated maximum pixel value can be reused in step S2022A without recalculating it. That is, in some embodiments, step S2022A is optional.
[0131] Step 2022B: Based on the first pixel value and the maximum pixel value of the pixel in each channel, determine a pixel difference to obtain the first pixel difference of the pixel in multiple channels.
[0132] In one possible implementation, for any pixel, the difference between the maximum pixel value and the first pixel value in each channel can be calculated to obtain the first pixel difference of the pixel in each channel.
[0133] Taking the three channels R, G, and B as an example, the first pixel difference of any pixel point in each channel can be calculated according to the relational expressions (2) to (4) described above.
[0134] It should be noted that before performing step S2022B, the computing device may have already calculated the first pixel difference for each pixel across all channels. In this case, step S2022B can reuse the calculated results without recalculating the first pixel difference for each pixel across all channels. That is, in some embodiments, step S2022B is optional.
[0135] Step 2022C: For any one of the multiple channels, determine the pixel correction value of the pixel in the channel based on the first pixel difference of the pixel in the channel, the first chromaticity adjustment parameter of the pixel, the saturation adjustment parameter of the pixel, and the second adjustment parameter corresponding to the channel.
[0136] In one possible implementation, step 2022C can be achieved through the following steps:
[0137] Step 2022C-1: Determine the product of the first chromaticity adjustment parameter of the pixel and the second adjustment parameter corresponding to the channel, and use it as the fourth adjustment parameter corresponding to the pixel on the channel.
[0138] Taking three channels (R, G, and B) as an example, each channel corresponds to a second adjustment parameter. For any pixel in the first image, the product of the first chroma adjustment parameter corresponding to the pixel and the second adjustment parameter corresponding to the R channel can be determined as the fourth adjustment parameter corresponding to the pixel in the R channel; the product of the first chroma adjustment parameter corresponding to the pixel and the second adjustment parameter corresponding to the G channel can be determined as the fourth adjustment parameter corresponding to the pixel in the G channel; and the product of the first chroma adjustment parameter corresponding to the pixel and the second adjustment parameter corresponding to the B channel can be determined as the fourth adjustment parameter corresponding to the pixel in the B channel.
[0139] Step 2022C-2: Based on the saturation adjustment parameter of the pixel, perform an exponentiation operation on the fourth adjustment parameter corresponding to the pixel in this channel to obtain the fifth adjustment parameter corresponding to the pixel in this channel.
[0140] Taking three channels (R, G, and B) as an example, the fourth adjustment parameter corresponding to the pixel in the R channel can be raised to a power based on the pixel's saturation adjustment parameter to obtain the fifth adjustment parameter corresponding to the pixel in the R channel; the fourth adjustment parameter corresponding to the pixel in the G channel can be raised to a power based on the pixel's saturation adjustment parameter to obtain the fifth adjustment parameter corresponding to the pixel in the G channel; and the fourth adjustment parameter corresponding to the pixel in the B channel can be raised to a power based on the pixel's saturation adjustment parameter to obtain the fifth adjustment parameter corresponding to the pixel in the B channel.
[0141] In one possible implementation, the fourth adjustment parameter can be used as the base and the saturation adjustment parameter as the power, and the fourth adjustment parameter can be exponentially calculated based on the saturation adjustment parameter to obtain the fifth adjustment parameter.
[0142] Step 2022C-3: Based on the fifth adjustment parameter of the pixel in the channel, perform weighted processing on the first pixel difference of the pixel in the channel to obtain the pixel correction value of the pixel in the channel.
[0143] Taking three channels (R, G, and B) as an example, the pixel correction value of the pixel in the R channel can be obtained by weighting the first pixel difference of the pixel in the R channel based on the fifth adjustment parameter of the pixel in the R channel; the pixel correction value of the pixel in the G channel can be obtained by weighting the first pixel difference of the pixel in the G channel based on the fifth adjustment parameter of the pixel in the B channel; and the pixel correction value of the pixel in the B channel can be obtained by weighting the first pixel difference of the pixel in the B channel based on the fifth adjustment parameter of the pixel in the B channel.
[0144] Step 2022D: Based on the first pixel value and pixel correction value of the pixel in the channel, determine the second pixel value of the pixel in the channel.
[0145] In one possible implementation, the difference between the first pixel value and the pixel correction value of the pixel in that channel can be determined as the second pixel value of the pixel in that channel.
[0146] It should be noted that the above process is an example of determining the second pixel value of a pixel in one channel. The process of determining the second pixel value of the same pixel in other channels, and the process of determining the second pixel value of other pixels in each channel, are similar and will not be repeated here.
[0147] Taking three channels, R, G, and B, as an example, the second pixel value of a pixel in the R channel can be determined based on the first pixel value and pixel correction value in the R channel; the second pixel value of a pixel in the G channel can be determined based on the first pixel value and pixel correction value in the G channel; and the second pixel value of a pixel in the B channel can be determined based on the first pixel value and pixel correction value in the B channel.
[0148] Optionally, taking three channels including R, G, and B as an example, the method for determining the second pixel value of a pixel in each channel can be found in the following relational expressions: R'=R-diff1*((k0*sens_R)**S0) (9) G'=G-diff2*((k0*sens_G)**S0) (10) B'=B-diff3*((k0*sens_B)**S0) (11)
[0149] Where R' represents the second pixel value of a pixel in the R channel, G' represents the second pixel value of a pixel in the G channel, B' represents the second pixel value of a pixel in the B channel, R represents the first pixel value of a pixel in the R channel, G represents the first pixel value of a pixel in the G channel, B represents the first pixel value of a pixel in the B channel, diff1 represents the first pixel difference of a pixel in the R channel, diff2 represents the first pixel difference of a pixel in the G channel, diff3 represents the first pixel difference of a pixel in the B channel, sens_R represents the second adjustment parameter corresponding to the R channel, sens_G represents the second adjustment parameter corresponding to the G channel, sens_B represents the second adjustment parameter corresponding to the B channel, k0 represents the first chroma adjustment parameter, and S0 represents the saturation adjustment parameter.
[0150] Through the above embodiments, the pixel values of a pixel in other channels can be reduced without changing the maximum pixel value (i.e., without changing the pixel value of the pixel in the channel with the largest pixel value), thereby improving saturation. This allows the value of a pixel with higher saturation to be changed less, thus effectively avoiding the occurrence of oversaturation problems.
[0151] In more possible implementations, the calculated second pixel value may be less than 0, which may lead to pixel value overflow. Optionally, the second pixel value less than 0 can be truncated to 0 to effectively avoid pixel value overflow.
[0152] That is, in one possible implementation, for any of the multiple channels, if the pixel value determined based on the first pixel value and the pixel correction value of the pixel in that channel is less than 0, then the second pixel value of the pixel in that channel is determined to be 0, so as to avoid pixel value overflow.
[0153] It should be noted that step 2022 above is illustrated by taking the determination of the second pixel value through processing in the RGB color space as an example. In more possible implementations, the determination of the second pixel value can also be achieved in the YUV or HSV color space. The specific implementation method is the same as the processing in the RGB color space, and will not be repeated here.
[0154] After calculating the second pixel value through the above embodiments, the saturation can be improved by increasing the natural saturation. In addition, the brightness can be reduced to reduce power consumption. On this basis, the display power consumption of the image can be further reduced, that is, by performing low power adjustment based on the grayscale histogram of the image in step 203, the display power consumption of the image can be further reduced.
[0155] In some embodiments, when performing low-power adjustment on the second image based on the first pixel value of each pixel in the first image across multiple channels and the second pixel value of each pixel in the second image across multiple channels to obtain the target image, this can be achieved through the following steps:
[0156] Step 2031: Perform grayscale processing on the second image to obtain the first grayscale image.
[0157] Taking the three channels R, G, and B as an example, the RGB image can be converted into a grayscale image through the above step 2031, so that subsequent processing can be carried out based on the converted grayscale image.
[0158] Step 2032: Perform low-power mapping processing on the first grayscale image to obtain a second grayscale image.
[0159] In one possible implementation, step 2032 can be achieved through the following steps:
[0160] Step 2032A: Determine the number of pixels at each gray level in the first grayscale image to obtain the grayscale histogram corresponding to the first grayscale image.
[0161] Optionally, the occurrence frequency of different gray values in the first grayscale image can be counted to obtain the grayscale histogram corresponding to the first grayscale image.
[0162] Step 2032B: Based on the grayscale histogram of the first grayscale image, perform low-power mapping processing on the first grayscale image to obtain the second grayscale image.
[0163] In one possible implementation, step 2032B can be achieved through the following steps:
[0164] Step 2032B-1: Determine the first vector represented by the grayscale histogram of the first grayscale image.
[0165] Optionally, the grayscale histogram can be represented as a one-dimensional vector of length 256, which is the first vector represented by the grayscale histogram.
[0166] For example, the grayscale histogram of a grayscale image can be represented as a one-dimensional vector [38,255,65,83,…,738,888,86,388]. The first vector is then a one-dimensional vector [38,255,65,83,…,738,888,86,388] with a length of 256.
[0167] Step 2032B-2: Based on preset vector thresholds and stop thresholds, perform low-power adjustment on multiple vector values included in the first vector to obtain a second vector. The vector threshold is used to indicate the upper limit of the vector values included in the second vector, and the stop threshold is used to indicate the position of the vector value where the low-power adjustment stops.
[0168] It should be noted that low-power adjustment based on the first vector represented by the grayscale histogram can be achieved by reducing the number of high grayscale pixels and increasing the number of low grayscale pixels, thereby reducing the average pixel value and achieving the purpose of reducing power consumption.
[0169] In one possible implementation, the multiple vector values included in the first vector can be traversed, and during the traversal, the traversed vector values are compared with a vector threshold. If the traversed vector value is less than or equal to the vector threshold, the remaining vector values are traversed. If the traversed vector value is greater than the vector threshold, the currently traversed vector value is reset to the vector threshold, and the difference between the traversed vector value and the vector threshold is determined. This difference is then used to determine the ratio of the difference to the number of vector values that have not yet been traversed. This ratio is then added to each untraversed vector value until the vector value position indicated by the stop threshold is reached. At this point, the low-power adjustment of the multiple vector values included in the first vector is completed.
[0170] The vector threshold and the stop threshold can be set according to actual needs. The vector threshold and the stop threshold can be any value. For example, the vector threshold can be 500 and the stop threshold can be 20, but it is not limited to these.
[0171] Taking a one-dimensional vector of length 256 [38,255,65,83,…,738,888,86,388] as an example, with a vector threshold of 500 and a stopping threshold of 20, we can start traversing from the first vector value on the right and move to the left. Each time a vector value is traversed, it is compared with the vector threshold. If the traversed vector value is less than or equal to the vector threshold, we move one position to the left and continue traversing; if the traversed vector value is greater than the vector threshold, we determine the traversal. The difference between the encountered vector value and the vector threshold is calculated and evenly added to the vector values further to the left. For example, if the first vector traverses from right to left and reaches the vector value 888, which is greater than the vector threshold of 500, the difference between this vector value and the vector threshold is calculated to be 388. Since there are 253 vector values to the left of this vector value, the ratio of 388 to 253 is calculated to be 1.53. Then, 1.53 is added to all 253 vector values to the left of this vector value, and the vector value 888 is reset to the vector threshold of 500. This completes one low-power adjustment, allowing the traversal to continue to the left. As long as a vector value greater than the vector threshold is encountered, low-power adjustment can be performed in the manner described above, until the 20th vector value (i.e., the stopping threshold) is traversed, thus completing the low-power adjustment of the entire grayscale histogram.
[0172] Step 2032B-3: Normalize the second vector to obtain the third vector.
[0173] It should be noted that the second vector obtained after low-power adjustment based on the first vector is still a one-dimensional vector with a length of 256. Furthermore, the second vector can be normalized to obtain the third vector.
[0174] Step 2032B-4: Integrate based on the third vector to obtain target mapping information. The target mapping information is used to indicate the gray values mapped to after low-power adjustment for different gray values.
[0175] In one possible implementation, the third vector can be integrated to obtain the cumulative distribution function (CDF) of the third vector, thereby mapping the CDF value to an integer gray level in the range of [0, 255] (for example, the CDF value can be multiplied by 255 and rounded to obtain the corresponding mapped value). Then, the original gray level of the second image and the corresponding mapped gray value are formed into a key-value pair. This process is repeated until each gray level in the second image has been processed, thus obtaining the target mapping information.
[0176] CDF can be used to represent the cumulative probability of each gray level in an image.
[0177] Optionally, the target mapping information can be a low-power mapping LUT. Referring to Figure 4, which is a schematic diagram of a low-power mapping LUT according to an embodiment of the present invention, the low-power mapping LUT can be a curve with a horizontal axis range of 0-255 and a vertical axis range of 0-255. Through the low-power mapping LUT, each grayscale value on the horizontal axis can find a corresponding grayscale value on the vertical axis that has undergone low-power adjustment.
[0178] It should be noted that in the low-power mapping LUT shown in Figure 4, the dashed line represents the mapping of y=x, that is, the output is the same as the input. The solid curve represents the low-power mapping curve, which can map the input value to a smaller output value. After the image is low-power mapped by the low-power mapping LUT, the overall pixel value of the image decreases, thereby reducing the average brightness and thus reducing power consumption.
[0179] In more possible implementations, the low-power mapping curve may also map some input values to larger output values. However, as long as the area under the low-power mapping curve is smaller than the area under the y=x mapping curve, the average brightness can be reduced, thereby reducing power consumption.
[0180] Step 2032B-5: Based on the target mapping information, determine the second gray value mapped to the first gray value of each pixel in the first gray image, so as to obtain the second gray image.
[0181] Optionally, the target mapping information can be a low-power mapping LUT. Then, for any pixel in the first grayscale image, the first grayscale value of the pixel can be used as the value on the horizontal axis to find the value corresponding to the first grayscale value on the vertical axis of the low-power mapping LUT, which is then used as the second grayscale value. This process is repeated to determine the second grayscale value of each pixel in the first grayscale image.
[0182] After determining the second grayscale value of each pixel, a second grayscale image can be generated based on the second grayscale value of each pixel.
[0183] Step 2033: Determine the target scale parameter based on the first grayscale image and the second grayscale image.
[0184] In one possible implementation, the sum of gray values of multiple pixels included in the first grayscale image can be determined as the first grayscale sum value, and the sum of gray values of multiple pixels included in the second grayscale image can be determined as the second grayscale sum value, thereby determining the ratio of the second grayscale sum value to the first grayscale sum value as the target ratio parameter.
[0185] Step 2034: For any pixel in the second image, the second pixel value of the pixel in multiple channels is weighted based on the target ratio parameter to obtain the third pixel value of the pixel in multiple channels.
[0186] Taking three channels (R, G, and B) as an example, for any pixel in the second image, the second pixel value of that pixel in the R channel can be weighted based on the target ratio parameter to obtain the third pixel value of that pixel in the R channel; the second pixel value of that pixel in the G channel can be weighted based on the target ratio parameter to obtain the third pixel value of that pixel in the G channel; and the second pixel value of that pixel in the B channel can be weighted based on the target ratio parameter to obtain the third pixel value of that pixel in the B channel.
[0187] Step 2035: Based on the first pixel value of the pixel in multiple channels and the third pixel value of the pixel in multiple channels, determine the target pixel value of the pixel in multiple channels.
[0188] In one possible implementation, step 2035 can be achieved as follows:
[0189] Based on the first pixel value of the pixel in multiple channels, the third pixel value of the pixel in multiple channels, the preset brightness peak adjustment parameters, and the power consumption adjustment parameters set by the user, the target pixel value of the pixel in multiple channels is determined; wherein, the brightness peak adjustment parameters are used to indicate the degree of power consumption adjustment corresponding to the screen brightness peak, and the power consumption adjustment parameters are used to indicate the degree to which power consumption needs to be reduced.
[0190] In one possible implementation, determining the target pixel value of a pixel across multiple channels based on the first pixel value of the pixel across multiple channels, the third pixel value of the pixel across multiple channels, a preset brightness peak adjustment parameter, and a user-set power consumption adjustment parameter can be achieved through the following steps:
[0191] Step 2035-A1: For any one of the multiple channels, determine the difference between the first pixel value and the third pixel value of the pixel in that channel, and use it as the second pixel difference.
[0192] Optionally, the process for determining the second pixel difference provided in step 2035-A1 can be found in the following relational expression: diff_X=X-X' (12)
[0193] Where diff_X represents the second pixel difference, X represents the first pixel value, and X' represents the third pixel value.
[0194] It should be noted that each pixel can correspond to pixel values in multiple channels. Taking the R, G, and B channels as an example, the above relational expression (12) can be refined as follows: diff_X_R=X_R-X'_R (13) diff_X_G=X_G-X'_G (14) diff_X_B=X_B-X'_B (15)
[0195] Where, diff_X_R represents the second pixel difference of a pixel in the R channel, diff_X_G represents the second pixel difference of a pixel in the G channel, diff_X_B represents the second pixel difference of a pixel in the B channel, X_R represents the first pixel value of a pixel in the R channel, X_G represents the first pixel value of a pixel in the G channel, X_B represents the first pixel value of a pixel in the B channel, X'_R represents the third pixel value of a pixel in the R channel, X'_G represents the third pixel value of a pixel in the G channel, and X'_B represents the third pixel value of a pixel in the B channel.
[0196] Step 2035-A2: Determine the pixel difference to be adjusted based on the maximum settable parameter value of the second pixel difference and the power consumption adjustment degree parameter.
[0197] In one possible implementation, the ratio of the second pixel difference to the maximum settable parameter value of the power consumption adjustment level parameter can be determined as the pixel difference to be adjusted.
[0198] Optionally, the power consumption adjustment level parameter can be the level of power reduction selected by the user, such as level 1 to level 5. The value of the power consumption adjustment level parameter is 1, 2, 3, 4, 5, and the maximum settable value of the power consumption adjustment level parameter is 5.
[0199] Optionally, the power consumption adjustment level parameter can be determined based on the control bar value range and adjustment step size. For example, if the control bar value range is 0-100% and the adjustment step size is 1%, then the maximum parameter value that can be set for the power consumption adjustment level parameter is 100% ÷ 1% = 100.
[0200] Optionally, the process for determining the pixel difference to be adjusted provided in step 2035-A2 can be found in the following relational expression: diff_Y = diff_X ÷ N (16)
[0201] Where diff_Y represents the pixel difference to be adjusted, diff_X represents the second pixel difference, and N represents the maximum parameter value that can be set for the power consumption adjustment level parameter.
[0202] It should be noted that each pixel can correspond to pixel values in multiple channels. Taking the R, G, and B channels as an example, the above relational expression (16) can be refined as follows: diff_Y_R=diff_X_R÷N (17) diff_Y_G=diff_X_G÷N (18) diff_Y_B=diff_X_B÷N (19)
[0203] Where, diff_Y_R represents the proposed adjustment pixel difference of a pixel in the R channel, diff_Y_G represents the proposed adjustment pixel difference of a pixel in the G channel, diff_Y_B represents the proposed adjustment pixel difference of a pixel in the B channel, diff_X_R represents the second pixel difference of a pixel in the R channel, diff_X_G represents the second pixel difference of a pixel in the G channel, diff_X_B represents the second pixel difference of a pixel in the B channel, and N represents the maximum parameter value that can be set for the power consumption adjustment level parameter.
[0204] Step 2035-A3: Based on the first pixel value of the pixel in the channel, the pixel difference to be adjusted corresponding to the pixel, the power consumption adjustment degree parameter and the brightness peak adjustment parameter, determine the target pixel value of the pixel in the channel.
[0205] In one possible implementation, the pixel difference to be adjusted corresponding to the pixel can be weighted based on the power consumption adjustment level parameter and the brightness peak adjustment parameter to obtain the second pixel difference to be adjusted corresponding to the pixel; the difference between the first pixel value of the pixel in the channel and the second pixel difference to be adjusted corresponding to the pixel is determined as the target pixel value of the pixel in the channel.
[0206] Optionally, the process for determining the target pixel value provided in step 2035-A3 can be found in the following relational expression: X_final=X-diff_Y×M×β (20)
[0207] Where X_final represents the target pixel value of the pixel, X represents the first pixel value of the pixel, diff_Y represents the second pixel difference to be adjusted, M represents the power consumption adjustment level parameter, and β represents the brightness peak adjustment parameter.
[0208] It should be noted that each pixel can correspond to pixel values in multiple channels. Taking the R, G, and B channels as an example, the above relational expression (20) can be refined as follows: X_R_final=X_R-diff_Y_R×M×β (21) X_G_final=X_G-diff_Y_G×M×β (22) X_B_final=X_B-diff_Y_B×M×β (23)
[0209] Where X_R_final represents the target pixel value of the pixel in the R channel, X_G_final represents the target pixel value of the pixel in the R channel, X_B_final represents the target pixel value of the pixel in the B channel, X_R represents the first pixel value of the pixel in the R channel, X_G represents the first pixel value of the pixel in the G channel, X_B represents the first pixel value of the pixel in the B channel, diff_Y_R represents the second proposed adjustment pixel difference of the pixel in the R channel, diff_Y_G represents the second proposed adjustment pixel difference of the pixel in the G channel, diff_Y_B represents the second proposed adjustment pixel difference of the pixel in the B channel, M represents the power consumption adjustment level parameter, and β represents the brightness peak adjustment parameter.
[0210] Among other possible implementations, the target pixel value can also be determined without considering the peak screen brightness.
[0211] That is, step 2035 above can also be achieved through the following steps:
[0212] Step 2035-B1: For any one of the multiple channels, determine the difference between the first pixel value and the third pixel value of the pixel in that channel, and use it as the second pixel difference.
[0213] Step 2035-B2: Determine the pixel difference to be adjusted based on the maximum parameter value that can be set based on the second pixel difference and the power consumption adjustment degree parameter.
[0214] It should be noted that step 2035-B1 can refer to the optional implementation of step 2035-A1, and step 2035-B2 can refer to the optional implementation of step 2035-A2, which will not be repeated here.
[0215] Step 2035-B3: Based on the first pixel value of the pixel in the channel, the pixel difference to be adjusted corresponding to the pixel, and the power consumption adjustment degree parameter, determine the target pixel value of the pixel in the channel.
[0216] In one possible implementation, the pixel difference to be adjusted corresponding to the pixel can be weighted based on the power consumption adjustment degree parameter to obtain the first pixel difference to be adjusted corresponding to the pixel; the difference between the first pixel value of the pixel in the channel and the first pixel difference to be adjusted corresponding to the pixel is determined as the target pixel value of the pixel in the channel.
[0217] Alternatively, the process for determining the target pixel value provided above without considering the peak screen brightness can be found in the following relational expression: X_m=X-diff_Y×M (24)
[0218] Where X_ represents the target pixel value of the pixel without considering the peak screen brightness, X represents the first pixel value of the pixel, diff_Y represents the first pixel difference to be adjusted, and M represents the power consumption adjustment parameter.
[0219] It should be noted that each pixel can correspond to pixel values in multiple channels. Taking the R, G, and B channels as an example, the above relational expression (24) can be refined as follows: X_R_m=X_R-diff_Y_R×M (25) X_G_m=X_G-diff_Y_G×M (26) X_B_m=X_B-diff_Y_B×M (27)
[0220] Where X_R_m represents the target pixel value of the pixel in the R channel without considering the peak screen brightness, X_G_m represents the target pixel value of the pixel in the R channel without considering the peak screen brightness, X_B_m represents the target pixel value of the pixel in the B channel without considering the peak screen brightness, X_R represents the first pixel value of the pixel in the R channel, X_G represents the first pixel value of the pixel in the G channel, X_B represents the first pixel value of the pixel in the B channel, diff_Y_R represents the first pixel difference to be adjusted in the R channel, diff_Y_G represents the first pixel difference to be adjusted in the G channel, diff_Y_B represents the first pixel difference to be adjusted in the B channel, and M represents the power consumption adjustment level parameter.
[0221] It should be noted that step 203 above is illustrated by taking the determination of the target pixel value through processing in the RGB color space as an example. In more possible implementations, the target pixel value can also be determined in the YUV or HSV color space. The specific implementation method is the same as the processing in the RGB color space, and will not be repeated here.
[0222] After obtaining the target image with pixel values of the target pixel values in multiple channels through the above embodiments, power consumption reduction processing of the image display process can be achieved by displaying the target image with lower power consumption.
[0223] According to the above embodiments, the image processing method provided by the present invention can be seen in Figure 5. Figure 5 is an exemplary flowchart of an image processing process according to an embodiment of the present invention. As shown in Figure 5, taking the processing of an RGB image as an example, the average value of the three RGB channels of the pixels can be calculated based on the first image to be displayed, and the maximum value of the three RGB channels of the pixels can be found. The second chromaticity adjustment parameter k and the saturation adjustment parameter S0 are calculated based on the average value of the three RGB channels of the pixels and the maximum value of the three RGB channels of the pixels, respectively. Then, through shadow preservation processing, the first chromaticity adjustment parameter k0 is calculated based on the second chromaticity adjustment parameter k and the maximum value of the three RGB channels of the pixels. Then, the first chromaticity adjustment parameter k0 and the saturation adjustment parameter S0 are used to adjust the chromaticity and natural saturation of the first image, respectively, to obtain the second image. The second image is then grayscaled to obtain a first grayscale image. A low-power mapping LUT is generated based on the first grayscale image. The low-power mapping LUT, combined with peak brightness adjustment and level selection, is used to adjust the brightness of the second image to obtain a target image with reduced power consumption.
[0224] Corresponding to the embodiments of the foregoing methods, embodiments of the present invention also provide an image processing apparatus. Referring to FIG6, FIG6 is a block diagram illustrating an image processing apparatus according to an embodiment of the present invention. As shown in FIG6, the apparatus includes:
[0225] The acquisition module 601 is used to acquire a first image to be displayed, the first image including multiple pixels, and for any pixel, the color of the pixel is represented by pixel values on multiple channels;
[0226] The first adjustment module 602 is used to adjust the saturation of the first image based on the first pixel value of each pixel in the first image on multiple channels to obtain the second image;
[0227] The second adjustment module 603 is used to perform low-power adjustment on the second image based on the first pixel value of each pixel in the first image in multiple channels and the second pixel value of each pixel in the second image in multiple channels, so as to obtain the target image.
[0228] In some embodiments, the second adjustment module 603, when performing low-power adjustment on the second image based on the first pixel value of each pixel in the first image across multiple channels and the second pixel value of each pixel in the second image across multiple channels to obtain a target image, is configured to:
[0229] The second image is converted to grayscale to obtain the first grayscale image;
[0230] A second grayscale image is obtained by performing low-power mapping processing on the first grayscale image;
[0231] Based on the first grayscale image and the second grayscale image, determine the target scale parameter;
[0232] For any pixel in the second image, the second pixel value of the pixel in multiple channels is weighted based on the target ratio parameter to obtain the third pixel value of the pixel in multiple channels;
[0233] The target pixel value of the pixel in multiple channels is determined based on the first pixel value of the pixel in multiple channels and the third pixel value of the pixel in multiple channels.
[0234] In some embodiments, the second adjustment module 603, when performing low-power mapping processing based on the first grayscale image to obtain a second grayscale image, is used to:
[0235] Determine the number of pixels at each gray level in the first grayscale image to obtain the grayscale histogram corresponding to the first grayscale image;
[0236] Based on the grayscale histogram of the first grayscale image, a low-power mapping process is performed on the first grayscale image to obtain the second grayscale image.
[0237] In some embodiments, the second adjustment module 603, when performing low-power mapping processing on the first grayscale image based on the grayscale histogram of the first grayscale image to obtain the second grayscale image, is used to:
[0238] Determine the first vector represented by the grayscale histogram of the first grayscale image;
[0239] Based on preset vector thresholds and stop thresholds, low-power adjustments are made to multiple vector values included in the first vector to obtain a second vector. The vector threshold is used to indicate the upper limit of the vector values included in the second vector, and the stop threshold is used to indicate the position of the vector value where the low-power adjustment stops.
[0240] The second vector is normalized to obtain the third vector;
[0241] Integrating based on the third vector yields target mapping information, which indicates the gray values mapped to after low-power adjustment for different gray values.
[0242] Based on the target mapping information, the second gray value mapped to the first gray value of each pixel in the first gray image is determined to obtain the second gray image.
[0243] In some embodiments, the second adjustment module 603, when determining the target scaling parameter based on the first grayscale image and the second grayscale image, is used to:
[0244] The sum of the gray values of multiple pixels included in the first grayscale image is determined as the first grayscale sum value;
[0245] The sum of the gray values of multiple pixels included in the second grayscale image is determined as the second grayscale sum value;
[0246] The ratio of the second grayscale sum to the first grayscale sum is determined as the target ratio parameter.
[0247] In some embodiments, the second adjustment module 603, when determining the target pixel value of the pixel in multiple channels based on the first pixel value of the pixel in multiple channels and the third pixel value of the pixel in multiple channels, is configured to:
[0248] Based on the first pixel value of the pixel in multiple channels, the third pixel value of the pixel in multiple channels, and the power consumption adjustment level parameter set by the user, the target pixel value of the pixel in multiple channels is determined;
[0249] The power consumption adjustment parameter is used to indicate the degree to which power consumption needs to be reduced.
[0250] In some embodiments, the second adjustment module 603, when determining the target pixel value of the pixel in multiple channels based on the first pixel value of the pixel in multiple channels, the third pixel value of the pixel in multiple channels, and the power consumption adjustment level parameter set by the user, is configured to:
[0251] For any one of the multiple channels, the difference between the first pixel value and the third pixel value of the pixel in the channel is determined as the second pixel difference corresponding to the pixel.
[0252] The ratio of the second pixel difference of the pixel in the channel to the maximum settable parameter value of the power consumption adjustment degree parameter is determined as the pixel difference to be adjusted corresponding to the pixel.
[0253] Based on the first pixel value of the pixel in the channel, the pixel difference to be adjusted corresponding to the pixel, and the power consumption adjustment degree parameter, the target pixel value of the pixel in the channel is determined.
[0254] In some embodiments, the second adjustment module 603, when determining the target pixel value of the pixel in the channel based on the first pixel value of the pixel in the channel, the pixel difference to be adjusted corresponding to the pixel, and the power consumption adjustment degree parameter, is configured to:
[0255] Based on the power consumption adjustment degree parameter, the pixel difference to be adjusted corresponding to the pixel is weighted to obtain the first pixel difference to be adjusted corresponding to the pixel.
[0256] The difference between the first pixel value of the pixel in the channel and the first pixel difference to be adjusted corresponding to the pixel is determined as the target pixel value of the pixel in the channel.
[0257] In some embodiments, the second adjustment module 603, when determining the target pixel value of the pixel in multiple channels based on the first pixel value of the pixel in multiple channels and the third pixel value of the pixel in multiple channels, is configured to:
[0258] Based on the first pixel value of the pixel in multiple channels, the third pixel value of the pixel in multiple channels, the preset brightness peak adjustment parameters, and the power consumption adjustment parameters set by the user, the target pixel value of the pixel in multiple channels is determined.
[0259] The brightness peak adjustment parameter is used to indicate the degree of power consumption adjustment corresponding to the screen brightness peak, and the power consumption adjustment parameter is used to indicate the degree to which power consumption needs to be reduced.
[0260] In some embodiments, the second adjustment module 603, when determining the target pixel value of the pixel in multiple channels based on the first pixel value of the pixel in multiple channels, the third pixel value of the pixel in multiple channels, a preset brightness peak adjustment parameter, and a user-set power consumption adjustment parameter, is configured to:
[0261] For any one of the multiple channels, the difference between the first pixel value and the third pixel value of the pixel in the channel is determined as the second pixel difference corresponding to the pixel.
[0262] The ratio of the second pixel difference of the pixel in the channel to the maximum settable parameter value of the power consumption adjustment degree parameter is determined as the pixel difference to be adjusted corresponding to the pixel.
[0263] Based on the first pixel value of the pixel in the channel, the pixel difference to be adjusted corresponding to the pixel, the power consumption adjustment parameter, and the brightness peak adjustment parameter, the target pixel value of the pixel in the channel is determined.
[0264] In some embodiments, the second adjustment module 603, when determining the target pixel value of the pixel in the channel based on the first pixel value of the pixel in the channel, the pixel difference to be adjusted corresponding to the pixel, the power consumption adjustment degree parameter, and the brightness peak adjustment parameter, is used to:
[0265] Based on the power consumption adjustment parameter and the brightness peak adjustment parameter, the pixel difference to be adjusted corresponding to the pixel is weighted to obtain the second pixel difference to be adjusted corresponding to the pixel.
[0266] The difference between the first pixel value of the pixel in the channel and the second pixel difference to be adjusted corresponding to the pixel is determined as the target pixel value of the pixel in the channel.
[0267] In some embodiments, the first adjustment module 602, when performing saturation adjustment on the first image based on the first pixel value of each pixel in the first image across multiple channels to obtain a second image, is configured to:
[0268] For any pixel in the first image, based on the first pixel value of the pixel in multiple channels and the preset dark detail preservation information, the first chroma adjustment parameter and saturation adjustment parameter corresponding to the pixel are determined, wherein the dark detail preservation information is used to determine the mapping relationship between different pixel values and the first chroma adjustment parameter.
[0269] Based on the first pixel value of the pixel in multiple channels, the first chroma adjustment parameter corresponding to the pixel, and the saturation adjustment parameter corresponding to the pixel, the second pixel value of the pixel in multiple channels is determined to obtain the second image after saturation adjustment of the first image.
[0270] In some embodiments, the first adjustment module 602, when determining the first chroma adjustment parameter and saturation adjustment parameter corresponding to the pixel based on the first pixel value of the pixel in multiple channels and preset dark detail preservation information, is used to:
[0271] Based on the first pixel value of the pixel in multiple channels and the preset dark detail preservation information, the first chromaticity adjustment parameter corresponding to the pixel is determined;
[0272] Based on the first pixel value of the pixel in multiple channels and the preset first adjustment parameter, the saturation adjustment parameter corresponding to the pixel is determined, and the first adjustment parameter is used to indicate the adjustment intensity of the pixel value saturation.
[0273] In some embodiments, the first adjustment module 602, when determining the first chroma adjustment parameter corresponding to the pixel based on the first pixel value of the pixel in multiple channels and preset dark detail preservation information, is used to:
[0274] Based on the first pixel value of the pixel in multiple channels, determine the average pixel value and the maximum pixel value of the pixel;
[0275] Based on the average pixel value, the maximum pixel value, a preset second adjustment parameter, and a preset first constant parameter, a second chromaticity adjustment parameter corresponding to the pixel is determined. The second adjustment parameter is used to indicate the degree of adjustment of the pixel value chromaticity.
[0276] Based on the maximum pixel value and the dark detail preservation information, the third adjustment parameter corresponding to the pixel is determined;
[0277] The second chromaticity adjustment parameter corresponding to the pixel is weighted based on the third adjustment parameter corresponding to the pixel to obtain the first chromaticity adjustment parameter corresponding to the pixel.
[0278] In some embodiments, the first adjustment module 602, when determining the second chromaticity adjustment parameter corresponding to the pixel based on the pixel mean, the pixel maximum, a preset second adjustment parameter, and a preset first constant parameter, is used to:
[0279] Determine the absolute value of the difference between the average pixel value and the maximum pixel value;
[0280] The ratio of the absolute value of the difference to the first constant parameter is determined as the first proportional parameter;
[0281] The product of the second adjustment parameter and the first ratio parameter is determined as the second chromaticity adjustment parameter.
[0282] In some embodiments, the first adjustment module 602, when determining the saturation adjustment parameter corresponding to the pixel based on the first pixel value of the pixel in multiple channels and a preset first adjustment parameter, is used to:
[0283] The maximum pixel value of the pixel is determined based on the first pixel value of the pixel in multiple channels;
[0284] Based on the first pixel value of the pixel in each channel and the maximum pixel value, a pixel difference is determined to obtain the first pixel difference of the pixel in multiple channels;
[0285] Determine the maximum pixel difference and the sum of pixel differences among a plurality of first pixel differences, wherein the sum of pixel differences is the sum of the first pixel differences among the plurality of first pixel differences excluding the maximum pixel difference;
[0286] Based on the maximum pixel difference, the sum of pixel differences, and the first adjustment parameter, the color saturation parameter corresponding to the pixel is determined;
[0287] The color saturation parameter corresponding to the pixel is normalized to the first target range to obtain the saturation adjustment parameter corresponding to the pixel.
[0288] In some embodiments, the first adjustment module 602, when determining the color saturation parameter corresponding to the pixel based on the maximum pixel difference, the sum of pixel differences, and the first adjustment parameter, is used to:
[0289] The maximum pixel difference is exponentially calculated based on the first adjustment parameter, and the sum of the result obtained by the exponentiation and the sum of the pixel differences is determined as the color saturation parameter.
[0290] In some embodiments, the first adjustment module 602, when determining the second pixel value of the pixel in multiple channels based on the first pixel value of the pixel in multiple channels, the first chroma adjustment parameter corresponding to the pixel, and the saturation adjustment parameter corresponding to the pixel, is configured to:
[0291] The maximum pixel value of the pixel is determined based on the first pixel value of the pixel in multiple channels;
[0292] Based on the first pixel value of the pixel in each channel and the maximum pixel value, a pixel difference is determined to obtain the first pixel difference of the pixel in multiple channels;
[0293] For any one of the plurality of channels, a pixel correction value is determined based on the first pixel difference of the pixel in the channel, the first chroma adjustment parameter, the saturation adjustment parameter, and the second adjustment parameter corresponding to the channel;
[0294] Based on the first pixel value of the pixel in the channel and the pixel correction value, the second pixel value of the pixel in the channel is determined.
[0295] In some embodiments, the first adjustment module 602 is further configured to, for any of the plurality of channels, if the pixel value determined based on the first pixel value of the pixel in the channel and the pixel correction value is less than 0, then determine the second pixel value of the pixel in the channel as 0.
[0296] For the device embodiments, since they basically correspond to the method embodiments, the relevant parts can be referred to in the description of the method embodiments. The device embodiments described above are merely illustrative. The modules described as separate components may or may not be physically separate, and the components shown as modules may or may not be physical modules, that is, they may be located in one place or distributed across multiple network modules. Some or all of the modules can be selected to achieve the purpose of the solution in this specification according to actual needs. Those skilled in the art can understand and implement this without creative effort.
[0297] The present invention also provides a computing device. Referring to FIG7, FIG7 is a schematic diagram of the structure of a computing device according to an embodiment of the present invention. As shown in FIG7, the computing device includes a processor 710, a memory 720, and a network interface 730. The memory 720 is used to store computer instructions that can be executed on the processor 710. The processor 710 is used to implement the image processing method provided in any embodiment of the present invention when executing the computer instructions. The network interface 730 is used to implement input and output functions. In more possible implementations, the computing device may also include other hardware, which is not limited by the present invention.
[0298] This invention also provides a computer-readable storage medium, which can take many forms, such as RAM (Random Access Memory), volatile memory, non-volatile memory, flash memory, storage drives (e.g., hard disk drives), solid-state drives, any type of storage disk (e.g., optical discs, DVDs), or similar storage media, or combinations thereof. Specifically, the computer-readable medium can also be paper or other suitable media capable of printing programs. A computer program is stored on the computer-readable storage medium, and when executed by a processor, the computer program implements the image processing method provided in any embodiment of this invention.
[0299] The present invention also provides a computer program product, including a computer program that, when executed by a processor, implements the image processing method provided in any embodiment of the present invention.
[0300] Those skilled in the art will understand that one or more embodiments of this specification can be provided as a method, apparatus, computing device, computer-readable storage medium, or computer program product. Therefore, one or more embodiments of this specification can take the form of a completely hardware embodiment, a completely software embodiment, or an embodiment combining software and hardware aspects. Furthermore, one or more embodiments of this specification can take the form of a computer program product implemented on one or more computer-readable storage media (including, but not limited to, disk storage, CD-ROM, optical storage, etc.) containing computer-readable program code.
[0301] The various embodiments in this specification are described in a progressive manner. Similar or identical parts between embodiments can be referred to mutually. Each embodiment focuses on describing the differences from other embodiments. In particular, the embodiments corresponding to computing devices are basically similar to the method embodiments, so the description is relatively simple; relevant parts can be referred to the descriptions of the method embodiments.
[0302] The foregoing has described specific embodiments of this specification. Other embodiments are within the scope of this invention. In some cases, the actions or steps described in this invention may be performed in a different order than those shown in the embodiments and still achieve the desired results. Furthermore, the processes depicted in the drawings do not necessarily require the specific or sequential order shown to achieve the desired results. In some embodiments, multitasking and parallel processing are also possible or may be advantageous.
[0303] The embodiments of the subject matter and functional operation described in this specification can be implemented in the following ways: digital electronic circuits, tangibly embodied computer software or firmware, computer hardware including the structures disclosed in this specification and their structural equivalents, or combinations thereof. Embodiments of the subject matter described in this specification can be implemented as one or more computer programs, i.e., one or more modules of computer program instructions encoded on a tangible, non-transitory program carrier for execution by or control of the operation of a product defect detection device. Alternatively or additionally, the program instructions may be encoded on artificially generated propagation signals, such as machine-generated electrical, optical, or electromagnetic signals, which are generated to encode information and transmit it to a suitable receiving device for execution by the product defect detection device. The computer storage medium may be a machine-readable storage device, a machine-readable storage substrate, a random or serial access memory device, or combinations thereof.
[0304] The processing and logic flow described in this specification can be executed by one or more programmable computers that execute one or more computer programs to perform corresponding functions by operating on input data and generating output. The processing and logic flow can also be executed by dedicated logic circuitry—such as FPGAs (Field-Programmable Gate Arrays) or ASICs (Application-Specific Integrated Circuits), and the device can also be implemented as dedicated logic circuitry.
[0305] Suitable computers for executing computer programs include, for example, general-purpose and / or special-purpose microprocessors, or any other type of central processing unit. Typically, the central processing unit receives instructions and data from read-only memory and / or random access memory. The basic components of a computer include a central processing unit for implementing or executing instructions and one or more memory devices for storing instructions and data. Typically, a computer will also include one or more mass storage devices for storing data, such as disks, magneto-optical disks, or optical disks, or the computer will be operatively coupled to such mass storage devices to receive data from or transfer data to them, or both. However, a computer is not required to have such devices. Furthermore, a computer can be embedded in another device, such as a mobile phone, a personal digital assistant (PDA), a mobile audio or video player, a game console, a global positioning system (GPS) receiver, or a portable storage device such as a universal serial bus (USB) flash drive, to name a few.
[0306] Computer-readable media suitable for storing computer program instructions and data include all forms of non-volatile memory, media, and memory devices, such as semiconductor memory devices (e.g., EPROM, EEPROM, and flash memory devices), magnetic disks (e.g., internal hard disks or removable disks), magneto-optical disks, and CD-ROM and DVD-ROM disks. Processors and memory may be supplemented by or incorporated into dedicated logic circuitry.
[0307] While this specification contains numerous specific implementation details, these should not be construed as limiting the scope of any invention or the scope of the claims, but rather are primarily intended to describe features of specific embodiments of a particular invention. Certain features described in the various embodiments herein may also be implemented in combination in a single embodiment. Conversely, various features described in a single embodiment may also be implemented separately in various embodiments or in any suitable sub-combination. Furthermore, while features may function in certain combinations as described above and even initially claimed in this way, one or more features from a claimed combination may be removed from that combination in some cases, and a claimed combination may refer to a sub-combination or a variation thereof.
[0308] Similarly, although the operations are depicted in a specific order in the accompanying drawings, this should not be construed as requiring these operations to be performed in the specific order shown or sequentially, or requiring all illustrated operations to be performed to achieve the desired result. In some cases, multitasking and parallel processing may be advantageous. Furthermore, the separation of various system modules and components in the above embodiments should not be construed as requiring such separation in all embodiments, and it should be understood that the described program components and systems can generally be integrated together in a single software product or packaged into multiple software products.
[0309] Thus, specific embodiments of the subject matter have been described. Other embodiments are within the scope of the invention. In some cases, the actions described in the invention can be performed in a different order and still achieve the desired result. Furthermore, the processes depicted in the drawings are not necessarily shown in a specific order or sequence to achieve the desired result. In some implementations, multitasking and parallel processing may be advantageous.
[0310] Other embodiments of this specification will readily occur to those skilled in the art upon consideration of the specification and practice of the invention claimed herein. This specification is intended to cover any variations, uses, or adaptations that follow the general principles of this specification and include common knowledge or customary techniques in the art not claimed herein. That is, this specification is not limited to the precise structures described above and shown in the accompanying drawings, and various modifications and changes can be made without departing from its scope.
[0311] The above description is merely an optional embodiment of this specification and is not intended to limit this specification. Any modifications, equivalent substitutions, improvements, etc., made within the spirit and principles of this specification shall be included within the scope of protection of this specification.
[0312] It should be noted that the forming processes used in the processes involved in this invention may include, for example, film formation processes such as deposition and sputtering, and patterning processes such as etching.
[0313] In this invention, the terms "first" and "second" are used for descriptive purposes only and should not be construed as indicating or implying relative importance. The term "multiple" refers to two or more unless otherwise expressly defined.
[0314] Other embodiments of the invention will readily occur to those skilled in the art upon consideration of the specification and practice of the disclosure herein. The invention is intended to cover any variations, uses, or adaptations of the invention that follow the general principles of the invention and include common knowledge or customary techniques in the art not disclosed herein. The specification and examples are to be considered exemplary only, and the true scope and spirit of the invention are indicated by the following claims.
[0315] It should be understood that the present invention is not limited to the precise structure described above and shown in the accompanying drawings, and various modifications and changes can be made without departing from its scope. The scope of the invention is limited only by the appended claims.
Claims
1. An image processing method, characterized in that, The method includes: Obtain a first image to be displayed, the first image including multiple pixels, and for any pixel, the color of the pixel is represented by pixel values on multiple channels; Based on the first pixel value of each pixel in the first image across multiple channels, the saturation of the first image is adjusted to obtain the second image; Based on the first pixel value of each pixel in the first image across multiple channels and the second pixel value of each pixel in the second image across multiple channels, the second image is adjusted using low power to obtain the target image.
2. The method according to claim 1, characterized in that, The step of performing low-power adjustment on the second image based on the first pixel value of each pixel in the first image across multiple channels and the second pixel value of each pixel in the second image across multiple channels to obtain the target image includes: The second image is converted to grayscale to obtain the first grayscale image; A second grayscale image is obtained by performing low-power mapping processing on the first grayscale image; Based on the first grayscale image and the second grayscale image, determine the target scale parameter; For any pixel in the second image, the second pixel value of the pixel in multiple channels is weighted based on the target ratio parameter to obtain the third pixel value of the pixel in multiple channels; The target pixel value of the pixel in multiple channels is determined based on the first pixel value of the pixel in multiple channels and the third pixel value of the pixel in multiple channels.
3. The method according to claim 2, characterized in that, The step of performing low-power mapping processing based on the first grayscale image to obtain a second grayscale image includes: Determine the number of pixels at each gray level in the first grayscale image to obtain the grayscale histogram corresponding to the first grayscale image; Based on the grayscale histogram of the first grayscale image, a low-power mapping process is performed on the first grayscale image to obtain the second grayscale image.
4. The method according to claim 3, characterized in that, The step of performing low-power mapping processing on the first grayscale image based on its grayscale histogram to obtain the second grayscale image includes: Determine the first vector represented by the grayscale histogram of the first grayscale image; Based on preset vector thresholds and stop thresholds, low-power adjustments are made to multiple vector values included in the first vector to obtain a second vector. The vector threshold is used to indicate the upper limit of the vector values included in the second vector, and the stop threshold is used to indicate the position of the vector value where the low-power adjustment stops. The second vector is normalized to obtain the third vector; Integrating based on the third vector yields target mapping information, which indicates the gray values mapped to after low-power adjustment for different gray values. Based on the target mapping information, the second gray value mapped to the first gray value of each pixel in the first gray image is determined to obtain the second gray image.
5. The method according to claim 2, characterized in that, Determining the target scale parameter based on the first grayscale image and the second grayscale image includes: The sum of the gray values of multiple pixels included in the first grayscale image is determined as the first grayscale sum value; The sum of the gray values of multiple pixels included in the second grayscale image is determined as the second grayscale sum value; The ratio of the second grayscale sum to the first grayscale sum is determined as the target ratio parameter.
6. The method according to claim 2, characterized in that, Determining the target pixel value of a pixel in multiple channels based on the first pixel value and the third pixel value of the pixel in multiple channels includes: Based on the first pixel value of the pixel in multiple channels, the third pixel value of the pixel in multiple channels, and the power consumption adjustment parameter set by the user, the target pixel of the pixel in multiple channels is determined. value; The power consumption adjustment parameter is used to indicate the degree to which power consumption needs to be reduced.
7. The method according to claim 6, characterized in that, The step of determining the target pixel value of the pixel in multiple channels based on the first pixel value of the pixel in multiple channels, the third pixel value of the pixel in multiple channels, and the power consumption adjustment level parameter set by the user includes: For any one of the multiple channels, the difference between the first pixel value and the third pixel value of the pixel in the channel is determined as the second pixel difference corresponding to the pixel. The ratio of the second pixel difference of the pixel in the channel to the maximum settable parameter value of the power consumption adjustment degree parameter is determined as the pixel difference to be adjusted corresponding to the pixel. Based on the first pixel value of the pixel in the channel, the pixel difference to be adjusted corresponding to the pixel, and the power consumption adjustment degree parameter, the target pixel value of the pixel in the channel is determined.
8. The method according to claim 7, characterized in that, The step of determining the target pixel value of the pixel in the channel based on the first pixel value of the pixel in the channel, the pixel difference to be adjusted corresponding to the pixel, and the power consumption adjustment degree parameter includes: Based on the power consumption adjustment degree parameter, the pixel difference to be adjusted corresponding to the pixel is weighted to obtain the first pixel difference to be adjusted corresponding to the pixel. The difference between the first pixel value of the pixel in the channel and the first pixel difference to be adjusted corresponding to the pixel is determined as the target pixel value of the pixel in the channel.
9. The method according to claim 2, characterized in that, Determining the target pixel value of a pixel in multiple channels based on the first pixel value and the third pixel value of the pixel in multiple channels includes: Based on the first pixel value of the pixel in multiple channels, the third pixel value of the pixel in multiple channels, the preset brightness peak adjustment parameters, and the power consumption adjustment parameters set by the user, the target pixel value of the pixel in multiple channels is determined. The brightness peak adjustment parameter is used to indicate the degree of power consumption adjustment corresponding to the screen brightness peak, and the power consumption adjustment parameter is used to indicate the degree to which power consumption needs to be reduced.
10. The method according to claim 9, characterized in that, The process of determining the target pixel value of the pixel in multiple channels based on the first pixel value of the pixel in multiple channels, the third pixel value of the pixel in multiple channels, preset brightness peak adjustment parameters, and user-set power consumption adjustment parameters includes: For any one of the multiple channels, the difference between the first pixel value and the third pixel value of the pixel in the channel is determined as the second pixel difference corresponding to the pixel. The ratio of the second pixel difference of the pixel in the channel to the maximum settable parameter value of the power consumption adjustment degree parameter is determined as the pixel difference to be adjusted corresponding to the pixel. Based on the first pixel value of the pixel in the channel, the pixel difference to be adjusted corresponding to the pixel, the power consumption adjustment parameter, and the brightness peak adjustment parameter, the target pixel value of the pixel in the channel is determined.
11. The method according to claim 10, characterized in that, The step of determining the target pixel value of the pixel in the channel based on the first pixel value of the pixel in the channel, the pixel difference to be adjusted corresponding to the pixel, the power consumption adjustment degree parameter, and the brightness peak adjustment parameter includes: Based on the power consumption adjustment parameter and the brightness peak adjustment parameter, the pixel difference to be adjusted corresponding to the pixel is weighted to obtain the second pixel difference to be adjusted corresponding to the pixel. The difference between the first pixel value of the pixel in the channel and the second pixel difference to be adjusted corresponding to the pixel is determined as the target pixel value of the pixel in the channel.
12. The method according to claim 1, characterized in that, The step of adjusting the saturation of the first image based on the first pixel value of each pixel in multiple channels to obtain the second image includes: For any pixel in the first image, based on the first pixel value of the pixel in multiple channels and the preset dark detail preservation information, the first chroma adjustment parameter and saturation adjustment parameter corresponding to the pixel are determined, wherein the dark detail preservation information is used to determine the mapping relationship between different pixel values and the first chroma adjustment parameter. Based on the first pixel value of the pixel in multiple channels, the first chroma adjustment parameter corresponding to the pixel, and the saturation adjustment parameter corresponding to the pixel, the second pixel value of the pixel in multiple channels is determined to obtain the second image after saturation adjustment of the first image.
13. The method according to claim 12, characterized in that, The step of determining the first chroma adjustment parameter and saturation adjustment parameter corresponding to the pixel based on the first pixel value of the pixel in multiple channels and preset dark detail preservation information includes: Based on the first pixel value of the pixel in multiple channels and the preset dark detail preservation information, the first chromaticity adjustment parameter corresponding to the pixel is determined; Based on the first pixel value of the pixel in multiple channels and the preset first adjustment parameter, the saturation adjustment parameter corresponding to the pixel is determined, and the first adjustment parameter is used to indicate the adjustment intensity of the pixel value saturation.
14. The method according to claim 13, characterized in that, The step of determining the first chroma adjustment parameter corresponding to the pixel based on the first pixel value of the pixel in multiple channels and preset dark detail preservation information includes: Based on the first pixel value of the pixel in multiple channels, determine the average pixel value and the maximum pixel value of the pixel; Based on the average pixel value, the maximum pixel value, a preset second adjustment parameter, and a preset first constant parameter, a second chromaticity adjustment parameter corresponding to the pixel is determined. The second adjustment parameter is used to indicate the degree of adjustment of the pixel value chromaticity. Based on the maximum pixel value and the dark detail preservation information, the third adjustment parameter corresponding to the pixel is determined; The second chromaticity adjustment parameter corresponding to the pixel is weighted based on the third adjustment parameter corresponding to the pixel to obtain the first chromaticity adjustment parameter corresponding to the pixel.
15. The method according to claim 14, characterized in that, The step of determining the second chromaticity adjustment parameter corresponding to the pixel based on the pixel mean, the pixel maximum, a preset second adjustment parameter, and a preset first constant parameter includes: Determine the absolute value of the difference between the average pixel value and the maximum pixel value; The ratio of the absolute value of the difference to the first constant parameter is determined as the first proportional parameter; The product of the second adjustment parameter and the first ratio parameter is determined as the second chromaticity adjustment parameter.
16. The method according to claim 15, characterized in that, The step of determining the saturation adjustment parameter corresponding to the pixel based on the first pixel value of the pixel in multiple channels and a preset first adjustment parameter includes: The maximum pixel value of the pixel is determined based on the first pixel value of the pixel in multiple channels; Based on the first pixel value of the pixel in each channel and the maximum pixel value, a pixel difference is determined to obtain the first pixel difference of the pixel in multiple channels; Determine the maximum pixel difference and the sum of pixel differences among a plurality of first pixel differences, wherein the sum of pixel differences is the sum of the first pixel differences among the plurality of first pixel differences excluding the maximum pixel difference; Based on the maximum pixel difference, the sum of pixel differences, and the first adjustment parameter, the color saturation parameter corresponding to the pixel is determined; The color saturation parameter corresponding to the pixel is normalized to the first target interval to obtain the pixel. The corresponding saturation adjustment parameters.
17. The method according to claim 16, characterized in that, The step of determining the color saturation parameter corresponding to the pixel based on the maximum pixel difference, the sum of pixel differences, and the first adjustment parameter includes: The maximum pixel difference is exponentially calculated based on the first adjustment parameter, and the sum of the result obtained by the exponentiation and the sum of the pixel differences is determined as the color saturation parameter.
18. The method according to claim 12, characterized in that, The step of determining the second pixel value of the pixel in multiple channels based on the first pixel value of the pixel in multiple channels, the first chroma adjustment parameter corresponding to the pixel, and the saturation adjustment parameter corresponding to the pixel includes: The maximum pixel value of the pixel is determined based on the first pixel value of the pixel in multiple channels; Based on the first pixel value of the pixel in each channel and the maximum pixel value, a pixel difference is determined to obtain the first pixel difference of the pixel in multiple channels; For any one of the plurality of channels, a pixel correction value is determined based on the first pixel difference of the pixel in the channel, the first chroma adjustment parameter, the saturation adjustment parameter, and the second adjustment parameter corresponding to the channel; Based on the first pixel value of the pixel in the channel and the pixel correction value, the second pixel value of the pixel in the channel is determined.
19. The method according to claim 18, characterized in that, The method further includes: For any of the plurality of channels, if the pixel value determined based on the first pixel value of the pixel in the channel and the pixel correction value is less than 0, then the second pixel value of the pixel in the channel is determined to be 0.
20. An image processing apparatus, characterized in that, The device includes: The acquisition module is used to acquire a first image to be displayed, the first image including multiple pixels, and for any pixel, the color of the pixel is represented by pixel values on multiple channels; The first adjustment module is used to adjust the saturation of the first image based on the first pixel value of each pixel in the first image on multiple channels to obtain the second image; The second adjustment module is used to perform low-power adjustment on the second image based on the first pixel value of each pixel in the first image in multiple channels and the second pixel value of each pixel in the second image in multiple channels, so as to obtain the target image.
21. A computing device, characterized in that, The computing device includes a memory, a processor, and a computer program stored in the memory and executable on the processor, wherein the processor executes the computer program to perform the operations performed by the image processing method as described in any one of claims 1 to 19.
22. A computer-readable storage medium, characterized in that, The computer-readable storage medium stores a program that, when executed by a processor, performs the operations performed by the image processing method as described in any one of claims 1 to 19.
Citation Information
Patent Citations
Low-power consumption contrast enhancing method
CN103810681A
Image saturation adjusting method and device, storage medium and terminal
CN109741279A
Liquid crystal display dimming method combined with image saturation adjustment
CN114120932A
Image display method and device, electronic equipment and storage medium
CN118071665A
Dark part detail enhancement method based on gray level transformation
CN118195980A