CN114842814B - Color calibration method and device, electronic equipment and storage medium - Google Patents

Color calibration method and device, electronic equipment and storage medium Download PDF

Info

Publication number
CN114842814B
CN114842814B CN202210531158.6A CN202210531158A CN114842814B CN 114842814 B CN114842814 B CN 114842814B CN 202210531158 A CN202210531158 A CN 202210531158A CN 114842814 B CN114842814 B CN 114842814B
Authority
CN
China
Prior art keywords
calibration
target
pixel data
texture data
electronic device
Prior art date
Legal status (The legal status is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the status listed.)
Active
Application number
CN202210531158.6A
Other languages
Chinese (zh)
Other versions
CN114842814A (en
Inventor
黄剑泰
Current Assignee (The listed assignees may be inaccurate. Google has not performed a legal analysis and makes no representation or warranty as to the accuracy of the list.)
Guangdong Oppo Mobile Telecommunications Corp Ltd
Original Assignee
Guangdong Oppo Mobile Telecommunications Corp Ltd
Priority date (The priority date is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the date listed.)
Filing date
Publication date
Application filed by Guangdong Oppo Mobile Telecommunications Corp Ltd filed Critical Guangdong Oppo Mobile Telecommunications Corp Ltd
Priority to CN202210531158.6A priority Critical patent/CN114842814B/en
Publication of CN114842814A publication Critical patent/CN114842814A/en
Application granted granted Critical
Publication of CN114842814B publication Critical patent/CN114842814B/en
Active legal-status Critical Current
Anticipated expiration legal-status Critical

Links

Classifications

    • GPHYSICS
    • G09EDUCATION; CRYPTOGRAPHY; DISPLAY; ADVERTISING; SEALS
    • G09GARRANGEMENTS OR CIRCUITS FOR CONTROL OF INDICATING DEVICES USING STATIC MEANS TO PRESENT VARIABLE INFORMATION
    • G09G5/00Control arrangements or circuits for visual indicators common to cathode-ray tube indicators and other visual indicators
    • G09G5/02Control arrangements or circuits for visual indicators common to cathode-ray tube indicators and other visual indicators characterised by the way in which colour is displayed
    • G09G5/06Control arrangements or circuits for visual indicators common to cathode-ray tube indicators and other visual indicators characterised by the way in which colour is displayed using colour palettes, e.g. look-up tables
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06TIMAGE DATA PROCESSING OR GENERATION, IN GENERAL
    • G06T7/00Image analysis
    • G06T7/90Determination of colour characteristics
    • GPHYSICS
    • G09EDUCATION; CRYPTOGRAPHY; DISPLAY; ADVERTISING; SEALS
    • G09GARRANGEMENTS OR CIRCUITS FOR CONTROL OF INDICATING DEVICES USING STATIC MEANS TO PRESENT VARIABLE INFORMATION
    • G09G5/00Control arrangements or circuits for visual indicators common to cathode-ray tube indicators and other visual indicators
    • G09G5/02Control arrangements or circuits for visual indicators common to cathode-ray tube indicators and other visual indicators characterised by the way in which colour is displayed
    • G09G5/022Control arrangements or circuits for visual indicators common to cathode-ray tube indicators and other visual indicators characterised by the way in which colour is displayed using memory planes

Abstract

A color calibration method and device, an electronic device and a storage medium, wherein the method is applied to the electronic device, the electronic device comprises a graphic processor, and the method can comprise the following steps: and carrying out color calibration on the original pixel data corresponding to the image to be displayed through the graphic processor based on the target texture data to obtain calibration pixel data, wherein the calibration pixel data is used for outputting the display image. The target texture data is obtained by converting a target display lookup table LUT. By implementing the embodiment of the application, the display image to be output by the electronic equipment can be subjected to color calibration through the graphic processor, so that the color deviation of the display image output by the screen of the electronic equipment can be reduced, and the accuracy of the display image content of the electronic equipment can be improved.

Description

Color calibration method and device, electronic equipment and storage medium
Technical Field
The present application relates to the field of screen display technologies, and in particular, to a color calibration method and apparatus, an electronic device, and a storage medium.
Background
Currently, when an electronic device (such as a smart phone, a computer, a television, etc.) outputs a display image through its screen, it is generally required to output based on pixel values of the image content itself. However, in practice, it is found that the display image directly output by the screen often has problems of large color deviation, high distortion degree, and the like, which reduces the accuracy of the electronic device in presenting the image content.
Disclosure of Invention
The embodiment of the application discloses a color calibration method and device, electronic equipment and a storage medium, which can calibrate the color of a display image to be output by the electronic equipment through a graphic processor, thereby reducing the color deviation of the display image output by a screen of the electronic equipment and being beneficial to improving the accuracy of the display image content of the electronic equipment.
An embodiment of the application discloses a color calibration method applied to electronic equipment, wherein the electronic equipment comprises a graphics processor, and the method comprises the following steps:
based on target texture data, performing color calibration on original pixel data corresponding to an image to be displayed through the graphic processor to obtain calibration pixel data, wherein the calibration pixel data is used for outputting the display image;
the target texture data is obtained by converting a target display lookup table LUT.
A second aspect of an embodiment of the present application discloses a color calibration device applied to an electronic apparatus, where the electronic apparatus includes a graphics processor, and the color calibration device includes:
the calibration unit is used for carrying out color calibration on original pixel data corresponding to an image to be displayed through the graphic processor based on target texture data to obtain calibration pixel data, wherein the calibration pixel data is used for outputting the display image;
the target texture data is obtained by converting a target display lookup table LUT.
The third aspect of the embodiment of the application discloses an electronic device, which comprises a memory and a processor, wherein the memory stores a computer program, and the computer program when executed by the processor causes the processor to realize all or part of the steps in any one of the color calibration methods disclosed in the first aspect of the embodiment of the application.
A fourth aspect of the embodiments of the present application discloses a computer readable storage medium storing a computer program, wherein the computer program when executed by a processor implements all or part of the steps of any one of the color calibration methods as disclosed in the first aspect of the embodiments of the present application.
Compared with the related art, the embodiment of the application has the following beneficial effects:
in embodiments of the application, the color calibration method may be applied to an electronic device, which may include a graphics processor (Graphic Processing Unit, GPU). On the basis, the electronic equipment can carry out color calibration on the original pixel data corresponding to the image to be displayed through the graphic processor based on the target texture data to obtain calibrated pixel data, and the calibrated pixel data can be used for outputting the display image. The target texture data may be obtained by converting a target display Look-Up Table LUT (Look-Up Table). Therefore, by implementing the embodiment of the application, the electronic device can perform color calibration on the display image to be output by the electronic device through the built-in GPU, and the process of performing color calibration is realized based on the target texture data converted from the appointed LUT, so that the characteristics of flexible and easy processing of the texture data can be utilized to rapidly provide accurate calibration pixel data. The color calibration method can effectively reduce the color deviation of the display image output by the electronic equipment through the screen, and can simultaneously and conveniently carry out flexible color calibration on various images to be displayed, thereby being beneficial to improving the accuracy and the flexibility of the display image content of the electronic equipment.
Drawings
In order to more clearly illustrate the technical solutions of the embodiments of the present application, the following description will briefly explain the drawings needed in the embodiments, and it is obvious that the drawings in the following description are only some embodiments of the present application and that other drawings can be obtained according to these drawings without inventive effort for a person skilled in the art.
Fig. 1 is a schematic diagram of an application scenario of a color calibration method according to an embodiment of the present application;
FIG. 2 is a schematic diagram showing the effect of color calibration for pixel data according to an embodiment of the present application;
FIG. 3 is a flow chart of a color calibration method according to an embodiment of the present application;
FIG. 4 is a flow chart of another color calibration method according to an embodiment of the present application;
FIG. 5 is a schematic diagram showing an effect of interpolation calculation on pixel data according to an embodiment of the present application;
FIG. 6 is a flow chart of a color calibration method according to an embodiment of the present application;
FIG. 7 is a schematic diagram of a frame corresponding to a color calibration method according to an embodiment of the present application;
FIG. 8 is a schematic diagram of a color calibration device according to an embodiment of the present application;
fig. 9 is a schematic diagram of an electronic device according to an embodiment of the present application.
Detailed Description
The following description of the embodiments of the present application will be made clearly and completely with reference to the accompanying drawings, in which it is apparent that the embodiments described are only some embodiments of the present application, but not all embodiments. All other embodiments, which can be made by those skilled in the art based on the embodiments of the application without making any inventive effort, are intended to be within the scope of the application.
It should be noted that the terms "comprises" and "comprising," and any variations thereof, in embodiments of the application, are intended to cover a non-exclusive inclusion, such that a process, method, system, article, or apparatus that comprises a list of steps or elements is not necessarily limited to those steps or elements expressly listed or inherent to such process, method, article, or apparatus.
The embodiment of the application discloses a color calibration method and device, electronic equipment and a storage medium, which can reduce the color deviation of a screen output display image of the electronic equipment and are beneficial to improving the accuracy of the image content of the electronic equipment. .
The following detailed description will be given with reference to the accompanying drawings.
Referring to fig. 1, fig. 1 is a schematic view of an application scenario of a color calibration method according to an embodiment of the application, which includes an electronic device 10, wherein the electronic device 10 may include a graphics processor 11 (Graphic Processing Unit, GPU) and a screen 12. The graphics processor 11 is disposed inside the electronic device 10, and may be used to perform various image processing (such as color calibration and distortion correction) on the image to be displayed that is transmitted to the graphics processor 11, where the processed image may be directly or indirectly output to the screen 12 for display. Alternatively, the image to be displayed may be transmitted to the graphics processor 11 by another module (not shown) built in the electronic device 10, for example, a central processing unit (Central Processing Unit, CPU), an image signal processor (Image Signal Processor, ISP), etc., which is not particularly limited in the embodiment of the present application.
The electronic device 10 may include various devices or systems with a screen display function, such as a computer, a tablet computer, a smart phone, a smart watch, a smart bracelet, etc., which are not limited in the embodiment of the present application. Further, the electronic device 10 may be equipped with an operating system, such as an Android (Android) operating system, an iOS operating system, a sambian (Symbian) operating system, windows and Windows Phone operating systems, etc., to implement system functions of image processing, output display, etc., of an image to be displayed. It will be appreciated that the electronic device 10 shown in fig. 1 is a smart phone, which is merely an example and should not be construed as limiting the device type of the electronic device 10 in the embodiments of the present application.
Taking the electronic device 10 with the android operating system as an example, the electronic device 10 may further execute corresponding sending and displaying processing on the image to be displayed processed by the graphics processor 11 through a display hardware processing module (Hardware Composer, HWC, not shown), so that the image to be displayed after the sending and displaying processing may meet the display requirement of the screen 12, and further, the screen 12 may output a corresponding display image. The HWC module may be implemented in a HAL layer (Hardware Abstraction Layer ) of the android operating system, and is specifically used for synthesizing and displaying windows (layers). For example, after the electronic device 10 performs the image processing on the image to be displayed through the graphics processor 11, the image to be displayed and other required graphics or window materials (collectively referred to as layers) may be further transmitted to the HWC module through the surface eflinger service, and the HWC module synthesizes the image to be displayed, so as to obtain an image to be displayed that meets the display requirement of the screen 12, and further, the image to be displayed may be transmitted to the display driver of the screen 12, and finally, the corresponding display image is output on the screen 12.
In the embodiment of the present application, since the display image directly output by the screen 12 often has the problems of large color deviation, high distortion degree, etc., in order to solve the problem, the above-mentioned graphics processor 11 may perform color calibration on the corresponding image to be displayed before the display image is actually output by the screen 12. For example, the electronic device 10 may perform color calibration on the original pixel data corresponding to the image to be displayed by using the graphics processor 11 based on the target texture data to obtain calibrated pixel data, and transmit the calibrated pixel data to the HWC module for outputting the display image. The target texture data may be obtained by converting a target display Look-Up Table LUT (Look-Up Table), which may be determined based on an application scenario in which the electronic device 10 is currently located, a currently used application program, and the like.
In some embodiments, if the image to be displayed includes only one color channel (such as a gray scale image, etc.), the electronic device 10 may determine, by using the built-in graphics processor 11, calibration pixel data corresponding to original pixel data on the color channel based on the target texture data. In other embodiments, if the image to be displayed includes more than one color channel (e.g., RGB image including three color channels of red R, green G, and blue B, etc.), the electronic device 10 may determine the calibration pixel data corresponding to the original pixel data on each color channel based on the target texture data through the built-in graphics processor 11. Illustratively, as shown in fig. 2, for the respective original pixel data R1, G1, B1 on the three color channels R, G, B, the above-mentioned color calibration process is performed by the graphics processor 11, so that the corresponding calibrated pixel data R2, G2, B2 on the three color channels R, G, B can be obtained. On this basis, the graphic processor 11 may transmit the calibration pixel data to the HWC module, so that the HWC module may perform corresponding display processing, and finally output the color-calibrated display image on the screen 12.
By implementing the color calibration method, the electronic device 10 can perform color calibration on the display image to be output by the electronic device 10 through the built-in graphics processor 11, and the process of performing color calibration is realized based on the target texture data converted from the specified LUT, so that accurate calibration pixel data can be rapidly provided by utilizing the characteristic that the texture data is flexible and easy to process. The color calibration method can effectively reduce the color deviation of the display image output by the electronic equipment 10 through the screen 12, and can conveniently perform flexible color calibration on various images to be displayed, thereby being beneficial to improving the accuracy and flexibility of the display image content of the electronic equipment 10.
Referring to fig. 3, fig. 3 is a schematic flow chart of a color calibration method according to an embodiment of the application, and the color calibration method can be applied to the electronic device, which may include a graphics processor. As shown in fig. 3, the color calibration method may include the steps of:
302. based on the target texture data, performing color calibration on original pixel data corresponding to the image to be displayed through a graphics processor to obtain calibration pixel data, wherein the calibration pixel data is used for outputting the display image; the target texture data is obtained by converting a target display lookup table LUT.
In the embodiment of the application, the electronic equipment can calibrate the color of the image to be displayed through the built-in graphic processor. Specifically, the graphics processor may perform a calculation process related to color calibration on raw pixel data corresponding to an image to be displayed based on target texture data obtained by the target LUT conversion, to obtain corresponding calibrated pixel data. On the basis of this, the electronic device can output a corresponding display image on the screen in a subsequent step on the basis of the calibration pixel data it has obtained.
The target LUT refers to a display lookup table adopted by the electronic device in the process of performing color calibration, and the target LUT may include a mapping relationship between specified original pixel data and calibration pixel data, so that the original pixel data included in the target LUT is used as input, and the calibration pixel data having a mapping relationship only with the original pixel data can be found. For example, for a one-dimensional LUT (1 DLUT), if the input original pixel data includes a pixel value A1 on a single color channel, it is possible to find whether or not there is a pixel value A2 corresponding to A1 on the one-dimensional LUT, and take the found A2 as calibration pixel data; also by way of example, for a three-dimensional LUT (3D LUT), if the input raw pixel data includes respective pixel values (R1, G1, B1) on three color channels, it is possible to find whether a set of pixel values (R2, G2, B2) corresponding to (R1, G1, B1) exists on the three-dimensional LUT, and take the found set of pixel values (R2, G2, B2) as calibration pixel data.
It should be noted that, for different application scenarios where the electronic device is currently located, different application programs currently used, and the like, the target LUT adopted by the electronic device may be correspondingly different. After determining the target LUT, the electronic device may convert the target LUT to obtain corresponding target texture data, and apply the target texture data to a subsequent actual color calibration process.
The target texture data refers to texture type (texture) data obtained by converting the target LUT, the target texture data can realize a similar search function as the target LUT, and compared with the target LUT, the graphics processor is more flexible in processing and application of the target texture data, and can conveniently utilize the target texture data to perform numerical operations such as interpolation, thereby being beneficial to accurately and flexibly determining calibration pixel data matched with original pixel data corresponding to an image to be displayed.
Optionally, in the process of converting the target LUT to obtain the target texture data, the pixel value range of the target LUT may be extended, or may not be extended. For example, for a three-dimensional LUT, the look-up table size may be n×n (N is a positive integer, e.g., 17, 19, 33, etc.), then the pixel value range may include N discrete pixel values in [0,255 ]; after the conversion to obtain the corresponding target texture data, the size of the target texture data may be m×m (M is a positive integer, and M is greater than or equal to N), and the pixel value range may include M discrete pixel values in [0,255 ]. And the subsequent color calibration processing is carried out through the expanded target texture data, so that the actual calculated amount is reduced, and the efficiency and the flexibility of the image processor for carrying out color calibration on the image to be displayed are improved.
In the embodiment of the application, according to the number of color channels included in the image to be displayed, which is required to be color calibrated, target LUTs with different dimension numbers can be adopted, so that target texture data with corresponding dimension numbers can be obtained through conversion according to the target LUTs, and the target texture data can be used for respectively realizing color calibration for original pixel data on each color channel.
In some embodiments, if the image to be displayed includes only one color channel, the target LUT may be a one-dimensional LUT, and accordingly, the target texture data obtained by converting the one-dimensional LUT may include one-dimensional texture data. It should be noted that, when the graphics processor performs color calibration on the original pixel data corresponding to the image to be displayed according to the one-dimensional texture data, only the pixel value on the one color channel may be used as input to obtain the output pixel values on one or more color channels as calibration pixel data matched with the original pixel data.
In other embodiments, if the image to be displayed includes a plurality of color channels, for example, an RGB image including three color channels of red R, green G, and blue B, the target LUT may be a three-dimensional LUT, and correspondingly, the target texture data obtained by converting the three-dimensional LUT may include three-dimensional texture data. When the graphics processor performs color calibration on the original pixel data corresponding to the image to be displayed according to the three-dimensional texture data, each pixel value on the three color channels can be used as input to obtain the output pixel values on the corresponding three color channels, and the output pixel values are used as calibration pixel data matched with the original pixel data.
Therefore, by implementing the color calibration method described in the above embodiment, the electronic device can perform color calibration on the display image to be output by the electronic device through the GPU built in the electronic device, and the process of performing color calibration is implemented based on the target texture data converted from the specified LUT, so that accurate calibration pixel data can be rapidly provided by utilizing the flexible and easy-to-process characteristics of the texture data. The color calibration method can effectively reduce the color deviation of the display image output by the electronic equipment through the screen, and can simultaneously and conveniently carry out flexible color calibration on various images to be displayed, thereby being beneficial to improving the accuracy and the flexibility of the display image content of the electronic equipment.
Referring to fig. 4, fig. 4 is a flowchart of another color calibration method according to an embodiment of the application, and the color calibration method can be applied to the electronic device, which may include a graphics processor. As shown in fig. 4, the color calibration method may include the steps of:
402. based on the three-dimensional texture data, determining, by a graphics processor, each calibration pixel data that matches the original pixel data of each color channel corresponding to the image to be displayed, wherein the number of color channels is less than or equal to 3.
In the embodiment of the present application, for an image to be displayed including three color channels (for example, an RGB image including three color channels of red R, green G, and blue B, etc.), target texture data used by the graphics processor in performing color calibration on the image to be displayed may include three-dimensional texture data, which may be obtained by converting a three-dimensional LUT. It should be noted that the three-dimensional texture data may be used to perform color calibration on an image to be displayed including at most three color channels, so that each calibration pixel data that matches the original pixel data of each color channel corresponding to the image to be displayed may be determined.
In some embodiments, the graphics processor performs color calibration on the image to be displayed, which may be implemented by interpolation. The electronic device may perform interpolation calculation on the original pixel data corresponding to the image to be displayed by using the graphics processor of the electronic device based on the target texture data, to obtain calibration pixel data within a pixel value range corresponding to the current color mode. The pixel value range corresponding to the target texture data may be a subset of the pixel value range corresponding to the current color mode.
The current color mode of the electronic device may be determined by an application scenario where the electronic device is currently located, an application program currently used, and the like, which are not particularly limited in the embodiment of the present application. Alternatively, different color modes applicable to the electronic device may correspond to different numbers of color channels, or may correspond to the same number of color channels (e.g., each corresponding to three color channels); in the same color mode, the pixel value ranges corresponding to different color channels may be the same or different.
After determining the current color mode of the electronic device, the graphics processor may perform interpolation calculation on original pixel data corresponding to the image to be displayed by using the target texture data within a pixel value range corresponding to the current color mode. Since the pixel value range corresponding to the target texture data (for example, M discrete pixel values in [0,255], where M is a positive integer) is a subset of the pixel value range corresponding to the current color mode (for example, [0,255 ]), by the interpolation calculation, whether the original pixel data is included in the pixel value range corresponding to the target texture data or not can be determined, and the calibration pixel data which matches the original pixel data and conforms to the texture features corresponding to the target texture data can be determined, thereby being beneficial to improving the flexibility and reliability of color calibration of the image to be displayed by the electronic device.
Taking the example that the target texture data comprises three-dimensional texture data, the graphics processor can perform tri-linear interpolation calculation on original pixel data corresponding to the image to be displayed based on the three-dimensional texture data to obtain corresponding calibration pixel data. Referring to fig. 5, fig. 5 is a schematic diagram illustrating an effect of interpolation calculation on pixel data according to an embodiment of the present application. As shown in FIG. 5, the graphics processor may actually interpolate linearly 7 times based on point C 000 、C 001 、C 010 、C 100 、C 011 、C 101 、C 110 、C 111 And respectively corresponding calibration pixel data, and acquiring the calibration pixel data corresponding to the point C. Specifically, the 7-time linear interpolation includes the step of interpolating the point C 000 、C 001 、C 010 、C 100 、C 011 、C 101 、C 110 、C 111 Interpolation 4 times is performed to obtain point C 00 、C 01 、C 10 、C 11 The method comprises the steps of carrying out a first treatment on the surface of the Point-to-point C 00 、C 01 、C 10 、C 11 Interpolation 2 times is performed to obtain point C 0 、C 1 The method comprises the steps of carrying out a first treatment on the surface of the Point-to-point C 0 、C 1 The interpolation is performed 1 time to obtain point C.
Therefore, by implementing the color calibration method described in the above embodiment, the electronic device may perform color calibration on the display image to be output by the electronic device through the GPU built in the electronic device, and the color calibration process is implemented based on the target texture data converted by the specified LUT, which not only can effectively reduce the color deviation of the display image output by the electronic device through the screen thereof, but also can perform flexible color calibration on various images to be displayed conveniently, thereby being beneficial to improving the accuracy and flexibility of the content of the display image of the electronic device. In addition, the calibration pixel data are obtained in an interpolation mode, so that the calibration pixel data which accords with the texture characteristics corresponding to the target texture data can be obtained, the flexibility and the reliability of the electronic equipment for carrying out color calibration on the image to be displayed can be improved, the output display image can be adapted to the display characteristics of the screen of the electronic equipment, and the watching effect and the use experience of a user can be improved effectively.
Referring to fig. 6, fig. 6 is a flowchart of another color calibration method according to an embodiment of the application, and the color calibration method can be applied to the electronic device, which may include a graphics processor. As shown in fig. 6, the color calibration method may include the steps of:
602. the target LUT corresponding to the current color mode of the electronic device is read from the display hardware processing module HWC.
In the embodiment of the application, when the electronic equipment performs color calibration on the image to be processed by using the graphics processor, the related service for realizing three-dimensional LUT searching by using hardware can be closed, so that the image to be displayed after being processed by the graphics processor is prevented from being subjected to the traditional LUT-based searching calibration process by the HWC module. On this basis, the electronic device may read a target LUT corresponding to the current color mode of the electronic device through the HWC module, and convert the target LUT into target texture data in a subsequent step to apply it in a subsequent actual color calibration process.
For example, taking an android operating system as an example, the electronic device may create an HIDL Service, read the target LUT from the HWC module by calling the interface of the Service, and then may acquire the target LUT through the SurfaceFlinger Service in a subsequent step, and convert the target LUT into corresponding target texture data.
As an alternative embodiment, the current color mode of the electronic device may be determined by the application scenario in which the electronic device is currently located. For example, the electronic device may determine, from at least one target color mode, a current color mode corresponding to an application scene in which the electronic device is currently located, based on the application scene. For example, if the electronic device is in the fingerprint unlocking scene, in order to avoid the jump of the color temperature of the image displayed on the screen before and after unlocking, the color mode required for adjusting the color temperature of the fingerprint layer may be used as the color mode corresponding to the fingerprint unlocking scene, so that the electronic device may determine the current color mode from at least one set target color mode, and further may read the target LUT corresponding to the current color mode from the HWC module. The target texture data obtained through conversion of the target LUT is used for carrying out corresponding color calibration on the fingerprint layer, so that the color temperature jump problem can be avoided, and the experience of a user for carrying out fingerprint unlocking by using the electronic equipment is improved.
604. And converting the target LUT to obtain target texture data corresponding to the current color mode, and transmitting the target texture data to the graphic processor.
In the embodiment of the present application, taking the android operating system as an example, the electronic device may convert the target LUT obtained from the HWC module into corresponding target texture data through the above-mentioned surfeflinger service, and apply the target texture data to the actual color calibration process in the subsequent step.
Alternatively, for different texture data, the electronic device may be differentiated by a corresponding texture identification (e.g., a numeric identification, a character identification, etc.). For example, after the electronic device acquires the target LUT, a texture identifier corresponding to a current color mode of the electronic device may be created, and then after the target LUT is converted into target texture data corresponding to the current color mode, the target texture data may be marked by the texture identifier. On the basis, the electronic equipment can transmit the marked target texture data to the graphic processor so that the graphic processor can perform numerical operations such as interpolation and the like on the original pixel data corresponding to the image to be displayed by adopting the specified target texture data to obtain corresponding calibration pixel data.
606. And carrying out interpolation calculation on the original pixel data corresponding to the image to be displayed through the graphic processor based on the target texture data to obtain calibration pixel data in a pixel value range corresponding to the current color mode.
Step 606 is similar to step 402, and will not be described herein. It should be noted that, the pixel value range corresponding to the target texture data should be a subset of the pixel value range corresponding to the current color mode of the electronic device.
608. The calibration pixel data is transmitted to the HWC.
610. The calibration pixel data is subjected to display processing by HWC to output a display image conforming to the current color mode described above on a screen of the electronic device.
In the embodiment of the application, the calibration pixel data corresponding to the image to be displayed, which is obtained by performing color calibration through the graphic processor, can be transmitted to the HWC module by the graphic processor, and the HWC module executes corresponding sending and displaying processing, so that the image to be displayed after the sending and displaying processing can meet the display requirement of the screen of the electronic equipment, and the corresponding display image can be further output by the screen.
Referring to fig. 7, fig. 7 is a schematic diagram of a frame corresponding to a color calibration method according to an embodiment of the application. As shown in fig. 7, the electronic device may read the target LUT from the HWC module through the HIDL Service, and may further convert the target LUT into corresponding target texture data through the surfeflinger Service. On the basis, the electronic equipment can perform color calibration on the original pixel data corresponding to the image to be displayed according to the target texture data through the graphic processor of the electronic equipment, so as to obtain corresponding calibrated pixel data. The calibration pixel data may be transmitted by the image processor to the HWC module, and the HWC module may perform the above-mentioned display processing on the calibration pixel data, and finally output a color-calibrated display image on the screen.
Therefore, by implementing the color calibration method described in the above embodiment, the electronic device may perform color calibration on the display image to be output by the electronic device through the GPU built in the electronic device, and the color calibration process is implemented based on the target texture data converted by the specified LUT, which not only can effectively reduce the color deviation of the display image output by the electronic device through the screen thereof, but also can perform flexible color calibration on various images to be displayed conveniently, thereby being beneficial to improving the accuracy and flexibility of the content of the display image of the electronic device. In addition, the process before and after the color calibration of the graphics processor is assisted by the display hardware processing module HWC, so that the computing process related to the color calibration is favorably concentrated on the graphics processor, the whole flow can be optimized, and the efficiency and the reliability of the electronic equipment for carrying out the color calibration on the image to be displayed are improved.
Referring to fig. 8, fig. 8 is a schematic diagram of a color calibration device according to an embodiment of the application, which can be applied to the electronic device described above, and the electronic device can include a graphics processor. As shown in fig. 8, the color calibration device may include a calibration unit 801, in which:
a calibration unit 801, configured to perform color calibration on original pixel data corresponding to an image to be displayed through a graphics processor based on target texture data, to obtain calibration pixel data, where the calibration pixel data is used to output the display image;
the target texture data is obtained by converting a target display lookup table LUT.
Therefore, with the color calibration device described in the above embodiment, the electronic device may perform color calibration on the display image to be output by using the GPU built in the electronic device, and the process of performing color calibration is implemented based on the target texture data converted from the specified LUT, so that accurate calibration pixel data can be provided quickly by using the flexible and easy-to-process feature of the texture data. The color calibration method can effectively reduce the color deviation of the display image output by the electronic equipment through the screen, and can simultaneously and conveniently carry out flexible color calibration on various images to be displayed, thereby being beneficial to improving the accuracy and the flexibility of the display image content of the electronic equipment.
In one embodiment, the target texture data may include three-dimensional texture data, which may be obtained by converting a three-dimensional LUT, and the calibration unit 801 may specifically be configured to:
based on the three-dimensional texture data, determining, by a graphics processor, each calibration pixel data that matches the original pixel data of each color channel corresponding to the image to be displayed, wherein the number of color channels is less than or equal to 3.
As an alternative embodiment, the specific process of determining the calibration pixel data by the calibration unit 801 may include:
and carrying out interpolation calculation on original pixel data corresponding to the image to be displayed through a graphic processor based on the target texture data to obtain calibration pixel data in a pixel value range corresponding to the current color mode, wherein the pixel value range corresponding to the target texture data is a subset of the pixel value range corresponding to the current color mode.
In one embodiment, the color calibration device may further include an acquisition unit and a conversion unit, which are not illustrated, wherein:
an obtaining unit, configured to obtain, based on the target texture data, a target LUT corresponding to a current color mode of the electronic device before performing color calibration on raw pixel data corresponding to an image to be displayed by the graphics processor to obtain calibrated pixel data;
and the conversion unit is used for converting the target LUT to obtain target texture data corresponding to the current color mode and transmitting the target texture data to the graphic processor.
In an embodiment, the color calibration device may further comprise a determining unit, not shown, wherein:
and the determining unit is used for determining the current color mode corresponding to the application scene from at least one target color mode based on the application scene where the electronic equipment is currently located.
In one embodiment, the acquiring unit may specifically be configured to:
reading a target LUT corresponding to a current color mode of the electronic equipment from a display hardware processing module HWC;
the conversion unit may be specifically configured to:
creating a texture identifier corresponding to the current color mode;
converting the target LUT into target texture data corresponding to the current color mode, and marking the target texture data through the texture identification;
and transmitting the marked target texture data to a graphics processor.
In one embodiment, the color calibration device may further include a transmission unit and a display unit, which are not shown, wherein:
a transmission unit, configured to transmit the calibration pixel data to the HWC after the calibration pixel data is obtained by the calibration unit 801;
and the transmitting and displaying unit is used for performing display processing on the calibration pixel data through the HWC so as to output a display image which accords with the current color mode on a screen of the electronic equipment.
Therefore, by adopting the color calibration device described in the above embodiment, the electronic device can perform color calibration on the display image to be output by the electronic device through the GPU built in the electronic device, and the process of performing color calibration is realized based on the target texture data converted by the specified LUT, so that the color deviation of the display image output by the electronic device through the screen of the electronic device can be effectively reduced, and meanwhile, various images to be displayed can be flexibly and conveniently calibrated, thereby being beneficial to improving the accuracy and flexibility of the content of the display image of the electronic device. In addition, the calibration pixel data are obtained in an interpolation mode, so that the calibration pixel data which accords with the texture characteristics corresponding to the target texture data can be obtained, the flexibility and the reliability of the electronic equipment for carrying out color calibration on the image to be displayed can be improved, the output display image can be adapted to the display characteristics of the screen of the electronic equipment, and the watching effect and the use experience of a user can be effectively improved. In addition, the process before and after the color calibration of the graphics processor is assisted by the display hardware processing module HWC, so that the computing process related to the color calibration is favorably concentrated on the graphics processor, the whole flow can be optimized, and the efficiency and the reliability of the electronic equipment for carrying out the color calibration on the image to be displayed are further improved.
Referring to fig. 9, fig. 9 is a schematic diagram of an electronic device according to an embodiment of the application. As shown in fig. 9, the electronic device may include:
a memory 901 storing executable program code;
a processor 902 coupled to the memory 901;
wherein the processor 902 invokes executable program code stored in the memory 901, which may perform all or part of the steps of any of the color calibration methods described in the above embodiments as applied to an electronic device.
Further, the embodiment of the present application further discloses a computer-readable storage medium storing a computer program for electronic data exchange, wherein the computer program enables a computer to perform all or part of the steps of any one of the color calibration methods described in the above embodiments applied to an electronic device.
Furthermore, embodiments of the present application further disclose a computer program product which, when run on a computer, enables the computer to perform all or part of the steps of any of the color calibration methods described in the above embodiments as applied to electronic devices.
Those of ordinary skill in the art will appreciate that all or part of the steps of the various methods of the above embodiments may be implemented by a program that instructs associated hardware, the program may be stored in a computer readable storage medium including Read-Only Memory (ROM), random access Memory (Random Access Memory, RAM), programmable Read-Only Memory (Programmable Read-Only Memory, PROM), erasable programmable Read-Only Memory (Erasable Programmable Read Only Memory, EPROM), one-time programmable Read-Only Memory (OTPROM), electrically erasable programmable Read-Only Memory (EEPROM), compact disc Read-Only Memory (Compact Disc Read-Only Memory, CD-ROM) or other optical disk Memory, magnetic disk Memory, tape Memory, or any other medium that can be used for carrying or storing data that is readable by a computer.
The above describes in detail a color calibration method and apparatus, an electronic device, and a storage medium disclosed in the embodiments of the present application, and specific examples are applied to illustrate the principles and embodiments of the present application, where the above description of the embodiments is only for helping to understand the method and core ideas of the present application; meanwhile, as those skilled in the art will have variations in the specific embodiments and application scope in accordance with the ideas of the present application, the present description should not be construed as limiting the present application in view of the above.

Claims (9)

1. A color calibration method for use with an electronic device, the electronic device including a graphics processor, the method comprising:
reading a target display lookup table LUT corresponding to the current color mode of the electronic equipment from a display hardware processing module HWC;
converting the target display lookup table LUT to obtain target texture data corresponding to the current color mode, and transmitting the target texture data to the graphic processor;
and carrying out color calibration on original pixel data corresponding to the image to be displayed through the graphic processor based on the target texture data to obtain calibration pixel data, wherein the calibration pixel data is used for outputting the display image.
2. The method of claim 1, wherein the target texture data comprises three-dimensional texture data, the three-dimensional texture data being obtained by converting a three-dimensional LUT; the step of performing color calibration on the original pixel data corresponding to the image to be displayed by the graphics processor based on the target texture data to obtain calibrated pixel data includes:
and determining, by the graphics processor, respective calibration pixel data that match original pixel data of respective color channels corresponding to an image to be displayed based on the three-dimensional texture data, wherein the number of color channels is less than or equal to 3.
3. The method according to claim 1, wherein performing, by the graphics processor, color calibration on raw pixel data corresponding to an image to be displayed based on the target texture data, to obtain calibrated pixel data, includes:
and carrying out interpolation calculation on the original pixel data corresponding to the image to be displayed through the graphic processor based on the target texture data to obtain calibration pixel data in a pixel value range corresponding to the current color mode, wherein the pixel value range corresponding to the target texture data is a subset of the pixel value range corresponding to the current color mode.
4. The method according to claim 1, characterized in that before said reading from the display hardware processing module HWC a target display look-up table LUT corresponding to the current color mode of the electronic device, the method further comprises:
and determining a current color mode corresponding to the application scene from at least one target color mode based on the application scene where the electronic equipment is currently located.
5. The method of claim 1, wherein converting the target display look-up table LUT to obtain target texture data corresponding to the current color mode and transmitting the target texture data to the graphics processor comprises:
creating a texture identifier corresponding to the current color mode;
converting the target display lookup table LUT into target texture data corresponding to the current color mode, and marking the target texture data through the texture identifier;
and transmitting the marked target texture data to the graphic processor.
6. The method of claim 5, wherein after performing color calibration on the raw pixel data corresponding to the image to be displayed by the graphics processor based on the target texture data to obtain calibrated pixel data, the method further comprises:
transmitting the calibration pixel data to the HWC;
and performing display processing on the calibration pixel data through the HWC so as to output a display image conforming to the current color mode on a screen of the electronic device.
7. A color calibration device for use with an electronic device, the electronic device including a graphics processor, the color calibration device comprising:
an obtaining unit, configured to read a target display look-up table LUT corresponding to a current color mode of the electronic device from a display hardware processing module HWC;
the conversion unit is used for converting the target display lookup table LUT to obtain target texture data corresponding to the current color mode and transmitting the target texture data to the graphic processor;
and the calibration unit is used for carrying out color calibration on the original pixel data corresponding to the image to be displayed through the graphic processor based on the target texture data to obtain calibration pixel data, and the calibration pixel data is used for outputting the display image.
8. An electronic device comprising a memory and a processor, wherein the memory stores a computer program that, when executed by the processor, causes the processor to implement the method of any of claims 1-6.
9. A computer readable storage medium, on which a computer program is stored, characterized in that the computer program, when being executed by a processor, implements the method according to any one of claims 1 to 6.
CN202210531158.6A 2022-05-16 2022-05-16 Color calibration method and device, electronic equipment and storage medium Active CN114842814B (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN202210531158.6A CN114842814B (en) 2022-05-16 2022-05-16 Color calibration method and device, electronic equipment and storage medium

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN202210531158.6A CN114842814B (en) 2022-05-16 2022-05-16 Color calibration method and device, electronic equipment and storage medium

Publications (2)

Publication Number Publication Date
CN114842814A CN114842814A (en) 2022-08-02
CN114842814B true CN114842814B (en) 2023-12-08

Family

ID=82569207

Family Applications (1)

Application Number Title Priority Date Filing Date
CN202210531158.6A Active CN114842814B (en) 2022-05-16 2022-05-16 Color calibration method and device, electronic equipment and storage medium

Country Status (1)

Country Link
CN (1) CN114842814B (en)

Citations (8)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
WO1990015404A1 (en) * 1989-05-30 1990-12-13 Eastman Kodak Company Apparatus for interfacing video frame store with color display device
JP2000115558A (en) * 1998-10-08 2000-04-21 Mitsubishi Electric Corp Color characteristic description device, color management device, image converter and color correction method
CN101461250A (en) * 2006-06-02 2009-06-17 汤姆逊许可公司 Converting a colorimetric transform from an input color space to an output color space
CN111770320A (en) * 2020-07-14 2020-10-13 深圳市洲明科技股份有限公司 Color correction method and device, color correction equipment and storage medium
CN112530382A (en) * 2019-09-19 2021-03-19 华为技术有限公司 Method and device for adjusting picture color of electronic equipment
CN112967193A (en) * 2021-03-02 2021-06-15 Oppo广东移动通信有限公司 Image calibration method and device, computer readable medium and electronic equipment
CN113360691A (en) * 2021-06-07 2021-09-07 Tcl通讯(宁波)有限公司 Color style display processing method and device, terminal equipment and storage medium
CN114359305A (en) * 2021-12-31 2022-04-15 Oppo广东移动通信有限公司 Image processing method, image processing device, electronic equipment and computer readable storage medium

Family Cites Families (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US20160217766A1 (en) * 2015-01-23 2016-07-28 Dell Products, Lp System and Method for Sub-Pixel Color Management

Patent Citations (8)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
WO1990015404A1 (en) * 1989-05-30 1990-12-13 Eastman Kodak Company Apparatus for interfacing video frame store with color display device
JP2000115558A (en) * 1998-10-08 2000-04-21 Mitsubishi Electric Corp Color characteristic description device, color management device, image converter and color correction method
CN101461250A (en) * 2006-06-02 2009-06-17 汤姆逊许可公司 Converting a colorimetric transform from an input color space to an output color space
CN112530382A (en) * 2019-09-19 2021-03-19 华为技术有限公司 Method and device for adjusting picture color of electronic equipment
CN111770320A (en) * 2020-07-14 2020-10-13 深圳市洲明科技股份有限公司 Color correction method and device, color correction equipment and storage medium
CN112967193A (en) * 2021-03-02 2021-06-15 Oppo广东移动通信有限公司 Image calibration method and device, computer readable medium and electronic equipment
CN113360691A (en) * 2021-06-07 2021-09-07 Tcl通讯(宁波)有限公司 Color style display processing method and device, terminal equipment and storage medium
CN114359305A (en) * 2021-12-31 2022-04-15 Oppo广东移动通信有限公司 Image processing method, image processing device, electronic equipment and computer readable storage medium

Also Published As

Publication number Publication date
CN114842814A (en) 2022-08-02

Similar Documents

Publication Publication Date Title
JP5296889B2 (en) Image processing apparatus and image processing method
JP4375781B2 (en) Image processing apparatus, image processing method, program, and recording medium
CN101049008B (en) Image processing apparatus and image processing method
JP4196845B2 (en) Image processing device
EP1914980A1 (en) Apparatus and method for improving visibility of image
EP3070925B1 (en) Color matching for imaging systems
CN110392243B (en) Method and apparatus for gamut mapping
US8111430B2 (en) Color conversion apparatus and method
CN107533832B (en) Image processing apparatus, image processing method, and program
US20180352263A1 (en) Method and device for processing color image data representing colors of a color gamut
US20070053023A1 (en) Color processing apparatus and its method
CN109255774B (en) Image fusion method, device and equipment
CN115023729A (en) Method for converting an image and corresponding device
US7826111B2 (en) Color conversion method using a colors look-up table
US10453171B2 (en) Multiple stage memory loading for a three-dimensional look up table used for gamut mapping
CN114842814B (en) Color calibration method and device, electronic equipment and storage medium
CN109471686B (en) System and method for rendering graphical assets
US20170124963A1 (en) Display adjustment method and electronic device thereof
EP1229733A2 (en) System and Method for gamut mapping using a composite color space
CN116248846A (en) Color correction method and device
US20210297558A1 (en) Cubiform method
WO2018003938A1 (en) Video signal processing device, video signal processing method, and program
JP2019095711A (en) Correction data generation device, display device, correction data generation method, and program
JP2019149106A (en) Image processor, image processing method, and program
TWI817601B (en) Color correction method and color correction device

Legal Events

Date Code Title Description
PB01 Publication
PB01 Publication
SE01 Entry into force of request for substantive examination
SE01 Entry into force of request for substantive examination
GR01 Patent grant
GR01 Patent grant