Image processing methods, apparatuses, electronic devices and storage media

By acquiring and compensating for the layer color information of the target interface in electronic devices, and using GPU and dedicated video memory chips for color compensation, the problem of image color differences on different devices is solved, achieving color consistency and improved visual effects.

CN122090794APending Publication Date: 2026-05-26BEIJING XIAOMI MOBILE SOFTWARE CO LTD
View PDF 0 Cites 0 Cited by

Patent Information

Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
BEIJING XIAOMI MOBILE SOFTWARE CO LTD
Filing Date
2024-11-26
Publication Date
2026-05-26

AI Technical Summary

Technical Problem

The GPU processing on different electronic devices results in significant color differences in images on the display, leading to inconsistent visual effects.

Method used

By acquiring the first layer of the target interface, color compensation is performed using the color compensation information corresponding to the GPU, including hue, brightness, saturation, and color temperature compensation. Color parameters are adjusted to achieve consistency, and fine adjustments are made in conjunction with the independent video memory chip.

Benefits of technology

This ensures consistent color display of the target interface across different electronic devices, improving the visual experience.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN122090794A_ABST
    Figure CN122090794A_ABST
Patent Text Reader

Abstract

This application proposes an image processing method, apparatus, electronic device, and storage medium. The method includes: obtaining a first layer of a target interface to be displayed by a target application, wherein the first layer is determined based on an initial layer of the target interface rendered by a graphics processing unit (GPU) in the electronic device; performing color compensation on the first layer according to color compensation information corresponding to the GPU; and displaying the target interface according to the color-compensated first layer. By performing color compensation on the first layer according to the color compensation information corresponding to the graphics processing unit, a color-compensated first layer corresponding to the target interface to be displayed on the electronic device is obtained, so that the color-compensated first layer has color consistency, thereby achieving color display consistency of the target interface on different electronic devices and improving the visual effect.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] This application relates to the field of image processing technology, and in particular to an image processing method, apparatus, electronic device and storage medium. Background Technology

[0002] Currently, with the development of electronic technology and different needs, different electronic devices are matched with processing chips of different specifications. The design of the graphics processing unit (GPU) of different specifications of processing chips is also different. As a result, in scenarios that require GPU to perform image rendering, the image processed by the GPU on different electronic devices will have different effects, resulting in large color differences and poor visual effects on the screens of different devices. Summary of the Invention

[0003] This application aims to at least partially address one of the technical problems in the related art.

[0004] To this end, this application proposes an image processing method, apparatus, electronic device, and storage medium. The method performs color compensation on a first layer using color compensation information corresponding to a graphics processor to obtain a color-compensated layer corresponding to the target interface to be displayed on the electronic device. This ensures that the color-compensated layer has consistent color information, thereby achieving consistent color information display of the target interface on different electronic devices and improving the visual effect.

[0005] One embodiment of this application proposes an image processing method, including:

[0006] Obtain the first layer of the target interface to be displayed by the target application; wherein, the first layer is determined based on the initial layer of the target interface rendered by the graphics processing unit (GPU) in the electronic device;

[0007] The first layer is color-compensated according to the color compensation information corresponding to the GPU;

[0008] The target interface is displayed based on the first layer after color compensation.

[0009] Another embodiment of this application provides an image processing apparatus, including:

[0010] The acquisition module is used to acquire the first layer of the target interface to be displayed by the target application; wherein, the first layer is determined based on the initial layer of the target interface rendered by the graphics processing unit (GPU) in the electronic device;

[0011] The compensation module is used to perform color compensation on the first layer according to the color compensation information corresponding to the GPU;

[0012] The display module is used to display the target interface based on the first layer after color compensation.

[0013] Another embodiment of this application provides an electronic device including a memory, a processor, and a computer program stored in the memory and executable on the processor, wherein when the processor executes the program, it implements the method described in the foregoing aspect.

[0014] Another embodiment of this application proposes a non-transitory computer-readable storage medium having a computer program stored thereon, which, when executed by a processor, implements the method described in the foregoing aspect.

[0015] Another embodiment of this application proposes a computer program product having a computer program stored thereon, which, when executed by a processor, implements the method described in the foregoing aspect.

[0016] The image processing method, apparatus, electronic device, and storage medium proposed in this application obtain a first layer of the target interface to be displayed by the target application. The first layer is determined based on the initial layer of the target interface rendered by the graphics processing unit (GPU) in the electronic device. Color compensation is performed on the first layer according to the color compensation information corresponding to the GPU. The target interface is then displayed based on the color-compensated first layer. By performing color compensation on the first layer according to the color compensation information corresponding to the graphics processing unit, a color-compensated first layer corresponding to the target interface to be displayed on the electronic device is obtained, so that the color-compensated first layer has color consistency, thereby achieving color display consistency of the target interface on different electronic devices and improving the visual effect.

[0017] Additional aspects and advantages of this application will be set forth in part in the description which follows, and in part will be obvious from the description, or may be learned by practice of this application. Attached Figure Description

[0018] The above and / or additional aspects and advantages of this application will become apparent and readily understood from the following description of the embodiments taken in conjunction with the accompanying drawings, wherein:

[0019] Figure 1 This is a schematic flowchart of an image processing method provided in an embodiment of this application;

[0020] Figure 2 A flowchart illustrating another image processing method provided in an embodiment of this application;

[0021] Figure 3 A flowchart illustrating another image processing method provided in an embodiment of this application;

[0022] Figure 4 A flowchart illustrating another image processing method provided in an embodiment of this application;

[0023] Figure 5 A schematic diagram illustrating intent recognition provided for an embodiment of this application;

[0024] Figure 6 This is a schematic diagram of the structure of an image processing apparatus provided in an embodiment of this application;

[0025] Figure 7 This is a block diagram of an electronic device provided in an embodiment of this application. Detailed Implementation

[0026] The embodiments of this application are described in detail below. Examples of these embodiments are shown in the accompanying drawings, wherein the same or similar reference numerals denote the same or similar elements or elements having the same or similar functions throughout. The embodiments described below with reference to the accompanying drawings are exemplary and intended to explain this application, and should not be construed as limiting this application.

[0027] The image processing method, apparatus, electronic device, and storage medium of this application are described below with reference to the accompanying drawings.

[0028] Figure 1 This is a schematic flowchart of an image processing method provided in an embodiment of this application.

[0029] This application embodiment illustrates the example of the image processing method being configured in an image processing apparatus, which can be applied to any electronic device to enable the electronic device to perform image processing functions.

[0030] Among them, electronic devices can be any device with computing capabilities, such as mobile terminals, which can be hardware devices with various operating systems, touch screens and / or displays, such as mobile phones, tablets, personal digital assistants, wearable devices, etc.

[0031] like Figure 1 As shown, the method may include the following steps:

[0032] Step 101: Obtain the first layer of the target interface to be displayed in the target application.

[0033] The first layer is determined based on the initial layer of the target interface rendered by the graphics processing unit (GPU) in the electronic device.

[0034] In this embodiment, the target application is an application currently running on the electronic device that requires display, such as a game application or a photo album application. The target application can be installed on different electronic devices. After the target application is launched on the electronic device, it can display multiple interfaces. The target interface is one of these multiple interfaces and can be considered as the interface currently to be displayed; for identification purposes, it is referred to as the target interface.

[0035] In this embodiment, the first layer is determined based on the initial layer of the target interface rendered by the graphics processing unit (GPU) in the electronic device. That is, the target interface layer needs to be processed by the GPU, and the GPU-output layer requires color compensation. In one implementation, the target interface to be displayed by the target application is rendered by the GPU to obtain the initial layer of the target interface. Simultaneously, the layer of the user interaction interface is obtained, and the initial layer and the user interaction interface layer are merged to obtain the first layer. In a second implementation, if there is no user interaction interface layer, the initial layer of the target interface is used as the first layer.

[0036] Step 102: Perform color information compensation on the first layer based on the color compensation information corresponding to the GPU.

[0037] Different electronic devices have GPUs with varying performance, resulting in color differences in the initial layers rendered by the GPUs on the same target interface. This leads to significant variations in the visual appearance of the final target interface displayed on the electronic devices. To address this issue, this embodiment configures color compensation information corresponding to the GPU in the electronic device. The first layer is then color-compensated using this GPU-specific color compensation information, resulting in a color-compensated first layer. This achieves consistent color control of the first layer corresponding to the target interface to be displayed, ensuring color consistency across different electronic devices.

[0038] Color compensation includes at least one of hue compensation, brightness compensation, saturation compensation, and color temperature compensation. Through color compensation, the color of the target interface finally displayed on the electronic device is consistent. Color is represented by color parameters, which include at least one of hue, brightness, saturation, and color temperature.

[0039] Step 103: Display the target interface based on the first layer after color compensation.

[0040] In this embodiment of the application, the display is based on the first layer after color compensation on the display screen of the electronic device. In order to enhance the consistency of the display, as an implementation method, the display screen of the electronic device can be mapped to a unified wide color gamut, such as the DCI-P3 color gamut, through the color gamut conversion of the display driver integrated circuit (DDIC), so as to achieve the consistency of the display effect and improve the visual effect.

[0041] In the image processing method of this application embodiment, a first layer of the target interface to be displayed by the target application is obtained. The first layer is determined based on the initial layer of the target interface rendered by the graphics processor (GPU) in the electronic device. Color compensation is performed on the first layer according to the color compensation information corresponding to the GPU. The target interface is displayed according to the color-compensated first layer. By performing color compensation on the first layer according to the color compensation information corresponding to the graphics processor, the color-compensated first layer corresponding to the target interface to be displayed by the electronic device is obtained, so that the color-compensated first layer has color consistency, thereby realizing the color display consistency of the target interface on different electronic devices and improving the visual effect.

[0042] Based on the above embodiments, Figure 2 A flowchart illustrating another image processing method provided in this application embodiment is shown below. Figure 2 As shown, the method includes the following steps:

[0043] Step 201: Obtain the primitive information of the target interface, and in response to the identifier of the primitive information being the target identifier, send the primitive information to the GPU.

[0044] The target interface's primitive information mainly includes the primitive type, attributes, and interaction methods. This information collectively defines how the primitives are presented on the target interface. The primitive information also includes an identifier, which indicates whether the target interface needs GPU rendering. In one scenario, if the identifier is a target identifier, indicating that the target interface needs GPU rendering, the primitive information is sent to the GPU for rendering. For example, if the target identifier is 1, the layer obtained after GPU rendering needs color compensation before being displayed on the electronic device screen. If the identifier is not a target identifier, for example, if the identifier is 0, it means that the target interface does not need GPU rendering and is directly displayed on the electronic device screen. This achieves color compensation only for interfaces of a specific application or scenario. For example, if the target application is a game application, color compensation is performed on the target interface of the game application to ensure color consistency when the target interface is displayed on different electronic devices. This also ensures the daily display needs of video applications and desktop applications, meaning it can meet the needs of different display scenarios. For interfaces that do not require GPU rendering, color compensation information is not required. This application embodiment limits the scenarios that require GPU rendering.

[0045] Step 202: Render the primitive information using the GPU to obtain the initial layer of the target page.

[0046] The initial layer of the target page obtained by rendering primitive information through the GPU can be achieved using rendering methods in related technologies, which will not be elaborated in this embodiment.

[0047] Step 203: Determine the first layer based on the initial layer.

[0048] In one implementation, the target interface to be displayed in the target application is rendered by the GPU to obtain the initial layer of the target interface. At the same time, the layer of the user interaction interface is obtained, and the initial layer and the layer of the user interaction interface are combined to obtain the first layer.

[0049] As a second implementation method, if there is no layer for the user interface, the initial layer of the target interface is used as the first layer.

[0050] It should be noted that the first layer is determined based on the initial layer of the target interface rendered by the GPU. Therefore, there are differences in color information between the first layers rendered by different GPUs. It is necessary to use the color compensation information corresponding to the GPU to correct the color information and achieve consistency of color information.

[0051] Step 204: Obtain the first layer of the target interface to be displayed in the target application.

[0052] The first layer is determined based on the initial layer of the target interface rendered by the graphics processing unit (GPU) in the electronic device.

[0053] Step 204 can be explained in the previous embodiments, and the principle is the same, so it will not be repeated here.

[0054] Step 205: Determine the initial values ​​of the color parameters of each first color in the first layer using the independent video memory chip.

[0055] In one implementation of this application, an independent video memory chip is configured in the electronic device. The independent video memory chip is a second chip other than the processing chip of the electronic device. The processing chip is, for example, a system on chip (SOC) or a central processing unit (CPU), etc., used to perform visual processing optimization on the first layer, relieve the pressure of GPU computing on the electronic device, and improve device performance.

[0056] In this embodiment, the first layer includes multiple colors, labeled as first colors. The first colors can be characterized by color parameters, including at least one of hue, brightness, saturation, and color temperature. The initial values ​​of the color parameters for each first color in the first layer refer to the values ​​of the color parameters for each color in the initial layer output after GPU rendering.

[0057] Step 206: Determine the target value of the color parameter of each first color in the first layer based on the initial value of the color parameter and color compensation information of each first color in the first layer using the independent video memory chip.

[0058] In this embodiment of the application, color compensation information, namely color parameter compensation information, is the correspondence between the initial value and the target value of the color parameter. As an example, the color parameter compensation information is stored in a color compensation table, which is stored in an independent video memory chip. Since the color compensation information includes the compensation information of the color parameters, the color parameters include at least one of hue, brightness and saturation, thereby enabling the storage of more color information and improving the effect of image processing.

[0059] In one implementation of this application, the initial values ​​of the color parameters of each first color in the first layer are compensated according to the color compensation information, the target values ​​of the color parameters of each first color in the first layer are determined, the color of the first layer is corrected, and the first layer is displayed in various electronic devices with consistent color.

[0060] Step 207: Display the target interface according to the target values ​​of the color parameters of each first color in the first layer.

[0061] In this embodiment, the initial values ​​of the color parameters of each first color in the first layer are adjusted by an independent video memory chip to obtain the target values ​​of the color parameters of each first color. This achieves the adjustment of the values ​​of the color parameters of each color in the first layer, that is, the adjustment of the color information of the first layer, so that the color display of the first layer remains consistent. This ensures good color consistency when the target interface to be displayed is displayed on different electronic devices, thus improving the display effect.

[0062] In the image processing method of this application embodiment, a first layer of the target interface to be displayed by the target application is obtained. The first layer is determined based on the initial layer of the target interface rendered by the graphics processor (GPU) in the electronic device. Color compensation is performed on the first layer according to the color compensation information corresponding to the GPU. The target interface is displayed according to the color-compensated first layer. By performing color compensation on the first layer according to the color compensation information corresponding to the graphics processor, the color-compensated first layer corresponding to the target interface to be displayed by the electronic device is obtained, so that the color-compensated first layer of the electronic device has color consistency, thereby achieving color display consistency of the target interface on different electronic devices.

[0063] Based on the above embodiments, Figure 3 A flowchart illustrating another image processing method provided in this application embodiment is shown below. Figure 3 As shown, the method includes the following steps:

[0064] Step 301: Obtain the first layer of the target interface to be displayed in the target application.

[0065] The first layer is determined based on the initial layer of the target interface rendered by the graphics processing unit (GPU) in the electronic device.

[0066] Step 302: Determine the initial values ​​of the color parameters of each first color in the first layer using the independent video memory chip.

[0067] Steps 301 and 302 can be referred to the relevant explanations in the foregoing embodiments, as the principles are the same, and will not be repeated here.

[0068] Step 303: For each color parameter of the first color, based on the initial value of the color parameter of the first color, query the correspondence between the initial value and the target value of the color parameter included in the color compensation information, and determine the query result.

[0069] The query results indicate whether the color compensation information includes the initial value of the target color parameter that matches the initial value of the color parameter of the first color.

[0070] In one implementation of this application, the color compensation information can be a color compensation table, which stores the correspondence between the initial values ​​and target values ​​of color parameters. For each color parameter of a first color, the initial value of that color parameter is matched with the initial values ​​of each color parameter stored in the color compensation information. For ease of explanation, the initial value of the current first color parameter is referred to as A. The initial value A of the color parameter is compared with the initial values ​​of each color parameter in the color compensation table to determine whether there is an initial value in the color compensation table that matches the initial value A. Matching means that the difference between the two color parameters is less than a set threshold. Wherein, when there are multiple color parameters, it means that the difference between each of the color parameters and each of the matched color parameters is less than the set threshold. The set threshold can be set according to the accuracy requirements of the scene, and is not limited in this embodiment.

[0071] Step 304: Determine the target value of the color parameter of the first color based on the query results.

[0072] In one implementation of this application, if the query result finds an initial value of a target color parameter that matches the initial value of the color parameter of the first color, then the target value corresponding to the initial value of the target color parameter is used as the target value of the color parameter of the first color. If there are multiple initial values ​​of the target color parameter, then the average of the multiple target values ​​corresponding to the initial values ​​of the multiple target color parameters is taken as the target value of the color parameter of the first color.

[0073] In another implementation of this application, if the query result is that no target color parameter initial value matching the initial value of the first color parameter is found, then for each color parameter, the two initial values ​​closest to the initial value of the color parameter are determined from the color compensation information. The two closest initial values ​​are the initial values ​​with the smallest difference between them and the initial value of the color parameter. As an example, the color parameters of the first color include three color parameters: a first color parameter, a second color parameter, and a third color parameter. The first color parameter is, for example, hue; the second color parameter is, for example, brightness; and the third color parameter is, for example, saturation. For hue matching, the initial hue value h1 is matched against the color compensation information. The two values ​​with the smallest difference between h1 and the initial hue value are determined to be h2 and h3, respectively. Then, the target values ​​corresponding to h2 and h3 are determined from the color compensation information to be h4 and h5. Similarly, the two values ​​with the smallest difference between brightness v1 and brightness v1 are determined to be v4 and v3, respectively. Then, the target values ​​corresponding to v4 and v3 are determined from the color compensation information to be v2 and v5. Similarly, the two values ​​with the smallest difference between saturation s1 and s2 are determined to be s2 and s5, respectively. Then, the target values ​​corresponding to s2 and s5 are determined from the color compensation information to be s3 and s6. Furthermore, based on the two candidate target values ​​h4 and h5 corresponding to hue, the two candidate target values ​​v2 and v5 corresponding to luminance, and the two candidate target values ​​s3 and s6 corresponding to saturation, a cube interpolation algorithm is used to determine the target values ​​corresponding to hue, luminance, and saturation. Color compensation information is stored in dedicated video memory. Color compensation is performed based on this information using the dedicated video memory. Multiple color parameters can be used, enabling compensation of more color information and allowing for more precise and accurate color adjustments through the dedicated video memory chip.

[0074] Step 305: Display the target interface based on the first layer after color compensation.

[0075] In this process, after the target values ​​of the color parameters of each first color in the first layer are determined, the first layer becomes the color-compensated first layer. Based on the color-compensated first layer, the display of the target interface on the display screen of the electronic device is realized, thus achieving consistent control of the color display of the target interface of the target application, that is, achieving display consistency on different electronic devices and improving the display effect.

[0076] In the image processing method of this application embodiment, color compensation information is stored in independent video memory. Color compensation is performed based on the color compensation information through the independent video memory. There can be multiple color parameters, which realizes the compensation of more color information. More precise and accurate color adjustment can be achieved through the independent video memory chip. Color compensation is performed on the first layer through the color compensation information corresponding to the graphics processor to obtain the first layer with color compensation corresponding to the target interface to be displayed on the electronic device. This makes the first layer with color compensation on the electronic device have color consistency, thereby achieving color display consistency of the target interface on different electronic devices.

[0077] Based on the above embodiments, Figure 4 This is a flowchart illustrating another image processing method provided in an embodiment of this application, specifically explaining how to determine the color compensation information corresponding to the GPU of an electronic device, such as... Figure 4 As shown, before performing color compensation on the first layer based on the color compensation information corresponding to the GPU, the method includes the following steps:

[0078] Step 401: Obtain the second layer of the application interface rendered by the GPU and the reference layer of the application interface rendered by the GPU as a reference.

[0079] The application interface, based on scenario requirements, includes multiple interfaces from multiple applications. For example, in a game scenario, the application interface should include commonly used screens from mainstream games. The application interface can be the interface of the target application or the interface of other applications; this embodiment does not impose any limitations.

[0080] In one implementation of this application, taking GPUs named Chip A and Chip B as examples, the influence of different GPU rendering on color and grayscale is statistically analyzed. An ideal screen after color gamut mapping is selected. The image obtained by merging the second layer output by the GPU of Chip B in the game scene is displayed on the ideal screen. The image obtained by merging the reference layer output by the GPU of Chip A in the game scene is also displayed on the ideal screen. Then, the effects of Chip A and Chip B after processing and displayed on the screen are saved as a reference image and a first image, respectively.

[0081] Step 402: Display the first image corresponding to the second layer and the reference image corresponding to the reference layer on the target display screen.

[0082] In this embodiment, the first image corresponding to the second layer and the reference image corresponding to the reference layer are displayed in a split-screen manner on the target display screen, so as to display two images on one screen at the same time. As one implementation method, experienced professionals can determine the color difference information of the two images displayed on the screen by human eye.

[0083] Step 403: Determine the differences between the first image and the reference image in the color parameters of each second color.

[0084] In one implementation of this application, the color parameters include hue, brightness, and saturation. The difference information includes at least one of color difference values ​​and color difference descriptions. The color difference values ​​include hue difference values, brightness difference values, and saturation difference values. The color difference description is a textual description indicating the differences between colors, i.e., a textual description of the differences between colors. The second color is used to identify colors in the first image and the reference image. The explanation of the second color can refer to the explanation of the first color, and will not be repeated here.

[0085] As an example, Table 1 shows the differences between the first image and the reference image in each color parameter of the second color.

[0086] Table 1

[0087] Second color Hue Gap_B|A Tuning_Guide Color 1 0° <![CDATA[a1,b1,c1]]> Too reddish, the color is too bright... Color 2 20° <![CDATA[a2,b2,c2]]> It has a yellowish tint and low brightness... ... ... ... ... Color n 225° <![CDATA[a n ,b n ,c n ]]> Overall, it's grayish and the color isn't vibrant enough...

[0088] Here, Gap_B|A refers to the difference information of the first image corresponding to chip B relative to the reference image corresponding to chip A in various color parameters of the second color, including differences in brightness, hue, and saturation. a1, b1, and c1 represent the differences in brightness, hue, and saturation of the first image relative to the reference image in color n, respectively. Hue is the hue value, indicated by degrees on the color wheel. Tuning_Guide is a description of the color difference.

[0089] Step 404: Based on the differences between the first image and the reference image in the color parameters of each second color, determine the target values ​​of the color parameters of each second color in the first image.

[0090] In one implementation of this application, the color parameter difference information is the color difference value of the color parameter. For each second color, the color difference value of the first image and the reference image on the color parameter of the second color is summed with the initial value of the color parameter of each second color in the first image. The summed result is used as the target value of the color parameter of that second color in the first image. Alternatively, the result obtained by multiplying the color difference value of the first image and the reference image on the color parameter of the second color by a set coefficient is summed with the initial value of the color parameter of each second color in the first image. The summed result is used as the target value of the color parameter of that second color in the first image. The set coefficient is determined based on experience.

[0091] In another implementation of this application, if the user cannot manually calibrate the difference values ​​between the color parameters of each second color, they can determine the descriptive information between the color differences of each second color, i.e., the color difference description. Since the color difference description is not a specific numerical value, it cannot be directly used for color adjustment. That is, based on the color difference descriptions of the first image and the reference image on the color parameters of each second color, the first adjustment value of the color parameters of each second color in the first image is determined. As one implementation, the color difference descriptions of the first image and the reference image on the color parameters of each second color are input into an intent recognition model for intent recognition to obtain the first adjustment value of the color parameters of each second color in the first image. The intent recognition model is pre-trained and has learned the correspondence between the color difference description and the color adjustment value. Therefore, based on the text of the color difference description, the intent recognition model can abstract the first adjustment value of the color parameter. The first adjustment value of the color parameter includes, for example, adjustment values ​​for three dimensions: chromaticity (H), brightness (V), and saturation (S). Then, the first adjustment value of the color parameter of each second color in the first image and the initial value of the color parameter of each second color in the first image are used to determine the target value of the color parameter of each second color in the first image. As an example, the intent recognition model is a bidirectional encoder (BERT) model.

[0092] In another implementation of this application, after determining the first adjustment value of the color parameter of each second color in the first image and the difference value of the color parameter of each second color that has been manually calibrated, the target adjustment value of the color parameter of each second color in the first image is determined according to the first adjustment value of the color parameter of each second color in the first image and the color difference value corresponding to the color parameter of each second color. The color difference value corresponding to the color parameter of each second color refers to the color difference value between the first image and the reference image in terms of the color parameter of each second color.

[0093] One approach to determining the target adjustment value of the color parameter of the second color in the first image involves using a weighted average of the first adjustment value and the difference value of each second color parameter in the first image. This improves the accuracy of the target adjustment value determination. Furthermore, by combining the target adjustment values ​​and the initial values ​​of each second color parameter in the first image, the target value of each second color parameter in the first image is determined.

[0094] As an example, Figure 5 A schematic diagram of intent recognition provided for an embodiment of this application, such as... Figure 5 As shown, the color parameters include three dimensions: hue (H), brightness (V), and saturation (S). Intent recognition is performed on the color difference description corresponding to the color parameters of each second color in the first image to obtain the first adjustment value for the color parameters of each second color in the first image. For example, if the color difference description of color 1 is: color 1 is too reddish and too vibrant, then the first adjustment value of the color parameters output by the model includes how much to increase or decrease hue (H), brightness (V), and saturation (S). For example, color 1 needs to increase hue (H) by a2, brightness (V) by v2, and saturation (S) by s2. Similarly, the first adjustment value of the color parameters for color 2 is not elaborated further. The intent recognition model transforms the textual description of color differences into quantifiable color adjustment values, enabling the independent graphics memory chip to accurately perform color compensation and improve accuracy.

[0095] Step 405: Determine color compensation information based on the correspondence between the initial values ​​of the color parameters of each second color in the first image and the target values ​​of the color parameters of each second color in the first image.

[0096] In one implementation of this application, the correspondence between the initial values ​​and target values ​​of the color parameters of each second color in the first image can be stored in a table, so that the color compensation information can be presented through the color compensation table. As one implementation, the color compensation information is stored in the color adjustment module of the independent video memory chip by writing values ​​to registers. In scenarios where color adjustment is required, the target values ​​of each color parameter are applied by reading the register values.

[0097] In the color processing method of this application embodiment, a display scheme that uses an independent video memory chip to maintain color consistency in game scenes of different electronic devices is used. In response to the problem of inconsistent rendering effects of different models of GPU chips in game interfaces, the method fully references the real-time feedback of the human eye and uses the adjustment function of the independent video memory chip to perform different color compensation and adjustment values ​​for different electronic devices, thereby maintaining the display consistency of color brightness of different electronic devices and improving the user's subjective visual experience in game scenes.

[0098] To implement the above embodiments, this application also proposes an image processing apparatus.

[0099] Figure 6 This is a schematic diagram of the structure of an image processing device provided in an embodiment of this application.

[0100] like Figure 6 As shown, the device may include:

[0101] The acquisition module 61 is used to acquire the first layer of the target interface to be displayed by the target application; wherein, the first layer is determined based on the initial layer of the target interface rendered by the graphics processor GPU in the electronic device;

[0102] The compensation module 62 is used to perform color compensation on the first layer according to the color compensation information corresponding to the GPU;

[0103] Display module 63 is used to display the target interface based on the first layer after color compensation.

[0104] Furthermore, in one implementation of this application embodiment, the compensation module 62 is further used for:

[0105] The initial values ​​of the color parameters of each first color in the first layer are determined by an independent video memory chip;

[0106] The independent video memory chip determines the target value of the color parameter of each first color in the first layer based on the initial value of the color parameter of each first color in the first layer and the color compensation information.

[0107] In one implementation of this application, the color compensation information includes the correspondence between the initial value and the target value of the color parameters, and the compensation module 62 is further used for:

[0108] For each color parameter of the first color, based on the initial value of the color parameter of the first color, the correspondence between the initial value and the target value of the color parameter included in the color compensation information is queried to determine the query result; wherein, the query result is used to indicate whether the color compensation information includes the initial value of the target color parameter that matches the initial value of the color parameter of the first color.

[0109] Based on the query results, determine the target value of the color parameter of the first color.

[0110] In one implementation of this application, the apparatus further includes: a first determining module, configured to:

[0111] Obtain the second layer of the application interface rendered by the GPU and the reference layer of the application interface rendered by the GPU as a reference.

[0112] The target display screen shows the first image corresponding to the second layer and the reference image corresponding to the reference layer.

[0113] Determine the differences between the first image and the reference image in the color parameters of each second color;

[0114] Based on the difference information between the first image and the reference image in the color parameters of each second color, the target value of each color parameter of the second color in the first image is determined.

[0115] The color compensation information is determined based on the correspondence between the initial values ​​of the color parameters of each of the second colors in the first image and the target values ​​of the color parameters of each of the second colors in the first image.

[0116] In one implementation of this application, the difference information includes color difference values, and the first determining module is further configured to:

[0117] For each second color, a target value for the color parameter of the second color in the first image is determined based on the color difference value between the first image and the reference image in terms of the color parameter of the second color.

[0118] In one implementation of this application, the difference information includes color difference values ​​and color difference descriptions. The first determining module is further configured to:

[0119] Based on the color difference description between the first image and the reference image on the color parameters of each second color, a first adjustment value for the color parameter of each second color in the first image is determined.

[0120] Based on the first adjustment value of the color parameter of each second color in the first image and the color difference value of the color parameter of each second color in the first image, the target adjustment value of the color parameter of each second color in the first image is determined;

[0121] Based on the target adjustment values ​​of the color parameters of each of the second colors in the first image and the initial values ​​of the color parameters of each of the second colors in the first image, the target values ​​of the color parameters of each of the second colors in the first image are determined.

[0122] In one implementation of this application, the first determining module is further configured to:

[0123] The color differences between the first image and the reference image in terms of the color parameters of each second color are described and input into the intent recognition model for intent recognition to obtain the first adjustment value of the color parameters of each second color in the first image.

[0124] In one implementation of this application, the apparatus further includes: a second determining module, configured to:

[0125] Obtain the graphic element information of the target interface;

[0126] In response to the primitive information being identified as a target identifier, the primitive information is sent to the GPU;

[0127] The GPU renders the primitive information to obtain the initial layer of the target page;

[0128] The first layer is determined based on the initial layer.

[0129] It should be noted that the foregoing explanation of the method embodiments also applies to the apparatus of this embodiment, and will not be repeated here.

[0130] In the image processing apparatus of this application embodiment, a first layer of the target interface to be displayed by the target application is obtained. The first layer is determined based on the initial layer of the target interface rendered by the graphics processor (GPU) in the electronic device. Color compensation is performed on the first layer according to the color compensation information corresponding to the GPU. The target interface is displayed according to the color-compensated first layer. By performing color compensation on the first layer according to the color compensation information corresponding to the graphics processor, the color-compensated first layer corresponding to the target interface to be displayed by the electronic device is obtained, so that the color-compensated first layer of the electronic device has color consistency, thereby realizing the color display consistency of the target interface on different electronic devices.

[0131] To implement the above embodiments, this application also proposes an electronic device, including a memory, a processor, and a computer program stored in the memory and executable on the processor, wherein when the processor executes the program, it implements the method described in the foregoing method embodiments.

[0132] To implement the above embodiments, this application also proposes a non-transitory computer-readable storage medium storing a computer program thereon, which, when executed by a processor, implements the method described in the foregoing method embodiments.

[0133] To implement the above embodiments, this application also proposes a computer program product having a computer program stored thereon, wherein the computer program, when executed by a processor, implements the method described in the foregoing method embodiments.

[0134] Figure 7 This is a block diagram of an electronic device provided in an embodiment of this application. For example, the electronic device 800 may be a mobile phone, computer, digital broadcasting terminal, messaging device, game console, tablet device, medical device, fitness equipment, personal digital assistant, etc.

[0135] Reference Figure 7 The electronic device 800 may include one or more of the following components: processing component 802, memory 804, power component 806, multimedia component 808, audio component 810, input / output (I / O) interface 812, sensor component 814, and communication component 816.

[0136] Processing component 802 typically controls the overall operation of electronic device 800, such as operations associated with display, telephone calls, data communication, camera operation, and recording operations. Processing component 802 may include one or more processors 820 to execute instructions to complete all or part of the steps of the methods described above. Furthermore, processing component 802 may include one or more modules to facilitate interaction between processing component 802 and other components. For example, processing component 802 may include a multimedia module to facilitate interaction between multimedia component 808 and processing component 802.

[0137] Memory 804 is configured to store various types of data to support the operation of electronic device 800. Examples of this data include instructions for any application or method operating on electronic device 800, contact data, phonebook data, messages, pictures, videos, etc. Memory 804 can be implemented by any type of volatile or non-volatile storage device or a combination thereof, such as static random access memory (SRAM), electrically erasable programmable read-only memory (EEPROM), erasable programmable read-only memory (EPROM), programmable read-only memory (PROM), read-only memory (ROM), magnetic storage, flash memory, magnetic disk, or optical disk.

[0138] Power component 806 provides power to various components of electronic device 800. Power component 806 may include a power management system, one or more power supplies, and other components associated with generating, managing, and distributing power to electronic device 800.

[0139] Multimedia component 808 includes a screen that provides an output interface between the electronic device 800 and the user. In some embodiments, the screen may include a liquid crystal display (LCD) and a touch panel (TP). If the screen includes a touch panel, the screen may be implemented as a touchscreen to receive input signals from the user. The touch panel includes one or more touch sensors to sense touches, swipes, and gestures on the touch panel. The touch sensors may sense not only the boundaries of the touch or swipe action but also the duration and pressure associated with the touch or swipe operation. In some embodiments, multimedia component 808 includes a front-facing camera and / or a rear-facing camera. When the electronic device 800 is in an operating mode, such as a shooting mode or a video mode, the front-facing camera and / or the rear-facing camera may receive external multimedia data. Each front-facing camera and rear-facing camera may be a fixed optical lens system or have focal length and optical zoom capabilities.

[0140] Audio component 810 is configured to output and / or input audio signals. For example, audio component 810 includes a microphone (MIC) configured to receive external audio signals when electronic device 800 is in an operating mode, such as call mode, recording mode, and voice recognition mode. The received audio signals may be further stored in memory 804 or transmitted via communication component 816. In some embodiments, audio component 810 also includes a speaker for outputting audio signals.

[0141] I / O interface 812 provides an interface between processing component 802 and peripheral interface modules, such as keyboards, click wheels, buttons, etc. These buttons may include, but are not limited to, home buttons, volume buttons, power buttons, and lock buttons.

[0142] Sensor assembly 814 includes one or more sensors for providing state assessments of various aspects of electronic device 800. For example, sensor assembly 814 can detect the on / off state of electronic device 800, the relative positioning of components such as the display and keypad of electronic device 800, changes in position of electronic device 800 or a component of electronic device 800, the presence or absence of user contact with electronic device 800, orientation or acceleration / deceleration of electronic device 800, and temperature changes of electronic device 800. Sensor assembly 814 may include a proximity sensor configured to detect the presence of nearby objects without any physical contact. Sensor assembly 814 may also include a light sensor, such as a CMOS or CCD image sensor, for use in imaging applications. In some embodiments, sensor assembly 814 may also include an accelerometer, gyroscope, magnetometer, pressure sensor, or temperature sensor.

[0143] Communication component 816 is configured to facilitate wired or wireless communication between electronic device 800 and other devices. Electronic device 800 can access wireless networks based on communication standards, such as WiFi, 4G, or 5G, or combinations thereof. In one exemplary embodiment, communication component 816 receives broadcast signals or broadcast-related information from an external broadcast management system via a broadcast channel. In one exemplary embodiment, communication component 816 also includes a near-field communication (NFC) module to facilitate short-range communication. For example, the NFC module may be implemented based on radio frequency identification (RFID) technology, Infrared Data Association (IrDA) technology, ultra-wideband (UWB) technology, Bluetooth (BT) technology, and other technologies.

[0144] In an exemplary embodiment, the electronic device 800 may be implemented by one or more application-specific integrated circuits (ASICs), digital signal processors (DSPs), digital signal processing devices (DSPDs), programmable logic devices (PLDs), field-programmable gate arrays (FPGAs), controllers, microcontrollers, microprocessors, or other electronic components to perform the methods described above.

[0145] In an exemplary embodiment, a non-transitory computer-readable storage medium including instructions is also provided, such as a memory 804 including instructions, which can be executed by a processor 820 of an electronic device 800 to perform the above-described method. For example, the non-transitory computer-readable storage medium may be a ROM, random access memory (RAM), CD-ROM, magnetic tape, floppy disk, and optical data storage device, etc.

[0146] In the description of this specification, the references to terms such as "one embodiment," "some embodiments," "example," "specific example," or "some examples," etc., refer to specific features, structures, materials, or characteristics described in connection with that embodiment or example, which are included in at least one embodiment or example of this application. In this specification, the illustrative expressions of the above terms do not necessarily refer to the same embodiment or example. Furthermore, the specific features, structures, materials, or characteristics described may be combined in any suitable manner in one or more embodiments or examples. Moreover, without contradiction, those skilled in the art can combine and integrate the different embodiments or examples described in this specification, as well as the features of different embodiments or examples.

[0147] Furthermore, the terms "first" and "second" are used for descriptive purposes only and should not be construed as indicating or implying relative importance or implicitly specifying the number of technical features indicated. Thus, a feature defined as "first" or "second" may explicitly or implicitly include at least one of that feature. In the description of this application, "multiple" means at least two, such as two, three, etc., unless otherwise explicitly specified.

[0148] Any process or method description in the flowchart or otherwise herein can be understood as representing a module, segment, or portion of code comprising one or more executable instructions for implementing custom logic functions or processes, and the scope of the preferred embodiments of this application includes additional implementations in which functions may be performed not in the order shown or discussed, including substantially simultaneously or in reverse order depending on the functions involved, as should be understood by those skilled in the art to which embodiments of this application pertain.

[0149] The logic and / or steps represented in the flowchart or otherwise described herein, for example, can be considered as a sequenced list of executable instructions for implementing logical functions, and can be embodied in any computer-readable medium for use by, or in conjunction with, an instruction execution system, apparatus, or device (such as a computer-based system, a processor-included system, or other system that can fetch and execute instructions from, an instruction execution system, apparatus, or device). For the purposes of this specification, "computer-readable medium" can be any means that can contain, store, communicate, propagate, or transmit programs for use by, or in conjunction with, an instruction execution system, apparatus, or device. More specific examples (a non-exhaustive list) of computer-readable media include: an electrical connection having one or more wires (electronic device), a portable computer disk drive (magnetic device), random access memory (RAM), read-only memory (ROM), erasable and editable read-only memory (EPROM or flash memory), fiber optic devices, and portable optical disc read-only memory (CDROM). Alternatively, the computer-readable medium may be paper or other suitable media on which the program can be printed, since the program can be obtained electronically, for example, by optically scanning the paper or other medium, followed by editing, interpreting, or otherwise processing as necessary, and then stored in a computer memory.

[0150] It should be understood that various parts of this application can be implemented using hardware, software, firmware, or a combination thereof. In the above embodiments, multiple steps or methods can be implemented using software or firmware stored in memory and executed by a suitable instruction execution system. For example, if implemented in hardware as in another embodiment, it can be implemented using any one or a combination of the following techniques known in the art: discrete logic circuits having logic gates for implementing logical functions on data signals, application-specific integrated circuits (ASICs) having suitable combinational logic gates, programmable gate arrays (PGAs), field-programmable gate arrays (FPGAs), etc.

[0151] Those skilled in the art will understand that all or part of the steps of the methods in the above embodiments can be implemented by a program instructing related hardware. The program can be stored in a computer-readable storage medium, and when executed, the program includes one or a combination of the steps of the method embodiments.

[0152] Furthermore, the functional units in the various embodiments of this application can be integrated into a processing module, or each unit can exist physically separately, or two or more units can be integrated into a module. The integrated module can be implemented in hardware or as a software functional module. If the integrated module is implemented as a software functional module and sold or used as an independent product, it can also be stored in a computer-readable storage medium.

[0153] The storage medium mentioned above can be a read-only memory, a disk, or an optical disk, etc. Although embodiments of this application have been shown and described above, it is understood that the above embodiments are exemplary and should not be construed as limiting this application. Those skilled in the art can make changes, modifications, substitutions, and variations to the above embodiments within the scope of this application.

Claims

1. An image processing method, characterized in that, include: Obtain the first layer of the target interface to be displayed by the target application; wherein, the first layer is determined based on the initial layer of the target interface rendered by the graphics processing unit (GPU) in the electronic device; The first layer is color-compensated according to the color compensation information corresponding to the GPU; The target interface is displayed based on the first layer after color compensation.

2. The method as described in claim 1, characterized in that, The step of performing color compensation on the first layer based on the color compensation information corresponding to the GPU includes: The initial values ​​of the color parameters of each first color in the first layer are determined by an independent video memory chip; The independent video memory chip determines the target value of the color parameter of each first color in the first layer based on the initial value of the color parameter of each first color in the first layer and the color compensation information.

3. The method as described in claim 2, characterized in that, The color compensation information includes the correspondence between initial values ​​and target values ​​of color parameters. The step of determining the target values ​​of the color parameters of each first color in the first layer using the independent video memory chip based on the initial values ​​of the color parameters of each first color in the first layer and the color compensation information includes: For each color parameter of the first color, based on the initial value of the color parameter of the first color, the correspondence between the initial value and the target value of the color parameter included in the color compensation information is queried to determine the query result; wherein, the query result is used to indicate whether the color compensation information includes the initial value of the target color parameter that matches the initial value of the color parameter of the first color. Based on the query results, determine the target value of the color parameter of the first color.

4. The method as described in claim 2, characterized in that, The method further includes: Obtain the second layer of the application interface rendered by the GPU and the reference layer of the application interface rendered by the GPU as a reference. The target display screen shows the first image corresponding to the second layer and the reference image corresponding to the reference layer. Determine the differences between the first image and the reference image in the color parameters of each second color; Based on the difference information between the first image and the reference image in the color parameters of each second color, the target value of each color parameter of the second color in the first image is determined. The color compensation information is determined based on the correspondence between the initial values ​​of the color parameters of each of the second colors in the first image and the target values ​​of the color parameters of each of the second colors in the first image.

5. The method as described in claim 4, characterized in that, The difference information includes color difference values. The step of determining the target value of each color parameter of the second color in the first image based on the difference information between the first image and the reference image in each second color parameter includes: For each second color, a target value for the color parameter of the second color in the first image is determined based on the color difference value between the first image and the reference image in terms of the color parameter of the second color.

6. The method as described in claim 4, characterized in that, The difference information includes color difference values ​​and color difference descriptions. The step of determining the target value of each color parameter of the second color in the first image based on the difference information between the first image and the reference image in each second color parameter includes: Based on the color difference description between the first image and the reference image on the color parameters of each second color, a first adjustment value for the color parameter of each second color in the first image is determined. Based on the first adjustment value of the color parameter of each second color in the first image and the color difference value of the color parameter of each second color in the first image, the target adjustment value of the color parameter of each second color in the first image is determined; Based on the target adjustment values ​​of the color parameters of each of the second colors in the first image and the initial values ​​of the color parameters of each of the second colors in the first image, the target values ​​of the color parameters of each of the second colors in the first image are determined.

7. The method as described in claim 6, characterized in that, The step of determining the first adjustment value of the color parameters of each second color in the first image based on the color difference description between the first image and the reference image in each second color parameter includes: The color differences between the first image and the reference image in terms of the color parameters of each second color are described and input into the intent recognition model for intent recognition to obtain the first adjustment value of the color parameters of each second color in the first image.

8. The method according to any one of claims 1-7, characterized in that, Before obtaining the first layer of the target interface to be displayed in the target application, the process includes: Obtain the graphic element information of the target interface; In response to the primitive information being identified as a target identifier, the primitive information is sent to the GPU; The GPU renders the primitive information to obtain the initial layer of the target page; The first layer is determined based on the initial layer.

9. An image processing apparatus, characterized in that, include: The acquisition module is used to acquire the first layer of the target interface to be displayed by the target application; wherein, the first layer is determined based on the initial layer of the target interface rendered by the graphics processing unit (GPU) in the electronic device; The compensation module is used to perform color compensation on the first layer according to the color compensation information corresponding to the GPU; The display module is used to display the target interface based on the first layer after color compensation.

10. An electronic device, characterized in that, It includes a memory, a processor, and a computer program stored in the memory and executable on the processor, wherein when the processor executes the program, it implements the method as described in any one of claims 1-8.

11. A non-transitory computer-readable storage medium having a computer program stored thereon, characterized in that, When the computer program is executed by a processor, it implements the method as described in any one of claims 1-8.

12. A computer program product, characterized in that, Includes a computer program, which, when executed by a processor, implements the method of any one of claims 1-8.