CN114842814A - 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
CN114842814A
CN114842814A CN202210531158.6A CN202210531158A CN114842814A CN 114842814 A CN114842814 A CN 114842814A CN 202210531158 A CN202210531158 A CN 202210531158A CN 114842814 A CN114842814 A CN 114842814A
Authority
CN
China
Prior art keywords
target
calibration
pixel data
electronic device
image
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.)
Granted
Application number
CN202210531158.6A
Other languages
Chinese (zh)
Other versions
CN114842814B (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

Images

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

Landscapes

  • Engineering & Computer Science (AREA)
  • Physics & Mathematics (AREA)
  • General Physics & Mathematics (AREA)
  • Theoretical Computer Science (AREA)
  • Computer Hardware Design (AREA)
  • Computer Vision & Pattern Recognition (AREA)
  • Image Processing (AREA)
  • Facsimile Image Signal Circuits (AREA)

Abstract

A color calibration method and device, an electronic device and a storage medium are provided, the method is applied to the electronic device, the electronic device comprises a graphic processor, and the method can comprise the following steps: and based on the target texture data, carrying out color calibration on original pixel data corresponding to the image to be displayed through the 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 look-up table LUT. By implementing the embodiment of the application, the color calibration can be performed on the display image to be output by the electronic equipment through the graphic processor, so that the color deviation of the display image output by the screen can be reduced, and the improvement on the accuracy of the image content presented by the electronic equipment is facilitated.

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 the display image based on the pixel value of the image content itself. However, in practice, it is found that the display image directly output by the screen often has the problems of large color deviation, high distortion degree and the like, and the accuracy of the electronic device for presenting the image content is reduced.
Disclosure of Invention
The embodiment of the application discloses a color calibration method and device, electronic equipment and a storage medium, which can be used for carrying out color calibration on a display image to be output of 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 image content presented by the electronic equipment.
A first aspect of an embodiment of the present application discloses a color calibration method applied to an electronic device, where the electronic device includes a graphics processor, and the method includes:
based on the target texture data, carrying out color calibration on original pixel data corresponding to an image to be displayed through the graphics processor to obtain calibration pixel data, wherein the calibration pixel data is used for outputting a display image;
the target texture data is obtained by converting a target display look-up table LUT.
A second aspect of the embodiments of the present application discloses a color calibration apparatus, which is applied to an electronic device, where the electronic device includes a graphics processor, and the color calibration apparatus includes:
the calibration unit is used for carrying out color calibration on original pixel data corresponding to an image to be displayed through the graphics processor based on target texture data to obtain calibration pixel data, and the calibration pixel data is used for outputting a display image;
the target texture data is obtained by converting a target display look-up table LUT.
A third aspect of the embodiments of the present application discloses an electronic device, which includes a memory and a processor, where the memory stores a computer program, and when the computer program is executed by the processor, the processor is enabled to implement all or part of the steps in any one of the color calibration methods disclosed in the first aspect of the embodiments of the present application.
A fourth aspect of 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 disclosed in the first aspect of embodiments of the present application.
Compared with the related art, the embodiment of the application has the following beneficial effects:
in this embodiment, the color calibration method may be applied to an electronic device, and the electronic device may include a Graphics Processing Unit (GPU). On this basis, the electronic device may perform color calibration on original pixel data corresponding to the image to be displayed through the graphics processor based on the target texture data to obtain calibration pixel data, and the calibration pixel data may be used to output 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 color calibration process is realized based on the target texture data converted from the specified LUT, so that the characteristics of flexibility and easiness in processing of the texture data can be utilized to quickly provide accurate calibration pixel data. The color calibration method can effectively reduce the color deviation of the image output and display of the electronic equipment through the screen, and can conveniently carry out flexible color calibration on various images to be displayed, thereby being beneficial to improving the accuracy and flexibility of the image content presented by the electronic equipment.
Drawings
In order to more clearly illustrate the technical solutions in the embodiments of the present application, the drawings needed to be used in the embodiments will be briefly described below, and it is obvious that the drawings in the following description are only some embodiments of the present application, and it is obvious for those skilled in the art that other drawings can be obtained according to the drawings without creative efforts.
FIG. 1 is a schematic diagram of an application scenario of a color calibration method disclosed in an embodiment of the present application;
FIG. 2 is a schematic diagram illustrating an effect of color calibration on pixel data according to an embodiment of the present disclosure;
FIG. 3 is a schematic flow chart illustrating a color calibration method according to an embodiment of the present disclosure;
FIG. 4 is a schematic flow chart illustrating another color calibration method disclosed in the embodiments of the present application;
fig. 5 is a schematic diagram illustrating an effect of performing interpolation calculation on pixel data according to an embodiment of the present application;
FIG. 6 is a schematic flow chart illustrating a further color calibration method disclosed in the embodiments of the present application;
FIG. 7 is a schematic diagram of a frame corresponding to a color calibration method disclosed in an embodiment of the present application;
FIG. 8 is a schematic block diagram of a color calibration apparatus according to an embodiment of the present disclosure;
fig. 9 is a schematic block diagram of an electronic device according to an embodiment of the present disclosure.
Detailed Description
The technical solutions in the embodiments of the present application will be described clearly and completely with reference to the drawings in the embodiments of the present application, and it is obvious that the described embodiments are only a part of the embodiments of the present application, and not all of the embodiments. All other embodiments, which can be derived by a person skilled in the art from the embodiments given herein without making any creative effort, shall fall within the protection scope of the present application.
It should be noted that the terms "comprises" and "comprising," and any variations thereof, in the embodiments of the present 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, but may include other steps or elements not 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 and are beneficial to improving the accuracy of the image content presented by the electronic equipment. .
The following detailed description is made 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 disclosed in the embodiment of the present application, including an electronic device 10, where the electronic device 10 may include a Graphics Processing Unit (GPU) 11 and a screen 12. The graphic processor 11 is disposed inside the electronic device 10, and may be configured to perform various image processing (for example, color calibration, distortion correction, and the like) on an image to be displayed transmitted to the graphic processor 11, and 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, such as a Central Processing Unit (CPU), an Image Signal Processor (ISP), and the like, which is not limited in this embodiment of the present application.
For example, the electronic device 10 may include various devices or systems with an on-screen display function, such as a computer, a tablet computer, a smart phone, a smart watch, a smart bracelet, and the like, which is not limited in this embodiment. Further, the electronic device 10 may be loaded with an operating system, such as an Android operating system, an iOS operating system, a Symbian operating system, a Windows and Windows Phone operating system, for implementing system functions such as image processing, output display, and the like of an image to be displayed. It is understood that the electronic device 10 shown in fig. 1 is a smart phone, which is merely an example and should not be considered as a limitation to the device type of the electronic device 10 in the embodiment of the present application.
Taking the example that the electronic device 10 carries an android operating system, the electronic device 10 may further perform, by using a display Hardware processing module (hard component, HWC, not shown), corresponding display sending processing on the image to be displayed, which is processed by the graphics processor 11, so that the image to be displayed, which is processed by the display sending processing, may meet the display requirement of the screen 12, and then the screen 12 may output a corresponding display image. The HWC module may be implemented in a HAL (Hardware Abstraction Layer) Layer in an android operating system, and is specifically configured to synthesize and display a window (Layer). 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 surfefinger service, and the HWC module performs synthesis to obtain the image to be displayed that meets the display requirement of the screen 12, and then 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, and the like, in order to solve the problem, the color calibration may be performed on the corresponding image to be displayed by the graphics processor 11 before the display image is actually output by the screen 12. For example, the electronic device 10 may perform color calibration on original pixel data corresponding to an image to be displayed through the graphics processor 11 based on the target texture data to obtain calibration pixel data, and transmit the calibration pixel data to the HWC module for outputting a 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 scene in which the electronic device 10 is currently located, an application program currently used, and the like.
In some embodiments, if the image to be displayed includes only one color channel (e.g., a grayscale map, etc.), the electronic device 10 may determine, through its built-in graphics processor 11, calibration pixel data corresponding to the 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 (for example, an RGB image including three color channels of red R, green G, and blue B), the electronic device 10 may determine, by the built-in graphics processor 11, calibration pixel data corresponding to the original pixel data on each color channel based on the target texture data. Illustratively, as shown in fig. 2, for the original pixel data R1, G1, B1 on R, G, B three color channels, respectively, the color calibration process described above is performed by the graphics processor 11, so as to obtain R, G, B corresponding calibrated pixel data R2, G2, B2 on three color channels, respectively. On the basis, the graphic processor 11 may transmit the calibration pixel data to the HWC module for the HWC module to perform corresponding rendering 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 a display image to be output by the electronic device 10 through the built-in graphics processor 11, and the color calibration process is implemented based on the target texture data converted from the specified LUT, so that the accurate calibration pixel data can be quickly provided by using 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 device 10 through the screen 12, and can conveniently and flexibly calibrate the colors of various images to be displayed, thereby being beneficial to improving the accuracy and flexibility of the image content presented by the electronic device 10.
Referring to fig. 3, fig. 3 is a schematic flowchart illustrating a color calibration method according to an embodiment of the disclosure, where the color calibration method can be applied to the electronic device, and the electronic device can 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, carrying out color calibration on original pixel data corresponding to an image to be displayed through a graphic processor to obtain calibration pixel data, wherein the calibration pixel data is used for outputting a display image; the target texture data is obtained by converting a target display look-up table LUT.
In the embodiment of the application, the electronic device can perform color calibration on the image to be displayed through a built-in graphics processor of the electronic device. Specifically, the graphics processor may perform a calculation process related to color calibration on original pixel data corresponding to an image to be displayed based on target texture data obtained by conversion of the target LUT, to obtain corresponding calibration pixel data. On the basis of the calibration pixel data, the electronic device can output a corresponding display image on a screen according to the calibration pixel data obtained by the electronic device in the subsequent step.
The target LUT refers to a display lookup table used in a color calibration process of the electronic device, and the target LUT may include a mapping relationship between specified original pixel data and calibration pixel data, so that the unique calibration pixel data having a mapping relationship with the original pixel data included in the target LUT may be found by using the original pixel data as an input. For example, for a one-dimensional LUT (1DLUT), if the input raw pixel data includes a pixel value a1 on a single color channel, it may be found whether there is a pixel value a2 corresponding to a1 on the one-dimensional LUT, and the found a2 is taken as calibration pixel data; as another example, for a three-dimensional LUT (3D LUT), if the input original pixel data includes respective pixel values (R1, G1, B1) on three color channels, it may be searched on the three-dimensional LUT whether there is a set of pixel values (R2, G2, B2) corresponding to (R1, G1, B1), and the set of pixel values (R2, G2, B2) found is used 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, and the target texture data can realize a similar search function to the target LUT, and compared with the target LUT, the processing and application of the target texture data by the graphics processor are more flexible, and the target texture data can be conveniently used for numerical operations such as interpolation, so that calibration pixel data matched with original pixel data corresponding to an image to be displayed can be accurately and flexibly determined.
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 expanded or may not be expanded. For example, for a three-dimensional LUT, the lookup table size may be N × N (N is a positive integer, e.g., 17, 19, 33, etc.), and the pixel value range may include discrete N pixel values in [0,255 ]; after the corresponding target texture data is obtained by conversion, the size of the target texture data may be M × M (M is a positive integer, and M ≧ N), and the pixel value range thereof may include discrete M pixel values in [0,255 ]. And subsequent color calibration processing is performed on the expanded target texture data, so that the actual calculation amount is favorably reduced, and the efficiency and the flexibility of color calibration of the image to be displayed by the graphics processor are improved.
In this embodiment of the application, according to the number of color channels included in an image to be displayed, which needs to be color calibrated, target LUTs with different dimensionality numbers may be adopted, so that target texture data with corresponding dimensionality numbers may be obtained through conversion according to the target LUTs, and the target texture data is used for respectively implementing color calibration on 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 original pixel data corresponding to an image to be displayed according to one-dimensional texture data, the graphics processor may only use a pixel value on the one color channel as an input to obtain an output pixel value 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 accordingly, 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 original pixel data corresponding to an image to be displayed according to the three-dimensional texture data, the graphics processor may use each pixel value on the three color channels as an input to obtain output pixel values on the corresponding three color channels 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 may perform color calibration on a display image to be output by the electronic device through a GPU built in the electronic device, and the process of performing color calibration is implemented based on target texture data converted from a designated LUT, so that the characteristics of flexibility and easiness in processing of texture data may be utilized to quickly provide accurate calibration pixel data. The color calibration method can effectively reduce the color deviation of the image output and display of the electronic equipment through the screen, and can conveniently carry out flexible color calibration on various images to be displayed, thereby being beneficial to improving the accuracy and flexibility of the image content presented by the electronic equipment.
Referring to fig. 4, fig. 4 is a flowchart illustrating another color calibration method disclosed in the embodiment of the present application, where the color calibration method can be applied to the electronic device, and the electronic device can include a graphics processor. As shown in fig. 4, the color calibration method may include the steps of:
402. and determining, by a graphics processor, calibration pixel data matched with original pixel data of color channels corresponding to the image to be displayed based on the three-dimensional texture data, wherein the number of the 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 a 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 matching 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. For example, the electronic device may perform interpolation calculation on original pixel data corresponding to an image to be displayed through a graphics processor of the electronic device based on the target texture data to obtain calibration pixel data belonging to 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 scene where the electronic device is currently located, an application program currently used, and the like, and is not particularly limited in this embodiment of the application. Optionally, different color modes applicable to the electronic device may correspond to different numbers of color channels, and may also correspond to the same number of color channels (e.g., each corresponding to three color channels); under 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 the original pixel data corresponding to the image to be displayed by using the target texture data within the pixel value range corresponding to the current color mode. Since the pixel value range (e.g., M discrete pixel values in [0,255], where M is a positive integer) corresponding to the target texture data is a subset of the pixel value range (e.g., [0,255]) corresponding to the current color mode, through the interpolation calculation, no matter whether the original pixel data is included in the pixel value range corresponding to the target texture data, the calibration pixel data that matches the original pixel data and conforms to the texture feature corresponding to the target texture data can be determined, thereby facilitating improvement of flexibility and reliability of color calibration of the image to be displayed by the electronic device.
Taking the example that the target texture data includes three-dimensional texture data, the graphics processor may perform trilinear interpolation calculation on the original pixel data corresponding to the image to be displayed based on the three-dimensional texture data to obtain the phaseThe corresponding calibration pixel data. For example, please refer to fig. 5, fig. 5 is a schematic diagram illustrating an effect of performing interpolation calculation on pixel data according to an embodiment of the present application. As shown in FIG. 5, the graphics processor may actually interpolate through 7 linear interpolations, according to points C 000 、C 001 、C 010 、C 100 、C 011 、C 101 、C 110 、C 111 And respectively corresponding calibration pixel data, and acquiring calibration pixel data corresponding to the point C. Specifically, the above 7-degree linear interpolation includes the above point C 000 、C 001 、C 010 、C 100 、C 011 、C 101 、C 110 、C 111 The 4 interpolations performed, resulting in point C 00 、C 01 、C 10 、C 11 (ii) a And point C 00 、C 01 、C 10 、C 11 The interpolation performed 2 times yields point C 0 、C 1 (ii) a And point C 0 、C 1 The 1 interpolation performed results in point C.
Therefore, by implementing the color calibration method described in the above embodiment, the electronic device can perform color calibration on a display image to be output by the electronic device through a built-in GPU of the electronic device, and the color calibration process is implemented based on target texture data converted from a specified LUT, so that not only can the color deviation of the display image output by the electronic device through a screen of the electronic device be effectively reduced, but also flexible color calibration can be conveniently performed on various images to be displayed, thereby facilitating the improvement of the accuracy and flexibility of the image content presented by the electronic device. In addition, the calibration pixel data is obtained in an interpolation mode, the calibration pixel data which accord with the texture characteristics corresponding to the target texture data can be obtained, the flexibility and the reliability of color calibration of the image to be displayed of the electronic equipment can be further improved, the output display image can adapt to the display characteristics of the screen of the electronic equipment, and therefore the watching effect and the use experience of a user are effectively improved.
Referring to fig. 6, fig. 6 is a flowchart illustrating a color calibration method according to another embodiment of the present disclosure, where the color calibration method can be applied to the electronic device, and the electronic device can 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 this embodiment of the application, when the electronic device performs color calibration on an image to be processed by using the graphics processor, the electronic device may close a service related to implementing three-dimensional LUT lookup by using hardware, so as to avoid that the image to be displayed after being processed by the graphics processor is subjected to a conventional LUT-based lookup calibration process again by the HWC module. On this basis, the electronic device may read the 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, so as to apply the target texture data to a subsequent actual color calibration process.
For example, taking an android operating system as an example, the electronic device may create a HIDL Service, read the target LUT from the HWC module by calling an interface of the Service, and then obtain the target LUT through a surfaceflag 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. For example, if the electronic device is in a fingerprint unlocking scene, in order to avoid a color temperature jump of an image displayed on a screen before and after unlocking, a color mode required for performing color temperature adjustment on a fingerprint layer may be used as a 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 a target LUT corresponding to the current color mode from the HWC module. The fingerprint image layer is correspondingly color-calibrated through the target texture data obtained by the target LUT conversion, so that the color temperature jump problem can be avoided, and the experience of a user in using electronic equipment to unlock fingerprints 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 graphics processor.
In this embodiment, still 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 surface flinger service, and apply the target texture data to an actual color calibration process in a subsequent step.
Alternatively, for different texture data, the electronic device may distinguish by corresponding texture identifiers (e.g., numeric identifiers, character identifiers, etc.). For example, after obtaining the target LUT, the electronic device may create a texture identifier corresponding to a current color mode of the electronic device, and may further mark the target texture data by the texture identifier after converting the target LUT into the target texture data corresponding to the current color mode. On the basis, the electronic device can transmit the marked target texture data to the graphics processor, so that the graphics processor can perform numerical operation such as interpolation 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 based on the target texture data, carrying out interpolation calculation on the original pixel data corresponding to the image to be displayed through the graphic processor to obtain calibration pixel data which belongs to the pixel value range corresponding to the current color mode.
Step 606 is similar to step 402, and is not described herein again. 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 the HWC to output a display image conforming to the current color mode on a screen of the electronic device.
In this embodiment, calibration pixel data corresponding to an image to be displayed, which is obtained by performing color calibration through a graphics processor, may be transmitted to the HWC module by the graphics processor, and the HWC module performs corresponding display sending processing, so that the image to be displayed after the display sending processing may meet the display requirement of the screen of the electronic device, and then the screen may output a corresponding display image.
For example, please refer to fig. 7, fig. 7 is a frame diagram corresponding to the color calibration method disclosed in the embodiment of the present application. As shown in fig. 7, the electronic device may read the target LUT from the HWC module through HIDL Service, and may convert the target LUT into corresponding target texture data through a surfefinger Service. On the basis, the electronic device can perform color calibration on the original pixel data corresponding to the image to be displayed through the graphic processor of the electronic device according to the target texture data to obtain corresponding calibration pixel data. The calibration pixel data may be transmitted from 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 display image after color calibration on a screen.
Therefore, by implementing the color calibration method described in the above embodiment, the electronic device can perform color calibration on a display image to be output by the electronic device through a built-in GPU of the electronic device, and the color calibration process is implemented based on target texture data converted from a specified LUT, so that not only can the color deviation of the display image output by the electronic device through a screen of the electronic device be effectively reduced, but also flexible color calibration can be conveniently performed on various images to be displayed, thereby facilitating the improvement of the accuracy and flexibility of the image content presented by the electronic device. In addition, the auxiliary processing is carried out on the processes before and after the color calibration is carried out on the graphics processor through the display hardware processing module HWC, the calculation process related to the color calibration is favorably carried out in a centralized mode on the graphics processor, therefore, the whole process can be optimized, and the efficiency and the reliability of the color calibration of the image to be displayed of the electronic equipment are improved.
Referring to fig. 8, fig. 8 is a schematic block diagram of a color calibration apparatus according to an embodiment of the present disclosure, which can be applied to the electronic device, and the electronic device may include a graphics processor. As shown in fig. 8, the color calibration apparatus may include a calibration unit 801, wherein:
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 a display image;
the target texture data is obtained by converting a target display look-up table LUT.
It can be seen that, with the color calibration apparatus described in the foregoing embodiment, the electronic device may perform color calibration on a display image to be output by the electronic device through a GPU built in the electronic device, and the color calibration process is implemented based on target texture data converted from a designated LUT, so that the characteristics of flexibility and easiness in processing of the texture data may be utilized to quickly provide accurate calibration pixel data. The color calibration method can effectively reduce the color deviation of the image output and display of the electronic equipment through the screen, and can conveniently carry out flexible color calibration on various images to be displayed, thereby being beneficial to improving the accuracy and flexibility of the image content presented by the electronic equipment.
In an embodiment, the target texture data may include three-dimensional texture data, and the three-dimensional texture data may be obtained by converting a three-dimensional LUT, and the calibration unit 801 may be specifically configured to:
and determining, by a graphics processor, calibration pixel data matched with original pixel data of color channels corresponding to the image to be displayed based on the three-dimensional texture data, wherein the number of the color channels is less than or equal to 3.
As an alternative implementation, the specific process of determining the calibration pixel data by the calibration unit 801 may include:
and based on the target texture data, performing interpolation calculation on original pixel data corresponding to the image to be displayed through a graphics processor to obtain calibration pixel data belonging to 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 apparatus may further include an acquisition unit and a conversion unit, not shown, wherein:
an obtaining unit, configured to obtain a target LUT corresponding to a current color mode of the electronic device before the calibration unit 801 performs color calibration on original pixel data corresponding to an image to be displayed through a graphics processor based on target texture data 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 graphics processor.
In an embodiment, the color calibration apparatus may further include a determination unit, not shown, wherein:
the determining unit is used for 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.
In an embodiment, the obtaining unit may be specifically configured to:
reading a target LUT corresponding to a current color mode of the electronic device from the 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 identifier;
and transmitting the marked target texture data to a graphics processor.
In an embodiment, the color calibration apparatus may further include a transmission unit and a display unit, not shown in the figure, wherein:
a transmitting unit, configured to transmit the calibration pixel data to the HWC after the calibration unit 801 obtains the calibration pixel data;
and the display sending unit is used for carrying out 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.
It can be seen that, with the color calibration apparatus described in the above embodiment, the electronic device can perform color calibration on a display image to be output by the electronic device through its built-in GPU, and the color calibration process is implemented based on target texture data converted from a designated LUT, which can effectively reduce color deviation of the display image output by the electronic device through its screen, and can also perform flexible color calibration on various images to be displayed conveniently, thereby facilitating improvement of accuracy and flexibility of image content presented by the electronic device. In addition, the calibration pixel data is obtained in an interpolation mode, the calibration pixel data which accord with the texture characteristics corresponding to the target texture data can be obtained, the flexibility and the reliability of color calibration of the image to be displayed of the electronic equipment can be improved, the output display image can adapt to the display characteristics of the screen of the electronic equipment, and therefore the watching effect and the using experience of a user are effectively improved. In addition, the auxiliary processing is carried out on the processes before and after the color calibration is carried out on the graphics processor through the display hardware processing module HWC, the calculation process related to the color calibration is favorably carried out in a centralized mode on the graphics processor, therefore, the whole process can be optimized, and the efficiency and the reliability of the color calibration of the image to be displayed of the electronic equipment are favorably improved.
Referring to fig. 9, fig. 9 is a schematic block diagram of an electronic device according to an embodiment of the disclosure. As shown in fig. 9, the electronic device may include:
a memory 901 in which executable program code is stored;
a processor 902 coupled to a memory 901;
the processor 902 calls the executable program code stored in the memory 901, and can execute all or part of the steps of any one of the color calibration methods applied to the electronic device described in the above embodiments.
In addition, 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 execute all or part of the steps of any one of the color calibration methods applied to the electronic device described in the above embodiments.
In addition, the embodiments of the present application further disclose a computer program product, which, when running on a computer, enables the computer to execute all or part of the steps of any one of the color calibration methods applied to the electronic device described in the above embodiments.
It will be understood by those skilled in the art that all or part of the steps in the methods of the embodiments described above may be implemented by hardware instructions of a program, and the program may be stored in a computer-readable storage medium, where the storage medium includes Read-Only Memory (ROM), Random Access Memory (RAM), Programmable Read-Only Memory (PROM), 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 (CD-ROM), or other Memory, such as a magnetic disk, or a combination thereof, A tape memory, or any other medium readable by a computer that can be used to carry or store data.
The color calibration method and apparatus, the electronic device, and the storage medium disclosed in the embodiments of the present application are described in detail above, and specific examples are applied herein to illustrate the principles and implementations of the present application, and the description of the embodiments above is only used to help understand the method and the core ideas of the present application; meanwhile, for a person skilled in the art, according to the idea of the present application, there may be variations in the specific embodiments and the application scope, and in summary, the content of the present specification should not be construed as a limitation to the present application.

Claims (10)

1. A color calibration method applied to an electronic device, wherein the electronic device comprises a graphics processor, the method comprising:
based on the target texture data, carrying out color calibration on original pixel data corresponding to an image to be displayed through the graphics processor to obtain calibration pixel data, wherein the calibration pixel data is used for outputting a display image;
the target texture data is obtained by converting a target display look-up table LUT.
2. The method according to claim 1, wherein the target texture data includes three-dimensional texture data obtained by converting a three-dimensional LUT; the color calibration of the original pixel data corresponding to the image to be displayed through 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 of claim 1, wherein performing, by the graphics processor, color calibration on original pixel data corresponding to an image to be displayed based on the target texture data to obtain calibrated pixel data comprises:
and based on the target texture data, performing interpolation calculation on original pixel data corresponding to the image to be displayed through the graphics processor to obtain calibration pixel data belonging to 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 any one of claims 1 to 3, wherein before the color calibration of the original pixel data corresponding to the image to be displayed by the graphics processor based on the target texture data to obtain the calibrated pixel data, the method further comprises:
acquiring a target LUT corresponding to a current color mode of the electronic equipment;
and converting the target LUT to obtain target texture data corresponding to the current color mode, and transmitting the target texture data to the graphics processor.
5. The method of claim 4, wherein prior to the obtaining a target LUT corresponding to a current color mode of the electronic device, the method further comprises:
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.
6. The method of claim 4, wherein obtaining the target LUT corresponding to the current color mode of the electronic device comprises:
reading, from a display hardware processing module HWC, a target LUT corresponding to a current color mode of the electronic device;
the converting the target LUT to obtain target texture data corresponding to the current color mode and transmitting the target texture data to the graphics processor includes:
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;
transmitting the marked target texture data to the graphics processor.
7. The method of claim 6, wherein after the color calibration of the raw pixel data corresponding to the image to be displayed by the graphics processor based on the target texture data to obtain the calibrated pixel data, the method further comprises:
transmitting the calibration pixel data to the HWC;
performing display processing on the calibration pixel data through the HWC to output a display image conforming to the current color mode on a screen of the electronic device.
8. A color calibration apparatus applied to an electronic device including a graphic processor, the color calibration apparatus comprising:
the calibration unit is used for carrying out color calibration on original pixel data corresponding to an image to be displayed through the graphics processor based on target texture data to obtain calibration pixel data, and the calibration pixel data is used for outputting a display image;
the target texture data is obtained by converting a target display look-up table LUT.
9. An electronic device, characterized in that the electronic device comprises a memory and a processor, the memory having stored therein a computer program which, when executed by the processor, causes the processor to carry out the method according to any one of claims 1 to 7.
10. A computer-readable storage medium, on which a computer program is stored, which, when being executed by a processor, carries out the method according to any one of claims 1 to 7.
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 true CN114842814A (en) 2022-08-02
CN114842814B 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 (9)

* 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
US20160217766A1 (en) * 2015-01-23 2016-07-28 Dell Products, Lp System and Method for Sub-Pixel Color Management
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

Patent Citations (9)

* 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
US20160217766A1 (en) * 2015-01-23 2016-07-28 Dell Products, Lp System and Method for Sub-Pixel Color Management
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
CN114842814B (en) 2023-12-08

Similar Documents

Publication Publication Date Title
JP4375781B2 (en) Image processing apparatus, image processing method, program, and recording medium
JP3219180B2 (en) Color correction method and apparatus
KR100886099B1 (en) Apparatus for automatically computing image correction curve and Method thereof
CN101346984A (en) Constrained color palette in a color space
EP3070925B1 (en) Color matching for imaging systems
KR20080045132A (en) Hardware-accelerated color data processing
US7965427B2 (en) Color processing apparatus and its method
CN113112424B (en) Image processing method, device, computer equipment and storage medium
US7127102B2 (en) Color matching method and device, color matching program, and computer readable record medium that stores color matching program allowing appropriate color matching at high speed
US6124944A (en) Image processing apparatus and method
US20020031258A1 (en) Image processing method, image processing apparatus, and storage medium
US8111430B2 (en) Color conversion apparatus and method
CN109729333B (en) Color space mapping method, device, computer readable storage medium and system
US7826111B2 (en) Color conversion method using a colors look-up table
US8111423B2 (en) Image processing device and image processing method
AU2010257408A1 (en) Colour encoding clustering
US7251360B2 (en) Look-up table generation method, computer program, and imaging apparatus
CN103685854A (en) Image processing apparatus, image processing method, and program
CN114842814B (en) Color calibration method and device, electronic equipment and storage medium
CN112911366A (en) Saturation adjusting method and device and display equipment
JP2005269443A (en) Method and apparatus for image processing, program and recording medium
JP4556523B2 (en) Video signal processing apparatus and video signal processing method
JP2004246671A (en) Lookup table formation method, computer program, and imaging device
JP4416415B2 (en) Look-up table creation method, computer program, and imaging apparatus
CN114841850A (en) Image processing method and device and electronic equipment

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