WO2022040889A1 - Display method and apparatus, and electronic device - Google Patents

Display method and apparatus, and electronic device Download PDF

Info

Publication number
WO2022040889A1
WO2022040889A1 PCT/CN2020/110917 CN2020110917W WO2022040889A1 WO 2022040889 A1 WO2022040889 A1 WO 2022040889A1 CN 2020110917 W CN2020110917 W CN 2020110917W WO 2022040889 A1 WO2022040889 A1 WO 2022040889A1
Authority
WO
WIPO (PCT)
Prior art keywords
rgb
lut
display
luminance
parameter
Prior art date
Application number
PCT/CN2020/110917
Other languages
French (fr)
Chinese (zh)
Inventor
刘洋
刘海啸
李睿哲
Original Assignee
华为技术有限公司
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 华为技术有限公司 filed Critical 华为技术有限公司
Priority to PCT/CN2020/110917 priority Critical patent/WO2022040889A1/en
Priority to CN202080103365.0A priority patent/CN115918066A/en
Publication of WO2022040889A1 publication Critical patent/WO2022040889A1/en

Links

Images

Classifications

    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04NPICTORIAL COMMUNICATION, e.g. TELEVISION
    • H04N9/00Details of colour television systems
    • H04N9/64Circuits for processing colour signals
    • 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
    • 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

Definitions

  • the present application relates to the field of display technology, and in particular, to a display method, device and electronic device.
  • Color gamut is a method of encoding a color, and also refers to the totality of colors that a technical system can produce.
  • a color gamut is some complete subset of colors. The most common application of color subsets is to accurately represent a given situation. For example, a given color space or the color rendering range of an output device. For different monitors, the displayed color gamut is different, resulting in the same graphics being displayed differently on different monitors.
  • the objectively measured indicators can be quantified according to the CIE1931 color space.
  • the CIE 1931 color space (also known as the CIE 1931 XYZ color space) was one of the first color spaces to be defined mathematically.
  • the CIE 1931 color space associates each color with tristimulus values X, Y, and Z, where the Y parameter is a measure of the lightness or brightness of the color.
  • the chromaticity of a color is specified by the two export parameters x and y of X, Y and Z.
  • the exported color space is specified by x, y, Y, which is called the CIE xyY color space and is widely used in practice to specify colors.
  • the CIE 1931 color space is special because it is based on direct measurements of human color vision and serves as the basis for the definition of many other color spaces.
  • the sRGB color space, DCI-P3 or Adobe RGB, etc. are standard color spaces used in monitors, printers, and the Internet. Taking sRGB as an example, when outputting RGB color values in a monitor, in addition to displaying in the corresponding RGB color values, it will also display in its corresponding CIE 1931 color space. Therefore, when the display needs to be converted from one CIE 1931 color space to another CIE 1931 color space for display, the conversion can be achieved by inputting different RGB color values.
  • the present application provides a display method, device and electronic device, which can improve the accuracy and efficiency of the display converted from one color gamut to another color gamut for display.
  • an embodiment of the present application provides a display method, the method includes: acquiring a first RGB of a first pixel to be displayed; acquiring a third display lookup table LUT corresponding to the first application mode, the The third LUT is generated according to the fusion of the first LUT and the second LUT corresponding to the first application mode.
  • the third LUT includes a one-to-one correspondence between the first initial RGB and the first display RGB.
  • the first initial RGB corresponds to the initial chromaticity and Luminance parameters
  • the first display RGB corresponds to the chromaticity and luminance parameters of the first application mode
  • the first LUT includes a one-to-one mapping relationship between a plurality of first initial RGB and target RGB
  • the target RGB corresponds to the specified chromaticity and luminance parameters
  • the second The LUT includes a one-to-one mapping relationship between a plurality of second initial RGB and display RGB.
  • the second initial RGB corresponds to the specified luminance and chrominance parameters
  • the display RGB is related to the application mode.
  • the same second initial RGB corresponds to different application modes.
  • the display RGB is different, and one application mode corresponds to a second LUT; the second RGB corresponding to the first RGB in the first application mode is determined according to the third LUT, and the second RGB is sent to the first display for display.
  • the display method provided by the first aspect includes: obtaining the first RGB of the first pixel to be displayed; obtaining a corresponding third lookup table LUT according to the first application mode, and the third LUT is generated by merging the first LUT and the second LUT ; wherein, different application modes correspond to different second LUTs; the third LUT includes a one-to-one mapping relationship between a plurality of first initial RGB and the first display RGB, and the first display RGB corresponds to the first application mode; the first LUT includes A one-to-one mapping relationship between a plurality of first initial RGB and target RGB, the first initial RGB corresponds to initial chromaticity and luminance parameters, and the target RGB corresponds to specified chromaticity and luminance parameters; the second LUT includes a plurality of second initial RGB and display RGB The one-to-one mapping relationship, the second initial RGB corresponds to the specified chromaticity and luminance parameters, the display RGB is related to the application mode, and the same initial RGB corresponds to different display RGB in different application modes; according to the
  • obtaining the first LUT for converting each display screen from the first initial RGB to the target RGB corresponding to the specified chromaticity and luminance parameters is to take into account the actual characteristics of each display panel and is used to describe each display panel.
  • the color space corresponding to the display screen improves the display accuracy; in addition, the second initial RGB corresponding to the specified chromaticity and luminance parameters is obtained and converted to the second LUT of the display RGB in each application mode, and fused according to the first LUT
  • the second LUT generates the third LUT. You can only measure and obtain the corresponding relationship between the specified chromaticity and luminance parameters and the RGB displayed in different application modes.
  • the method further includes: acquiring a third LUT corresponding to the second application mode, and generating the third LUT corresponding to the second application mode according to the fusion of the first LUT and the second LUT corresponding to the second application mode.
  • the method further includes: obtaining the first LUT from the memory; or receiving the first LUT from the server; or receiving the corresponding target RGB from the server according to the preset first initial RGB or obtaining the corresponding target RGB from the memory, Further, the first LUT is determined.
  • the target RGB is stored in the memory, and the target RGB corresponding to different first LUTs can be obtained through the preset first initial RGB, instead of repeatedly storing the first RGB in each first LUT, reducing the need for storage pressure.
  • the method further includes: acquiring a second LUT corresponding to the first application mode from a plurality of second LUTs stored in the memory; or receiving a second LUT corresponding to the first application mode from the server.
  • the method further includes: receiving an updated second LUT from the server.
  • receiving the updated second LUT from the server includes: receiving the updated second LUT from the server at a preset time or when a preset instruction is received.
  • the second LUT is a lookup table that specifies the chrominance and luminance parameters to be converted to different application modes.
  • an updated second LUT needs to be acquired, and the updated second LUT is acquired at a preset time.
  • the LUT can ensure the real-time performance of acquiring the second LUT; and acquiring the updated second LUT when the preset instruction is received can ensure the practicability of acquiring the second LUT.
  • acquiring the third LUT includes: acquiring the first initial RGB in the first LUT and its corresponding target RGB; determining the real-time first display RGB obtained by mapping the target RGB according to the second LUT; An initial RGB and a first third LUT showing the mapping relationship of RGB.
  • the first initial RGB in the first LUT is mapped to the target RGB
  • the target RGB corresponds to the specified chromaticity and luminance parameters
  • the second initial RGB in the second LUT also corresponds to the specified chromaticity and luminance parameters.
  • the target RGB traverses the second LUT and matches with the second initial RGB. If the matching is successful, the corresponding relationship between the first display RGB corresponding to the second initial RGB and the first initial RGB can be directly determined, and determined according to the corresponding relationship
  • the third LUT, this process has high efficiency and low computational overhead.
  • acquiring the first LUT includes: converting the first initial RGB to obtain the intermediate RGB; performing iterative transformation on the intermediate RGB according to a preset step size to obtain the target RGB; according to the first initial RGB and the target RGB The one-to-one mapping relationship determines the first LUT.
  • the intermediate RGB obtained according to the matrix calculation is not directly used as the target RGB, but iteratively determines the RGB for the display screen when the specified chromaticity and luminance parameters are displayed as the target RGB, which improves the generated first LUT. accuracy.
  • obtaining the intermediate chromaticity and luminance parameters corresponding to RGB i +1 according to the intermediate chromaticity and luminance parameters and the change values of the chrominance and luminance parameters corresponding to RGB i including obtaining RGB i+ by calculating according to the following formula 1 Corresponding intermediate chromaticity and brightness parameters:
  • xyY i+1 is the intermediate chromaticity and brightness parameters corresponding to RGB i+1
  • xyY i is the intermediate chromaticity and brightness parameters corresponding to RGB i
  • RGB includes R parameters, G parameters and B parameters
  • ⁇ R, ⁇ G, ⁇ B are the preset step sizes of the R parameter
  • the G parameter and the B parameter respectively
  • ⁇ x R , ⁇ y R are the chromaticity parameter changes caused by the R parameter iteration according to the preset step size
  • ⁇ Y R is the R parameter iterated according to the preset step size
  • the resulting changes in luminance parameters, ⁇ x G , ⁇ y G are the changes in the chrominance parameters caused by the iterations of the G parameters according to the preset step size
  • ⁇ Y G is the changes in the luminance parameters caused by the iterations of the G parameters according to the preset step sizes
  • ⁇ x B , ⁇ y B is the change value of the chrominance parameter caused by the it
  • converting the first initial RGB to obtain the intermediate RGB includes: performing gamma transformation on the first initial RGB based on the first Gamma value to obtain the first linear rgb; A linear rgb is converted to obtain the specified chrominance and luminance parameters; the specified luminance and chrominance parameters are converted according to the second transformation matrix to obtain the second linear rgb, and the second transformation matrix is generated according to the measured luminance parameters of the first display; based on The second Gamma value performs inverse gamma transformation on the second linear rgb to obtain intermediate RGB, and the second Gamma value is determined according to the measured brightness parameter of the first display.
  • an embodiment of the present application provides a display method, which is applied to a server.
  • the method includes: generating a second LUT, where the second LUT includes a one-to-one mapping relationship between a plurality of second initial RGB and display RGB, and the display RGB and the application Mode related, the same second initial RGB corresponds to different display RGB in different application modes, one application mode corresponds to one second LUT; the second LUT is sent to the terminal.
  • the server generates the second LUT, and then sends the second LUT to the terminal, so that the terminal combines the first LUT and the second LUT to generate the third LUT, because the second LUT is only related to the application mode and the specified chrominance and luminance If the parameters are related, then if the first two are determined, the second LUT can be uniformly delivered by the server to reduce the computing resource overhead of the terminal.
  • generating the second LUT includes: converting the second initial RGB to obtain display RGB, so that the display chromaticity and luminance parameters in the first application mode corresponding to the display RGB are displayed; A one-to-one mapping relationship between RGB is displayed to generate a second LUT corresponding to the first application mode.
  • the method further includes: generating a first LUT, where the first LUT includes a one-to-one mapping relationship between a plurality of first initial RGBs and target RGBs, and the target RGBs correspond to specified chromaticity and luminance parameters; sending a message to the terminal First LUT.
  • the server generates the first LUT and sends it to the terminal, because the server can obtain the chromaticity and brightness parameters of each display screen, and generate the first LUT corresponding to each display screen, which can effectively reduce the terminal's Computing resource overhead.
  • generating the first LUT includes: converting the first initial RGB to obtain the intermediate RGB; performing iterative transformation on the intermediate RGB according to a preset step size to obtain the target RGB; according to the first initial RGB and the target RGB The one-to-one mapping relationship determines the first LUT.
  • the method further includes: generating an updated second LUT, where the updated second LUT is a second LUT corresponding to the updated first application mode; or the updated second LUT is a newly added application mode The corresponding second LUT; the updated second LUT is sent to the terminal.
  • an embodiment of the present application provides a display processing device, the device includes a processing module, an obtaining module and a processing module, wherein the obtaining module is used to obtain the first RGB of the first pixel to be displayed; the processing module, Used to obtain the third display lookup table LUT corresponding to the first application mode, the third LUT corresponding to the first application mode is generated according to the fusion of the first LUT and the second LUT corresponding to the first application mode, and the third LUT includes a plurality of first LUTs.
  • the first LUT includes a plurality of first initial The one-to-one mapping relationship between RGB and the target RGB, the target RGB corresponds to the specified chromaticity and luminance parameters;
  • the second LUT includes a one-to-one mapping relationship between a plurality of second initial RGB and the display RGB, and the second initial RGB corresponds to the initial chromaticity and luminance parameters ,
  • the display RGB is related to the application mode, the display RGB corresponding to the same second initial RGB in different application modes is different, and one application mode corresponds to a second LUT;
  • the processing module is used to determine the first RGB according to the third LUT.
  • An application mode corresponds to the second RGB, and the second RGB is sent to the first display for display.
  • the obtaining module is further configured to: obtain a third LUT corresponding to the second application mode, where the third LUT corresponding to the second application mode is generated by merging the first LUT and the second LUT corresponding to the second application mode .
  • the obtaining module is further configured to: obtain the first LUT from the memory; or
  • the obtaining module is further configured to: obtain a second LUT corresponding to the first application mode from a plurality of second LUTs stored in the memory; or receive a second LUT corresponding to the first application mode from the server .
  • the obtaining module is further configured to: receive the updated second LUT from the server.
  • the obtaining module is specifically configured to: receive the updated second LUT from the server at a preset time or when a preset instruction is received.
  • the processing module is specifically configured to: obtain the first initial RGB in the first LUT and its corresponding target RGB; determine the real-time first display RGB obtained by mapping the target RGB according to the second LUT; An initial RGB and a first third LUT showing the mapping relationship of RGB.
  • the processing module is specifically configured to: convert the first initial RGB to obtain the intermediate RGB; perform iterative transformation on the intermediate RGB according to a preset step size to obtain the target RGB; according to the first initial RGB and the target RGB The one-to-one mapping relationship determines the first LUT.
  • the processing module is specifically configured to: calculate and obtain intermediate chromaticity and luminance parameters corresponding to RGB i+1 according to the following formula:
  • xyY i+1 is the intermediate chromaticity and brightness parameters corresponding to RGB i+1
  • xyY i is the intermediate chromaticity and brightness parameters corresponding to RGB i
  • RGB includes R parameters, G parameters and B parameters
  • ⁇ R, ⁇ G, ⁇ B are the preset step sizes of the R parameter
  • the G parameter and the B parameter respectively
  • ⁇ x R , ⁇ y R are the chromaticity parameter changes caused by the R parameter iteration according to the preset step size
  • ⁇ Y R is the R parameter iterated according to the preset step size
  • the resulting changes in luminance parameters, ⁇ x G , ⁇ y G are the changes in the chrominance parameters caused by the iterations of the G parameters according to the preset step size
  • ⁇ Y G is the changes in the luminance parameters caused by the iterations of the G parameters according to the preset step sizes
  • ⁇ x B , ⁇ y B is the change value of the chrominance parameter caused by the it
  • the processing module is specifically configured to: perform gamma transformation on the first initial RGB based on the first Gamma value to obtain the first linear rgb; convert the first linear rgb according to the first transformation matrix to obtain the specified Chroma and luminance parameters; convert the specified luminance and chrominance parameters according to the second transformation matrix to obtain a second linear rgb, and the second transformation matrix is generated according to the measured brightness parameters of the first display; based on the second Gamma value, the second linear rgb performs inverse gamma transformation to obtain intermediate RGB, and the second Gamma value is determined according to the measured brightness parameter of the first display.
  • an embodiment of the present application provides an apparatus for display processing, the apparatus includes a processor and an interface circuit, the interface circuit is configured to receive code instructions and transmit them to the processor, and the processor is configured to run all The code instructions are used to perform the method according to any one of the first aspects, or to perform the method according to any one of the second aspects.
  • an embodiment of the present application provides an apparatus for display processing, the apparatus includes a processor, a transceiver, a memory, and computer-executable instructions stored in the memory and executable on the processor, when The computer-executable instructions, when executed, cause the communication apparatus to perform the method of any one of the first aspect, or to perform the method of any one of the second aspect.
  • a computer-readable storage medium is provided, and program instructions are stored in the computer-readable storage medium.
  • program instructions are executed on a computer or a processor, the computer or the processor can perform any of the above-mentioned aspects. Methods.
  • a computer program product comprising instructions which, when run on a computer or processor, enable the computer or processor to perform the method of any of the above aspects.
  • an electronic device including the above-mentioned apparatus for display processing.
  • FIG. 1 is a schematic structural diagram of an exemplary apparatus provided by an embodiment of the present application.
  • FIG. 2 is a schematic diagram of a display screen color value conversion scene provided by an embodiment of the present application.
  • FIG. 3 is a schematic diagram of a color value conversion process of a display screen provided by an embodiment of the present application.
  • 4A is a schematic diagram of the architecture of a color gamut correction system corresponding to an embodiment of the present application.
  • FIG. 4B is a flowchart of a display method provided by an embodiment of the present application.
  • 4C is a schematic diagram of a process of applying a third LUT provided by an embodiment of the present application.
  • 4D is a schematic schematic diagram of a first LUT and a second LUT fused to generate a third LUT according to an embodiment of the present application;
  • 4E is a flowchart of determining target RGB provided by an embodiment of the present application.
  • 4F is a schematic diagram of a fusion process of a first LUT and a second LUT provided by an embodiment of the application;
  • FIG. 5 is a structural block diagram of an apparatus for display processing provided by an embodiment of the present application.
  • FIG. 6 is a schematic diagram of a hardware structure of an apparatus for display processing provided by an embodiment of the present application.
  • multiple processing units refers to two or more processing units; multiple systems refers to two or more systems.
  • first”, second, etc. are only used for descriptive purposes, and should not be understood as indicating or implying relative importance or implying the number of indicated technical features.
  • a feature defined as “first”, “second”, etc. may expressly or implicitly include one or more of that feature.
  • plural means two or more.
  • FIG. 1 is a schematic structural diagram of an exemplary apparatus provided by an embodiment of the present application.
  • the device 01 includes: a processor 11 , a radio frequency (RF) circuit 12 , a power supply 13 , a memory 14 , an input unit 15 , a display unit 16 , an audio circuit 17 and other components.
  • RF radio frequency
  • FIG. 1 does not constitute a limitation to the device, and the device may include more or less components than those shown in FIG. 1 , or may be combined as shown in FIG. 1 . Some of the components shown may alternatively be arranged differently from the components shown in FIG. 1 .
  • the processor 11 is the control center of the device, using various interfaces and lines to connect various parts of the entire device, by running or executing the software programs and/or modules stored in the memory 14, and calling the data stored in the memory 14, Execute various functions of the device and process data to monitor the device as a whole.
  • the processor 11 may include one or more processing units; preferably, the processor 11 may integrate an application processor and a modem processor, wherein the application processor mainly processes the operating system, user interface, and application programs, etc. , the modem processor mainly deals with wireless communication. It can be understood that, the above-mentioned modulation and demodulation processor may not be integrated into the processor 11 .
  • the RF circuit 12 can be used for receiving and sending signals during transmission and reception of information or during a call. In particular, after receiving the downlink information of the base station, it is processed by the processor 11; in addition, the uplink data is sent to the base station.
  • RF circuits include, but are not limited to, antennas, at least one amplifier, transceivers, couplers, low noise amplifiers (LNAs), duplexers, and the like.
  • the RF circuit 12 may also communicate with the network and other devices via wireless communication.
  • Wireless communication can use any communication standard or protocol, including but not limited to global system of mobile communication (GSM), general packet radio service (GPRS), code division multiple access (code division multiple) access, CDMA), wideband code division multiple access (wideband code division multiple access, WCDMA), long term evolution (long term evolution, LTE), email, short message service (short messaging service, SMS) and so on.
  • GSM global system of mobile communication
  • GPRS general packet radio service
  • code division multiple access code division multiple access
  • CDMA code division multiple access
  • wideband code division multiple access wideband code division multiple access
  • WCDMA wideband code division multiple access
  • long term evolution long term evolution
  • email short message service
  • the device includes a power supply 13 (such as a battery) for supplying power to various components.
  • a power supply 13 (such as a battery) for supplying power to various components.
  • the power supply can be logically connected to the processor 11 through a power management system, so as to manage charging, discharging, and power consumption management functions through the power management system.
  • the memory 14 can be used to store software programs and modules, and the processor 11 executes various functional applications and data processing of the device by running the software programs and modules stored in the memory 14 .
  • the memory 14 may mainly include a stored program area and a stored data area, wherein the stored program area may store an operating system, an application program (such as a sound playback function, an image playback function, etc.) required for at least one function, and the like; Data created by the use of the mobile phone (such as audio data, image data, phone book, etc.), etc.
  • memory 14 may include high-speed random access memory, and may also include non-volatile memory, such as at least one magnetic disk storage device, flash memory device, or other volatile solid state storage device.
  • the input unit 15 may be used to receive input numerical or character information, and to generate key signal input related to user settings and function control of the device.
  • the input unit 15 may include a touch screen 151 and other input devices 152.
  • the touch screen 151 also known as a touch panel, can collect the user's touch operations on or near the touch screen (such as the user's operations on or near the touch screen 151 using a finger, a stylus, or any suitable object or accessory), and according to the The preset program drives the corresponding connection device.
  • the touch screen 151 may include two parts, a touch detection device and a touch controller.
  • the touch detection device detects the user's touch orientation, detects the signal brought by the touch operation, and transmits the signal to the touch controller; the touch controller receives the touch information from the touch detection device, converts it into contact coordinates, and then sends it to the touch controller.
  • the touch screen 151 may be implemented in various types such as resistive, capacitive, infrared, and surface acoustic waves.
  • Other input devices 152 may include, but are not limited to, one or more of a physical keyboard, function keys (such as volume control keys, power switch keys, etc.), trackballs, mice, joysticks, and the like.
  • the display unit 16 may be used to display information input by the user or information provided to the user and various menus of the device.
  • the display unit 16 may include a display panel 161, and in the present application, the display panel 161 may be configured with an AMOLED display screen.
  • the touch screen 151 can cover the display panel 161.
  • the touch screen 151 detects a touch operation on or near the touch screen 151, it transmits it to the processor 11 to determine the type of the touch event, and then the processor 11 displays the touch event according to the type of the touch event.
  • Corresponding visual outputs are provided on panel 161 .
  • the touch screen 151 and the display panel 161 are used as two independent components to realize the input and output functions of the device, in some embodiments, the touch screen 151 and the display panel 161 can be integrated to realize the input of the device and output functions.
  • Audio circuit 17, speaker 171 and microphone 172 are used to provide an audio interface between the user and the device.
  • the audio circuit 17 can transmit the received audio data converted electrical signal to the speaker 171, and the speaker 171 converts it into a sound signal for output; on the other hand, the microphone 172 converts the collected sound signal into an electrical signal, which is converted by the audio circuit 17 Upon receipt, it is converted to audio data, which is then output to RF circuit 12 for transmission to, for example, another device, or to memory 14 for further processing.
  • the device shown in FIG. 1 may further include various sensors.
  • a gyroscope sensor for example, a hygrometer sensor, an infrared sensor, a magnetometer sensor, etc.
  • the apparatus shown in FIG. 1 may further include a wireless fidelity (wireless fidelity, WiFi) module, a Bluetooth module, etc., which will not be repeated here.
  • an electronic device may execute some or all of the steps in the embodiment of the present application, these steps or operations are only examples, and the embodiment of the present application may also be executed Other operations or variations of various operations.
  • various steps may be performed in different orders presented in the embodiments of the present application, and may not be required to perform all the operations in the embodiments of the present application.
  • Each embodiment of the present application may be implemented independently or in any combination, which is not limited in this application.
  • Gamma correction is a method of non-linear tonal editing of the image, which can detect the dark part and the light part in the image signal, and increase the ratio of the two, thereby improving the contrast effect of the image.
  • the photoelectric conversion characteristics of current display screens, photographic films, and many electronic cameras can be nonlinear.
  • the non-linear transformation of the color value output by the device is due to the fact that the human visual system is not linear, and humans perceive visual stimuli through comparison.
  • the outside world strengthens the stimulus in a certain proportion, and for people, this stimulus increases evenly. Therefore, for human perception, the physical quantity that increases in a proportional sequence is uniform.
  • the value ⁇ of gamma may be determined according to the photoelectric conversion curve of the color space.
  • Color can be the different perceptions of the eyes for light of different frequencies, or it can represent the light of different frequencies that exists objectively.
  • a color space is a range of colors defined by a coordinate system that people have established to represent colors.
  • a color gamut together with a color model, defines a color space.
  • the color model is an abstract mathematical model that represents color with a set of color components.
  • the color model may include, for example, three primary color mode (red green blue, RGB), printing four-color mode (cyan magenta yellow key plate, CMYK).
  • Color gamut refers to the totality of colors that a system can produce.
  • Adobe RGB and sRGB are two different color spaces based on the RGB model.
  • Each device such as a monitor or printer has its own color space and can only produce colors within its gamut.
  • the color of the image may change on different devices as each device converts and displays RGB or CMYK according to its own color space.
  • the CIE 1931 color space (also known as the CIE 1931 XYZ color space) was one of the first color spaces to be defined mathematically.
  • the CIE XYZ color space is directly measured based on human color vision and can serve as the basis for the definition of other color spaces.
  • the Y parameter used by the CIE XYZ color space is the lightness or lightness of the color.
  • the chromaticity of a color is determined using parameters x and y, and the relationship between chromaticity x, y and tristimulus values X, Y, and Z is:
  • a color can be determined by the parameters x, y, Y.
  • the chromaticity coordinates x, y and the luminance value Y can be measured using a color analyzer.
  • X and Z in tristimulus values can be calculated from chromaticity coordinates x, y and luminance Y:
  • the sRGB (standard Red Green Blue) color space is a standard RGB color space developed by HP and Microsoft in 1996 for monitors, printers and the Internet. It provides a standard way to define color, so that various computer peripherals and application software, such as display, printing and scanning, have a common language for color.
  • the sRGB color space is based on independent color coordinates, which enables colors to correspond to the same color coordinate system in the transmission of different devices, without being affected by the different color coordinates of these devices.
  • the color gamut space of sRGB is relatively small.
  • sRGB defines the colors of the three primary colors of red, green and blue, where the color value of one of the three primary colors takes the maximum value, and the color corresponding to the color value of the other two colors is zero, which represents the one color.
  • the color values R, G and B are all 0-255, then when the values of R and G are all zero, the corresponding value of B is 255.
  • Color means blue.
  • the value of the three primary colors perceived by the observer is the sum of the three primary color values of the two monochromatic lights observed separately.
  • ⁇ R1, G1, B1 ⁇ , ⁇ R2, B2, G2 ⁇ are the three primary color values of the observer's perception of beam 1 and beam 2, respectively, when these two beams When combined, the three primary color values perceived by the observer are ⁇ R,G,B ⁇ , where:
  • Beam 1 ⁇ R1, G1, B1 ⁇ and beam 2 ⁇ R2, G2, B2 ⁇ are represented by the CIE1931 color space, and the corresponding tristimulus values are ⁇ X1, Y1, Z1 ⁇ and ⁇ X2, Y2, Z2 ⁇ respectively, then the observation
  • the tristimulus values ⁇ X, Y, Z ⁇ corresponding to the three primary colors ⁇ R, G, B ⁇ felt by the user are:
  • Calculating the three primary colors in sRGB from the CIE xyY coordinate system first requires transforming it into the CIE XYZ three-valued mode. That is to use formula (3) and formula (4) to determine X, Z to obtain three values X, Y and Z in the CIE 1931 color space. Then use the transformation matrix to calculate the linear R, G and B values:
  • sRGB is a reflection of the color values displayed by a typical monitor with a real-world gamma of 2.2, so use the following transformation formula to convert linear values to sRGB:
  • the human eye perceives the same X, Y, and Y tristimulus values are also different. If people want to feel the same X, Y, and Y tristimulus values, the color gamut of the display screen needs to be converted, and the corresponding color value of the input sRGB color space also needs to be corrected.
  • FIG. 2 is a schematic diagram of a display screen color value conversion scene provided by an embodiment of the application.
  • the input image fig.1 is input to the display screen 201.
  • the display screen 201 is in the initial color gamut , take a target pixel in fig.1 as an example, the corresponding color value of the target pixel in the initial color gamut display is the first RGB, and the corresponding XYZ stimulus value is the initial XYZ stimulus value.
  • Color gamut correction is performed on the display screen 201 so that the color value corresponding to the target pixel is the second RGB, and the corresponding XYZ stimulus value is the target XYZ stimulus value.
  • the process of converting the display screen from the first RGB to the second RGB for display in FIG. 1 specifically includes the following steps:
  • Step 1 Perform linear transformation on the received color value of the standard color gamut image.
  • FIG. 3 is a schematic diagram of a color value conversion process of a display screen provided by an embodiment of the present application.
  • the first RGB can be converted from a nonlinear value to a linear value through gamma transformation.
  • a first gamma (gamma) look-up table is stored, the first gamma look-up table includes the mapping relationship between nonlinear RGB and its corresponding linear rbg, and the first gamma look-up table is used to realize the conversion of nonlinear color values to linear color value.
  • gamma may be 2.2
  • the mapping relationship of the first gamma lookup table may be to map the input red component value R0, green component value G0, and blue component value B0 to red component value R1, green component value G1, and blue component value in turn
  • the color component value B1, wherein the red component value R1, the green component value G1 and the blue component value B1 are referred to as the first linear rgb.
  • the conversion of the input nonlinear RGB to the first linear RGB is realized by the following formula:
  • a nonlinear color value range may correspond to a linear color value.
  • the nonlinear color values in the range of (R0- ⁇ R, R0+ ⁇ R) all correspond to R1 in the first gamma lookup table.
  • Table 1 is an example of a first gamma lookup table provided by the embodiment of the present application.
  • the values of the color values R0, G0 and B0 may all be 0-2 10 , and R0 in a certain range corresponds to the same R1 in the first gamma lookup table. It can be normalized according to a value selected in the corresponding range of R0, so that the obtained values are all between 0 and 1, and then the gamma calculation is performed, and the 10-bit value is output, which is R1.
  • R0 is 0-31
  • the corresponding R1 is (15/1023)2.2*1023.
  • a nonlinear color value may also correspond to a linear color value.
  • the linear color value corresponding to the non-linear color value not stored in the first gamma lookup table may be determined by interpolation of the linear color value corresponding to the nonlinear color value stored in the lookup table.
  • Table 2 is another example of the first gamma lookup table provided by the embodiment of the present application.
  • the color values R0, G0 and B0 can all be 0-2 10 .
  • the value of R0 is 0, 32, 64...1023, which corresponds to the first gamma lookup table
  • the value of R1 is 0, (32/1023) 2.2 *1023, (64/1023)2.2*1023...(1023/1023)2.2*1023.
  • 12bit R1 value can also be output.
  • the corresponding R1 can be (32/1023) 2.2 *4095.
  • the corresponding R1 value is determined by interpolating these known R1 values in the first gamma lookup table.
  • the value of R1 corresponding to when the value of R0 is 25 is determined by interpolation according to the value of R1 corresponding to when the value of R0 is 0 and 32 in turn.
  • the specific algorithm used by the interpolation method is not limited, and may be a linear interpolation method, a Lagrangian interpolation method, or the like, or other interpolation methods may be used.
  • the above example of the first gamma lookup table is only used to explain the embodiment of the present application, and should not be construed as a limitation.
  • the examples of this application take a gamma of 2.2 as an example to introduce the conversion between nonlinear color values and linear color values.
  • the example should not constitute a limitation.
  • the specific gamma value can also be determined according to the photoelectric conversion curve of the color space.
  • the embodiment of the present application does not limit the specific gamma value.
  • Step 2 Perform color gamut conversion to obtain the color value of the display screen.
  • color gamut conversion can be performed, that is, the initial XYZ stimulus value of the display screen is converted to the target XYZ stimulus value, and the first linear rgb is converted to the second Linear rgb, the second linear rgb is the linear color value corresponding to the second RGB.
  • Target XYZ stimulus values can be expressed as: Xt, Yt and Zt.
  • In formula (8) is the target color value to which the display screen needs to be converted, that is, the second linear rgb corresponding to the second RGB. It can be a conversion matrix from sRGB color space to 1931 color space, and specifically can be an inverse matrix of the 3 ⁇ 3 conversion matrix in formula (5). Among them, X R , Y R and Z R are the corresponding tristimulus values when the red color value R of the display screen takes the maximum value, and X G , Y G and Z G are the three corresponding tristimulus values when the green color value G of the display screen takes the maximum value.
  • Color stimulus value, X B , Y B and Z B are the corresponding tristimulus values when the blue color value B of the display screen takes the maximum value.
  • the color values R, G and B of the display screen are all 0-255, then X R , Y R and Z R are the corresponding tristimulus values when the red color value R of the display screen is 255, X R G , Y G and Z G are the corresponding tristimulus values when the green color value G of the display screen is 255, X B , Y B and Z B are the corresponding tristimulus values when the display screen blue color value B is 255 .
  • the 3 ⁇ 3 conversion matrix is used to convert the linear color values R1 , G1 and B1 output by the first gamma lookup table into the linear color values R pannel , G pannel and B pannel on the display color gamut of the display screen.
  • the color gamut conversion on the display can also be performed directly by storing the color value lookup table. That is, when the first RGB is determined, the corresponding second RGB is found through the color value look-up table, so that the display screen is displayed under the target XYZ stimulus value, and the color gamut conversion is completed.
  • the mapping relationship of the color value look-up table may be obtained by measurement, and a three-dimensional color value look-up table is established by using the known target color gamut and the color values on the display screen corresponding to the color gamut measured by the color analyzer. The three dimensions are R, G, and B, respectively.
  • the same set of values of the initial color values R in , G in and B in can uniquely correspond to a set of display target color values R out , G according to the three dimensions The values of out and B out .
  • the color value lookup table looks for the unsaved R1, G1 and B1 values, find the position of the input linear color value in the three dimensions in the color value lookup table, and determine the color value of the display screen by interpolation method, For the description of the interpolation method, reference may be made to the specific description in step 1, and details are not repeated here.
  • the color value RGB stored in the color value lookup table may be a linear value or a non-linear value.
  • Step 3 Perform nonlinear conversion on the linear color value.
  • the above R pannel , G pannel , and B pannel obtained by formula (10) are linear color values on the display color gamut of the display screen.
  • the nonlinear transformation can be implemented by a look-up table similar to the linear transformation in step one.
  • a second gamma lookup table can be stored, the second gamma lookup table includes the correspondence between linear rgb and its corresponding nonlinear RGB, and the second gamma lookup table is used to realize the linear color value on the display color gamut of the display screen Convert to non-linear color values.
  • the gamma may be 2.2
  • the mapping relationship of the second gamma lookup table may be to map the input red component value R pannel , green component value G pannel and blue component value B pannel to the red component value R2 , the green component value R2 and the green component value in turn.
  • G2 and blue component value B2. in:
  • a linear color value range may correspond to a non-linear color value.
  • linear color values in the range of (R pannel - ⁇ R1 , R pannel + ⁇ R1) all correspond to R2 in the first gamma lookup table.
  • a linear color value in the second gamma lookup table may also correspond to a nonlinear color value.
  • the nonlinear color value value corresponding to the unsaved linear color value value in the second gamma lookup table may be determined by an interpolation method. For the description of the interpolation method, reference may be made to the specific description in step 1, which will not be repeated here.
  • Step 4 Display the display screen according to the non-linear color value obtained by conversion.
  • the second RGB corresponding to when the display screen is converted to the target XYZ stimulus value is obtained, specifically the non-linear red component value R2, green component value G2 and blue component value B2, and the display screen displays according to the corresponding color values.
  • the display screens involved in the embodiments of the present application may be LED display screens, and may specifically include various types of organic light-emitting diode (organic light-emitting diode, OLED) display screens, such as AMOLED display screens, passive matrix organic light emitting diodes (passive matrix organic light emitting diodes) matrix organic light-emitting diodes, PM-OLED) display screen, may also include other types of LEDs, and may also include future types of displays, which are not limited in the embodiments of the present application.
  • OLED organic light-emitting diode
  • AMOLED display screens active matrix organic light emitting diodes (passive matrix organic light emitting diodes) matrix organic light-emitting diodes, PM-OLED) display screen
  • PM-OLED passive matrix organic light emitting diodes
  • future types of displays which are not limited in the embodiments of the present application.
  • the white brightness of the display is generally required to be corrected to gamma 2.2 to meet the human eye's perception of brightness.
  • the gamma curve of the white brightness is corrected to 2.2, the brightness corresponding to the three components of R, G, and B may not conform to the gamma 2.2, and the gammas corresponding to displays of different technological levels are different. , so the linear domain to nonlinear domain conversion cannot be accurately performed, thus affecting the color accuracy.
  • the chromaticity coordinates x and y of the RGB will change with the brightness, especially for the OLED with active light emission or the LCD with the LED as the backlight, especially if the brightness is low.
  • the amount of change is relatively large, and a fixed 3x3 matrix cannot well correct the color gamut of the display screen to the standard color gamut, thus affecting the color accuracy.
  • the color value transformation through the color value lookup table is to directly map the RGB color value of the standard color gamut image as the input RGB component to the RGB component output by the display.
  • the color value lookup table is large enough, the input RGB can be mapped one by one. RGB components to the monitor output, allowing the monitor to display accurate colors.
  • each node in the table needs to be corrected to display accurate colors.
  • the calibration process is as follows:
  • the chromaticity and luminance parameters ie, the xyY parameters, which are used to describe the color of the pixel, are used to describe the color of the pixel, and have a function with the tristimulus value XYZ perceived by the human eye
  • the computer performs the calculation and then writes it into the storage of the mobile phone.
  • the more information tested the more accurate the color correction will be.
  • too many sampling tests will affect the actual display production capacity. For example, it takes 200-500ms to measure a color on the display. Usually, more than 17x17x17 colors need to be measured to achieve accurate color gamut correction of the display.
  • the display needs to be calibrated to different color gamuts, and usually needs to use different color value lookup tables.
  • it is necessary to perform color correction for different scenarios, so as the usage scenarios increase, the correction time will be longer.
  • FIG. 4A is a schematic diagram of the architecture of a color gamut correction system corresponding to an embodiment of the present application.
  • the system architecture 40 includes various functional modules 401 , such as a user interface, an image module, and a video module. , a shooting module, etc.; and then includes a graphics processor (graphics processing unit, GPU) 402 capable of image processing, and includes a display subsystem 403 for determining display colors, and a display screen 404 for displaying colors.
  • various functional modules 401 such as a user interface, an image module, and a video module. , a shooting module, etc.
  • a graphics processor graphics processing unit, GPU
  • the display subsystem 403 further includes various sub-modules for determining display colors, such as a scaling module, a color space conversion module, a high-dynamic range (high-dynamic range, HDR) image module, a color module, and the like.
  • the color module 4036 is used to generate a color value lookup table, so that the initial RGB displayed in the current color gamut of the display screen can find the corresponding display RGB according to the color value lookup table, so that when the display screen is displayed by displaying RGB, the corresponding XYZ
  • the tristimulus value is the same as the standard color gamut, that is, the display is corrected to the standard color gamut.
  • FIG. 4A may be fully deployed in the electronic device described in FIG. 1 , or partially deployed in the electronic device described in FIG. 1 , so as to implement the display method described in the embodiments of the present application.
  • FIG. 4B is a flowchart of a display method provided by an embodiment of the present application. As shown in FIG. 4B , the method includes the following steps:
  • a terminal device may be referred to as a terminal (terminal) for short, also referred to as a user equipment (user equipment, UE), or a subscriber unit (subscriber unit, SU), which may be specifically a mobile phone (mobile phone), Tablet computers, laptop computers, wearable devices (such as smart watches, smart bracelets, smart helmets, smart glasses), and other devices with wireless access capabilities, such as smart cars, are Internet of Things (IOT) devices, including various smart home devices (such as smart meters and smart home appliances) and smart city devices (such as security or monitoring devices, smart road traffic facilities), etc.
  • IOT Internet of Things
  • the terminal device includes a display screen
  • the image can be displayed according to its own color gamut, screen material or other parameters.
  • the RGB color value of each pixel For a specific image, its corresponding color can be described by the RGB color value of each pixel. Therefore, after obtaining the input image that needs to be displayed on the first display screen, first obtain the corresponding color value of each pixel of the input image.
  • the first RGB used to describe the input image.
  • the third display lookup table LUT corresponding to the first application mode is generated according to the fusion of the first LUT and the second LUT corresponding to the first application mode, and the third LUT corresponding to the first application mode is merged and generated.
  • the LUT includes a one-to-one correspondence between a plurality of initial RGB and the first display RGB, the initial RGB corresponds to the initial chromaticity and luminance parameters, and the first display RGB corresponds to the chromaticity and luminance parameters of the first application mode;
  • the first LUT includes a one-to-one mapping relationship between a plurality of initial RGB and target RGB, and the target RGB corresponds to specified chromaticity and luminance parameters;
  • the second LUT includes a one-to-one mapping relationship between a plurality of initial RGB and display RGB, so the The display RGB is related to the application mode, the same initial RGB corresponds to different display RGB in different application modes, and one application mode corresponds to one of the second LUTs.
  • the application mode includes multiple modes divided by product, such as mobile phone mode, tablet mode, TV mode, etc.; or multiple modes divided by different application scenarios, such as divided according to energy consumption mode, which can include conventional mode and power saving mode, etc.; according to the application content, it can include web page mode, video mode, image mode, etc.
  • Different application modes have different corresponding color gamuts, that is, for the same input image, the RGB color values and XYZ tristimulus values in each application mode are also different.
  • the third is to display a look up table (LUT), and after determining the first application mode corresponding to the display screen, input the first RGB of the input image into the third LUT corresponding to the first application mode, and obtain the corresponding The second RGB, so that when the display screen is displayed by the second RGB, the display in the color gamut corresponding to the first application mode is achieved.
  • LUT look up table
  • the third LUT Before applying the mapping relationship of the third LUT to determine the second RGB corresponding to each input image for display, the third LUT needs to be generated.
  • the third LUT includes a one-to-one correspondence between a plurality of first initial RGBs and first display RGBs.
  • the first initial RGB is the color value corresponding to when the display screen is displayed in the current color gamut. Under normal circumstances, each display screen can be displayed in the interval of R, G and B values respectively 0-255 (in decimal).
  • the first initial RGB can be some typical sampled RGB, such as the value obtained by dividing 0-255 into 17 equal parts, then the initial RGB can be (0,0,16), (0,32,16), (16 , 16, 48), (16, 64, 16), (240, 0, 0)...(255, 255, 255) and so on.
  • the first display RGB is the color value to which the initial RGB corresponds when the display screen is converted to the color gamut in the first application mode.
  • the content in the third LUT can be shown in the following table:
  • first initial RGB first display RGB (0,,0,16) (0,0,10) (0,32,32) (0,25,25) ... ... (255,255,255) (250,250,250)
  • the first initial RGB of the input image is (255, 255, 255), that is, the red component value, the green component value and the blue component value are all 255, which is a white image.
  • all white images need to be displayed at a lower brightness, that is, mapped to display RGB (250, 250, 250) for display.
  • FIG. 4C is a schematic diagram of a process of applying a third LUT provided by an embodiment of the present application.
  • the same input image can be input into different display screens, and different display screens can display The difference between brightness and color, the transmittance of LCD, and the material of OLED make each display screen feel the same chromaticity and brightness, and the corresponding RGB display will be different.
  • the same display screen can be used in multiple application modes, that is, the same display screen can be displayed in different chromaticity and brightness, and the corresponding display RGB will be different. Therefore, after the input image is input to the display screen, the display RGB of the corresponding output image is related to the display screen on the one hand, and the application mode of the display screen on the other hand, and can be generated and applied according to each application mode of each display screen.
  • a third LUT is related to the display screen on the one hand, and the application mode of the display screen on the other hand, and can be generated and applied according to each application mode of each display screen.
  • the corresponding display RGB of the display screen in each application mode can be measured multiple times to directly generate the third LUT in this mode, but this will lead to the problem of low generation efficiency. Or calculate the corresponding display RGB of each display screen in different application modes according to the matrix transformation, and then generate the third LUT, which will cause the acquired display RGB to be inaccurate, which will lead to inaccurate chromaticity and brightness parameters displayed on the display screen.
  • the third LUT is generated by fusing the first LUT and the second LUT. For the specific process, please refer to FIG. 4D .
  • FIG. 4D For the specific process, please refer to FIG. 4D .
  • FIG. 4D is a schematic diagram of the principle of generating a third LUT by fusing a first LUT and a second LUT according to an embodiment of the present application.
  • the first LUT when the specified display screen is converted from the specified color gamut to the display color gamut corresponding to each application mode, its corresponding output RGB is converted from the second initial RGB to the display RGB, and the display RGB is related to the application mode.
  • Two initial RGBs correspond to different display RGBs in different application modes, and one application mode corresponds to one second LUT.
  • Each second LUT includes a one-to-one mapping relationship between multiple second initial RGB and display RGB, and the second initial RGB in the second LUT is also some typical RGB values, such as the values obtained by dividing 0-255 into 17 equal parts, Then the second initial RGB can be (0,0,16), (0,32,16), (16,16,48), (16,64,16), (240,0,0)...(255,255,255 )Wait. In different application modes, the same second initial RGB value will be mapped to different display RGBs.
  • the display mapped to The RGB may be (150, 150, 150); in the second LUT corresponding to the outdoor mode, when the second initial RGB is (255, 255, 255), the mapped display RGB may be (250, 250, 250).
  • the first LUT and the second LUT are merged to generate a third LUT, and the application mode corresponding to the third LUT is the application mode corresponding to the second LUT.
  • each display screen inputting an RGB will have its corresponding XYZ tristimulus value perceived by the human eye, and its derived parameters x, y, and Y are used to characterize the brightness and color corresponding to the stimulus value.
  • the x, y, and Y parameters are expressed as chromaticity and luminance parameters corresponding to RGB.
  • the initial color gamut of each display screen can be factory color gamut, default color gamut, etc.) can be characterized by the initial RGB and the initial chromaticity and luminance parameters corresponding to the initial RGB.
  • the conversion relationship between RGB and XYZ stimulus values can be based on The aforementioned formula (5) and formula (6) are calculated and obtained, and the functional relationship between XYZ stimulus value and chromaticity and luminance parameters can be determined according to the aforementioned formulas (1) to (4), so the conversion relationship between RGB and chromaticity and luminance parameters can be derived.
  • the RGB color value, brightness and chromaticity parameters, and the corresponding relationship of the color gamut are shown in the following table:
  • the first initial RGB and the second RGB can be the same color value, such as initial RGB1, initial RGB2 or initial RGB3, but the first initial RGB corresponds to the initial luminance and chrominance parameters, and the second initial RGB corresponds to the specified chromaticity and luminance Parameters, that is, the actual characteristics of different display screens are different, and the color and brightness perceived by the human eye are also different (or the color gamut is different).
  • the output RGB of the first display screen needs to be converted into the target RGB, and then according to the first initial The one-to-one mapping relationship between RGB and target RGB generates the first LUT.
  • the color module 4036 includes a storage module, which stores the first initial RGB of the first display screen and the corresponding initial brightness and chromaticity parameters, and then the second initial RGB and chromaticity parameters of the specified display screen can be obtained.
  • the corresponding specified luminance and chrominance parameters can be obtained.
  • the program sets the initial RGB (corresponding to the first initial RGB and the second initial RGB) by default, and correspondingly stores the corresponding initial luminance and chrominance parameters in the memory, and specifies the luminance and chrominance parameters.
  • the specified luminance and chrominance parameters can also be read from the temporary storage space in real time.
  • a first LUT is generated by the first LUT generation module, and the first LUT is a one-to-one correspondence table of conversion from the first initial RGB to the target RGB when the display screen is converted from the initial color gamut to the designated color gamut of the designated display screen.
  • the specific process is:
  • Xt, Yt and Zt correspond to the initial chrominance and luminance parameters.
  • the non-linear RGB value can be obtained by inverse gamma transformation.
  • the corresponding second gamma value Calculated from measured values.
  • the formula for obtaining the second gamma value is:
  • gray1 and gray2 represent the grayscale values corresponding to any two groups of RGB values
  • Y gray1 and Y gray2 respectively represent the corresponding brightness values when the grayscale value is gray1
  • the grayscale values corresponding to any two groups of RGB can be obtained by measurement. Then the second gamma value is calculated and obtained according to the measured value.
  • Matrix in the above process The values in are selected according to the specified luminance and chromaticity parameters, so the intermediate RGB calculated according to this matrix is the theoretically corresponding output RGB (non-linear RGB) when the first display screen is converted to the specified luminance and chromaticity parameters. ).
  • the intermediate RGB obtained according to the matrix is not necessarily the output RGB corresponding to the first display screen when the luminance and chrominance parameters are specified for display. Therefore, in the embodiment of the present application, it is necessary to further obtain the target RGB, and the target RGB is the output RGB actually corresponding to the first display screen when the specified luminance and chromaticity parameters are displayed.
  • the intermediate RGB is iteratively transformed according to the preset step size, and the corresponding chromaticity and luminance parameters are calculated for the intermediate RGB obtained by each iteration, until it is determined that the measured chromaticity and luminance parameters and the specified If the chrominance and luminance parameters are the same or similar, it is determined that the intermediate RGB is the target RGB.
  • FIG. 4E is a flowchart of determining target RGB provided by an embodiment of the present application. As shown in FIG. 4E, the process includes the following steps:
  • the preset step size can be a fixed value composed of ⁇ R, ⁇ G and/or ⁇ B, for example, the preset step size can be (0, 0, ⁇ R), (0, ⁇ G, 0) or ( ⁇ R, ⁇ G, ⁇ B), etc. .
  • the intermediate RGB obtained by the above matrix calculation is used as the initial value of the iterative transformation, for example, set as RGB 1 .
  • the output RGB of the first display screen is RGB 1
  • the corresponding intermediate chromaticity and luminance parameter 1 can be obtained by measurement.
  • this value is equal to the specified luminance and chromaticity parameters (or the difference between the two is less than the preset threshold), it means The intermediate RGB obtained by the matrix calculation is the target RGB displayed by the first display screen in the specified color gamut, and it is not necessary to perform iterative transformation on the intermediate RGB.
  • the difference between the intermediate chromaticity and luminance parameter 1 and the specified chromaticity and luminance parameter is greater than the preset threshold, it means that the current display color gamut of the first display screen is far away from the specified color gamut, and the RGB 1 is transformed according to the preset step size. , for example, increase or subtract ⁇ R, ⁇ G, ⁇ B from the R, G, B values corresponding to RGB 1 to obtain RGB2, and the output RGB of the first display screen changes, which also causes changes in the corresponding chromaticity and luminance parameters, and records the chromaticity
  • the change value of the luminance parameter is added and subtracted with the intermediate chromaticity and luminance parameter 1 to obtain the intermediate chromaticity and luminance parameter 2 corresponding to RGB 2 .
  • the corresponding formula can be expressed as:
  • RGB includes R parameter, G parameter and B parameter, ⁇ R, ⁇ G, ⁇ B are the preset step size of R parameter, G parameter and B parameter respectively, ⁇ x R , ⁇ y R are the color caused by the iteration of R parameter according to the preset step size.
  • the change value of the luminance parameter ⁇ Y R is the change value of the luminance parameter caused by the iteration of the R parameter according to the preset step size
  • ⁇ x G , ⁇ y G are the change value of the chrominance parameter caused by the iteration of the G parameter according to the preset step size
  • ⁇ Y G is the G ⁇ x B
  • ⁇ y B is the change value of the chrominance parameter caused by the iteration of the B parameter according to the preset step size
  • ⁇ Y B is the luminance parameter caused by the iteration of the B parameter according to the preset step size Parameter change value.
  • RGB 2 it is also possible to directly measure and obtain the intermediate chromaticity and brightness parameter 2 corresponding to the first display screen outputting RGB 2 .
  • the iteratively obtained RGB i makes the luminance and chromaticity parameters corresponding to the first display screen the specified luminance and chromaticity parameters, indicating that the color gamut of the first display screen has been converted to the specified color gamut, and the corresponding RGB is the target RGB.
  • the displayed luminance and chromaticity parameters are converted from the initial chromaticity and luminance parameters to the specified chromaticity and luminance parameters, that is, the first display screen is converted to Specify the color gamut for display.
  • the intermediate RGB to which the initial color gamut of the first display screen needs to be converted is calculated by the matrix corresponding to the specified color gamut, and then the intermediate RGB is used as the output RGB of the first display screen, and the corresponding chromaticity is carried out.
  • the measurement of the brightness parameter it is determined whether the first display screen is converted to the specified color gamut. If not, iteratively transforms the output RGB according to the preset step size until it is determined that the first display screen is converted to the specified color gamut, and the corresponding target is obtained.
  • the gamma value is first determined according to the measured gray value of each display screen, which improves the accuracy of matrix conversion.
  • the intermediate RGB obtained according to the matrix calculation is not directly used as the first display screen in the specified color gamut.
  • the target RGB is displayed, but iteratively determines the target RGB, which further improves the accuracy of the generated first LUT.
  • the above-mentioned process of obtaining the first LUT can also be performed in other devices or processors.
  • the color module 4036 does not include the first LUT generation module, and the communication module in the system does not include the first LUT generation module.
  • the third LUT needs to be generated, the first LUT can be directly requested from other devices or processors, which can reduce the system data processing consumption; or the communication module has obtained the first LUT in advance and stored it in the storage module.
  • the first LUT is read from the storage module. Because the first initial RGB can be a value set by default in the program, the target RGB obtained or stored by the system can also be the target RGB corresponding to the first initial RGB, which reduces the storage pressure.
  • the system can also determine the first LUT according to the first initial RGB set by default and the acquired target RGB.
  • the second LUT is a one-to-one correspondence table of conversion from the second initial RGB to the display RGB when the specified display screen is converted from the specified color gamut to the corresponding color gamut under different application scenarios. If the designated display screen used by the multiple first display screens is the same, then the second LUTs used by them are also the same.
  • the current color gamut (specified color gamut) of the designated display screen can be indicated by the second initial RGB, for example, the input second initial RGB is (0, 0, 16), (0, 32, 16), ..., (255, 255, 255), the corresponding chrominance and luminance parameters are: specify chrominance and luminance parameter 1, specify chrominance and luminance parameter 2, ..., specify chrominance and luminance parameter N, convert to different application modes After displaying the color gamut, the corresponding relationship is shown in Table 5:
  • Table 5 specifies the color gamut relationship between the display and different application modes
  • the conversion from the specified color gamut to the first display color gamut corresponding to the first application mode is reflected in the conversion of the specified luminance and chromaticity parameters to the display chromaticity and luminance parameters, correspondingly, the output RGB of the specified display screen Convert from second initial RGB to display RGB.
  • the second LUT may only include the correspondence between the second initial RGB and the display RGB, and each application mode corresponds to a second LUT.
  • the second LUT is generated in other devices or processors, and then the communication interface of the color gamut correction system 40 acquires the second LUT from the server when the third LUT needs to be generated; or the color gamut correction system 40 has acquired and stored the second LUT in advance.
  • the second LUT when the third LUT needs to be generated, the second LUT can be read from the memory.
  • the first LUT and the second LUT are fused to generate a third LUT, including: acquiring the first initial RGB in the first LUT and its corresponding target RGB; determining the real-time first display RGB obtained by the target RGB mapping according to the second LUT; The first initial RGB and the first third LUT showing the mapping relationship of RGB.
  • FIG. 4F is a schematic diagram of a fusion process of a first LUT and a second LUT provided by an embodiment of the present application.
  • the target RGB corresponds to the specified chromaticity and luminance parameters
  • the second initial RGB also corresponds to the specified chromaticity and luminance parameters
  • it can be considered that the correspondence between the second initial RGB and the display RGB is It is the correspondence between target RGB and display RGB.
  • the target RGB2 corresponding to the first initial RGB2 (0, 0, 32) is (0, 0, 40)
  • the target RGB2 is the intermediate value of the second initial RGB2 and the second initial RGB3 in the second LUT
  • the target RGB2 is the intermediate value of the second initial RGB2 and the second initial RGB3 in the second LUT
  • the first RGB is input to the third LUT for the initial image originally displayed on the first display screen (described by the first RGB) , match or interpolate it with the first initial RGB in the third LUT to obtain the second RGB corresponding to the output, which is used as the display RGB corresponding to the first RGB.
  • the first display displays the chrominance and luminance parameters corresponding to the second RGB, that is, the initial image is converted to the first application mode for display.
  • a third LUT corresponding to each application mode is generated, and then it is determined according to the third LUT that when the first display screen is converted from the current color gamut to the target color gamut corresponding to each application mode for display, the The correspondence between the first RGB conversion of a pixel to the second RGB. The efficiency of the first display screen from the initial color gamut to the target color gamut of different application modes is improved.
  • obtaining the first LUT of each display screen converted from the first initial RGB to the target RGB corresponding to the specified chromaticity and brightness parameters is to describe the color corresponding to each display screen in consideration of the actual characteristics of each display screen panel
  • the second initial RGB corresponding to the specified chromaticity and luminance parameters is obtained and converted to the second LUT of the display RGB in each application mode, and the second LUT is fused according to the first LUT to generate the first LUT.
  • the second LUT can be updated. For example, if a new application mode is added to the mobile phone, including sleep mode, eye protection mode for teenagers, etc., the possibility of specifying the display screen to switch to a different application mode increases, that is, the number of second LUTs increases. Or, if the previous application mode is updated, for example, the contrast and brightness of the video mode are optimized, then the second LUT corresponding to the video mode is updated. In this case, the color gamut correction system 40 can obtain the updated second LUT from other devices through the communication interface.
  • the color gamut correction system 40 After receiving the updated second LUT sent by the other device, the color gamut correction system 40 stores it in the ROM, and the color module The fusion module in 4036 reads the ROM as needed, obtains the updated second LUT, and then fuses the generated first LUT to generate the third LUT. This method can update the third LUT in real time and improve the display efficiency of the display screen in different application modes.
  • FIG. 5 is a display processing apparatus provided by an embodiment of the present application, so as to execute the display method in the foregoing embodiment.
  • the device 70 for controlling screen brightness provided in this embodiment may include:
  • an obtaining module 701 configured to obtain the first RGB of the first pixel to be displayed
  • the processing module 702 is used to obtain the third display lookup table LUT corresponding to the first application mode, and the third LUT corresponding to the first application mode is generated according to the fusion of the first LUT and the second LUT corresponding to the first application mode,
  • the third LUT includes a one-to-one correspondence between a plurality of first initial RGB and first display RGB, the first initial RGB corresponds to initial chromaticity and luminance parameters, and the first display RGB corresponds to the first application mode The chromaticity and luminance parameters of the The one-to-one mapping relationship between the initial RGB and the display RGB, the second initial RGB corresponds to the specified luminance and chrominance parameters, the display RGB is related to the application mode, and the same initial RGB corresponds to different application modes.
  • the display RGB is different, and one application mode corresponds to one of the second LUTs;
  • the processing module 702 is further configured to determine the second RGB corresponding to the first RGB in the first application mode according to the third LUT, and send the second RGB to the first display for display.
  • the obtaining module 701 is further configured to: obtain a third LUT corresponding to the second application mode, and the third LUT corresponding to the second application mode is based on the first LUT and the corresponding second application mode.
  • the second LUT is fused to generate.
  • the obtaining module 701 is further configured to: obtain the first LUT from the memory; or receive the first LUT from the server; or receive from the server according to the preset first initial RGB or obtain the corresponding LUT from the memory. target RGB, and then determine the first LUT.
  • the obtaining module 701 is further configured to: obtain a second LUT corresponding to the first application mode from a plurality of second LUTs stored in the memory; or receive a second LUT corresponding to the first application mode from the server; The second LUT corresponding to the application mode.
  • the obtaining module 701 is further configured to: receive the updated second LUT from the server.
  • the obtaining module 701 is specifically configured to: receive the updated second LUT from the server at a preset time or when a preset instruction is received.
  • the processing module 702 is specifically configured to: obtain the first initial RGB in the first LUT and the corresponding target RGB; determine the real-time first RGB obtained by mapping the target RGB according to the second LUT. a display RGB; generating the third LUT including the mapping relationship between the first initial RGB and the first display RGB.
  • the processing module 702 is specifically configured to: convert the first initial RGB to obtain intermediate RGB; perform iterative transformation on the intermediate RGB according to a preset step size to obtain the target RGB; The one-to-one mapping relationship between the first initial RGB and the target RGB determines the first LUT.
  • processing module 702 is specifically configured to:
  • the processing module 702 is specifically configured to: calculate and obtain the intermediate chromaticity and luminance parameters corresponding to the RGB i+1 according to the following formula:
  • the xyY i+1 is the intermediate chromaticity and luminance parameter corresponding to the RGB i+1
  • the xyY i is the intermediate chromaticity and luminance parameter corresponding to the RGB i
  • the RGB includes the R parameter
  • the G parameter and B parameter ⁇ R, ⁇ G, ⁇ B are the R parameter, the preset step size of the G parameter and the B parameter respectively
  • the ⁇ x R , ⁇ y R are the R parameter according to the preset step size
  • the change value of the chrominance parameter caused by the long iteration, ⁇ Y R is the change value of the luminance parameter caused by the iteration of the R parameter according to the preset step size
  • ⁇ x G , ⁇ y G are the value of the G parameter according to the preset step size
  • the change value of the chrominance parameter caused by the iteration, ⁇ Y G is the change value of the luminance parameter caused by the iteration of the G parameter according to the preset step size
  • the processing module 702 is specifically configured to: perform gamma transformation on the first initial RGB based on the first Gamma value to obtain a first linear rgb; convert the first linear rgb according to a first transformation matrix , to obtain the specified chromaticity and luminance parameters;
  • the intermediate RGB is obtained by performing inverse gamma transformation on the second linear rgb based on a second Gamma value determined according to a measured luminance parameter of the first display.
  • each module of the apparatus shown in FIG. 5 is only a division of logical functions, and may be fully or partially integrated into a physical entity in actual implementation, or may be physically separated.
  • these modules can all be implemented in the form of software calling through processing elements; they can also all be implemented in hardware; some modules can also be implemented in the form of software calling through processing elements, and some modules can be implemented in hardware.
  • the processing module 702 may be a separately established processing element, or may be integrated into a certain chip of the apparatus, and may also be stored in the memory of the apparatus in the form of a program, and a certain processing element of the apparatus may The functions of the processing module 702 are called and executed.
  • the implementation of other modules is similar.
  • each step of the above-mentioned method or each of the above-mentioned units may be completed by an integrated logic circuit of hardware in the processor element or an instruction in the form of software.
  • the above modules may be one or more integrated circuits configured to implement the above methods, such as: one or more application-specific integrated circuits (ASICs), or, one or more digital signal processors (digital signal processors) signal processor, DSP), or, one or more field-programmable gate arrays (FPGA), etc.
  • ASICs application-specific integrated circuits
  • DSP digital signal processors
  • FPGA field-programmable gate arrays
  • the processing element may be a general-purpose processor, such as a central processing unit (central processing unit, CPU) or other processors that can call programs.
  • these modules can be integrated together and implemented in the form of a system-on-a-chip (SOC).
  • SOC system-on-a-chip
  • FIG. 6 is a schematic diagram of a hardware structure of an apparatus for display processing provided by an embodiment of the present application.
  • the display processing apparatus 80 includes: a processor 801 , a transceiver 802 , a controller 803 and a screen 804 .
  • the transceiver 801 is used to obtain the first RGB of the first pixel to be displayed;
  • the processor 802 is configured to obtain a third display lookup table LUT corresponding to the first application mode, and the third LUT corresponding to the first application mode is fused according to the first LUT and the second LUT corresponding to the first application mode.
  • the third LUT includes a one-to-one correspondence between multiple first initial RGBs and first display RGBs, the first initial RGBs correspond to initial chromaticity and luminance parameters, and the first display RGBs correspond to the first The chromaticity and luminance parameters of the application mode;
  • the first LUT includes a one-to-one mapping relationship between a plurality of first initial RGB and target RGB, and the target RGB corresponds to a specified chromaticity and luminance parameter;
  • the second LUT includes a plurality of The one-to-one mapping relationship between the second initial RGB and the display RGB, the second initial RGB corresponds to the specified luminance and chrominance parameters, the display RGB is related to the application mode, and the same second initial RGB is used in different applications The corresponding display RGB in the mode is different
  • the controller 803 is configured to determine the second RGB corresponding to the first RGB in the first application mode according to the third LUT, and send the second RGB to the screen 804 for display.
  • the display processing apparatus in this embodiment can execute the display method in the foregoing embodiment, and the specific process and steps of obtaining the third LUT have been described in detail in the foregoing embodiment, and will not be repeated here.
  • the transceiver 801 can be used to obtain the first RGB corresponding to the target image to be displayed when displayed in the initial color gamut of the first display screen, and obtain the first RGB according to the first LUT.
  • the controller 803 outputs the second RGB to the screen 804 and controls the screen 804 to display in the second RGB, that is, the color corresponding to the target image in the first application mode is completed. The process of displaying the domain will not be repeated here.
  • the apparatus 80 for display processing may further include a memory 805, and the memory 804 is used for storing the first LUT, the second LUT and/or the third LUT obtained from other servers.
  • the screen 804 is usually composed of an organic light emitting display (Organic Light Emitting Display, OLED for short) or an active matrix organic light emitting diode (Active-matrix organic light emitting diode, AMOLED).
  • OLED Organic Light Emitting Display
  • AMOLED Active-matrix organic light emitting diode
  • the screen 804 is used as an OLED screen for illustration.
  • the controller 803 in the display processing device generates corresponding grayscale values according to the second RGB.
  • the screen is driven with different voltages, it can display different brightness, so as to display the display brightness value corresponding to the input grayscale value.
  • the controller 803 may include a voltage generator 8031 and a brightness controller 8032 .
  • the voltage generator can be used to generate a corresponding reference voltage according to the input gray-scale value; and the brightness controller can be used to control the screen to display a display brightness value corresponding to the input gray-scale value based on the reference voltage.
  • the voltage generator 8031 may be a digital to analog converter (digital to analog converter, DAC).
  • the digital-to-analog converter is used to convert the input grayscale value into an analog reference voltage value, so that the brightness controller 8032 can control the display brightness value of the screen according to the reference voltage, so that the screen displays the corresponding display brightness value when powered on.
  • the digital-to-analog converter can convert the input gray-scale value into an actual reference voltage value.
  • the corresponding reference voltage value will also change accordingly, so that the screen can emit light with different brightness under the excitation of different reference voltage value and current value, and display the actual image.
  • the processor 802, the transceiver 801, the controller 803 and the memory 805 can use a communication bus or other data paths to realize the transmission of data and signals. Due to the electrical connection between the memory 805 and the processor 802 and the controller 803, the first LUT and/or the second LUT stored in the memory 805 can be transmitted to the processor 802 to generate a third LUT, and then transmit and receive After the controller 801 determines the second RGB according to the obtained first RGB and the third LUT, it is transmitted to the controller 803 to determine the input grayscale value that the pixel should have according to the second RGB, and let the controller 803 determine the input grayscale value according to the input grayscale value. Control the display brightness value of each pixel of the screen 804, etc.
  • the processor 802 is usually the control center of the display processing device, and can be directly connected with different hardware parts such as the memory 805 by means of a communication bus, and by running or executing software programs and/or modules, and calling data stored in the memory , perform various functions of the terminal device and process data, so as to complete the brightness control operation of the screen.
  • the processor 71 may be a microcontroller unit (Microcontroller Unit, MCU), or a central processing unit (central processing unit, CPU), or an independent system-on-a-chip (system-on-a-chip, SOC), or a One or more integrated circuits configured to implement the above method, for example: one or more application specific integrated circuits (ASIC), or, one or more microprocessors (digital singnal processor, DSP), or, One or more field programmable gate arrays (field programmable gate array, FPGA), etc.
  • MCU microcontroller Unit
  • CPU central processing unit
  • SOC system-on-a-chip
  • ASIC application specific integrated circuits
  • DSP digital singnal processor
  • FPGA field programmable gate array
  • the processor 802 may include one or more processing units; and use different processing units to execute the above-mentioned different instructions and programs respectively, so as to perform different functions respectively.
  • While the memory 805 may be read-only memory (ROM) or other types of static storage devices that can store static information and instructions, random access memory (RAM) or other types of static storage devices that can store information and instructions
  • ROM read-only memory
  • RAM random access memory
  • dynamic storage devices which can also be electrically erasable programmable read-only memory (EEPROM), compact disc read-only memory (CD-ROM), or other optical disk storage, optical disks storage (including compact discs, laser discs, compact discs, digital versatile discs, Blu-ray discs, etc.), magnetic disk storage media or other magnetic storage devices, or capable of carrying or storing desired program code in the form of instructions or data structures and capable of being accessed by Any other medium accessed by the computer, but not limited to this.
  • the memory 805 may exist independently and be connected to the processor 802 and the transceiver 801 through a bus. Memory 805 may also be integrated with processor 802.
  • the memory 805 can also be used to store the application code for executing the solution of the present application, and the execution is controlled by the processor 802 .
  • the processor 802 is configured to execute the application program code stored in the memory 805, so as to implement the screen brightness control method provided by the above embodiments of the present application.
  • the display processing device also includes a pulse width modulation (Pulse Width Modulation, PWM) dimmer 806, and the PWM dimmer 806 can modulate the on-off of internal transistor gates or MOS transistor bases and other switching devices , thereby generating a series of pulses with the same pulse width, and by changing the pulse width or duty cycle to achieve different equivalent analog outputs, thereby adjusting the output brightness of the screen 804 .
  • PWM Pulse Width Modulation
  • the PWM dimmer 806 is electrically connected to the screen 804.
  • the PWM dimmer 806 can receive digital signals from the control chip and convert the digital signals into pulses with different pulse widths or duty cycles.
  • each pixel on the screen 804 will also display different brightness, thereby realizing the normal display and brightness adjustment of the image.
  • the PWM dimmer 806 may be electrically connected to the processor 802 or be a part of the controller 803 to adjust the display brightness of the screen 804 according to input data such as grayscale values.
  • the above-mentioned embodiments it may be implemented in whole or in part by software, hardware, firmware or any combination thereof.
  • a software program it can be implemented in whole or in part in the form of a computer program product.
  • the computer program product includes one or more computer instructions. When the computer program instructions are loaded and executed on the computer, all or part of the processes or functions described in the embodiments of the present application are generated.
  • the computer may be a general purpose computer, special purpose computer, computer network, or other programmable device.
  • the computer instructions may be stored in or transmitted from one computer-readable storage medium to another computer-readable storage medium, for example, the computer instructions may be downloaded from a website site, computer, server, or data center Transmission to another website site, computer, server, or data center by wire (eg, coaxial cable, optical fiber, digital subscriber line, DSL) or wireless (eg, infrared, wireless, microwave, etc.).
  • the computer-readable storage medium can be any available medium that can be accessed by a computer or data storage devices including one or more servers, data centers, etc. that can be integrated with the medium.
  • the usable media may be magnetic media (eg, floppy disks, hard disks, magnetic tapes), optical media (eg, DVDs), or semiconductor media (eg, solid state disks (SSDs)), and the like.

Landscapes

  • Engineering & Computer Science (AREA)
  • Physics & Mathematics (AREA)
  • Computer Hardware Design (AREA)
  • General Physics & Mathematics (AREA)
  • Theoretical Computer Science (AREA)
  • Multimedia (AREA)
  • Signal Processing (AREA)
  • Image Processing (AREA)

Abstract

Embodiments of the present disclosure provide a display method and apparatus, and an electronic device. The method comprises: acquiring a first RGB of a first pixel to be displayed; acquiring a third display lookup table (LUT) corresponding to a first application mode, the third LUT being generated by means of fusion between a first LUT and a second LUT which corresponds to the first application mode and comprising one-to-one correspondences between multiple first initial RGBs and first display RGBs, the first LUT comprising one-to-one mapping relationships between the multiple first initial RGBs and target RGBs, the second LUT comprising one-to-one mapping relationships between multiple second initial RGBs and display RGBs; and determining, according to the third LUT, the second RGB which the first RGB corresponds to in the first application mode, and sending the second RGB to a first display for displaying. According to the embodiments of the present disclosure, the efficiency and accuracy of color space conversion by the display screen can be effectively improved.

Description

一种显示方法、装置及电子设备A display method, device and electronic device 技术领域technical field
本申请涉及显示技术领域,尤其涉及一种显示方法、装置及电子设备。The present application relates to the field of display technology, and in particular, to a display method, device and electronic device.
背景技术Background technique
色域是对一种颜色进行编码的方法,也指一个技术系统能够产生的颜色的总合。在计算机图形处理中,色域是颜色的某个完全的子集。颜色子集最常见的应用是用来精确地代表一种给定的情况。例如一个给定的色彩空间或是某个输出装置的呈色范围。对于不同显示器而言,显示的色域不一样,导致最终相同的图形在不同显示器上显示不同。而客观量测的指标,我们可以按照CIE1931色彩空间来量化。Color gamut is a method of encoding a color, and also refers to the totality of colors that a technical system can produce. In computer graphics, a color gamut is some complete subset of colors. The most common application of color subsets is to accurately represent a given situation. For example, a given color space or the color rendering range of an output device. For different monitors, the displayed color gamut is different, resulting in the same graphics being displayed differently on different monitors. The objectively measured indicators can be quantified according to the CIE1931 color space.
CIE 1931色彩空间(也叫做CIE 1931 XYZ色彩空间)是其中一个最先采用数学方式来定义的色彩空间。CIE 1931色彩空间将每个颜色关联到三色刺激值X、Y和Z,其中Y参数是颜色的明度或亮度的测量。颜色的色度通过X、Y和Z的两个导出参数x和y来指定,导出的色彩空间用x,y,Y来指定,它叫做CIE xyY色彩空间并在实践中广泛用于指定颜色。CIE 1931色彩空间是特殊的,因为它是基于人类颜色视觉的直接测定,并充当很多其他色彩空间的定义基础。The CIE 1931 color space (also known as the CIE 1931 XYZ color space) was one of the first color spaces to be defined mathematically. The CIE 1931 color space associates each color with tristimulus values X, Y, and Z, where the Y parameter is a measure of the lightness or brightness of the color. The chromaticity of a color is specified by the two export parameters x and y of X, Y and Z. The exported color space is specified by x, y, Y, which is called the CIE xyY color space and is widely used in practice to specify colors. The CIE 1931 color space is special because it is based on direct measurements of human color vision and serves as the basis for the definition of many other color spaces.
sRGB色彩空间、DCI-P3或Adobe RGB等是用于显示器、打印机以及因特网的标准色彩空间。以sRGB为例,在显示器中输出RGB色彩值时,除了在对应的RGB色彩值进行显示之外,还会在其对应的CIE 1931色彩空间进行显示。因此,当需要将显示器从一个CIE 1931色彩空间转换到另一个CIE 1931色彩空间进行显示时,可以通过输入不同RGB色彩值来实现转换。The sRGB color space, DCI-P3 or Adobe RGB, etc. are standard color spaces used in monitors, printers, and the Internet. Taking sRGB as an example, when outputting RGB color values in a monitor, in addition to displaying in the corresponding RGB color values, it will also display in its corresponding CIE 1931 color space. Therefore, when the display needs to be converted from one CIE 1931 color space to another CIE 1931 color space for display, the conversion can be achieved by inputting different RGB color values.
在这个过程中需要确定sRGB色彩空间与CIE 1931色彩空间之间的对应关系,如果通过矩阵变换计算对应关系,存在准确度不高的问题;而通过量测结果生成的对应关系表查找对应关系,又将耗费大量的人力成本和时间成本进行量测。In this process, it is necessary to determine the corresponding relationship between the sRGB color space and the CIE 1931 color space. If the corresponding relationship is calculated by matrix transformation, there is a problem of low accuracy; It will consume a lot of labor cost and time cost for measurement.
发明内容SUMMARY OF THE INVENTION
本申请提供一种显示方法、装置及电子设备,能够提高显示器从一个色域转换到另个色域进行显示的准确度和效率。The present application provides a display method, device and electronic device, which can improve the accuracy and efficiency of the display converted from one color gamut to another color gamut for display.
第一方面,本申请实施例提供一种显示方法,该方法包括:获取待显示的第一像素的第一RGB;获取第一应用模式对应的第三显示查找表LUT,第一应用模式对应的第三LUT根据第一LUT和第一应用模式对应的第二LUT融合生成,第三LUT包括多个第一初始RGB与第一显示RGB的一一对应关系,第一初始RGB对应初始色度与亮度参数,第一显示RGB对应第一应用模式的色度与亮度参数;第一LUT包括多个第一初始RGB与目标RGB的一一映射关系,目标RGB对应指定色度与亮度参数;第二LUT包括多个第二初始RGB与显示RGB的一一映射关系,第二初始RGB对应指定亮度与色度参数,显示RGB与应用模式相关,同一个第二初始RGB在不同的应用模式下对应的显示RGB不同,一个应用模式对应一个第二LUT;根据第三LUT确定第一RGB在第一应用模式对应的第二RGB,并将第二RGB发送给第一显示器进行显示。In a first aspect, an embodiment of the present application provides a display method, the method includes: acquiring a first RGB of a first pixel to be displayed; acquiring a third display lookup table LUT corresponding to the first application mode, the The third LUT is generated according to the fusion of the first LUT and the second LUT corresponding to the first application mode. The third LUT includes a one-to-one correspondence between the first initial RGB and the first display RGB. The first initial RGB corresponds to the initial chromaticity and Luminance parameters, the first display RGB corresponds to the chromaticity and luminance parameters of the first application mode; the first LUT includes a one-to-one mapping relationship between a plurality of first initial RGB and target RGB, and the target RGB corresponds to the specified chromaticity and luminance parameters; the second The LUT includes a one-to-one mapping relationship between a plurality of second initial RGB and display RGB. The second initial RGB corresponds to the specified luminance and chrominance parameters, and the display RGB is related to the application mode. The same second initial RGB corresponds to different application modes. The display RGB is different, and one application mode corresponds to a second LUT; the second RGB corresponding to the first RGB in the first application mode is determined according to the third LUT, and the second RGB is sent to the first display for display.
或者,第一方面提供的显示方法包括:获取待显示的第一像素的第一RGB;根据 第一应用模式获取对应的第三查找表LUT,第三LUT根据第一LUT与第二LUT融合生成;其中,不同的应用模式对应不同的第二LUT;第三LUT包括多个第一初始RGB与第一显示RGB的一一映射关系,第一显示RGB与第一应用模式对应;第一LUT包括多个第一初始RGB与目标RGB的一一映射关系,第一初始RGB对应初始色度与亮度参数,目标RGB对应指定色度与亮度参数;第二LUT包括多个第二初始RGB与显示RGB的一一映射关系,第二初始RGB对应指定色度与亮度参数,显示RGB与应用模式相关,同一个初始RGB在不同的应用模式下对应的显示RGB不同;根据第三LUT确定第一RGB在第一应用模式下对应的第二RGB;将第二RGB发送给显示器进行显示。Alternatively, the display method provided by the first aspect includes: obtaining the first RGB of the first pixel to be displayed; obtaining a corresponding third lookup table LUT according to the first application mode, and the third LUT is generated by merging the first LUT and the second LUT ; wherein, different application modes correspond to different second LUTs; the third LUT includes a one-to-one mapping relationship between a plurality of first initial RGB and the first display RGB, and the first display RGB corresponds to the first application mode; the first LUT includes A one-to-one mapping relationship between a plurality of first initial RGB and target RGB, the first initial RGB corresponds to initial chromaticity and luminance parameters, and the target RGB corresponds to specified chromaticity and luminance parameters; the second LUT includes a plurality of second initial RGB and display RGB The one-to-one mapping relationship, the second initial RGB corresponds to the specified chromaticity and luminance parameters, the display RGB is related to the application mode, and the same initial RGB corresponds to different display RGB in different application modes; according to the third LUT, it is determined that the first RGB is in The corresponding second RGB in the first application mode; the second RGB is sent to the display for display.
在本申请实施例中,获取每个显示屏由第一初始RGB转换到指定色度与亮度参数对应的目标RGB的第一LUT,是考虑到每个显示屏面板实际特性,用于描述每个显示屏对应的色彩空间,提高了显示的准确性;另外,获取指定色度与亮度参数对应的第二初始RGB转换到每种应用模式下的显示RGB的第二LUT,并根据第一LUT融合第二LUT生成第三LUT,可以只测量获取该指定色度与亮度参数与不同应用模式下显示RGB的对应关系,再结合每个显示屏的第一LUT,即可获取每个显示屏转换到不同应用模式下时RGB的对应关系,而不用测量每个显示屏转换到不同应用模式下时RGB的对应关系,能够在一组测试参数的情况下生成不同场景下所需要的查找表,减少测量时间,提升色彩空间转换效率,同时能保证转换准确性。In the embodiment of the present application, obtaining the first LUT for converting each display screen from the first initial RGB to the target RGB corresponding to the specified chromaticity and luminance parameters is to take into account the actual characteristics of each display panel and is used to describe each display panel. The color space corresponding to the display screen improves the display accuracy; in addition, the second initial RGB corresponding to the specified chromaticity and luminance parameters is obtained and converted to the second LUT of the display RGB in each application mode, and fused according to the first LUT The second LUT generates the third LUT. You can only measure and obtain the corresponding relationship between the specified chromaticity and luminance parameters and the RGB displayed in different application modes. Combined with the first LUT of each display, you can obtain the conversion of each display to The corresponding relationship of RGB in different application modes, instead of measuring the corresponding relationship of RGB when each display screen is converted to different application modes, can generate the look-up table required in different scenarios under the condition of a set of test parameters, reducing the measurement Time, improve color space conversion efficiency, and ensure conversion accuracy.
在一个可选的示例中,该方法还包括:获取第二应用模式对应的第三LUT,第二应用模式对应的第三LUT根据第一LUT和第二应用模式对应的第二LUT融合生成。In an optional example, the method further includes: acquiring a third LUT corresponding to the second application mode, and generating the third LUT corresponding to the second application mode according to the fusion of the first LUT and the second LUT corresponding to the second application mode.
在一个可选的示例中,该方法还包括:从存储器获取第一LUT;或从服务器接收第一LUT;或根据预先设定的第一初始RGB从服务器接收或从存储器获取对应的目标RGB,进而确定第一LUT。In an optional example, the method further includes: obtaining the first LUT from the memory; or receiving the first LUT from the server; or receiving the corresponding target RGB from the server according to the preset first initial RGB or obtaining the corresponding target RGB from the memory, Further, the first LUT is determined.
本申请实施例中,存储器中只存储目标RGB,通过预先设置的第一初始RGB获取不同第一LUT对应的目标RGB即可,而不需要重复存储每个第一LUT中的第一RGB,减少存储压力。In the embodiment of the present application, only the target RGB is stored in the memory, and the target RGB corresponding to different first LUTs can be obtained through the preset first initial RGB, instead of repeatedly storing the first RGB in each first LUT, reducing the need for storage pressure.
在一个可选的示例中,该方法还包括:从存储器存储的多个第二LUT中获取与第一应用模式对应的第二LUT;或从服务器接收与第一应用模式对应的第二LUT。In an optional example, the method further includes: acquiring a second LUT corresponding to the first application mode from a plurality of second LUTs stored in the memory; or receiving a second LUT corresponding to the first application mode from the server.
在一个可选的示例中,该方法还包括:从服务器接收更新的第二LUT。In an optional example, the method further includes: receiving an updated second LUT from the server.
在一个可选的示例中,从服务器接收更新的第二LUT包括:在预设时间或者接收到预设指令的情况下,从服务器接收更新的第二LUT。In an optional example, receiving the updated second LUT from the server includes: receiving the updated second LUT from the server at a preset time or when a preset instruction is received.
本实施例中,第二LUT是指定色度与亮度参数转换到不同应用模式下的查找表,在应用模式改变的情况下,需要获取更新的第二LUT,在预设时间获取更新的第二LUT,可以保证获取第二LUT的实时性;在接收到预设指令时获取更新的第二LUT,可以保证获取第二LUT的实用性。In this embodiment, the second LUT is a lookup table that specifies the chrominance and luminance parameters to be converted to different application modes. When the application mode changes, an updated second LUT needs to be acquired, and the updated second LUT is acquired at a preset time. The LUT can ensure the real-time performance of acquiring the second LUT; and acquiring the updated second LUT when the preset instruction is received can ensure the practicability of acquiring the second LUT.
在一个可选的示例中,获取第三LUT包括:获取第一LUT中的第一初始RGB及其对应的目标RGB;确定目标RGB根据第二LUT映射获得的实时第一显示RGB;生成包括第一初始RGB和第一显示RGB的映射关系的第三LUT。In an optional example, acquiring the third LUT includes: acquiring the first initial RGB in the first LUT and its corresponding target RGB; determining the real-time first display RGB obtained by mapping the target RGB according to the second LUT; An initial RGB and a first third LUT showing the mapping relationship of RGB.
本实施例中,第一LUT中的第一初始RGB映射到目标RGB,目标RGB对应指 定色度与亮度参数,第二LUT中第二初始RGB也对应指定色度与亮度参数,那么可以直接根据目标RGB遍历第二LUT,并与第二初始RGB进行匹配,如果匹配成功,则可以直接确定该第二初始RGB对应的第一显示RGB与第一初始RGB的对应关系,并根据该对应关系确定第三LUT,这个过程效率高,且计算开销小。In this embodiment, the first initial RGB in the first LUT is mapped to the target RGB, the target RGB corresponds to the specified chromaticity and luminance parameters, and the second initial RGB in the second LUT also corresponds to the specified chromaticity and luminance parameters. The target RGB traverses the second LUT and matches with the second initial RGB. If the matching is successful, the corresponding relationship between the first display RGB corresponding to the second initial RGB and the first initial RGB can be directly determined, and determined according to the corresponding relationship The third LUT, this process has high efficiency and low computational overhead.
在一个可选的示例中,获取第一LUT包括:对第一初始RGB进行转换,获得中间RGB;按照预设步长对中间RGB进行迭代变换,获得目标RGB;根据第一初始RGB和目标RGB的一一映射关系确定第一LUT。In an optional example, acquiring the first LUT includes: converting the first initial RGB to obtain the intermediate RGB; performing iterative transformation on the intermediate RGB according to a preset step size to obtain the target RGB; according to the first initial RGB and the target RGB The one-to-one mapping relationship determines the first LUT.
本实施例中,没有将根据矩阵计算获得的中间RGB直接作为目标RGB,而是反复迭代确定显示屏在指定色度与亮度参数显示时对于的RGB为目标RGB,提升了生成的第一LUT的准确性。In this embodiment, the intermediate RGB obtained according to the matrix calculation is not directly used as the target RGB, but iteratively determines the RGB for the display screen when the specified chromaticity and luminance parameters are displayed as the target RGB, which improves the generated first LUT. accuracy.
在一个可选的示例中,按照预设步长对中间RGB进行迭代变换,获得目标RGB,包括:S1:按照预设步长对RGB i进行变换,并获得对应色度与亮度参数变化值;S2:根据预设步长获得RGB i+1,根据RGB i对应的中间色度与亮度参数和色度与亮度参数变化值获取RGB i+1对应的中间色度与亮度参数;S3:判断RGB i+1对应的中间色度与亮度参数与指定色度与亮度参数的差值是否小于预设阈值;若RGB i+1对应的中间色度与亮度参数与指定色度与亮度参数亮度差值不小于预设阈值,则令i=i+1,并重复执行S1-S3,直至RGB i+1对应的中间色度与亮度参数与指定色度与亮度参数差值小于预设阈值,当i=1时,RGB i为中间RGB。 In an optional example, iteratively transforms the intermediate RGB according to the preset step size to obtain the target RGB, including: S1: transform RGB i according to the preset step size, and obtain the corresponding chromaticity and luminance parameter change values; S2: Obtain RGB i+1 according to the preset step size, and obtain the intermediate chromaticity and luminance parameters corresponding to RGB i +1 according to the intermediate chromaticity and luminance parameters and the change values of the chrominance and luminance parameters corresponding to RGB i ; S3: Determine RGB Whether the difference between the intermediate chrominance and brightness parameters corresponding to i +1 and the specified chrominance and brightness parameters is less than the preset threshold; is not less than the preset threshold, then set i=i+1, and repeat S1-S3 until the difference between the intermediate chromaticity and luminance parameters corresponding to RGB i+1 and the specified chromaticity and luminance parameters is less than the preset threshold, when i When =1, RGB i is the intermediate RGB.
在一个可选的示例中,根据RGB i对应的中间色度与亮度参数和色度与亮度参数变化值获取RGB i+1对应的中间色度与亮度参数,包括按照如下公式计算获得RGB i+1对应的中间色度与亮度参数: In an optional example, obtaining the intermediate chromaticity and luminance parameters corresponding to RGB i +1 according to the intermediate chromaticity and luminance parameters and the change values of the chrominance and luminance parameters corresponding to RGB i, including obtaining RGB i+ by calculating according to the following formula 1 Corresponding intermediate chromaticity and brightness parameters:
Figure PCTCN2020110917-appb-000001
Figure PCTCN2020110917-appb-000001
其中xyY i+1为RGB i+1对应的中间色度与亮度参数,xyY i为RGB i对应的中间色度与亮度参数,RGB中包括R参数,G参数和B参数,ΔR,ΔG,ΔB分别为R参数,G参数和B参数的预设步长,Δx R,Δy R为R参数按照预设步长迭代造成的色度参数变化值,ΔY R为为R参数按照预设步长迭代造成的亮度参数变化值,Δx G,Δy G为G参数按照预设步长迭代造成的色度参数变化值,ΔY G为G参数按照预设步长迭代造成的亮度参数变化值,Δx B,Δy B为B参数按照预设步长迭代造成的色度参数变化值,ΔY B为B参数按照预设步长迭代造成的亮度参数变化值。 Where xyY i+1 is the intermediate chromaticity and brightness parameters corresponding to RGB i+1 , xyY i is the intermediate chromaticity and brightness parameters corresponding to RGB i , RGB includes R parameters, G parameters and B parameters, ΔR, ΔG, ΔB are the preset step sizes of the R parameter, the G parameter and the B parameter, respectively, Δx R , Δy R are the chromaticity parameter changes caused by the R parameter iteration according to the preset step size, ΔY R is the R parameter iterated according to the preset step size The resulting changes in luminance parameters, Δx G , Δy G are the changes in the chrominance parameters caused by the iterations of the G parameters according to the preset step size, ΔY G is the changes in the luminance parameters caused by the iterations of the G parameters according to the preset step sizes, Δx B , Δy B is the change value of the chrominance parameter caused by the iteration of the B parameter according to the preset step size, and ΔY B is the change value of the luminance parameter caused by the iteration of the B parameter according to the preset step size.
在一个可选的示例中,对第一初始RGB进行转换,获得中间RGB,包括:基于第一Gamma值对第一初始RGB进行伽马变换,得到第一线性rgb;根据第一变换矩阵对第一线性rgb进行转换,获得指定色度与亮度参数;根据第二变换矩阵对指定亮度与色度参数进行转换,获得第二线性rgb,第二变换矩阵根据第一显示器的测量亮度参数生成;基于第二Gamma值对第二线性rgb进行反伽马变换,获得中间RGB,第二Gamma值根据第一显示器的测量亮度参数确定。In an optional example, converting the first initial RGB to obtain the intermediate RGB includes: performing gamma transformation on the first initial RGB based on the first Gamma value to obtain the first linear rgb; A linear rgb is converted to obtain the specified chrominance and luminance parameters; the specified luminance and chrominance parameters are converted according to the second transformation matrix to obtain the second linear rgb, and the second transformation matrix is generated according to the measured luminance parameters of the first display; based on The second Gamma value performs inverse gamma transformation on the second linear rgb to obtain intermediate RGB, and the second Gamma value is determined according to the measured brightness parameter of the first display.
第二方面,本申请实施例提供一种显示方法,应用于服务器,该方法包括:生成第二LUT,第二LUT包括多个第二初始RGB与显示RGB的一一映射关系,显示RGB与应用模式相关,同一个第二初始RGB在不同的应用模式下对应的显示RGB不同,一个应用模式对应一个第二LUT;向终端发送第二LUT。In a second aspect, an embodiment of the present application provides a display method, which is applied to a server. The method includes: generating a second LUT, where the second LUT includes a one-to-one mapping relationship between a plurality of second initial RGB and display RGB, and the display RGB and the application Mode related, the same second initial RGB corresponds to different display RGB in different application modes, one application mode corresponds to one second LUT; the second LUT is sent to the terminal.
本实施例中,由服务器生成第二LUT,然后将第二LUT发送给终端,以便终端结合第一LUT和第二LUT生成第三LUT,因为第二LUT只与应用模式和指定色度与亮度参数相关,那么在前两者确定的情况下,可以统一由服务器下发第二LUT,减少终端的计算资源开销。In this embodiment, the server generates the second LUT, and then sends the second LUT to the terminal, so that the terminal combines the first LUT and the second LUT to generate the third LUT, because the second LUT is only related to the application mode and the specified chrominance and luminance If the parameters are related, then if the first two are determined, the second LUT can be uniformly delivered by the server to reduce the computing resource overhead of the terminal.
在一个可选的示例中,生成第二LUT包括:对第二初始RGB进行转换,获得显示RGB,使得显示RGB对应的第一应用模式下的显示色度与亮度参数;根据第二初始RGB与显示RGB之间的一一映射关系生成第一应用模式对应的第二LUT。In an optional example, generating the second LUT includes: converting the second initial RGB to obtain display RGB, so that the display chromaticity and luminance parameters in the first application mode corresponding to the display RGB are displayed; A one-to-one mapping relationship between RGB is displayed to generate a second LUT corresponding to the first application mode.
在一个可选的示例中,该方法还包括:生成第一LUT,第一LUT包括多个第一初始RGB与目标RGB的一一映射关系,目标RGB对应指定色度与亮度参数;向终端发送第一LUT。In an optional example, the method further includes: generating a first LUT, where the first LUT includes a one-to-one mapping relationship between a plurality of first initial RGBs and target RGBs, and the target RGBs correspond to specified chromaticity and luminance parameters; sending a message to the terminal First LUT.
本申请实施例中,由服务器生成第一LUT,并发送给终端,因为服务器可以获取每个显示屏的色度与亮度参数,并生成每个显示屏对应的第一LUT,能有效减少终端的计算资源开销。In the embodiment of the present application, the server generates the first LUT and sends it to the terminal, because the server can obtain the chromaticity and brightness parameters of each display screen, and generate the first LUT corresponding to each display screen, which can effectively reduce the terminal's Computing resource overhead.
在一个可选的示例中,生成第一LUT包括:对第一初始RGB进行转换,获得中间RGB;按照预设步长对中间RGB进行迭代变换,获得目标RGB;根据第一初始RGB和目标RGB的一一映射关系确定第一LUT。In an optional example, generating the first LUT includes: converting the first initial RGB to obtain the intermediate RGB; performing iterative transformation on the intermediate RGB according to a preset step size to obtain the target RGB; according to the first initial RGB and the target RGB The one-to-one mapping relationship determines the first LUT.
在一个可选的示例中,该方法还包括:生成更新的第二LUT,更新的第二LUT为更新的第一应用模式对应的第二LUT;或更新的第二LUT为新增的应用模式对应的第二LUT;向终端发送更新的第二LUT。In an optional example, the method further includes: generating an updated second LUT, where the updated second LUT is a second LUT corresponding to the updated first application mode; or the updated second LUT is a newly added application mode The corresponding second LUT; the updated second LUT is sent to the terminal.
第三方面,本申请实施例提供一种显示处理的装置,该装置包括处理模块,获取模块和处理模块,其中,获取模块,用于获取待显示的第一像素的第一RGB;处理模块,用于获取第一应用模式对应的第三显示查找表LUT,第一应用模式对应的第三LUT根据第一LUT和第一应用模式对应的第二LUT融合生成,第三LUT包括多个第一初始RGB与第一显示RGB的一一对应关系,第一初始RGB对应初始色度与亮度参数,第一显示RGB对应第一应用模式的色度与亮度参数;第一LUT包括多个第一初始RGB与目标RGB的一一映射关系,目标RGB对应指定色度与亮度参数;第二LUT包括多个第二初始RGB与显示RGB的一一映射关系,第二初始RGB对应初始色度与亮度参数,显示RGB与应用模式相关,同一个第二初始RGB在不同的应用模式下对应的显示RGB不同,一个应用模式对应一个第二LUT;处理模块,用于根据第三LUT确定第一RGB在第一应用模式对应的第二RGB,并将第二RGB发送给第一显示器进行显示。In a third aspect, an embodiment of the present application provides a display processing device, the device includes a processing module, an obtaining module and a processing module, wherein the obtaining module is used to obtain the first RGB of the first pixel to be displayed; the processing module, Used to obtain the third display lookup table LUT corresponding to the first application mode, the third LUT corresponding to the first application mode is generated according to the fusion of the first LUT and the second LUT corresponding to the first application mode, and the third LUT includes a plurality of first LUTs. The one-to-one correspondence between the initial RGB and the first display RGB, the first initial RGB corresponds to the initial chromaticity and luminance parameters, and the first display RGB corresponds to the chromaticity and luminance parameters of the first application mode; the first LUT includes a plurality of first initial The one-to-one mapping relationship between RGB and the target RGB, the target RGB corresponds to the specified chromaticity and luminance parameters; the second LUT includes a one-to-one mapping relationship between a plurality of second initial RGB and the display RGB, and the second initial RGB corresponds to the initial chromaticity and luminance parameters , the display RGB is related to the application mode, the display RGB corresponding to the same second initial RGB in different application modes is different, and one application mode corresponds to a second LUT; the processing module is used to determine the first RGB according to the third LUT. An application mode corresponds to the second RGB, and the second RGB is sent to the first display for display.
在一个可选的示例中,获取模块还用于:获取第二应用模式对应的第三LUT,第二应用模式对应的第三LUT根据第一LUT和第二应用模式对应的第二LUT融合生成。In an optional example, the obtaining module is further configured to: obtain a third LUT corresponding to the second application mode, where the third LUT corresponding to the second application mode is generated by merging the first LUT and the second LUT corresponding to the second application mode .
在一个可选的示例中,获取模块还用于:从存储器获取第一LUT;或In an optional example, the obtaining module is further configured to: obtain the first LUT from the memory; or
从服务器接收第一LUT;或根据预先设定的第一初始RGB从服务器接收或从存 储器获取对应的目标RGB,进而确定第一LUT。Receive the first LUT from the server; or receive the corresponding target RGB from the server according to the preset first initial RGB or obtain the corresponding target RGB from the memory, and then determine the first LUT.
在一个可选的示例中,获取模块还用于:从存储器存储的多个第二LUT中获取与第一应用模式对应的第二LUT;或从服务器接收与第一应用模式对应的第二LUT。In an optional example, the obtaining module is further configured to: obtain a second LUT corresponding to the first application mode from a plurality of second LUTs stored in the memory; or receive a second LUT corresponding to the first application mode from the server .
在一个可选的示例中,获取模块还用于:从服务器接收更新的第二LUT。In an optional example, the obtaining module is further configured to: receive the updated second LUT from the server.
在一个可选的示例中,获取模块具体用于:在预设时间或者接收到预设指令的情况下,从服务器接收更新的第二LUT。In an optional example, the obtaining module is specifically configured to: receive the updated second LUT from the server at a preset time or when a preset instruction is received.
在一个可选的示例中,处理模块具体用于:获取第一LUT中的第一初始RGB及其对应的目标RGB;确定目标RGB根据第二LUT映射获得的实时第一显示RGB;生成包括第一初始RGB和第一显示RGB的映射关系的第三LUT。In an optional example, the processing module is specifically configured to: obtain the first initial RGB in the first LUT and its corresponding target RGB; determine the real-time first display RGB obtained by mapping the target RGB according to the second LUT; An initial RGB and a first third LUT showing the mapping relationship of RGB.
在一个可选的示例中,处理模块具体用于:对第一初始RGB进行转换,获得中间RGB;按照预设步长对中间RGB进行迭代变换,获得目标RGB;根据第一初始RGB和目标RGB的一一映射关系确定第一LUT。In an optional example, the processing module is specifically configured to: convert the first initial RGB to obtain the intermediate RGB; perform iterative transformation on the intermediate RGB according to a preset step size to obtain the target RGB; according to the first initial RGB and the target RGB The one-to-one mapping relationship determines the first LUT.
在一个可选的示例中,处理模块具体用于:S1:按照预设步长对RGBi进行变换,并获得对应色度与亮度参数变化值;S2:根据预设步长获得RGBi+1,根据RGBi对应的中间色度与亮度参数和色度与亮度参数变化值获取RGBi+1对应的中间色度与亮度参数;S3:判断RGBi+1对应的中间色度与亮度参数与指定色度与亮度参数的差值是否小于预设阈值;若RGBi+1对应的中间色度与亮度参数与指定色度与亮度参数亮度差值不小于预设阈值,则令i=i+1,并重复执行S1-S3,直至RGBi+1对应的中间色度与亮度参数与指定色度与亮度参数差值小于预设阈值,当i=1时,RGBi为中间RGB。In an optional example, the processing module is specifically used to: S1: transform RGBi according to a preset step size, and obtain corresponding change values of chrominance and luminance parameters; S2: obtain RGBi+1 according to the preset step size, according to Obtain the intermediate chrominance and brightness parameters corresponding to RGBi and the change values of the chrominance and brightness parameters to obtain the intermediate chromaticity and brightness parameters corresponding to RGBi+1; S3: Determine the intermediate chrominance and brightness parameters corresponding to RGBi+1 and the specified chromaticity and brightness Whether the difference between the parameters is less than the preset threshold; if the difference between the intermediate chrominance and brightness parameters corresponding to RGBi+1 and the specified chrominance and brightness parameters is not less than the preset threshold, set i=i+1, and repeat S1 -S3, until the difference between the intermediate chrominance and brightness parameters corresponding to RGBi+1 and the specified chrominance and brightness parameters is less than the preset threshold, when i=1, RGBi is the intermediate RGB.
在一个可选的示例中,处理模块具体用于:按照如下公式计算获得RGB i+1对应的中间色度与亮度参数: In an optional example, the processing module is specifically configured to: calculate and obtain intermediate chromaticity and luminance parameters corresponding to RGB i+1 according to the following formula:
Figure PCTCN2020110917-appb-000002
Figure PCTCN2020110917-appb-000002
其中xyY i+1为RGB i+1对应的中间色度与亮度参数,xyY i为RGB i对应的中间色度与亮度参数,RGB中包括R参数,G参数和B参数,ΔR,ΔG,ΔB分别为R参数,G参数和B参数的预设步长,Δx R,Δy R为R参数按照预设步长迭代造成的色度参数变化值,ΔY R为为R参数按照预设步长迭代造成的亮度参数变化值,Δx G,Δy G为G参数按照预设步长迭代造成的色度参数变化值,ΔY G为G参数按照预设步长迭代造成的亮度参数变化值,Δx B,Δy B为B参数按照预设步长迭代造成的色度参数变化值,ΔY B为B参数按照预设步长迭代造成的亮度参数变化值。 Where xyY i+1 is the intermediate chromaticity and brightness parameters corresponding to RGB i+1 , xyY i is the intermediate chromaticity and brightness parameters corresponding to RGB i , RGB includes R parameters, G parameters and B parameters, ΔR, ΔG, ΔB are the preset step sizes of the R parameter, the G parameter and the B parameter, respectively, Δx R , Δy R are the chromaticity parameter changes caused by the R parameter iteration according to the preset step size, ΔY R is the R parameter iterated according to the preset step size The resulting changes in luminance parameters, Δx G , Δy G are the changes in the chrominance parameters caused by the iterations of the G parameters according to the preset step size, ΔY G is the changes in the luminance parameters caused by the iterations of the G parameters according to the preset step sizes, Δx B , Δy B is the change value of the chrominance parameter caused by the iteration of the B parameter according to the preset step size, and ΔY B is the change value of the luminance parameter caused by the iteration of the B parameter according to the preset step size.
在一个可选的示例中,处理模块具体用于:基于第一Gamma值对第一初始RGB进行伽马变换,得到第一线性rgb;根据第一变换矩阵对第一线性rgb进行转换,获得指定色度与亮度参数;根据第二变换矩阵对指定亮度与色度参数进行转换,获得第二线性rgb,第二变换矩阵根据第一显示器的测量亮度参数生成;基于第二Gamma值对第二线性rgb进行反伽马变换,获得中间RGB,第二Gamma值根据第一显示器的测量亮度参数确定。In an optional example, the processing module is specifically configured to: perform gamma transformation on the first initial RGB based on the first Gamma value to obtain the first linear rgb; convert the first linear rgb according to the first transformation matrix to obtain the specified Chroma and luminance parameters; convert the specified luminance and chrominance parameters according to the second transformation matrix to obtain a second linear rgb, and the second transformation matrix is generated according to the measured brightness parameters of the first display; based on the second Gamma value, the second linear rgb performs inverse gamma transformation to obtain intermediate RGB, and the second Gamma value is determined according to the measured brightness parameter of the first display.
第四方面,本申请实施例提供一种显示处理的装置,所述装置包括处理器和接口电路,所述接口电路用于接收代码指令并传输至所述处理器,所述处理器用于运行所述代码指令以执行如第一方面任一项所述的方法,或执行第二方面任一项所述的方法。In a fourth aspect, an embodiment of the present application provides an apparatus for display processing, the apparatus includes a processor and an interface circuit, the interface circuit is configured to receive code instructions and transmit them to the processor, and the processor is configured to run all The code instructions are used to perform the method according to any one of the first aspects, or to perform the method according to any one of the second aspects.
第五方面,本申请实施例提供了一种显示处理的装置,所述装置包括处理器、收发器、存储器以及存储在所述存储器上并可在所述处理器上运行的计算机执行指令,当所述计算机执行指令被运行时,使得所述通信装置执行如第一方面任一项所述的方法,或执行如第二方面任一项所述的方法。In a fifth aspect, an embodiment of the present application provides an apparatus for display processing, the apparatus includes a processor, a transceiver, a memory, and computer-executable instructions stored in the memory and executable on the processor, when The computer-executable instructions, when executed, cause the communication apparatus to perform the method of any one of the first aspect, or to perform the method of any one of the second aspect.
第六方面,提供了一种计算机可读存储介质,该计算机可读存储介质中存储有程序指令,当该程序指令在计算机或处理器上运行时,使得计算机或处理器可以执行上述任一方面的方法。In a sixth aspect, a computer-readable storage medium is provided, and program instructions are stored in the computer-readable storage medium. When the program instructions are executed on a computer or a processor, the computer or the processor can perform any of the above-mentioned aspects. Methods.
第七方面,提供了一种包含指令的计算机程序产品,当该指令在计算机或处理器上运行时,使得计算机或处理器可以执行上述任一方面的方法。In a seventh aspect, there is provided a computer program product comprising instructions which, when run on a computer or processor, enable the computer or processor to perform the method of any of the above aspects.
第八方面,提供一种电子设备,包括上述的显示处理的装置。In an eighth aspect, an electronic device is provided, including the above-mentioned apparatus for display processing.
其中,第二方面至第八方面中任一种设计方式所带来的技术效果可参见上述第一方面中不同设计方式所带来的技术效果,此处不再赘述。Wherein, for the technical effect brought by any one of the design methods in the second aspect to the eighth aspect, reference may be made to the technical effects brought by the different design methods in the above-mentioned first aspect, which will not be repeated here.
附图说明Description of drawings
图1为本申请实施例提供的一种示例性的装置的架构示意图;FIG. 1 is a schematic structural diagram of an exemplary apparatus provided by an embodiment of the present application;
图2为本申请实施例提供的一种显示屏色彩值变换场景示意图;2 is a schematic diagram of a display screen color value conversion scene provided by an embodiment of the present application;
图3为本申请实施例提供的一种显示屏色彩值变换过程示意图;3 is a schematic diagram of a color value conversion process of a display screen provided by an embodiment of the present application;
图4A为本申请实施例对应的一种色域校正系统架构示意图;4A is a schematic diagram of the architecture of a color gamut correction system corresponding to an embodiment of the present application;
图4B为本申请实施例提供的一种显示方法流程图;FIG. 4B is a flowchart of a display method provided by an embodiment of the present application;
图4C为本申请实施例提供的一种应用第三LUT的过程示意图;4C is a schematic diagram of a process of applying a third LUT provided by an embodiment of the present application;
图4D为本申请实施例提供的一种第一LUT和第二LUT融合生成第三LUT的原理示意图;4D is a schematic schematic diagram of a first LUT and a second LUT fused to generate a third LUT according to an embodiment of the present application;
图4E为本申请实施例提供的一种确定目标RGB的流程图;4E is a flowchart of determining target RGB provided by an embodiment of the present application;
图4F为本申请实施例提供的一种第一LUT和第二LUT融合过程示意图;4F is a schematic diagram of a fusion process of a first LUT and a second LUT provided by an embodiment of the application;
图5为本申请实施例提供的一种显示处理的装置结构框图;FIG. 5 is a structural block diagram of an apparatus for display processing provided by an embodiment of the present application;
图6是本申请实施例提供的一种显示处理的装置的硬件结构示意图。FIG. 6 is a schematic diagram of a hardware structure of an apparatus for display processing provided by an embodiment of the present application.
具体实施方式detailed description
下面将结合本申请实施例中的附图,对本申请实施例中的技术方案进行描述,显然,所描述的实施例仅仅是本申请一部分实施例,而不是全部的实施例。The technical solutions in the embodiments of the present application will be described below with reference to the drawings in the embodiments of the present application. Obviously, the described embodiments are only a part of the embodiments of the present application, rather than all the embodiments.
本文中术语“和/或”,仅仅是一种描述关联对象的关联关系,表示可以存在三种关系,例如,A和/或B,可以表示:单独存在A,同时存在A和B,单独存在B这三种情况。在本申请实施例中,“示例性的”或者“例如”等词用于表示作例子、例证或说明。本申请实施例中被描述为“示例性的”或者“例如”的任何实施例或设计方案不应被解释为比其它实施例或设计方案更优选或更具优势。确切而言,使用“示例性的”或者“例如”等词旨在以具体方式呈现相关概念。在本申请实施例的描述中,除非另有说明,“多个” 的含义是指两个或两个以上。例如,多个处理单元是指两个或两个以上的处理单元;多个系统是指两个或两个以上的系统。以下,术语“第一”、“第二”等仅用于描述目的,而不能理解为指示或暗示相对重要性或者隐含指明所指示的技术特征的数量。由此,限定有“第一”、“第二”等的特征可以明示或者隐含地包括一个或者更多个该特征。在本申请的描述中,除非另有说明,“多个”的含义是两个或两个以上。The term "and/or" in this article is only an association relationship to describe the associated objects, indicating that there can be three kinds of relationships, for example, A and/or B, it can mean that A exists alone, A and B exist at the same time, and A and B exist independently. B these three cases. In the embodiments of the present application, words such as "exemplary" or "for example" are used to represent examples, illustrations or illustrations. Any embodiments or designs described in the embodiments of the present application as "exemplary" or "such as" should not be construed as preferred or advantageous over other embodiments or designs. Rather, the use of words such as "exemplary" or "such as" is intended to present the related concepts in a specific manner. In the description of the embodiments of the present application, unless otherwise specified, the meaning of "plurality" refers to two or more. For example, multiple processing units refers to two or more processing units; multiple systems refers to two or more systems. Hereinafter, the terms "first", "second", etc. are only used for descriptive purposes, and should not be understood as indicating or implying relative importance or implying the number of indicated technical features. Thus, a feature defined as "first", "second", etc., may expressly or implicitly include one or more of that feature. In the description of this application, unless stated otherwise, "plurality" means two or more.
图1为本申请实施例提供的一种示例性的装置的架构示意图。如图1所示,该装置01包括:处理器11,射频(radio frequency,RF)电路12、电源13、存储器14、输入单元15、显示单元16、音频电路17等部件。本领域技术人员可以理解,图1中示出的装置的结构并不构成对该装置的限定,该装置可以包括比如图1所示的部件更多或更少的部件,或者可以组合如图1所示的部件中的某些部件,或者可以与如图1所示的部件布置不同。FIG. 1 is a schematic structural diagram of an exemplary apparatus provided by an embodiment of the present application. As shown in FIG. 1 , the device 01 includes: a processor 11 , a radio frequency (RF) circuit 12 , a power supply 13 , a memory 14 , an input unit 15 , a display unit 16 , an audio circuit 17 and other components. Those skilled in the art can understand that the structure of the device shown in FIG. 1 does not constitute a limitation to the device, and the device may include more or less components than those shown in FIG. 1 , or may be combined as shown in FIG. 1 . Some of the components shown may alternatively be arranged differently from the components shown in FIG. 1 .
处理器11是该装置的控制中心,利用各种接口和线路连接整个装置的各个部分,通过运行或执行存储在存储器14内的软件程序和/或模块,以及调用存储在存储器14内的数据,执行装置的各种功能和处理数据,从而对装置进行整体监控。可选的,处理器11可包括一个或多个处理单元;优选的,处理器11可集成应用处理器和调制解调处理器,其中,应用处理器主要处理操作系统、用户界面和应用程序等,调制解调处理器主要处理无线通信。可以理解的是,上述调制解调处理器也可以不集成到处理器11中。The processor 11 is the control center of the device, using various interfaces and lines to connect various parts of the entire device, by running or executing the software programs and/or modules stored in the memory 14, and calling the data stored in the memory 14, Execute various functions of the device and process data to monitor the device as a whole. Optionally, the processor 11 may include one or more processing units; preferably, the processor 11 may integrate an application processor and a modem processor, wherein the application processor mainly processes the operating system, user interface, and application programs, etc. , the modem processor mainly deals with wireless communication. It can be understood that, the above-mentioned modulation and demodulation processor may not be integrated into the processor 11 .
RF电路12可用于收发信息或通话过程中,信号的接收和发送,特别地,将基站的下行信息接收后,给处理器11处理;另外,将上行的数据发送给基站。通常,RF电路包括但不限于天线、至少一个放大器、收发信机、耦合器、低噪声放大器(low noise amplifier,LNA)、双工器等。此外,RF电路12还可以通过无线通信与网络和其他设备通信。无线通信可以使用任一通信标准或协议,包括但不限于全球移动通讯系统(global system of mobile communication,GSM)、通用分组无线服务(general packet radio service,GPRS)、码分多址(code division multiple access,CDMA)、宽带码分多址(wideband code division multiple access,WCDMA)、长期演进(long term evolution,LTE)、电子邮件、短消息服务(short messaging service,SMS)等。The RF circuit 12 can be used for receiving and sending signals during transmission and reception of information or during a call. In particular, after receiving the downlink information of the base station, it is processed by the processor 11; in addition, the uplink data is sent to the base station. Typically, RF circuits include, but are not limited to, antennas, at least one amplifier, transceivers, couplers, low noise amplifiers (LNAs), duplexers, and the like. In addition, the RF circuit 12 may also communicate with the network and other devices via wireless communication. Wireless communication can use any communication standard or protocol, including but not limited to global system of mobile communication (GSM), general packet radio service (GPRS), code division multiple access (code division multiple) access, CDMA), wideband code division multiple access (wideband code division multiple access, WCDMA), long term evolution (long term evolution, LTE), email, short message service (short messaging service, SMS) and so on.
该装置包括给各个部件供电的电源13(比如电池),可选的,电源可以通过电源管理系统与处理器11逻辑相连,从而通过电源管理系统实现管理充电、放电、以及功耗管理等功能。The device includes a power supply 13 (such as a battery) for supplying power to various components. Optionally, the power supply can be logically connected to the processor 11 through a power management system, so as to manage charging, discharging, and power consumption management functions through the power management system.
存储器14可用于存储软件程序以及模块,处理器11通过运行存储在存储器14的软件程序以及模块,从而执行装置的各种功能应用以及数据处理。存储器14可主要包括存储程序区和存储数据区,其中,存储程序区可存储操作系统、至少一个功能所需的应用程序(比如声音播放功能、图像播放功能等)等;存储数据区可存储根据手机的使用所创建的数据(比如音频数据、图像数据、电话本等)等。此外,存储器14可以包括高速随机存取存储器,还可以包括非易失性存储器,例如至少一个磁盘存储器件、闪存器件、或其他易失性固态存储器件。The memory 14 can be used to store software programs and modules, and the processor 11 executes various functional applications and data processing of the device by running the software programs and modules stored in the memory 14 . The memory 14 may mainly include a stored program area and a stored data area, wherein the stored program area may store an operating system, an application program (such as a sound playback function, an image playback function, etc.) required for at least one function, and the like; Data created by the use of the mobile phone (such as audio data, image data, phone book, etc.), etc. Additionally, memory 14 may include high-speed random access memory, and may also include non-volatile memory, such as at least one magnetic disk storage device, flash memory device, or other volatile solid state storage device.
输入单元15可用于接收输入的数字或字符信息,以及产生与装置的用户设置以及功能控制有关的键信号输入。具体地,输入单元15可包括触摸屏151以及其他输入设 备152。触摸屏151,也称为触摸面板,可收集用户在触摸屏上或附近的触摸操作(比如用户使用手指、触笔等任何适合的物体或附件在触摸屏151上或在触摸屏151附近的操作),并根据预先设定的程式驱动相应的连接装置。可选的,触摸屏151可包括触摸检测装置和触摸控制器两个部分。其中,触摸检测装置检测用户的触摸方位,并检测触摸操作带来的信号,将信号传送给触摸控制器;触摸控制器从触摸检测装置上接收触摸信息,并将它转换成触点坐标,再送给处理器11,并能接收处理器11发来的命令并加以执行。此外,可以采用电阻式、电容式、红外线以及表面声波等多种类型实现触摸屏151。其他输入设备152可以包括但不限于物理键盘、功能键(比如音量控制按键、电源开关按键等)、轨迹球、鼠标、操作杆等中的一种或多种。The input unit 15 may be used to receive input numerical or character information, and to generate key signal input related to user settings and function control of the device. Specifically, the input unit 15 may include a touch screen 151 and other input devices 152. The touch screen 151, also known as a touch panel, can collect the user's touch operations on or near the touch screen (such as the user's operations on or near the touch screen 151 using a finger, a stylus, or any suitable object or accessory), and according to the The preset program drives the corresponding connection device. Optionally, the touch screen 151 may include two parts, a touch detection device and a touch controller. Among them, the touch detection device detects the user's touch orientation, detects the signal brought by the touch operation, and transmits the signal to the touch controller; the touch controller receives the touch information from the touch detection device, converts it into contact coordinates, and then sends it to the touch controller. To the processor 11, and can receive the command sent by the processor 11 and execute it. In addition, the touch screen 151 may be implemented in various types such as resistive, capacitive, infrared, and surface acoustic waves. Other input devices 152 may include, but are not limited to, one or more of a physical keyboard, function keys (such as volume control keys, power switch keys, etc.), trackballs, mice, joysticks, and the like.
显示单元16可用于显示由用户输入的信息或提供给用户的信息以及装置的各种菜单。显示单元16可包括显示面板161,在本申请中,可以采用AMOLED显示屏来配置显示面板161。进一步的,触摸屏151可覆盖显示面板161,当触摸屏151检测到在触摸屏151上或附近的触摸操作后,传送给处理器11以确定触摸事件的类型,随后处理器11根据触摸事件的类型在显示面板161上提供相应的视觉输出。虽然在图1中,触摸屏151与显示面板161是作为两个独立的部件来实现装置的输入和输出功能,但是在某些实施例中,可以将触摸屏151与显示面板161集成而实现装置的输入和输出功能。The display unit 16 may be used to display information input by the user or information provided to the user and various menus of the device. The display unit 16 may include a display panel 161, and in the present application, the display panel 161 may be configured with an AMOLED display screen. Further, the touch screen 151 can cover the display panel 161. When the touch screen 151 detects a touch operation on or near the touch screen 151, it transmits it to the processor 11 to determine the type of the touch event, and then the processor 11 displays the touch event according to the type of the touch event. Corresponding visual outputs are provided on panel 161 . Although in FIG. 1, the touch screen 151 and the display panel 161 are used as two independent components to realize the input and output functions of the device, in some embodiments, the touch screen 151 and the display panel 161 can be integrated to realize the input of the device and output functions.
音频电路17、扬声器171和麦克风172,用于提供用户与装置之间的音频接口。音频电路17可将接收到的音频数据转换后的电信号,传输到扬声器171,由扬声器171转换为声音信号输出;另一方面,麦克风172将收集的声音信号转换为电信号,由音频电路17接收后转换为音频数据,再将音频数据输出至RF电路12以发送给比如另一装置,或者将音频数据输出至存储器14以便进一步处理。Audio circuit 17, speaker 171 and microphone 172 are used to provide an audio interface between the user and the device. The audio circuit 17 can transmit the received audio data converted electrical signal to the speaker 171, and the speaker 171 converts it into a sound signal for output; on the other hand, the microphone 172 converts the collected sound signal into an electrical signal, which is converted by the audio circuit 17 Upon receipt, it is converted to audio data, which is then output to RF circuit 12 for transmission to, for example, another device, or to memory 14 for further processing.
可选的,如图1所示的装置还可以包括各种传感器。例如陀螺仪传感器、湿度计传感器、红外线传感器、磁力计传感器等,在此不再赘述。可选的,如图1所示的装置还可以包括无线保真(wireless fidelity,WiFi)模块、蓝牙模块等,在此不再赘述。Optionally, the device shown in FIG. 1 may further include various sensors. For example, a gyroscope sensor, a hygrometer sensor, an infrared sensor, a magnetometer sensor, etc., will not be repeated here. Optionally, the apparatus shown in FIG. 1 may further include a wireless fidelity (wireless fidelity, WiFi) module, a Bluetooth module, etc., which will not be repeated here.
可以理解的,本申请实施例中,电子设备(例如上述图1示出的装置)可以执行本申请实施例中的部分或全部步骤,这些步骤或操作仅是示例,本申请实施例还可以执行其它操作或者各种操作的变形。此外,各个步骤可以按照本申请实施例呈现的不同的顺序来执行,并且有可能并非要执行本申请实施例中的全部操作。本申请各实施例可以单独实施,也可以任意组合实施,本申请对此不作限定。It can be understood that, in this embodiment of the present application, an electronic device (for example, the apparatus shown in FIG. 1 above) may execute some or all of the steps in the embodiment of the present application, these steps or operations are only examples, and the embodiment of the present application may also be executed Other operations or variations of various operations. In addition, various steps may be performed in different orders presented in the embodiments of the present application, and may not be required to perform all the operations in the embodiments of the present application. Each embodiment of the present application may be implemented independently or in any combination, which is not limited in this application.
为了便于理解本申请实施例,对本申请实施例涉及的一些概念或术语进行解释。To facilitate understanding of the embodiments of the present application, some concepts or terms involved in the embodiments of the present application are explained.
(1)伽马校正(1) Gamma correction
伽马校正是对图像进行非线性色调编辑的方法,可以检出图像信号中的深色部分和浅色部分,并使两者比例增大,从而提高图像对比度效果。目前的显示屏、摄影胶片和许多电子照相机的光电转换特性均可以是非线性的。这些非线性部件的输出与输入之间的关系可以用一个幂函数来表示,即:输出=(输入) γGamma correction is a method of non-linear tonal editing of the image, which can detect the dark part and the light part in the image signal, and increase the ratio of the two, thereby improving the contrast effect of the image. The photoelectric conversion characteristics of current display screens, photographic films, and many electronic cameras can be nonlinear. The relationship between the output and input of these nonlinear components can be represented by a power function, ie: output = (input) γ .
设备输出的色彩值进行非线性转换是由于人类的视觉系统不是线性的,人类是通过比较来感知视觉刺激。外界以一定的比例加强刺激,对人来说,这个刺激才是均匀增长的。因此,对人类的感知来说,以等比数列增加的物理量,是均匀的。为了将输入的颜色按照 人类视觉规律进行显示,需要经过上述幂函数形式的非线性转换,将线性的色彩值转换为非线性的色彩值。gamma的取值γ可以是根据色彩空间的光电转换曲线确定的。The non-linear transformation of the color value output by the device is due to the fact that the human visual system is not linear, and humans perceive visual stimuli through comparison. The outside world strengthens the stimulus in a certain proportion, and for people, this stimulus increases evenly. Therefore, for human perception, the physical quantity that increases in a proportional sequence is uniform. In order to display the input color according to the laws of human vision, it is necessary to convert the linear color value into a nonlinear color value through the nonlinear transformation in the form of the above power function. The value γ of gamma may be determined according to the photoelectric conversion curve of the color space.
(2)色彩空间(2) Color space
颜色可以是眼睛对于不同频率的光线的不同感受,也可以表示客观存在的不同频率的光。色彩空间是人们建立起用来表示色彩的坐标系统所定义的色彩范围。色域与色彩模型一起定义一个色彩空间。其中,色彩模型是用一组颜色成分表示颜色的抽象数学模型。色彩模型例如可以包括三原色光模式(red green blue,RGB)、印刷四色模式(cyan magenta yellow key plate,CMYK)。色域是指一个系统能够产生的颜色的总合。示例性的,Adobe RGB和sRGB是两个基于RGB模型的不同的色彩空间。Color can be the different perceptions of the eyes for light of different frequencies, or it can represent the light of different frequencies that exists objectively. A color space is a range of colors defined by a coordinate system that people have established to represent colors. A color gamut, together with a color model, defines a color space. Among them, the color model is an abstract mathematical model that represents color with a set of color components. The color model may include, for example, three primary color mode (red green blue, RGB), printing four-color mode (cyan magenta yellow key plate, CMYK). Color gamut refers to the totality of colors that a system can produce. Illustratively, Adobe RGB and sRGB are two different color spaces based on the RGB model.
每台设备例如显示器或打印机都有自己的色彩空间,且只能生成其色域内的颜色。将图像从一台设备移至另一台设备时,由于每台设备按照自己的色彩空间转换并显示RGB或CMYK,图像在不同的设备上的颜色可能会发生变化。Each device such as a monitor or printer has its own color space and can only produce colors within its gamut. When moving an image from one device to another, the color of the image may change on different devices as each device converts and displays RGB or CMYK according to its own color space.
下面介绍几种常用的色彩空间。Several commonly used color spaces are described below.
①CIE 1931色彩空间①CIE 1931 color space
CIE 1931色彩空间(也叫做CIE 1931 XYZ色彩空间)是其中一个最先采用数学方式来定义的色彩空间。CIE XYZ色彩空间基于人类颜色视觉直接测定得到,可以充当其他色彩空间的定义基础。CIE XYZ色彩空间所使用的Y参数是颜色的明度或亮度。颜色的色度使用参数x和y来确定,色度x、y与三色刺激值X、Y和Z之间的关系为:The CIE 1931 color space (also known as the CIE 1931 XYZ color space) was one of the first color spaces to be defined mathematically. The CIE XYZ color space is directly measured based on human color vision and can serve as the basis for the definition of other color spaces. The Y parameter used by the CIE XYZ color space is the lightness or lightness of the color. The chromaticity of a color is determined using parameters x and y, and the relationship between chromaticity x, y and tristimulus values X, Y, and Z is:
Figure PCTCN2020110917-appb-000003
Figure PCTCN2020110917-appb-000003
Figure PCTCN2020110917-appb-000004
Figure PCTCN2020110917-appb-000004
可以用参数x,y,Y来确定一个颜色,对于显示屏来说,色度坐标x、y和亮度值Y可以使用色彩分析仪测量得到。其中,三色刺激值中X和Z可以从色度坐标x、y以及亮度Y计算得到:A color can be determined by the parameters x, y, Y. For a display screen, the chromaticity coordinates x, y and the luminance value Y can be measured using a color analyzer. Among them, X and Z in tristimulus values can be calculated from chromaticity coordinates x, y and luminance Y:
Figure PCTCN2020110917-appb-000005
Figure PCTCN2020110917-appb-000005
Figure PCTCN2020110917-appb-000006
Figure PCTCN2020110917-appb-000006
②sRGB色彩空间②sRGB color space
sRGB(standard Red Green Blue)色彩空间是惠普与微软于1996年一起开发的用于显示器、打印机以及因特网的一种标准RGB色彩空间。它提供一种标准方法来定义色彩,让显示、打印和扫描等各种计算机外部设备与应用软件对于色彩有一个共通的语言。sRGB的色彩空间是基于独立的色彩坐标,可以使色彩在不同的设备使用传输中对应于同一色彩坐标体系,而不受这些设备各自具有的不同色彩坐标的影响。但是sRGB的色域空间比较小。sRGB定义了红色、绿色与蓝色三原色的颜色,其中,三原色中一个颜色的色彩值取最大值,且其它两个颜色的色彩值都为零时所对应的颜色表示该一个颜色。示例性的,红色、绿色与蓝色三原色中,色彩值R、G和B的取值均为0-255,则当R、G取值均为零时,B取值为255时所对应的颜色表示蓝色。The sRGB (standard Red Green Blue) color space is a standard RGB color space developed by HP and Microsoft in 1996 for monitors, printers and the Internet. It provides a standard way to define color, so that various computer peripherals and application software, such as display, printing and scanning, have a common language for color. The sRGB color space is based on independent color coordinates, which enables colors to correspond to the same color coordinate system in the transmission of different devices, without being affected by the different color coordinates of these devices. However, the color gamut space of sRGB is relatively small. sRGB defines the colors of the three primary colors of red, green and blue, where the color value of one of the three primary colors takes the maximum value, and the color corresponding to the color value of the other two colors is zero, which represents the one color. Exemplarily, in the three primary colors of red, green and blue, the color values R, G and B are all 0-255, then when the values of R and G are all zero, the corresponding value of B is 255. Color means blue.
若两单色光组合成一测试色光,则观测者感知到的三原色数值为两单色光分别被单独观测的三原色数值之和。If the two monochromatic lights are combined into one test color light, the value of the three primary colors perceived by the observer is the sum of the three primary color values of the two monochromatic lights observed separately.
换句话说,如果光束一及光束二为单色光,而{R1,G1,B1}、{R2,B2,G2}分别为观测者对光束一及光束二的感知三原色数值,当此二光束合并时,观测者感知的三原色数值为{R,G,B},其中:In other words, if beam 1 and beam 2 are monochromatic light, and {R1, G1, B1}, {R2, B2, G2} are the three primary color values of the observer's perception of beam 1 and beam 2, respectively, when these two beams When combined, the three primary color values perceived by the observer are {R,G,B}, where:
R=R1+R2R=R1+R2
G=G1+G2G=G1+G2
B=B1+B2B=B1+B2
光束一{R1,G1,B1}和光束二{R2,G2,B2}采用CIE1931色彩空间表示,分别对应三色刺激值为{X1,Y1,Z1}和{X2,Y2,Z2},则观测者感受到的三原色{R,G,B}对应的三色刺激值{X,Y,Z}为Beam 1 {R1, G1, B1} and beam 2 {R2, G2, B2} are represented by the CIE1931 color space, and the corresponding tristimulus values are {X1, Y1, Z1} and {X2, Y2, Z2} respectively, then the observation The tristimulus values {X, Y, Z} corresponding to the three primary colors {R, G, B} felt by the user are:
X=X1+X2X=X1+X2
Y=Y1+Y2Y=Y1+Y2
Z=Z1+Z2Z=Z1+Z2
③色彩空间转换③ Color space conversion
不同的色彩空间之间可以进行转换,以下以CIE1931色彩空间和sRGB色彩空间为例介绍色彩空间的转换。Conversion between different color spaces is possible. The following uses CIE1931 color space and sRGB color space as examples to introduce color space conversion.
从CIE xyY坐标系计算sRGB中的三原色首先需要将它变换到CIE XYZ三值模式。即使用公式(3)和公式(4)确定X、Z得到CIE 1931色彩空间中的三值X、Y和Z。之后利用转换矩阵计算得到线性的R、G和B值:Calculating the three primary colors in sRGB from the CIE xyY coordinate system first requires transforming it into the CIE XYZ three-valued mode. That is to use formula (3) and formula (4) to determine X, Z to obtain three values X, Y and Z in the CIE 1931 color space. Then use the transformation matrix to calculate the linear R, G and B values:
Figure PCTCN2020110917-appb-000007
Figure PCTCN2020110917-appb-000007
sRGB是反映真实世界gamma为2.2的典型显示器显示的色彩值,因此使用下面的变换公式将线性值转换到sRGB:sRGB is a reflection of the color values displayed by a typical monitor with a real-world gamma of 2.2, so use the following transformation formula to convert linear values to sRGB:
Figure PCTCN2020110917-appb-000008
Figure PCTCN2020110917-appb-000008
(3)显示屏的色彩值变换(3) Color value transformation of the display screen
当显示屏进行显示时,由于不同显示屏对应的色域不同,输入相同的RGB色彩值时,人眼感受到相同的X、Y、Y三色刺激值也不同。如果要让人眼感受到相同的X、Y、Y三色刺激值,则需要对显示屏的色域进行转换,对应的输入sRGB色彩空间的色彩值也需要进行校正。When the display screen is displayed, due to the different color gamuts corresponding to different display screens, when the same RGB color value is input, the human eye perceives the same X, Y, and Y tristimulus values are also different. If people want to feel the same X, Y, and Y tristimulus values, the color gamut of the display screen needs to be converted, and the corresponding color value of the input sRGB color space also needs to be corrected.
可参阅图2,图2为本申请实施例提供的一种显示屏色彩值变换场景示意图,如图2所示,将输入图像fig.1输入到显示屏201,当显示屏201在初始色域时,以fig.1中的一个目标像素为例,该目标像素在初始色域显示时对应的色彩值为第一RGB,对应的XYZ刺激值为初始XYZ刺激值。对显示屏201进行色域校正,使得该目标像素对应的色彩值为第二RGB,对应的XYZ刺激值为目标XYZ刺激值。Referring to FIG. 2, FIG. 2 is a schematic diagram of a display screen color value conversion scene provided by an embodiment of the application. As shown in FIG. 2, the input image fig.1 is input to the display screen 201. When the display screen 201 is in the initial color gamut , take a target pixel in fig.1 as an example, the corresponding color value of the target pixel in the initial color gamut display is the first RGB, and the corresponding XYZ stimulus value is the initial XYZ stimulus value. Color gamut correction is performed on the display screen 201 so that the color value corresponding to the target pixel is the second RGB, and the corresponding XYZ stimulus value is the target XYZ stimulus value.
图1中显示屏由第一RGB转换到第二RGB进行显示的过程具体包括如下步骤:The process of converting the display screen from the first RGB to the second RGB for display in FIG. 1 specifically includes the following steps:
步骤一、对接收到的标准色域图像的色彩值进行线性变换。Step 1: Perform linear transformation on the received color value of the standard color gamut image.
显示屏在初始色域进行显示的为标准色域图像,同样以一个目标像素为例进行说明,目标像素的色彩值为第一RGB。由于第一RGB中:红色分量值R0、绿色分量值G0和蓝 色分量值B0均为非线性的,在进行色彩值变换之前需要将非线性的色彩值转换为线性的色彩值。请参阅图3,图3为本申请实施例提供的一种显示屏色彩值变换过程示意图,可以通过伽马变换实现将第一RGB由非线性值转换为线性值。例如,存储第一伽马(gamma)查找表,第一gamma查找表中包括非线性RGB和其对应线性rbg之间的映射关系,通过第一gamma查找表实现将非线性的色彩值转换为线性的色彩值。具体的,gamma可以为2.2,第一gamma查找表的映射关系可以是将输入的红色分量值R0、绿色分量值G0和蓝色分量值B0依次映射为红色分量值R1、绿色分量值G1和蓝色分量值B1,其中,红色分量值R1、绿色分量值G1和蓝色分量值B1称为第一线性rgb。其中,输入的非线性的RGB转换为第一线性rgb由下述公式实现:What the display screen displays in the initial color gamut is a standard color gamut image, which is also described by taking a target pixel as an example, and the color value of the target pixel is the first RGB. Since in the first RGB: the red component value R0, the green component value G0 and the blue component value B0 are all nonlinear, it is necessary to convert the nonlinear color values into linear color values before performing color value transformation. Please refer to FIG. 3. FIG. 3 is a schematic diagram of a color value conversion process of a display screen provided by an embodiment of the present application. The first RGB can be converted from a nonlinear value to a linear value through gamma transformation. For example, a first gamma (gamma) look-up table is stored, the first gamma look-up table includes the mapping relationship between nonlinear RGB and its corresponding linear rbg, and the first gamma look-up table is used to realize the conversion of nonlinear color values to linear color value. Specifically, gamma may be 2.2, and the mapping relationship of the first gamma lookup table may be to map the input red component value R0, green component value G0, and blue component value B0 to red component value R1, green component value G1, and blue component value in turn The color component value B1, wherein the red component value R1, the green component value G1 and the blue component value B1 are referred to as the first linear rgb. Among them, the conversion of the input nonlinear RGB to the first linear RGB is realized by the following formula:
Figure PCTCN2020110917-appb-000009
Figure PCTCN2020110917-appb-000009
第一gamma查找表中,可以是一个非线性的色彩值范围对应一个线性的色彩值。例如(R0-ΔR,R0+ΔR)范围内的非线性色彩值在第一gamma查找表中均对应R1。示例性的,请参阅表1,表1是本申请实施例提供的一种第一gamma查找表的示例。In the first gamma lookup table, a nonlinear color value range may correspond to a linear color value. For example, the nonlinear color values in the range of (R0-ΔR, R0+ΔR) all correspond to R1 in the first gamma lookup table. For example, please refer to Table 1. Table 1 is an example of a first gamma lookup table provided by the embodiment of the present application.
表1第一gamma查找表Table 1 First gamma lookup table
Figure PCTCN2020110917-appb-000010
Figure PCTCN2020110917-appb-000010
如表1所示,色彩值R0、G0和B0的取值均可以为0-2 10,且一定范围内的R0在第一gamma查找表中对应同一个R1。可以根据R0对应范围内选定的一个值进行归一化,使获得的值都在0-1之间,然后再进行伽马计算,并输出10bit的值,即为R1。例如R0为0-31时,对应的R1为(15/1023)2.2*1023。对于取值依次落在32-63、32-63、64-95……992-1023范围内的R0,在第一gamma查找表中对应的R1的值依次为(47/1023) 2.2*1023,(79/1023) 2.2*1023……(1007/1023) 2.2*1023等。 As shown in Table 1, the values of the color values R0, G0 and B0 may all be 0-2 10 , and R0 in a certain range corresponds to the same R1 in the first gamma lookup table. It can be normalized according to a value selected in the corresponding range of R0, so that the obtained values are all between 0 and 1, and then the gamma calculation is performed, and the 10-bit value is output, which is R1. For example, when R0 is 0-31, the corresponding R1 is (15/1023)2.2*1023. For R0 whose values fall in the range of 32-63, 32-63, 64-95 ... (79/1023) 2.2 *1023...(1007/1023) 2.2 *1023 etc.
另外,第一gamma查找表中,也可以是一个非线性的色彩值对应一个线性的色彩值。在第一gamma查找表中未保存的非线性色彩值对应的线性色彩值可以通过查找表中存储的非线性色彩值对应的线性色彩值插值确定。示例性的,请参阅表2,表2是本申请实施例提供的另一种第一gamma查找表的示例。In addition, in the first gamma lookup table, a nonlinear color value may also correspond to a linear color value. The linear color value corresponding to the non-linear color value not stored in the first gamma lookup table may be determined by interpolation of the linear color value corresponding to the nonlinear color value stored in the lookup table. For example, please refer to Table 2, which is another example of the first gamma lookup table provided by the embodiment of the present application.
表2第一gamma查找表Table 2 First gamma lookup table
R0/G0/B0R0/G0/B0 00 3232 6464 ……... 10231023
R1/G1/B1R1/G1/B1 00 (32/1023) 2.2*1023 (32/1023) 2.2 *1023 (64/1023) 2.2*1023 (64/1023) 2.2 *1023 ……... (1023/1023) 2.2*1023 (1023/1023) 2.2 *1023
如表2所示,色彩值R0、G0和B0的取值均可以为0-2 10,以R0为例,R0取值为0、32、64……1023,在第一gamma查找表中对应的R1的值依次为0、(32/1023) 2.2*1023、(64/1023)2.2*1023……(1023/1023)2.2*1023。另外为了避免精度损失,还可以输出12bit的R1值。例如R0为32时,对应的R1可以为(32/1023) 2.2*4095。R0取值为0、32、64……1023以外的值时,通过对第一gamma查找表中已知的这些R1值插值来确定对应的R1取值,例如,R0取值为25时,可以根据R0取值依次为0和32时对应的R1取值来插值确定R0 取值为25时对应的R1的取值。本申请实施例中,对插值法所使用的具体算法不作限定,可以是线性插值法、拉格朗日插值法等,也可以使用其他插值法。 As shown in Table 2, the color values R0, G0 and B0 can all be 0-2 10 . Taking R0 as an example, the value of R0 is 0, 32, 64...1023, which corresponds to the first gamma lookup table The value of R1 is 0, (32/1023) 2.2 *1023, (64/1023)2.2*1023...(1023/1023)2.2*1023. In addition, in order to avoid loss of precision, 12bit R1 value can also be output. For example, when R0 is 32, the corresponding R1 can be (32/1023) 2.2 *4095. When R0 takes a value other than 0, 32, 64...1023, the corresponding R1 value is determined by interpolating these known R1 values in the first gamma lookup table. The value of R1 corresponding to when the value of R0 is 25 is determined by interpolation according to the value of R1 corresponding to when the value of R0 is 0 and 32 in turn. In the embodiment of the present application, the specific algorithm used by the interpolation method is not limited, and may be a linear interpolation method, a Lagrangian interpolation method, or the like, or other interpolation methods may be used.
可以理解的,上述第一gamma查找表的示例仅用于解释本申请实施例,不应构成限定。本申请实施例以gamma为2.2为例介绍非线性的色彩值与线性的色彩值之间的转换,示例不应构成限定,具体的gamma取值也可以是根据色彩空间的光电转换曲线确定的,本申请实施例对具体的gamma取值不作限定。It can be understood that the above example of the first gamma lookup table is only used to explain the embodiment of the present application, and should not be construed as a limitation. The examples of this application take a gamma of 2.2 as an example to introduce the conversion between nonlinear color values and linear color values. The example should not constitute a limitation. The specific gamma value can also be determined according to the photoelectric conversion curve of the color space. The embodiment of the present application does not limit the specific gamma value.
步骤二、进行色域转换,转换得到显示屏的色彩值。Step 2: Perform color gamut conversion to obtain the color value of the display screen.
(1)通过转换矩阵进行色域转换(1) Color gamut conversion by conversion matrix
在经过第一gamma查找表得到第一RGB对应的第一线性rgb后,可以进行色域转换,即将显示屏的初始XYZ刺激值转换到目标XYZ刺激值,同时将第一线性rgb转换到第二线性rgb,第二线性rgb为第二RGB对应的线性色彩值。目标XYZ刺激值可以表示为:Xt、Yt和Zt。After obtaining the first linear rgb corresponding to the first RGB through the first gamma lookup table, color gamut conversion can be performed, that is, the initial XYZ stimulus value of the display screen is converted to the target XYZ stimulus value, and the first linear rgb is converted to the second Linear rgb, the second linear rgb is the linear color value corresponding to the second RGB. Target XYZ stimulus values can be expressed as: Xt, Yt and Zt.
由于不同显示屏的色域不同,因此想要让人眼感受到同样的目标XYZ刺激值,对应输入的RGB色彩值需要进行校正。该过程同时需要进行色彩空间转换和显示屏的色域校正,具体原理如下:Since the color gamut of different display screens is different, in order for the eyes to feel the same target XYZ stimulus value, the corresponding input RGB color value needs to be corrected. This process requires both color space conversion and display color gamut correction. The specific principles are as follows:
Figure PCTCN2020110917-appb-000011
Figure PCTCN2020110917-appb-000011
在公式(8)中
Figure PCTCN2020110917-appb-000012
为显示屏需要转换到的目标色彩值,也即对应第二RGB的第二线性rgb。
Figure PCTCN2020110917-appb-000013
可以是sRGB色彩空间到1931色彩空间的转换矩阵,具体可以是公式(5)中的3×3的转换矩阵的逆矩阵。
Figure PCTCN2020110917-appb-000014
中,X R、Y R和Z R为显示屏红色色彩值R取最大值时对应的三色刺激值,X G、Y G和Z G为显示屏绿色色彩值G取最大值时对应的三色刺激值,X B、Y B和Z B为显示屏蓝色色彩值值B取最大值时对应的三色刺激值。示例性的,显示屏的色彩值R、G和B的取值均为0-255,则X R、Y R和Z R为显示屏红色色彩值R取255时对应的三色刺激值,X G、Y G和Z G为显示屏绿色色彩值G取255时对应的三色刺激值,X B、Y B和Z B为显示屏蓝色色彩值值B取255时对应的三色刺激值。
In formula (8)
Figure PCTCN2020110917-appb-000012
is the target color value to which the display screen needs to be converted, that is, the second linear rgb corresponding to the second RGB.
Figure PCTCN2020110917-appb-000013
It can be a conversion matrix from sRGB color space to 1931 color space, and specifically can be an inverse matrix of the 3×3 conversion matrix in formula (5).
Figure PCTCN2020110917-appb-000014
Among them, X R , Y R and Z R are the corresponding tristimulus values when the red color value R of the display screen takes the maximum value, and X G , Y G and Z G are the three corresponding tristimulus values when the green color value G of the display screen takes the maximum value. Color stimulus value, X B , Y B and Z B are the corresponding tristimulus values when the blue color value B of the display screen takes the maximum value. Exemplarily, the color values R, G and B of the display screen are all 0-255, then X R , Y R and Z R are the corresponding tristimulus values when the red color value R of the display screen is 255, X R G , Y G and Z G are the corresponding tristimulus values when the green color value G of the display screen is 255, X B , Y B and Z B are the corresponding tristimulus values when the display screen blue color value B is 255 .
对公式(8)进行变形得到:Deformation of formula (8) can be obtained:
Figure PCTCN2020110917-appb-000015
Figure PCTCN2020110917-appb-000015
在公式(9)中,令
Figure PCTCN2020110917-appb-000016
即得到:
In formula (9), let
Figure PCTCN2020110917-appb-000016
That is to get:
Figure PCTCN2020110917-appb-000017
Figure PCTCN2020110917-appb-000017
可以存储
Figure PCTCN2020110917-appb-000018
利用该3×3的转换矩阵来实现将第一gamma查找表输出的线性色彩值R1、G1和B1转换为显示屏的显示色域上的线性色彩值R pannel、G pannel和B pannel
can be stored
Figure PCTCN2020110917-appb-000018
The 3×3 conversion matrix is used to convert the linear color values R1 , G1 and B1 output by the first gamma lookup table into the linear color values R pannel , G pannel and B pannel on the display color gamut of the display screen.
(2)通过查找表进行色域转换(2) Color gamut conversion by look-up table
或者,也可以通过存储色彩值查找表直接进行显示屏上的色域转换。即在确定第一RGB的情况下,通过色彩值查找表查找到对应的第二RGB,使得显示屏在目标XYZ刺激值下进行显示,完成色域转换。色彩值查找表的映射关系可以是通过测量得到的,通过已知的目标色域,以及色彩分析仪测量得到的显示屏对应色域上的色彩值,建立三维的色彩值查找表。三个维度分别为R、G和B,色彩值查找表中,初始色彩值R in、G in和B in的同一组数值可以根据三个维度唯一对应一组显示屏目标色彩值R out、G out、B out的取值。在该色彩值查找表查找未保存的R1、G1和B1取值时,查找输入的线性色彩值在色彩值查找表中三个维度中所处的位置,通过插值法确定显示屏的色彩值,插值法的描述可以参考步骤一中的具体描述,这里不再赘述。 Alternatively, the color gamut conversion on the display can also be performed directly by storing the color value lookup table. That is, when the first RGB is determined, the corresponding second RGB is found through the color value look-up table, so that the display screen is displayed under the target XYZ stimulus value, and the color gamut conversion is completed. The mapping relationship of the color value look-up table may be obtained by measurement, and a three-dimensional color value look-up table is established by using the known target color gamut and the color values on the display screen corresponding to the color gamut measured by the color analyzer. The three dimensions are R, G, and B, respectively. In the color value lookup table, the same set of values of the initial color values R in , G in and B in can uniquely correspond to a set of display target color values R out , G according to the three dimensions The values of out and B out . When the color value lookup table looks for the unsaved R1, G1 and B1 values, find the position of the input linear color value in the three dimensions in the color value lookup table, and determine the color value of the display screen by interpolation method, For the description of the interpolation method, reference may be made to the specific description in step 1, and details are not repeated here.
可选情况下,色彩值查找表中存储的色彩值RGB可以是线性值,也可以是非线性值。Optionally, the color value RGB stored in the color value lookup table may be a linear value or a non-linear value.
步骤三、将线性的色彩值进行非线性转换。Step 3: Perform nonlinear conversion on the linear color value.
上述由公式(10)得到的R pannel、G pannel、B pannel为显示屏的显示色域上的线性色彩值。为了保证颜色是按照人类视觉规律进行显示,需要经过非线性转换。非线性变换可以类似于步骤一中的线性转换通过查找表实现。具体的,可以存储第二gamma查找表,第二gamma查找表中包括线性rgb和其对应非线性RGB之间的对应关系,通过第二gamma查找表实现显示屏的显示色域上的线性色彩值转换为非线性的色彩值。具体的,gamma可以为2.2,第二gamma查找表的映射关系可以是将输入的红色分量值R pannel、绿色分量值G pannel和蓝色分量值B pannel依次映射为红色分量值R2、绿色分量值G2和蓝色分量值B2。其中: The above R pannel , G pannel , and B pannel obtained by formula (10) are linear color values on the display color gamut of the display screen. In order to ensure that the color is displayed according to the laws of human vision, it needs to undergo non-linear transformation. The nonlinear transformation can be implemented by a look-up table similar to the linear transformation in step one. Specifically, a second gamma lookup table can be stored, the second gamma lookup table includes the correspondence between linear rgb and its corresponding nonlinear RGB, and the second gamma lookup table is used to realize the linear color value on the display color gamut of the display screen Convert to non-linear color values. Specifically, the gamma may be 2.2, and the mapping relationship of the second gamma lookup table may be to map the input red component value R pannel , green component value G pannel and blue component value B pannel to the red component value R2 , the green component value R2 and the green component value in turn. G2 and blue component value B2. in:
Figure PCTCN2020110917-appb-000019
Figure PCTCN2020110917-appb-000019
第二gamma查找表中,可以是一个线性的色彩值范围对应一个非线性的色彩值。例如(R pannel-ΔR1,R pannel+ΔR1)范围内的线性色彩值在第一gamma查找表中均对应R2。另外,第二gamma查找表中,也可以是一个线性的色彩值对应一个非线性的色彩值。在第二gamma查找表中未保存的线性色彩值取值对应的非线性色彩值取值可以通过插值法确定。其中,插值法的描述可以参考步骤一中的具体描述,这里不再赘述。 In the second gamma lookup table, a linear color value range may correspond to a non-linear color value. For example, linear color values in the range of (R pannel -ΔR1 , R pannel +ΔR1) all correspond to R2 in the first gamma lookup table. In addition, in the second gamma lookup table, a linear color value may also correspond to a nonlinear color value. The nonlinear color value value corresponding to the unsaved linear color value value in the second gamma lookup table may be determined by an interpolation method. For the description of the interpolation method, reference may be made to the specific description in step 1, which will not be repeated here.
步骤四、显示屏根据转换获得的非线性的色彩值进行显示。Step 4: Display the display screen according to the non-linear color value obtained by conversion.
获得了显示屏转换到目标XYZ刺激值时对应的第二RGB,具体为非线性的红色分量值R2、绿色分量值G2和蓝色分量值B2,显示屏按照对应的色彩值进行显示。The second RGB corresponding to when the display screen is converted to the target XYZ stimulus value is obtained, specifically the non-linear red component value R2, green component value G2 and blue component value B2, and the display screen displays according to the corresponding color values.
本申请实施例中所涉及的显示屏可以是LED显示屏,具体的可以包含各类有机发光二极管(organic light-emitting diode,OLED)显示屏,如AMOLED显示屏、无源矩阵有机发光二极管(passive matrix organic light-emitting diodes,PM-OLED)显示屏,还可以包含其他类型的LED,也可以包含未来新出现类型的显示器,本申请实施例对此不作限定。The display screens involved in the embodiments of the present application may be LED display screens, and may specifically include various types of organic light-emitting diode (organic light-emitting diode, OLED) display screens, such as AMOLED display screens, passive matrix organic light emitting diodes (passive matrix organic light emitting diodes) matrix organic light-emitting diodes, PM-OLED) display screen, may also include other types of LEDs, and may also include future types of displays, which are not limited in the embodiments of the present application.
上述显示屏色域转换过程中,通过变换矩阵进行色彩值变换时,一般要求显示器的白色亮度校正至gamma 2.2,以满足人眼对亮度的感知特性。但显示器的RGB像素之间存在串扰,导致当白色亮度的gamma曲线校正至2.2时,R、G、B三分量对应的亮度不一定符合gamma 2.2,且对应不同工艺水平的显示器,gamma都不一样,因此不能准确地进行线性域与非线性域转换,因此影响颜色准确性。与此同时,由于LED发光波长会受到驱动电压影响,因此不论对于主动发光的OLED,或者是以LED为背光的LCD,RGB的色度坐标x,y会随着亮度变化,特别对应亮度较低的情况下,变化量比较大,一个固定的3x3矩阵无法很好地将显示屏的色域校正至标准色域,因此影响颜色的准确性。In the above-mentioned display color gamut conversion process, when the color value is transformed by the transformation matrix, the white brightness of the display is generally required to be corrected to gamma 2.2 to meet the human eye's perception of brightness. However, there is crosstalk between the RGB pixels of the display. As a result, when the gamma curve of the white brightness is corrected to 2.2, the brightness corresponding to the three components of R, G, and B may not conform to the gamma 2.2, and the gammas corresponding to displays of different technological levels are different. , so the linear domain to nonlinear domain conversion cannot be accurately performed, thus affecting the color accuracy. At the same time, since the light-emitting wavelength of the LED is affected by the driving voltage, the chromaticity coordinates x and y of the RGB will change with the brightness, especially for the OLED with active light emission or the LCD with the LED as the backlight, especially if the brightness is low. In the case of , the amount of change is relatively large, and a fixed 3x3 matrix cannot well correct the color gamut of the display screen to the standard color gamut, thus affecting the color accuracy.
通过色彩值查找表进行色彩值变换是将标准色域图像RGB色彩值作为输入的RGB分量直接映射至显示器输出的RGB分量,理论上若色彩值查找表足够大,可以将输入的RGB一一映射至显示器输出的RGB分量,从而使显示屏显示准确的颜色。The color value transformation through the color value lookup table is to directly map the RGB color value of the standard color gamut image as the input RGB component to the RGB component output by the display. In theory, if the color value lookup table is large enough, the input RGB can be mapped one by one. RGB components to the monitor output, allowing the monitor to display accurate colors.
实际应用中,无法针对每一个RGB的分量进行一一映射,因此采用5x5x5,9x9x9甚至17x17x17的色彩值查找表,根据输入的RGB查找对应色彩值查找表的位置,再进行插值计算得到对应的输出值。In practical applications, it is impossible to map each RGB component one by one, so a color value lookup table of 5x5x5, 9x9x9 or even 17x17x17 is used, and the position of the corresponding color value lookup table is searched according to the input RGB, and then the corresponding output is obtained by interpolation calculation. value.
在生成色彩值查找表之前,需要对表中每一个节点进行校正才能显示准确的颜色。校正过程如下:通过色彩分析仪测试显示屏输入某个RGB色彩值时对应的色度和亮度参数(即xyY参数,用于描述像素的色彩,与人眼感受到的三色刺激值XYZ具有函数关系),电脑进行计算后再写入手机的存储,测试的信息越多校正的颜色越准确。但过多的采样测试会影响实际显示器出货的产能,例如在显示器上每量测一个颜色需要200~500ms,通常需要量测超过17x17x17种颜色才能达到将显示器的色域校正准确,因此需近一个小时。Before generating the color value lookup table, each node in the table needs to be corrected to display accurate colors. The calibration process is as follows: The chromaticity and luminance parameters (ie, the xyY parameters, which are used to describe the color of the pixel, are used to describe the color of the pixel, and have a function with the tristimulus value XYZ perceived by the human eye) when a certain RGB color value is input to the display screen through a color analyzer. relationship), the computer performs the calculation and then writes it into the storage of the mobile phone. The more information tested, the more accurate the color correction will be. However, too many sampling tests will affect the actual display production capacity. For example, it takes 200-500ms to measure a color on the display. Usually, more than 17x17x17 colors need to be measured to achieve accurate color gamut correction of the display. One hour.
与此同时,显示器针对不同的显示场景,需要校正到不同的色域,也通常需要采用不同的色彩值查找表。为了保证不同场景下的显示一致性,需要针对不同场景进行色彩校正,因此随着使用场景的增加,校正时间更长。At the same time, for different display scenarios, the display needs to be calibrated to different color gamuts, and usually needs to use different color value lookup tables. In order to ensure the display consistency in different scenarios, it is necessary to perform color correction for different scenarios, so as the usage scenarios increase, the correction time will be longer.
基于上述描述,本申请实施例提供一种显示方法,以解决上述显示颜色准确性低和转换色域效率低的问题。首先对该方法应用的系统架构进行介绍。请参阅图4A,图4A为本申请实施例对应的一种色域校正系统架构示意图,如图4A所示,该系统架构40中包括各类功能模块401,例如用户界面,图像模块,视频模块,拍摄模块等;然后包括能够进行图像处理的图形处理器(graphics processing unit,GPU)402,以及包括用于决定显示色彩的显示子系统403,对色彩进行显示的显示屏404等。其中,显示子系统403中,又包括各种决定显示色彩的子模块,例如缩放模块,色彩空间转换模块,高动态范围(high-dynamic range,HDR)图像模块,色彩模块等。其中色彩模块4036用来生成色彩值查找表,以便在显示屏当前色域进行显示的初始RGB能够根 据色彩值查找表查找到对应的显示RGB,使得显示屏通过显示RGB进行显示时,对应的XYZ三色刺激值与标准色域相同,也即将显示屏校正到标准色域。图4A可以全部部署于图1所述的电子设备中,或者部分部署于图1所述的电子设备中,以实现本申请实施例中所述的显示方法。Based on the above description, an embodiment of the present application provides a display method to solve the above-mentioned problems of low display color accuracy and low color gamut conversion efficiency. Firstly, the system architecture of this method is introduced. Please refer to FIG. 4A . FIG. 4A is a schematic diagram of the architecture of a color gamut correction system corresponding to an embodiment of the present application. As shown in FIG. 4A , the system architecture 40 includes various functional modules 401 , such as a user interface, an image module, and a video module. , a shooting module, etc.; and then includes a graphics processor (graphics processing unit, GPU) 402 capable of image processing, and includes a display subsystem 403 for determining display colors, and a display screen 404 for displaying colors. The display subsystem 403 further includes various sub-modules for determining display colors, such as a scaling module, a color space conversion module, a high-dynamic range (high-dynamic range, HDR) image module, a color module, and the like. The color module 4036 is used to generate a color value lookup table, so that the initial RGB displayed in the current color gamut of the display screen can find the corresponding display RGB according to the color value lookup table, so that when the display screen is displayed by displaying RGB, the corresponding XYZ The tristimulus value is the same as the standard color gamut, that is, the display is corrected to the standard color gamut. FIG. 4A may be fully deployed in the electronic device described in FIG. 1 , or partially deployed in the electronic device described in FIG. 1 , so as to implement the display method described in the embodiments of the present application.
请参阅图4B,图4B为本申请实施例提供的一种显示方法流程图,如图4B所示,该方法包括如下步骤:Please refer to FIG. 4B . FIG. 4B is a flowchart of a display method provided by an embodiment of the present application. As shown in FIG. 4B , the method includes the following steps:
501、获取待显示的第一像素的第一RGB。501. Obtain the first RGB of the first pixel to be displayed.
在一些情况下,对于终端设备,可简称为终端(terminal),也被称为用户设备(user equipment,UE),或订户单元(subscriber unit,SU),可以具体为移动电话(mobile phone)、平板电脑(tablet computer)、膝上型电脑(laptop computer)、可穿戴设备(比如智能手表、智能手环、智能头盔、智能眼镜),以及其他具备无线接入能力的设备,如智能汽车,各种物联网(internet of thing,IOT)设备,包括各种智能家居设备(比如智能电表和智能家电)以及智能城市设备(比如安防或监控设备,智能道路交通设施)等。在终端设备包括显示屏的情况下,可以对图像按照自身的色域、屏幕材料或其他参数进行显示。对于具体的某个图像,其对应的色彩可以通过每个像素的RGB色彩值来描述,因此,获取到需要在第一显示屏进行显示的输入图像后,首先获取该输入图像每个像素对应的第一RGB,用以描述该输入图像。In some cases, a terminal device may be referred to as a terminal (terminal) for short, also referred to as a user equipment (user equipment, UE), or a subscriber unit (subscriber unit, SU), which may be specifically a mobile phone (mobile phone), Tablet computers, laptop computers, wearable devices (such as smart watches, smart bracelets, smart helmets, smart glasses), and other devices with wireless access capabilities, such as smart cars, are Internet of Things (IOT) devices, including various smart home devices (such as smart meters and smart home appliances) and smart city devices (such as security or monitoring devices, smart road traffic facilities), etc. In the case where the terminal device includes a display screen, the image can be displayed according to its own color gamut, screen material or other parameters. For a specific image, its corresponding color can be described by the RGB color value of each pixel. Therefore, after obtaining the input image that needs to be displayed on the first display screen, first obtain the corresponding color value of each pixel of the input image. The first RGB, used to describe the input image.
502、获取第一应用模式对应的第三显示查找表LUT,所述第一应用模式对应的第三LUT根据第一LUT和所述第一应用模式对应的第二LUT融合生成,所述第三LUT包括多个初始RGB与第一显示RGB的一一对应关系,所述初始RGB对应初始色度与亮度参数,所述第一显示RGB对应所述第一应用模式的色度与亮度参数;所述第一LUT包括多个初始RGB与目标RGB的一一映射关系,所述目标RGB对应指定色度与亮度参数;所述第二LUT包括多个初始RGB与显示RGB的一一映射关系,所述显示RGB与应用模式相关,同一个所述初始RGB在不同的应用模式下对应的显示RGB不同,一个应用模式对应一个所述第二LUT。502. Obtain the third display lookup table LUT corresponding to the first application mode, the third LUT corresponding to the first application mode is generated according to the fusion of the first LUT and the second LUT corresponding to the first application mode, and the third LUT corresponding to the first application mode is merged and generated. The LUT includes a one-to-one correspondence between a plurality of initial RGB and the first display RGB, the initial RGB corresponds to the initial chromaticity and luminance parameters, and the first display RGB corresponds to the chromaticity and luminance parameters of the first application mode; The first LUT includes a one-to-one mapping relationship between a plurality of initial RGB and target RGB, and the target RGB corresponds to specified chromaticity and luminance parameters; the second LUT includes a one-to-one mapping relationship between a plurality of initial RGB and display RGB, so the The display RGB is related to the application mode, the same initial RGB corresponds to different display RGB in different application modes, and one application mode corresponds to one of the second LUTs.
503、根据所述第三LUT确定所述第一RGB在所述第一应用模式对应的第二RGB,将所述第二RGB发送给第一显示器进行显示。503. Determine, according to the third LUT, a second RGB corresponding to the first RGB in the first application mode, and send the second RGB to a first display for display.
通常情况下,应用模式包括以产品划分的多种模式,例如手机模式,平板电脑模式,电视机模式等;或者以不同应用场景划分的多种模式,例如按照能耗模式划分,可以包括常规模式和省电模式等;按照应用内容划分,可以包括网页模式,视频模式,图像模式等。不同的应用模式,其对应的色域不同,即针对同一个输入图像,每种应用模式下的RGB色彩值和XYZ三色刺激值也不同。Usually, the application mode includes multiple modes divided by product, such as mobile phone mode, tablet mode, TV mode, etc.; or multiple modes divided by different application scenarios, such as divided according to energy consumption mode, which can include conventional mode and power saving mode, etc.; according to the application content, it can include web page mode, video mode, image mode, etc. Different application modes have different corresponding color gamuts, that is, for the same input image, the RGB color values and XYZ tristimulus values in each application mode are also different.
在本申请实施例中,获取到待显示像素之后(可能为图像,也可能为视频),要将其转换到不同应用模式下的色域进行显示,可以通过生成每种应用模式下对应的第三显示查找表(look up table,LUT),然后在确定显示屏对应的第一应用模式后,将输入图像的第一RGB输入第一应用模式对应的第三LUT,获取该应用模式下对应的第二RGB,以使得显示屏通过第二RGB进行显示时,达成在第一应用模式对应的色域进行显示。In this embodiment of the present application, after acquiring the pixels to be displayed (which may be images or videos), to convert them to color gamuts in different application modes for display, you can generate the corresponding first pixel in each application mode by generating The third is to display a look up table (LUT), and after determining the first application mode corresponding to the display screen, input the first RGB of the input image into the third LUT corresponding to the first application mode, and obtain the corresponding The second RGB, so that when the display screen is displayed by the second RGB, the display in the color gamut corresponding to the first application mode is achieved.
在应用第三LUT的映射关系确定每个输入图像进行显示对应的第二RGB之前, 需要生成第三LUT。其中第三LUT包括多个第一初始RGB与第一显示RGB的一一对应关系。第一初始RGB为显示屏在当前色域进行显示时对应的色彩值。通常情况下,每个显示屏都能在R、G、B值分别为0-255(10进制时)的区间内显示。那么第一初始RGB可以为一些典型的采样RGB,例如对0-255进行17等分后获得的数值,则初始RGB可以为(0,0,16),(0,32,16),(16,16,48),(16,64,16),(240,0,0)……(255,255,255)等。第一显示RGB为显示屏转换到第一应用模式下的色域时,初始RGB对应变换到的色彩值。第三LUT中的内容可以如下表所示:Before applying the mapping relationship of the third LUT to determine the second RGB corresponding to each input image for display, the third LUT needs to be generated. The third LUT includes a one-to-one correspondence between a plurality of first initial RGBs and first display RGBs. The first initial RGB is the color value corresponding to when the display screen is displayed in the current color gamut. Under normal circumstances, each display screen can be displayed in the interval of R, G and B values respectively 0-255 (in decimal). Then the first initial RGB can be some typical sampled RGB, such as the value obtained by dividing 0-255 into 17 equal parts, then the initial RGB can be (0,0,16), (0,32,16), (16 , 16, 48), (16, 64, 16), (240, 0, 0)...(255, 255, 255) and so on. The first display RGB is the color value to which the initial RGB corresponds when the display screen is converted to the color gamut in the first application mode. The content in the third LUT can be shown in the following table:
表3第三LUTTable 3 Third LUT
第一初始RGBfirst initial RGB 第一显示RGBfirst display RGB
(0,,0,16)(0,,0,16) (0,0,10)(0,0,10)
(0,32,32)(0,32,32) (0,25,25)(0,25,25)
(255,255,255)(255,255,255) (250,250,250)(250,250,250)
例如输入图像的第一初始RGB为(255,255,255),即红色分量值、绿色分量值和蓝色分量值都为255,为一张白色图像。在第一应用模式下,针对所有白色图像,都需要按照更低的亮度进行显示,即映射为显示RGB(250,250,250)进行显示。For example, the first initial RGB of the input image is (255, 255, 255), that is, the red component value, the green component value and the blue component value are all 255, which is a white image. In the first application mode, all white images need to be displayed at a lower brightness, that is, mapped to display RGB (250, 250, 250) for display.
对于生产线上的每个显示屏,都需要确定其在每种应用模式下对应的第三LUT。以便确定输入图像在每个显示屏上,每种应用模式下对应的显示RGB。具体可参阅图4C,图4C为本申请实施例提供的一种应用第三LUT的过程示意图,如图4C所示,同一个输入图像可以输入不同的显示屏,而不同的显示屏由于可显示亮度与颜色的差异,LCD的穿透率,OLED的材料等差异,使得每个显示屏要让人眼感受到相同的色度与亮度,对应显示的RGB会有所区别。另一方面,同一个显示屏又可以运用于多种应用模式,即同一个显示屏可以在不同的色度与亮度下进行显示,对应的显示RGB又会不同。因此,输入图像输入显示屏后,对应的输出图像的显示RGB,一方面与显示屏有关,另一方面与显示屏的应用模式有关,可以根据每个显示屏的每一种应用模式生成和应用一个第三LUT。For each display on the production line, its corresponding third LUT in each application mode needs to be determined. In order to determine the corresponding display RGB of the input image on each display screen and each application mode. For details, please refer to FIG. 4C. FIG. 4C is a schematic diagram of a process of applying a third LUT provided by an embodiment of the present application. As shown in FIG. 4C, the same input image can be input into different display screens, and different display screens can display The difference between brightness and color, the transmittance of LCD, and the material of OLED make each display screen feel the same chromaticity and brightness, and the corresponding RGB display will be different. On the other hand, the same display screen can be used in multiple application modes, that is, the same display screen can be displayed in different chromaticity and brightness, and the corresponding display RGB will be different. Therefore, after the input image is input to the display screen, the display RGB of the corresponding output image is related to the display screen on the one hand, and the application mode of the display screen on the other hand, and can be generated and applied according to each application mode of each display screen. A third LUT.
根据前述描述可知,对于每个显示屏,可以通过多次量测显示屏在每种应用模式下对应的显示RGB以便直接生成该模式下的第三LUT,但是这将导致生成效率低下的问题。或者根据矩阵变换计算得到每个显示屏在不同应用模式下对应的显示RGB,再生成第三LUT,这将导致获取的显示RGB不准确,进而导致显示屏上显示的色度与亮度参数不准确的问题。在本申请实施例中,通过第一LUT和第二LUT融合生成第三LUT。具体过程可参阅图4D,图4D为本申请实施例提供的一种第一LUT和第二LUT融合生成第三LUT的原理示意图,如图4D所示,针对任意一个第一显示屏,将第一显示屏由初始色域转换到指定显示屏的指定色域时,对应的色彩值由第一初始RGB转换到目标RGB,根据第一初始RGB和目标RGB的一一映射关系生成该显示屏对应的第一LUT;指定显示屏从指定色域转换到每个应用模式对应的显示色域时,其对应的输出RGB由第二初始RGB转换到显示RGB,显示RGB与应用模式相关,同一个第二初始RGB在不同的应用模式下对应的显示RGB不同,一个应用模式对应一 个第二LUT。每个第二LUT包括多个第二初始RGB与显示RGB的一一映射关系,第二LUT中的第二初始RGB也是一些典型RGB值,例如对0-255进行17等分后获得的数值,则第二初始RGB可以为(0,0,16),(0,32,16),(16,16,48),(16,64,16),(240,0,0)……(255,255,255)等。在不同的应用模式下,相同的第二初始RGB值会映射到不同的显示RGB上,例如在夜间护眼模式对应的第二LUT中,第二初始RGB为(255,255,255)时,映射到的显示RGB可能为(150,150,150);而在室外模式对应的第二LUT中,第二初始RGB为(255,255,255)时,映射到的显示RGB可能为(250,250,250)。最后,第一LUT和第二LUT融合生成第三LUT,第三LUT对应的应用模式为第二LUT对应的应用模式。According to the foregoing description, for each display screen, the corresponding display RGB of the display screen in each application mode can be measured multiple times to directly generate the third LUT in this mode, but this will lead to the problem of low generation efficiency. Or calculate the corresponding display RGB of each display screen in different application modes according to the matrix transformation, and then generate the third LUT, which will cause the acquired display RGB to be inaccurate, which will lead to inaccurate chromaticity and brightness parameters displayed on the display screen. The problem. In this embodiment of the present application, the third LUT is generated by fusing the first LUT and the second LUT. For the specific process, please refer to FIG. 4D . FIG. 4D is a schematic diagram of the principle of generating a third LUT by fusing a first LUT and a second LUT according to an embodiment of the present application. As shown in FIG. 4D , for any first display screen, the When a display screen is converted from the initial color gamut to the specified color gamut of the designated display screen, the corresponding color value is converted from the first initial RGB to the target RGB, and the corresponding color value of the display screen is generated according to the one-to-one mapping relationship between the first initial RGB and the target RGB. The first LUT; when the specified display screen is converted from the specified color gamut to the display color gamut corresponding to each application mode, its corresponding output RGB is converted from the second initial RGB to the display RGB, and the display RGB is related to the application mode. Two initial RGBs correspond to different display RGBs in different application modes, and one application mode corresponds to one second LUT. Each second LUT includes a one-to-one mapping relationship between multiple second initial RGB and display RGB, and the second initial RGB in the second LUT is also some typical RGB values, such as the values obtained by dividing 0-255 into 17 equal parts, Then the second initial RGB can be (0,0,16), (0,32,16), (16,16,48), (16,64,16), (240,0,0)...(255,255,255 )Wait. In different application modes, the same second initial RGB value will be mapped to different display RGBs. For example, in the second LUT corresponding to the night eye protection mode, when the second initial RGB is (255, 255, 255), the display mapped to The RGB may be (150, 150, 150); in the second LUT corresponding to the outdoor mode, when the second initial RGB is (255, 255, 255), the mapped display RGB may be (250, 250, 250). Finally, the first LUT and the second LUT are merged to generate a third LUT, and the application mode corresponding to the third LUT is the application mode corresponding to the second LUT.
具体地,对于每个显示屏,输入一个RGB,都会有其对应的人眼感知到的XYZ三色刺激值,其导出参数x,y,Y用于表征该刺激值对应的亮度与色彩,在本申请实施例中将x,y,Y参数表述为RGB对应的色度与亮度参数。每个显示屏的初始色域(可以为出厂色域,默认色域等)都可以通过初始RGB以及与初始RGB对应的初始色度与亮度参数来表征,RGB与XYZ刺激值的转换关系可以根据前述公式(5)和公式(6)计算获得,XYZ刺激值和色度与亮度参数的函数关系可以根据前述公式(1)~公式(4)确定,因此RGB和色度与亮度参数的转换关系可推导获得。Specifically, for each display screen, inputting an RGB will have its corresponding XYZ tristimulus value perceived by the human eye, and its derived parameters x, y, and Y are used to characterize the brightness and color corresponding to the stimulus value. In the embodiments of the present application, the x, y, and Y parameters are expressed as chromaticity and luminance parameters corresponding to RGB. The initial color gamut of each display screen (can be factory color gamut, default color gamut, etc.) can be characterized by the initial RGB and the initial chromaticity and luminance parameters corresponding to the initial RGB. The conversion relationship between RGB and XYZ stimulus values can be based on The aforementioned formula (5) and formula (6) are calculated and obtained, and the functional relationship between XYZ stimulus value and chromaticity and luminance parameters can be determined according to the aforementioned formulas (1) to (4), so the conversion relationship between RGB and chromaticity and luminance parameters can be derived.
对于第一显示屏和指定显示屏,其RGB色彩值、亮度与色度参数,以及色域的对应关系如下表所示:For the first display screen and the designated display screen, the RGB color value, brightness and chromaticity parameters, and the corresponding relationship of the color gamut are shown in the following table:
表4第一显示屏与指定显示屏的色域关系表Table 4 Color gamut relationship between the first display screen and the specified display screen
Figure PCTCN2020110917-appb-000020
Figure PCTCN2020110917-appb-000020
第一初始RGB和第二RGB可以为相同的色彩值,例如都为初始RGB1,初始RGB2或初始RGB3,但是第一初始RGB对应初始亮度与色度参数,第二初始RGB对应指定色度与亮度参数,即不同显示屏实际特性不同,人眼感受到的色彩与亮度也不同(或者说色域不同)。为了使第一显示屏转换到指定显示屏的色域上,即使得第一显示屏在指定亮度与色度参数进行显示,第一显示屏的输出RGB需要变换为目标RGB,再根据第一初始RGB和目标RGB的一一映射关系生成第一LUT。The first initial RGB and the second RGB can be the same color value, such as initial RGB1, initial RGB2 or initial RGB3, but the first initial RGB corresponds to the initial luminance and chrominance parameters, and the second initial RGB corresponds to the specified chromaticity and luminance Parameters, that is, the actual characteristics of different display screens are different, and the color and brightness perceived by the human eye are also different (or the color gamut is different). In order to convert the first display screen to the color gamut of the specified display screen, that is, to make the first display screen display in the specified brightness and chromaticity parameters, the output RGB of the first display screen needs to be converted into the target RGB, and then according to the first initial The one-to-one mapping relationship between RGB and target RGB generates the first LUT.
假设色域校正系统40中,色彩模块4036中包括存储模块,其中存储了第一显示屏的第一初始RGB以及对应的初始亮度与色度参数,然后可以获取指定显示屏的第二初始RGB和对应的指定亮度与色度参数。或者,程序默认设定初始RGB(对应第一初始RGB和第二初始RGB),存储器中相应存储对应的初始亮度与色度参数,以及指定亮度与色度参数。可选情况下,也可以实时从临时存储空间中读取指定亮度与色度参数。然后由第一LUT生成模块生成第一LUT,第一LUT为显示屏由初始色域转换到指定显示屏的指定色域时,由第一初始RGB转换到目标RGB的一一对应关系表。具体过程为:Assuming that in the color gamut correction system 40, the color module 4036 includes a storage module, which stores the first initial RGB of the first display screen and the corresponding initial brightness and chromaticity parameters, and then the second initial RGB and chromaticity parameters of the specified display screen can be obtained. The corresponding specified luminance and chrominance parameters. Or, the program sets the initial RGB (corresponding to the first initial RGB and the second initial RGB) by default, and correspondingly stores the corresponding initial luminance and chrominance parameters in the memory, and specifies the luminance and chrominance parameters. Optionally, the specified luminance and chrominance parameters can also be read from the temporary storage space in real time. Then, a first LUT is generated by the first LUT generation module, and the first LUT is a one-to-one correspondence table of conversion from the first initial RGB to the target RGB when the display screen is converted from the initial color gamut to the designated color gamut of the designated display screen. The specific process is:
1、假设第一初始RGB为(R0,G0,B0),首先通过伽马转换将第一初始RGB转换 到线性域,获得第一线性rgb,表示为(r,g,b),具体转换公式为:1. Assuming that the first initial RGB is (R0, G0, B0), first convert the first initial RGB to the linear domain through gamma conversion, and obtain the first linear RGB, which is expressed as (r, g, b), the specific conversion formula for:
Figure PCTCN2020110917-appb-000021
Figure PCTCN2020110917-appb-000021
2、利用指定色域的转换矩阵,将线性rgb转换为XYZ三色刺激值,具体可参阅如下公式:2. Use the conversion matrix of the specified color gamut to convert the linear rgb to the XYZ tristimulus value. For details, please refer to the following formula:
Figure PCTCN2020110917-appb-000022
Figure PCTCN2020110917-appb-000022
其中Xt、Yt和Zt对应初始色度与亮度参数。Among them, Xt, Yt and Zt correspond to the initial chrominance and luminance parameters.
3、获得第一初始RGB对应的初始色度与亮度参数之后,可以根据前述公式(8)将其转换到目标RGB的线性空间域值,得到第二线性rgb。具体为:3. After the initial chromaticity and luminance parameters corresponding to the first initial RGB are obtained, they can be converted to the linear space domain value of the target RGB according to the aforementioned formula (8) to obtain the second linear RGB. Specifically:
Figure PCTCN2020110917-appb-000023
Figure PCTCN2020110917-appb-000023
其中(r,g,b) panel即为第二线性rgb,根据格拉斯曼第三定律可得: where (r, g, b) panel is the second linear rgb, which can be obtained according to Glassman's third law:
Figure PCTCN2020110917-appb-000024
Figure PCTCN2020110917-appb-000024
Figure PCTCN2020110917-appb-000025
Figure PCTCN2020110917-appb-000025
获得第二线性rgb后,在将其通过反伽马变换,即可获得非线性的RGB值。After the second linear rgb is obtained, the non-linear RGB value can be obtained by inverse gamma transformation.
由于固定伽马值并不一定能够使RGB值在线性域与非线性域进行准确转换,因此在本申请实施例中,将第二线性rgb进行反伽马变换时,对应的第二伽马值通过测量值计算获得。具体地,第二伽马值获取公式为:Since a fixed gamma value does not necessarily enable accurate conversion of RGB values in the linear domain and the nonlinear domain, in this embodiment of the present application, when performing inverse gamma transformation on the second linear rgb, the corresponding second gamma value Calculated from measured values. Specifically, the formula for obtaining the second gamma value is:
gamma2=log(Y gray1/Y gray2)/log(Gray1/Gray2)  (17) gamma2=log(Y gray1 /Y gray2 )/log(Gray1/Gray2) (17)
其中gray1和gray2表示任意两组RGB值对应的灰度值,Y gray1和Y gray2分别表示灰度值为gray1时对应的亮度值,以及灰度值为gray2时对应的亮度值。其中任意两组RGB对应的灰度值可以由测量获得。则第二伽马值根据测量值计算获得。 Among them, gray1 and gray2 represent the grayscale values corresponding to any two groups of RGB values, and Y gray1 and Y gray2 respectively represent the corresponding brightness values when the grayscale value is gray1, and the corresponding brightness value when the grayscale value is gray2. The grayscale values corresponding to any two groups of RGB can be obtained by measurement. Then the second gamma value is calculated and obtained according to the measured value.
最后根据gamma2对第二线性rgb进行反伽马变换,获得第一显示屏对应输出的中间RGB,公式为:Finally, perform inverse gamma transformation on the second linear rgb according to gamma2 to obtain the intermediate RGB corresponding to the output of the first display screen. The formula is:
Figure PCTCN2020110917-appb-000026
Figure PCTCN2020110917-appb-000026
上述过程中矩阵
Figure PCTCN2020110917-appb-000027
中的取值都是根据指定亮度与色度参数选择的,因此根据该矩阵计算获得的中间RGB为第一显示屏转换到指定亮度与色度参数时,理论上对应的输出RGB(非线性RGB)。但是由于上述矩阵选择的局限性,根据该矩阵获得的中间RGB并不一定为第一显示屏在指定亮度与色度参数进行显示时对应的输出RGB。因此,本申请实施例中,还需要进一步获取目标RGB,目标RGB为第一显示屏在指定亮度与色度参数进行显示时实际对应的输出RGB。
Matrix in the above process
Figure PCTCN2020110917-appb-000027
The values in are selected according to the specified luminance and chromaticity parameters, so the intermediate RGB calculated according to this matrix is the theoretically corresponding output RGB (non-linear RGB) when the first display screen is converted to the specified luminance and chromaticity parameters. ). However, due to the limitation of the above-mentioned matrix selection, the intermediate RGB obtained according to the matrix is not necessarily the output RGB corresponding to the first display screen when the luminance and chrominance parameters are specified for display. Therefore, in the embodiment of the present application, it is necessary to further obtain the target RGB, and the target RGB is the output RGB actually corresponding to the first display screen when the specified luminance and chromaticity parameters are displayed.
在本申请实施例中,按照预设步长对中间RGB进行迭代变换,针对每次迭代获得的中间RGB,计算其对应的色度与亮度参数,直到确定测量获得的色度与亮度参数与指定色度与亮度参数相同或相近,则确定该中间RGB即为目标RGB。参阅图4E,图4E为本申请实施例提供的一种确定目标RGB的流程图,如图4E所示,该过程包括如下步骤:In the embodiment of the present application, the intermediate RGB is iteratively transformed according to the preset step size, and the corresponding chromaticity and luminance parameters are calculated for the intermediate RGB obtained by each iteration, until it is determined that the measured chromaticity and luminance parameters and the specified If the chrominance and luminance parameters are the same or similar, it is determined that the intermediate RGB is the target RGB. Referring to FIG. 4E, FIG. 4E is a flowchart of determining target RGB provided by an embodiment of the present application. As shown in FIG. 4E, the process includes the following steps:
601、按照所述预设步长对RGB i进行变换,并获得对应色度与亮度参数变化值; 601. Transform RGB i according to the preset step size, and obtain corresponding chromaticity and luminance parameter change values;
602、根据所述预设步长获得RGB i+1,根据所述RGB i对应的中间色度与亮度参数和所述色度与亮度参数变化值获取所述RGB i+1对应的中间色度与亮度参数; 602. Obtain RGB i+1 according to the preset step size, and obtain the intermediate chromaticity corresponding to RGB i + 1 according to the intermediate chromaticity and luminance parameters corresponding to the RGB i and the change values of the chromaticity and luminance parameters and the brightness parameter;
603、判断所述RGB i+1对应的中间色度与亮度参数与所述指定色度与亮度参数的差值是否小于预设阈值; 603. Determine whether the difference between the intermediate chromaticity and luminance parameters corresponding to the RGB i+1 and the specified chromaticity and luminance parameters is less than a preset threshold;
604、若所述RGB i+1对应的所述中间色度与亮度参数与所述指定色度与亮度参数亮度差值不小于预设阈值,则令i=i+1,并重复执行S1-S3,直至所述RGB i+1对应的中间色度与亮度参数与所述指定色度与亮度参数差值小于预设阈值,获取所述RGB i+1作为目标RGB。当i=1时,所述RGB i为所述中间RGB。 604. If the luminance difference between the intermediate chromaticity and luminance parameters corresponding to the RGB i+1 and the specified chromaticity and luminance parameters is not less than a preset threshold, set i=i+1, and repeat S1- S3, until the difference between the intermediate chromaticity and luminance parameters corresponding to the RGB i+1 and the specified chromaticity and luminance parameters is less than a preset threshold, obtain the RGB i+1 as the target RGB. When i=1, the RGB i is the intermediate RGB.
预设步长可以为固定的ΔR,ΔG和/或ΔB构成的数值,例如预设步长可以为(0,0,ΔR),(0,ΔG,0)或者(ΔR,ΔG,ΔB)等。将上述根据矩阵计算获得的中间RGB作为迭代变换的初始值,例如设为RGB 1。当第一显示屏的输出RGB为RGB 1时,可测量获得对应的中间色度与亮度参数1,如果这个值与指定亮度与色度参数相等(或者两者差值小于预设阈值),说明根据矩阵计算获得的中间RGB即为第一显示屏在指定色域进行显示的目标RGB,则不需要再对中间RGB进行迭代变换。 The preset step size can be a fixed value composed of ΔR, ΔG and/or ΔB, for example, the preset step size can be (0, 0, ΔR), (0, ΔG, 0) or (ΔR, ΔG, ΔB), etc. . The intermediate RGB obtained by the above matrix calculation is used as the initial value of the iterative transformation, for example, set as RGB 1 . When the output RGB of the first display screen is RGB 1 , the corresponding intermediate chromaticity and luminance parameter 1 can be obtained by measurement. If this value is equal to the specified luminance and chromaticity parameters (or the difference between the two is less than the preset threshold), it means The intermediate RGB obtained by the matrix calculation is the target RGB displayed by the first display screen in the specified color gamut, and it is not necessary to perform iterative transformation on the intermediate RGB.
如果中间色度与亮度参数1与指定色度与亮度参数的差值大于预设阈值,说明第一显示屏当前的显示色域距离指定色域差距较大,对RGB 1按照预设步长变换,例如RGB 1对应的R,G,B值上增加或减去ΔR,ΔG,ΔB,获得RGB2,第一显示屏输出RGB发生变化,则同样引起对应色度与亮度参数的变化,记录色度与亮度参数变化值,并与中间色度与亮度参数1进行加减,获得与RGB 2对应的中间色度与亮度参数2。对应公式可表示为: If the difference between the intermediate chromaticity and luminance parameter 1 and the specified chromaticity and luminance parameter is greater than the preset threshold, it means that the current display color gamut of the first display screen is far away from the specified color gamut, and the RGB 1 is transformed according to the preset step size. , for example, increase or subtract ΔR, ΔG, ΔB from the R, G, B values corresponding to RGB 1 to obtain RGB2, and the output RGB of the first display screen changes, which also causes changes in the corresponding chromaticity and luminance parameters, and records the chromaticity The change value of the luminance parameter is added and subtracted with the intermediate chromaticity and luminance parameter 1 to obtain the intermediate chromaticity and luminance parameter 2 corresponding to RGB 2 . The corresponding formula can be expressed as:
Figure PCTCN2020110917-appb-000028
Figure PCTCN2020110917-appb-000028
其中xyY i+1为RGB i+1对应的中间色度与亮度参数,xyY i为RGB i对应的中间色度 与亮度参数,中间色度与亮度参数2对应上述公式中i=1的情况。RGB中包括R参数,G参数和B参数,ΔR,ΔG,ΔB分别为R参数,G参数和B参数的预设步长,Δx R,Δy R为R参数按照预设步长迭代造成的色度参数变化值,ΔY R为为R参数按照预设步长迭代造成的亮度参数变化值,Δx G,Δy G为G参数按照预设步长迭代造成的色度参数变化值,ΔY G为G参数按照预设步长迭代造成的亮度参数变化值,Δx B,Δy B为B参数按照预设步长迭代造成的色度参数变化值,ΔY B为B参数按照预设步长迭代造成的亮度参数变化值。 Wherein xyY i+1 is the intermediate chromaticity and luminance parameter corresponding to RGB i+1 , xyY i is the intermediate chromaticity and luminance parameter corresponding to RGB i , and the intermediate chromaticity and luminance parameter 2 corresponds to the case of i=1 in the above formula. RGB includes R parameter, G parameter and B parameter, ΔR, ΔG, ΔB are the preset step size of R parameter, G parameter and B parameter respectively, Δx R , Δy R are the color caused by the iteration of R parameter according to the preset step size. The change value of the luminance parameter, ΔY R is the change value of the luminance parameter caused by the iteration of the R parameter according to the preset step size, Δx G , Δy G are the change value of the chrominance parameter caused by the iteration of the G parameter according to the preset step size, ΔY G is the G Δx B , Δy B is the change value of the chrominance parameter caused by the iteration of the B parameter according to the preset step size, ΔY B is the luminance parameter caused by the iteration of the B parameter according to the preset step size Parameter change value.
或者也可以直接测量获得第一显示屏输出RGB 2时对应的中间色度与亮度参数2。在获得中间色度与亮度参数2之后,同样地,将其与指定色度与亮度参数进行对比,若两者差值小于预设阈值,则停止迭代,将RGB 2作为目标RGB,否则继续迭代。直到迭代获得的RGB i使得第一显示屏对应的亮度与色度参数为指定亮度与色度参数,表明第一显示屏的色域已经转换到指定色域,对应的RGB即为目标RGB。 Alternatively, it is also possible to directly measure and obtain the intermediate chromaticity and brightness parameter 2 corresponding to the first display screen outputting RGB 2 . After obtaining the intermediate chrominance and luminance parameters 2, similarly, compare them with the specified chrominance and luminance parameters. If the difference between the two is less than the preset threshold, stop the iteration and use RGB 2 as the target RGB, otherwise continue to iterate . Until the iteratively obtained RGB i makes the luminance and chromaticity parameters corresponding to the first display screen the specified luminance and chromaticity parameters, indicating that the color gamut of the first display screen has been converted to the specified color gamut, and the corresponding RGB is the target RGB.
在第一显示屏上,输出RGB由第一初始RGB转换为目标RGB后,显示的亮度与色度参数由初始色度与亮度参数转换到指定色度与亮度参数,即第一显示屏转换到指定色域进行显示。On the first display screen, after the output RGB is converted from the first initial RGB to the target RGB, the displayed luminance and chromaticity parameters are converted from the initial chromaticity and luminance parameters to the specified chromaticity and luminance parameters, that is, the first display screen is converted to Specify the color gamut for display.
可见,在本申请实施例中,先通过指定色域对应的矩阵计算第一显示屏的初始色域需要转换到的中间RGB,然后将中间RGB作为第一显示屏的输出RGB,进行对应色度与亮度参数的测量,确定第一显示屏是否转换到指定色域,如果不是,则按照预设步长对输出RGB进行迭代变换,直到确定第一显示屏转换到指定色域,获取对应的目标RGB。这个过程中,首先根据每个显示屏上的测量灰度值确定伽马值,提升了矩阵转换的准确性,另外,没有将根据矩阵计算获得的中间RGB直接作为第一显示屏在指定色域进行显示的目标RGB,而是反复迭代确定目标RGB,进一步提升了生成的第一LUT的准确性。It can be seen that, in the embodiment of the present application, the intermediate RGB to which the initial color gamut of the first display screen needs to be converted is calculated by the matrix corresponding to the specified color gamut, and then the intermediate RGB is used as the output RGB of the first display screen, and the corresponding chromaticity is carried out. With the measurement of the brightness parameter, it is determined whether the first display screen is converted to the specified color gamut. If not, iteratively transforms the output RGB according to the preset step size until it is determined that the first display screen is converted to the specified color gamut, and the corresponding target is obtained. RGB. In this process, the gamma value is first determined according to the measured gray value of each display screen, which improves the accuracy of matrix conversion. In addition, the intermediate RGB obtained according to the matrix calculation is not directly used as the first display screen in the specified color gamut. The target RGB is displayed, but iteratively determines the target RGB, which further improves the accuracy of the generated first LUT.
可选情况下,上述获取第一LUT的过程也可以在其他设备或处理器中进行,则色域校正系统40中,色彩模块4036中不包括第一LUT生成模块,由该系统中的通信模块在需要生成第三LUT时,直接从其他设备或处理器中请求获取第一LUT,可以减少系统数据处理消耗;或者通信模块已经提前获取了第一LUT,并存储在存储模块,在需要生成第三LUT时,从存储模块中读取第一LUT。因为第一初始RGB可以为程序默认设置的值,那么该系统获取的或者存储的也可以为与第一初始RGB对应的目标RGB,降低存储压力。系统根据默认设置的第一初始RGB和获取到的目标RGB也可以确定第一LUT。Optionally, the above-mentioned process of obtaining the first LUT can also be performed in other devices or processors. In the color gamut correction system 40, the color module 4036 does not include the first LUT generation module, and the communication module in the system does not include the first LUT generation module. When the third LUT needs to be generated, the first LUT can be directly requested from other devices or processors, which can reduce the system data processing consumption; or the communication module has obtained the first LUT in advance and stored it in the storage module. When there are three LUTs, the first LUT is read from the storage module. Because the first initial RGB can be a value set by default in the program, the target RGB obtained or stored by the system can also be the target RGB corresponding to the first initial RGB, which reduces the storage pressure. The system can also determine the first LUT according to the first initial RGB set by default and the acquired target RGB.
获取到第一LUT之后,需要将第一LUT与第二LUT融合生成第三LUT。其中第二LUT为指定显示屏由指定色域转换到不同应用场景下时对应的色域时,由第二初始RGB转换到显示RGB的一一对应关系表。如果多个第一显示屏所采用的指定显示屏为同一个,那么它们对应使用的第二LUT也为同一个。After the first LUT is obtained, the first LUT and the second LUT need to be fused to generate the third LUT. The second LUT is a one-to-one correspondence table of conversion from the second initial RGB to the display RGB when the specified display screen is converted from the specified color gamut to the corresponding color gamut under different application scenarios. If the designated display screen used by the multiple first display screens is the same, then the second LUTs used by them are also the same.
根据前述描述已知,指定显示屏的当前色域(指定色域)可以通过第二初始RGB来指示,例如输入第二初始RGB为(0,0,16),(0,32,16),……,(255,255,255),对应的色度与亮度参数为:指定色度与亮度参数1,指定色度与亮度参数2,……,指定色度与亮度参数N,转换到不同应用模式下的显示色域后,对应关系如表5所示:It is known from the foregoing description that the current color gamut (specified color gamut) of the designated display screen can be indicated by the second initial RGB, for example, the input second initial RGB is (0, 0, 16), (0, 32, 16), ..., (255, 255, 255), the corresponding chrominance and luminance parameters are: specify chrominance and luminance parameter 1, specify chrominance and luminance parameter 2, ..., specify chrominance and luminance parameter N, convert to different application modes After displaying the color gamut, the corresponding relationship is shown in Table 5:
表5指定显示屏与不同应用模式的色域关系表Table 5 specifies the color gamut relationship between the display and different application modes
Figure PCTCN2020110917-appb-000029
Figure PCTCN2020110917-appb-000029
即指定显示屏上,从指定色域转换到第一应用模式对应的第一显示色域,体现为指定亮度与色度参数转换到显示色度与亮度参数,对应的,指定显示屏的输出RGB由第二初始RGB转换到显示RGB。第二LUT中可以只包括第二初始RGB和显示RGB的对应关系,且每一种应用模式对应一个第二LUT。That is, on the specified display screen, the conversion from the specified color gamut to the first display color gamut corresponding to the first application mode is reflected in the conversion of the specified luminance and chromaticity parameters to the display chromaticity and luminance parameters, correspondingly, the output RGB of the specified display screen Convert from second initial RGB to display RGB. The second LUT may only include the correspondence between the second initial RGB and the display RGB, and each application mode corresponds to a second LUT.
第二LUT在其他设备或处理器中生成,然后由色域校正系统40的通信接口在需要生成第三LUT时,从服务器获取第二LUT;或者色域校正系统40已经提前获取并存储了第二LUT,在需要生成第三LUT时,从存储器读取第二LUT即可。The second LUT is generated in other devices or processors, and then the communication interface of the color gamut correction system 40 acquires the second LUT from the server when the third LUT needs to be generated; or the color gamut correction system 40 has acquired and stored the second LUT in advance. For the second LUT, when the third LUT needs to be generated, the second LUT can be read from the memory.
第一LUT和第二LUT融合生成第三LUT,包括:获取第一LUT中的第一初始RGB及其对应的目标RGB;确定目标RGB根据第二LUT映射获得的实时第一显示RGB;生成包括第一初始RGB和第一显示RGB的映射关系的第三LUT。The first LUT and the second LUT are fused to generate a third LUT, including: acquiring the first initial RGB in the first LUT and its corresponding target RGB; determining the real-time first display RGB obtained by the target RGB mapping according to the second LUT; The first initial RGB and the first third LUT showing the mapping relationship of RGB.
具体地,请参阅图4F,图4F为本申请实施例提供的一种第一LUT和第二LUT融合过程示意图,如图4F所示,根据第一LUT获取第一初始RGB对应的目标RGB后,将目标RGB作为第二LUT的输入值,查找对应的显示RGB。因为目标RGB对应指定色度与亮度参数,第二初始RGB也对应指定色度与亮度参数,那么在目标RGB=第二初始RGB的情况下,可以认为第二初始RGB与显示RGB的对应关系即为目标RGB与显示RGB的对应关系。例如图4F中,第一LUT中第一初始RGB1为(0,0,16)时,对应的目标RGB1为(0,0,32),而第二LUT中的第二初始RGB2为(0,0,32),其对应的显示RGB2为(0,0,48),那么生成的第三LUT中,第一初始RGB1(0,0,16)对应的显示RGB1为(0,0,48)。如果第一LUT中的目标RGB不对应第二LUT中现成的第二初始RGB,那么可以采用插值法等获取第一初始RGB与显示RGB的对应关系。例如图4F中,第一初始RGB2(0,0,32)对应的目标RGB2为(0,0,40),该目标RGB2为第二LUT中的第二初始RGB2和第二初始RGB3的中间值,可根据显示RGB2和显示RGB3插值获得在LUT2中,若第二初始RGB2为(0,0,40)时,对应的显示RGB2的色彩值B为:(48+72)/2=60,即第一初始RGB2(0,0,32)对应的显示RGB2为(0,0,60)。Specifically, please refer to FIG. 4F . FIG. 4F is a schematic diagram of a fusion process of a first LUT and a second LUT provided by an embodiment of the present application. As shown in FIG. 4F , after obtaining the target RGB corresponding to the first initial RGB according to the first LUT , take the target RGB as the input value of the second LUT, and find the corresponding display RGB. Because the target RGB corresponds to the specified chromaticity and luminance parameters, and the second initial RGB also corresponds to the specified chromaticity and luminance parameters, then in the case of target RGB=second initial RGB, it can be considered that the correspondence between the second initial RGB and the display RGB is It is the correspondence between target RGB and display RGB. For example, in Figure 4F, when the first initial RGB1 in the first LUT is (0, 0, 16), the corresponding target RGB1 is (0, 0, 32), and the second initial RGB2 in the second LUT is (0, 0, 32). 0,32), the corresponding display RGB2 is (0,0,48), then in the generated third LUT, the display RGB1 corresponding to the first initial RGB1 (0,0,16) is (0,0,48) . If the target RGB in the first LUT does not correspond to the ready-made second initial RGB in the second LUT, an interpolation method or the like may be used to obtain the correspondence between the first initial RGB and the display RGB. For example, in Figure 4F, the target RGB2 corresponding to the first initial RGB2 (0, 0, 32) is (0, 0, 40), and the target RGB2 is the intermediate value of the second initial RGB2 and the second initial RGB3 in the second LUT , can be obtained in LUT2 according to the interpolation of display RGB2 and display RGB3, if the second initial RGB2 is (0, 0, 40), the corresponding color value B of display RGB2 is: (48+72)/2=60, that is The display RGB2 corresponding to the first initial RGB2 (0, 0, 32) is (0, 0, 60).
根据第一LUT和第一应用模式下对应的第二LUT生成第三LUT之后,对于原本在第一显示屏上显示的初始图像(通过第一RGB进行描述),将第一RGB输入第三LUT,将其与第三LUT中的第一初始RGB进行匹配或插值,获得对应输出的第二RGB,作为第一RGB对应的显示RGB。第一显示器在第二RGB对应的色度与亮度参数进行显示,即完成初始图像转换到第一应用模式进行显示。After the third LUT is generated according to the first LUT and the corresponding second LUT in the first application mode, the first RGB is input to the third LUT for the initial image originally displayed on the first display screen (described by the first RGB) , match or interpolate it with the first initial RGB in the third LUT to obtain the second RGB corresponding to the output, which is used as the display RGB corresponding to the first RGB. The first display displays the chrominance and luminance parameters corresponding to the second RGB, that is, the initial image is converted to the first application mode for display.
可见,在本申请实施例中,生成每种应用模式对应的第三LUT,然后根据第三LUT确定第一显示屏由当前色域转换到每种应用模式对应的目标色域进行显示时,第一像素的第一RGB转换到第二RGB的对应关系。提升了第一显示屏从初始色域到不同应用模式的目标色域的效率。另外,获取每个显示屏由第一初始RGB转换到指定色度与 亮度参数对应的目标RGB的第一LUT,是考虑到每个显示屏面板实际特性,用于描述每个显示屏对应的色彩空间,提高了显示的准确性;另外,获取指定色度与亮度参数对应的第二初始RGB转换到每种应用模式下的显示RGB的第二LUT,并根据第一LUT融合第二LUT生成第三LUT,可以只测量获取该指定色度与亮度参数与不同应用模式下显示RGB的对应关系,再结合每个显示屏的第一LUT,即可获取每个显示屏转换到不同应用模式下时RGB的对应关系,而不用测量每个显示屏转换到不同应用模式下时RGB的对应关系,能够在一组测试参数的情况下生成不同场景下所需要的查找表,减少测量时间,提升色彩空间转换效率,同时能保证转换准确性。It can be seen that, in the embodiment of the present application, a third LUT corresponding to each application mode is generated, and then it is determined according to the third LUT that when the first display screen is converted from the current color gamut to the target color gamut corresponding to each application mode for display, the The correspondence between the first RGB conversion of a pixel to the second RGB. The efficiency of the first display screen from the initial color gamut to the target color gamut of different application modes is improved. In addition, obtaining the first LUT of each display screen converted from the first initial RGB to the target RGB corresponding to the specified chromaticity and brightness parameters is to describe the color corresponding to each display screen in consideration of the actual characteristics of each display screen panel In addition, the second initial RGB corresponding to the specified chromaticity and luminance parameters is obtained and converted to the second LUT of the display RGB in each application mode, and the second LUT is fused according to the first LUT to generate the first LUT. Three LUTs, you can only measure and obtain the corresponding relationship between the specified chromaticity and brightness parameters and the RGB displayed in different application modes, and then combine the first LUT of each display screen to obtain the time when each display screen is converted to different application modes The corresponding relationship of RGB, instead of measuring the corresponding relationship of RGB when each display screen is converted to different application modes, can generate the look-up table required in different scenarios under the condition of a set of test parameters, reduce the measurement time and improve the color space Conversion efficiency, while ensuring conversion accuracy.
在一些可能的情况下,第二LUT可以进行更新。例如手机新增了应用模式,包括睡眠模式,青少年护眼模式等,那么指定显示屏转换到不同应用模式下的可能性增加,即第二LUT的个数增加。或者,之前的应用模式进行了更新,例如视频模式的对比度和亮度都进行了优化,那么视频模式对应的第二LUT进行更新。在这种情况下,色域校正系统40可以通过通信接口从其他设备获取更新的第二LUT,色域校正系统40接收到其他设备发送的更新的第二LUT之后,存储在ROM中,色彩模块4036中的融合模块根据需要读取ROM,获得更新的第二LUT,然后融合生成的第一LUT,生成第三LUT。这种方法可以实时更新第三LUT,提升显示屏在不同应用模式下进行显示的效率。In some possible cases, the second LUT can be updated. For example, if a new application mode is added to the mobile phone, including sleep mode, eye protection mode for teenagers, etc., the possibility of specifying the display screen to switch to a different application mode increases, that is, the number of second LUTs increases. Or, if the previous application mode is updated, for example, the contrast and brightness of the video mode are optimized, then the second LUT corresponding to the video mode is updated. In this case, the color gamut correction system 40 can obtain the updated second LUT from other devices through the communication interface. After receiving the updated second LUT sent by the other device, the color gamut correction system 40 stores it in the ROM, and the color module The fusion module in 4036 reads the ROM as needed, obtains the updated second LUT, and then fuses the generated first LUT to generate the third LUT. This method can update the third LUT in real time and improve the display efficiency of the display screen in different application modes.
图5为本申请实施例提供的一种显示处理的装置,以执行前述实施例中的显示方法。如图5所示,本实施例提供的屏幕亮度的控制装置70可以包括:FIG. 5 is a display processing apparatus provided by an embodiment of the present application, so as to execute the display method in the foregoing embodiment. As shown in FIG. 5 , the device 70 for controlling screen brightness provided in this embodiment may include:
获取模块701,用于获取待显示的第一像素的第一RGB;an obtaining module 701, configured to obtain the first RGB of the first pixel to be displayed;
处理模块702,用于获取第一应用模式对应的第三显示查找表LUT,所述第一应用模式对应的第三LUT根据第一LUT和所述第一应用模式对应的第二LUT融合生成,所述第三LUT包括多个第一初始RGB与第一显示RGB的一一对应关系,所述第一初始RGB对应初始色度与亮度参数,所述第一显示RGB对应所述第一应用模式的色度与亮度参数;所述第一LUT包括多个第一初始RGB与目标RGB的一一映射关系,所述目标RGB对应指定色度与亮度参数;所述第二LUT包括多个第二初始RGB与显示RGB的一一映射关系,所述第二初始RGB对应所述指定亮度与色度参数,所述显示RGB与应用模式相关,同一个所述初始RGB在不同的应用模式下对应的显示RGB不同,一个应用模式对应一个所述第二LUT;The processing module 702 is used to obtain the third display lookup table LUT corresponding to the first application mode, and the third LUT corresponding to the first application mode is generated according to the fusion of the first LUT and the second LUT corresponding to the first application mode, The third LUT includes a one-to-one correspondence between a plurality of first initial RGB and first display RGB, the first initial RGB corresponds to initial chromaticity and luminance parameters, and the first display RGB corresponds to the first application mode The chromaticity and luminance parameters of the The one-to-one mapping relationship between the initial RGB and the display RGB, the second initial RGB corresponds to the specified luminance and chrominance parameters, the display RGB is related to the application mode, and the same initial RGB corresponds to different application modes. The display RGB is different, and one application mode corresponds to one of the second LUTs;
处理模块702,还用于根据所述第三LUT确定所述第一RGB在所述第一应用模式对应的第二RGB,将所述第二RGB发送给第一显示器进行显示。The processing module 702 is further configured to determine the second RGB corresponding to the first RGB in the first application mode according to the third LUT, and send the second RGB to the first display for display.
可选地,所述获取模块701还用于:获取第二应用模式对应的第三LUT,所述第二应用模式对应的第三LUT根据所述第一LUT和所述第二应用模式对应的第二LUT融合生成。Optionally, the obtaining module 701 is further configured to: obtain a third LUT corresponding to the second application mode, and the third LUT corresponding to the second application mode is based on the first LUT and the corresponding second application mode. The second LUT is fused to generate.
可选地,所述获取模块701还用于:从存储器获取所述第一LUT;或从服务器接收所述第一LUT;或根据预先设定的第一初始RGB从服务器接收或从存储器获取对应的目标RGB,进而确定所述第一LUT。Optionally, the obtaining module 701 is further configured to: obtain the first LUT from the memory; or receive the first LUT from the server; or receive from the server according to the preset first initial RGB or obtain the corresponding LUT from the memory. target RGB, and then determine the first LUT.
可选地,所述获取模块701还用于:从所述存储器存储的多个第二LUT中获取与 所述第一应用模式对应的第二LUT;或从所述服务器接收与所述第一应用模式对应的第二LUT。Optionally, the obtaining module 701 is further configured to: obtain a second LUT corresponding to the first application mode from a plurality of second LUTs stored in the memory; or receive a second LUT corresponding to the first application mode from the server; The second LUT corresponding to the application mode.
可选地,所述获取模块701还用于:从所述服务器接收更新的第二LUT。Optionally, the obtaining module 701 is further configured to: receive the updated second LUT from the server.
可选地,所述获取模块701具体用于:在预设时间或者接收到预设指令的情况下,从所述服务器接收所述更新的第二LUT。Optionally, the obtaining module 701 is specifically configured to: receive the updated second LUT from the server at a preset time or when a preset instruction is received.
可选地,所述处理模块702具体用于:获取所述第一LUT中的第一初始RGB及其对应的所述目标RGB;确定所述目标RGB根据所述第二LUT映射获得的实时第一显示RGB;生成包括所述第一初始RGB和所述第一显示RGB的映射关系的所述第三LUT。Optionally, the processing module 702 is specifically configured to: obtain the first initial RGB in the first LUT and the corresponding target RGB; determine the real-time first RGB obtained by mapping the target RGB according to the second LUT. a display RGB; generating the third LUT including the mapping relationship between the first initial RGB and the first display RGB.
可选地,所述处理模块702具体用于:对所述第一初始RGB进行转换,获得中间RGB;按照预设步长对所述中间RGB进行迭代变换,获得所述目标RGB;根据所述第一初始RGB和所述目标RGB的一一映射关系确定所述第一LUT。Optionally, the processing module 702 is specifically configured to: convert the first initial RGB to obtain intermediate RGB; perform iterative transformation on the intermediate RGB according to a preset step size to obtain the target RGB; The one-to-one mapping relationship between the first initial RGB and the target RGB determines the first LUT.
可选地,所述处理模块702具体用于:Optionally, the processing module 702 is specifically configured to:
S1:按照所述预设步长对RGBi进行变换,并获得对应色度与亮度参数变化值;S1: transform RGBi according to the preset step size, and obtain corresponding chromaticity and luminance parameter change values;
S2:根据所述预设步长获得RGBi+1,根据所述RGBi对应的中间色度与亮度参数和所述色度与亮度参数变化值获取所述RGBi+1对应的中间色度与亮度参数;S2: Obtain RGBi+1 according to the preset step size, and obtain the intermediate chrominance and luminance parameters corresponding to the RGBi+1 according to the intermediate chrominance and luminance parameters corresponding to the RGBi and the change values of the chrominance and luminance parameters ;
S3:判断所述RGBi+1对应的中间色度与亮度参数与所述指定色度与亮度参数的差值是否小于预设阈值;若所述RGBi+1对应的所述中间色度与亮度参数与所述指定色度与亮度参数亮度差值不小于预设阈值,则令i=i+1,并重复执行S1-S3,直至所述RGBi+1对应的中间色度与亮度参数与所述指定色度与亮度参数差值小于预设阈值,当i=1时,所述RGBi为所述中间RGB。S3: Determine whether the difference between the intermediate chrominance and brightness parameters corresponding to the RGBi+1 and the specified chrominance and brightness parameters is less than a preset threshold; if the intermediate chrominance and brightness parameters corresponding to the RGBi+1 and the specified chromaticity and luminance parameter luminance difference is not less than the preset threshold, then set i=i+1, and repeat S1-S3 until the intermediate chromaticity and luminance parameters corresponding to the RGBi+1 are the same as the described The difference between the specified chrominance and luminance parameters is less than a preset threshold, and when i=1, the RGBi is the intermediate RGB.
可选地,所述处理模块702具体用于:按照如下公式计算获得所述RGB i+1对应的中间色度与亮度参数: Optionally, the processing module 702 is specifically configured to: calculate and obtain the intermediate chromaticity and luminance parameters corresponding to the RGB i+1 according to the following formula:
Figure PCTCN2020110917-appb-000030
Figure PCTCN2020110917-appb-000030
其中所述xyY i+1为所述RGB i+1对应的中间色度与亮度参数,所述xyY i为所述RGB i对应的中间色度与亮度参数,所述RGB中包括R参数,G参数和B参数,ΔR,ΔG,ΔB分别为所述R参数,所述G参数和所述B参数的预设步长,所述Δx R,Δy R为所述R参数按照所述预设步长迭代造成的色度参数变化值,ΔY R为为所述R参数按照所述预设步长迭代造成的亮度参数变化值,Δx G,Δy G为所述G参数按照所述预设步长迭代造成的色度参数变化值,ΔY G为所述G参数按照所述预设步长迭代造成的亮度参数变化值,所述Δx B,Δy B为所述B参数按照所述预设步长迭代造成的色度参数变化值,ΔY B为所述B参数按照所述预设步长迭代造成的亮度参数变化值。 The xyY i+1 is the intermediate chromaticity and luminance parameter corresponding to the RGB i+1 , the xyY i is the intermediate chromaticity and luminance parameter corresponding to the RGB i , the RGB includes the R parameter, the G parameter and B parameter, ΔR, ΔG, ΔB are the R parameter, the preset step size of the G parameter and the B parameter respectively, the Δx R , Δy R are the R parameter according to the preset step size The change value of the chrominance parameter caused by the long iteration, ΔY R is the change value of the luminance parameter caused by the iteration of the R parameter according to the preset step size, Δx G , Δy G are the value of the G parameter according to the preset step size The change value of the chrominance parameter caused by the iteration, ΔY G is the change value of the luminance parameter caused by the iteration of the G parameter according to the preset step size, and the Δx B , Δy B are the B parameter according to the preset step size The change value of the chrominance parameter caused by the iteration, ΔY B is the change value of the luminance parameter caused by the iteration of the B parameter according to the preset step size.
可选地,所述处理模块702具体用于:基于第一Gamma值对所述第一初始RGB进行伽马变换,得到第一线性rgb;根据第一变换矩阵对所述第一线性rgb进行转换,获得所述指定色度与亮度参数;Optionally, the processing module 702 is specifically configured to: perform gamma transformation on the first initial RGB based on the first Gamma value to obtain a first linear rgb; convert the first linear rgb according to a first transformation matrix , to obtain the specified chromaticity and luminance parameters;
根据第二变换矩阵对所述指定亮度与色度参数进行转换,获得第二线性rgb,所述第二变换矩阵根据所述第一显示器的测量亮度参数生成;Convert the specified luminance and chrominance parameters according to a second transformation matrix to obtain a second linear rgb, and the second transformation matrix is generated according to the measured luminance parameters of the first display;
基于第二Gamma值对所述第二线性rgb进行反伽马变换,获得所述中间RGB,所述第二Gamma值根据所述第一显示器的测量亮度参数确定。The intermediate RGB is obtained by performing inverse gamma transformation on the second linear rgb based on a second Gamma value determined according to a measured luminance parameter of the first display.
需要说明的是,应理解图5所示装置的各个模块的划分仅仅是一种逻辑功能的划分,实际实现时可以全部或部分集成到一个物理实体上,也可以物理上分开。且这些模块可以全部以软件通过处理元件调用的形式实现;也可以全部以硬件的形式实现;还可以部分模块通过软件通过处理元件调用的形式实现,部分模块通过硬件的形式实现。例如,处理模块702可以为单独设立的处理元件,也可以集成在该装置的某一个芯片中实现,此外,也可以以程序的形式存储于该装置的存储器中,由该装置的某一个处理元件调用并执行该处理模块702的功能。其它模块的实现与之类似。此外这些模块全部或部分可以集成在一起,也可以独立实现。这里所述的处理元件可以是一种集成电路,具有信号的处理能力。在实现过程中,上述方法的各步骤或以上各个单元可以通过处理器元件中的硬件的集成逻辑电路或者软件形式的指令完成。It should be noted that it should be understood that the division of each module of the apparatus shown in FIG. 5 is only a division of logical functions, and may be fully or partially integrated into a physical entity in actual implementation, or may be physically separated. And these modules can all be implemented in the form of software calling through processing elements; they can also all be implemented in hardware; some modules can also be implemented in the form of software calling through processing elements, and some modules can be implemented in hardware. For example, the processing module 702 may be a separately established processing element, or may be integrated into a certain chip of the apparatus, and may also be stored in the memory of the apparatus in the form of a program, and a certain processing element of the apparatus may The functions of the processing module 702 are called and executed. The implementation of other modules is similar. In addition, all or part of these modules can be integrated together, and can also be implemented independently. The processing element described here may be an integrated circuit with signal processing capability. In the implementation process, each step of the above-mentioned method or each of the above-mentioned units may be completed by an integrated logic circuit of hardware in the processor element or an instruction in the form of software.
以上这些模块可以是被配置成实施以上方法的一个或多个集成电路,例如:一个或多个特定集成电路(application-specific integrated circuit,ASIC),或,一个或多个数字信号处理器(digital signal processor,DSP),或,一个或者多个现场可编程门阵列(field-programmable gate array,FPGA)等。再如,当以上某个模块通过处理元件调度程序的形式实现时,该处理元件可以是通用处理器,例如中央处理单元(central processing unit,CPU)或其它可以调用程序的处理器。再如,这些模块可以集成在一起,以片上系统(system-on-a-chip,SOC)的形式实现。The above modules may be one or more integrated circuits configured to implement the above methods, such as: one or more application-specific integrated circuits (ASICs), or, one or more digital signal processors (digital signal processors) signal processor, DSP), or, one or more field-programmable gate arrays (FPGA), etc. For another example, when one of the above modules is implemented in the form of a processing element scheduler, the processing element may be a general-purpose processor, such as a central processing unit (central processing unit, CPU) or other processors that can call programs. For another example, these modules can be integrated together and implemented in the form of a system-on-a-chip (SOC).
图6是本申请实施例提供的一种显示处理的装置的硬件结构示意图。如图6所示,该显示处理的装置80包括:处理器801、收发器802、控制器803和屏幕804。FIG. 6 is a schematic diagram of a hardware structure of an apparatus for display processing provided by an embodiment of the present application. As shown in FIG. 6 , the display processing apparatus 80 includes: a processor 801 , a transceiver 802 , a controller 803 and a screen 804 .
其中,所述收发器801,用于获取待显示的第一像素的第一RGB;Wherein, the transceiver 801 is used to obtain the first RGB of the first pixel to be displayed;
所述处理器802,用于获取第一应用模式对应的第三显示查找表LUT,所述第一应用模式对应的第三LUT根据第一LUT和所述第一应用模式对应的第二LUT融合生成,所述第三LUT包括多个第一初始RGB与第一显示RGB的一一对应关系,所述第一初始RGB对应初始色度与亮度参数,所述第一显示RGB对应所述第一应用模式的色度与亮度参数;所述第一LUT包括多个第一初始RGB与目标RGB的一一映射关系,所述目标RGB对应指定色度与亮度参数;所述第二LUT包括多个第二初始RGB与显示RGB的一一映射关系,所述第二初始RGB对应所述指定亮度与色度参数,所述显示RGB与应用模式相关,同一个所述第二初始RGB在不同的应用模式下对应的显示RGB不同,一个应用模式对应一个所述第二LUT;The processor 802 is configured to obtain a third display lookup table LUT corresponding to the first application mode, and the third LUT corresponding to the first application mode is fused according to the first LUT and the second LUT corresponding to the first application mode. Generated, the third LUT includes a one-to-one correspondence between multiple first initial RGBs and first display RGBs, the first initial RGBs correspond to initial chromaticity and luminance parameters, and the first display RGBs correspond to the first The chromaticity and luminance parameters of the application mode; the first LUT includes a one-to-one mapping relationship between a plurality of first initial RGB and target RGB, and the target RGB corresponds to a specified chromaticity and luminance parameter; the second LUT includes a plurality of The one-to-one mapping relationship between the second initial RGB and the display RGB, the second initial RGB corresponds to the specified luminance and chrominance parameters, the display RGB is related to the application mode, and the same second initial RGB is used in different applications The corresponding display RGB in the mode is different, and one application mode corresponds to one of the second LUTs;
所述控制器803,用于根据所述第三LUT确定所述第一RGB在所述第一应用模式对应的第二RGB,并将所述第二RGB发送给屏幕804进行显示。The controller 803 is configured to determine the second RGB corresponding to the first RGB in the first application mode according to the third LUT, and send the second RGB to the screen 804 for display.
这样,本实施例中的显示处理的装置,可以执行前述实施例中的显示方法,获取第三LUT的具体过程和步骤已在前述实施例中进行了详细说明,此处不再赘述。In this way, the display processing apparatus in this embodiment can execute the display method in the foregoing embodiment, and the specific process and steps of obtaining the third LUT have been described in detail in the foregoing embodiment, and will not be repeated here.
这样,当处理器802确定了第一LUT后,即可利用收发器801获取需要进行显示的目标图像在第一显示屏的初始色域进行显示时对应的第一RGB,根据第一LUT获 得第一RGB在第一应用模式对应的第二RGB后,通过控制器803将第二RGB输出到屏幕804并控制屏幕804在第二RGB进行显示,即完成目标图像在第一应用模式下对应的色域进行显示的过程,此处不再赘述。In this way, after the processor 802 determines the first LUT, the transceiver 801 can be used to obtain the first RGB corresponding to the target image to be displayed when displayed in the initial color gamut of the first display screen, and obtain the first RGB according to the first LUT. After one RGB is in the second RGB corresponding to the first application mode, the controller 803 outputs the second RGB to the screen 804 and controls the screen 804 to display in the second RGB, that is, the color corresponding to the target image in the first application mode is completed. The process of displaying the domain will not be repeated here.
此外,可选的,显示处理的装置80中还可以包括存储器805,存储器804用于存储从其他服务器获取的第一LUT,第二LUT和/或第三LUT。In addition, optionally, the apparatus 80 for display processing may further include a memory 805, and the memory 804 is used for storing the first LUT, the second LUT and/or the third LUT obtained from other servers.
其中,屏幕804通常为由有机发光显示器(Organic Light Emitting Display,简称OLED)或者主动矩阵有机发光二级体(Active-matrix organic light emitting diode,AMOLED)构成。示例性的,以屏幕804为OLED屏幕进行说明,为了让OLED屏幕的各个像素点进行期望的亮度和颜色显示输出,显示处理的装置中的控制器803根据第二RGB的灰阶值而产生相应的电压进行驱动,屏幕通入不同的电压时,即可显示不同的亮度,从而显示与输入灰阶值对应的显示亮度值。Wherein, the screen 804 is usually composed of an organic light emitting display (Organic Light Emitting Display, OLED for short) or an active matrix organic light emitting diode (Active-matrix organic light emitting diode, AMOLED). Exemplarily, the screen 804 is used as an OLED screen for illustration. In order to enable each pixel of the OLED screen to display desired brightness and color, the controller 803 in the display processing device generates corresponding grayscale values according to the second RGB. When the screen is driven with different voltages, it can display different brightness, so as to display the display brightness value corresponding to the input grayscale value.
具体的,控制器803可以包括电压生成器8031以及亮度控制器8032。其中,电压生成器能够用于根据输入灰阶值而生成相应的参考电压;而亮度控制器可以用于基于参考电压控制屏幕显示与输入灰阶值对应的显示亮度值。Specifically, the controller 803 may include a voltage generator 8031 and a brightness controller 8032 . The voltage generator can be used to generate a corresponding reference voltage according to the input gray-scale value; and the brightness controller can be used to control the screen to display a display brightness value corresponding to the input gray-scale value based on the reference voltage.
其中,由于输入灰阶值通常为数字信号,为了将输入灰阶值转换成为模拟的电压值,可选的,电压生成器8031可以为数模转换器(digital to analog converter,DAC)。数模转换器用于将输入的灰阶值转换为模拟的参考电压值,这样亮度控制器8032即可根据该参考电压控制屏幕的显示亮度值,以使屏幕在通电时显示对应的显示亮度值。具体的,数模转换器能够在接收到呈数字信号的输入灰阶值后,将该输入灰阶值变为实际的参考电压值。当输入的灰阶值不同时,对应的参考电压值也会随之改变,这样屏幕就可以在不同的参考电压值以及电流值激发下发出不同亮度的光线,显示实际图像。Wherein, since the input grayscale value is usually a digital signal, in order to convert the input grayscale value into an analog voltage value, optionally, the voltage generator 8031 may be a digital to analog converter (digital to analog converter, DAC). The digital-to-analog converter is used to convert the input grayscale value into an analog reference voltage value, so that the brightness controller 8032 can control the display brightness value of the screen according to the reference voltage, so that the screen displays the corresponding display brightness value when powered on. Specifically, after receiving the input gray-scale value in the form of a digital signal, the digital-to-analog converter can convert the input gray-scale value into an actual reference voltage value. When the input grayscale value is different, the corresponding reference voltage value will also change accordingly, so that the screen can emit light with different brightness under the excitation of different reference voltage value and current value, and display the actual image.
其中,处理器802、收发器801、控制器803和存储器805之间可以利用通信总线或者其它数据通路实现数据和信号之间的传输。由于存储器805和处理器802以及控制器803之间具有电性连接,因而存储器805中所存储的第一LUT和/或第二LUT可以传输给处理器802,以便生成第三LUT,然后让收发器801根据获取到的第一RGB和第三LUT确定第二RGB后,传输给控制器803根据第二RGB确定像素点所应具有的输入灰阶值,并让控制器803根据输入灰阶值控制屏幕804各像素点的显示亮度值等。Among them, the processor 802, the transceiver 801, the controller 803 and the memory 805 can use a communication bus or other data paths to realize the transmission of data and signals. Due to the electrical connection between the memory 805 and the processor 802 and the controller 803, the first LUT and/or the second LUT stored in the memory 805 can be transmitted to the processor 802 to generate a third LUT, and then transmit and receive After the controller 801 determines the second RGB according to the obtained first RGB and the third LUT, it is transmitted to the controller 803 to determine the input grayscale value that the pixel should have according to the second RGB, and let the controller 803 determine the input grayscale value according to the input grayscale value. Control the display brightness value of each pixel of the screen 804, etc.
其中,处理器802通常为显示处理的装置的控制中心,并可以利用通信总线与存储器805等不同硬件部分直线连接,并通过运行或执行软件程序和/或模块,以及调用存储在存储器内的数据,执行终端设备的各种功能和处理数据,从而完成屏幕的亮度控制操作。处理器71可以是微控制单元(Microcontroller Unit,MCU),或者是中央处理器(central processing unit,CPU),或者是独立的片上系统(system-on-a-chip,SOC),还可以是被配置成实施以上方法的一个或多个集成电路,例如:一个或多个特定集成电路(application specific integrated circuit,ASIC),或,一个或多个微处理器(digital singnal processor,DSP),或,一个或者多个现场可编程门阵列(field programmable gate array,FPGA)等。Wherein, the processor 802 is usually the control center of the display processing device, and can be directly connected with different hardware parts such as the memory 805 by means of a communication bus, and by running or executing software programs and/or modules, and calling data stored in the memory , perform various functions of the terminal device and process data, so as to complete the brightness control operation of the screen. The processor 71 may be a microcontroller unit (Microcontroller Unit, MCU), or a central processing unit (central processing unit, CPU), or an independent system-on-a-chip (system-on-a-chip, SOC), or a One or more integrated circuits configured to implement the above method, for example: one or more application specific integrated circuits (ASIC), or, one or more microprocessors (digital singnal processor, DSP), or, One or more field programmable gate arrays (field programmable gate array, FPGA), etc.
可选的,处理器802可包括一个或多个处理单元;并利用不同的处理单元分别执 行上述不同指令和程序,以分别执行不同功能。Optionally, the processor 802 may include one or more processing units; and use different processing units to execute the above-mentioned different instructions and programs respectively, so as to perform different functions respectively.
而存储器805可以是只读存储器(read-only memory,ROM)或可存储静态信息和指令的其他类型的静态存储设备,随机存取存储器(random access memory,RAM)或者可存储信息和指令的其他类型的动态存储设备,也可以是电可擦可编程只读存储器(electrically erasable programmable read-only memory,EEPROM)、只读光盘(compact disc read-only memory,CD-ROM)或其他光盘存储、光碟存储(包括压缩光碟、激光碟、光碟、数字通用光碟、蓝光光碟等)、磁盘存储介质或者其他磁存储设备、或者能够用于携带或存储具有指令或数据结构形式的期望的程序代码并能够由计算机存取的任何其他介质,但不限于此。存储器805可以是独立存在,通过总线与处理器802以及收发器801相连接。存储器805也可以和处理器802集成在一起。While the memory 805 may be read-only memory (ROM) or other types of static storage devices that can store static information and instructions, random access memory (RAM) or other types of static storage devices that can store information and instructions Types of dynamic storage devices, which can also be electrically erasable programmable read-only memory (EEPROM), compact disc read-only memory (CD-ROM), or other optical disk storage, optical disks storage (including compact discs, laser discs, compact discs, digital versatile discs, Blu-ray discs, etc.), magnetic disk storage media or other magnetic storage devices, or capable of carrying or storing desired program code in the form of instructions or data structures and capable of being accessed by Any other medium accessed by the computer, but not limited to this. The memory 805 may exist independently and be connected to the processor 802 and the transceiver 801 through a bus. Memory 805 may also be integrated with processor 802.
除了存储预设的gamma校正查找表之外,可选的,存储器805还可以用于存储执行本申请方案的应用程序代码,并由处理器802来控制执行。处理器802用于执行存储器805中存储的应用程序代码,从而实现本申请上述实施例提供的屏幕亮度的控制方法。In addition to storing the preset gamma correction look-up table, optionally, the memory 805 can also be used to store the application code for executing the solution of the present application, and the execution is controlled by the processor 802 . The processor 802 is configured to execute the application program code stored in the memory 805, so as to implement the screen brightness control method provided by the above embodiments of the present application.
此外,显示处理的装置中还包括有脉冲宽度调制(Pulse Width Modulation,PWM)调光器806,PWM调光器806能够对内部的晶体管栅极或者MOS管基极等开关器件的通断进行调制,从而产生一系列脉冲宽度相等的脉冲,并通过改变脉冲的宽度或者占空比来实现不同的等效模拟输出,从而调节屏幕804的输出亮度。示例性的,PWM调光器806和屏幕804电性连接,PWM调光器806可以接收来自控制芯片的数字信号,并将数字信号转化为脉冲宽度或者占空比不同的脉冲,此时即可等效输出幅值大小不同的电压信号,随着电压信号的大小不同,屏幕804上每个像素点也会显示出不同的亮度,由此实现了图像的正常显示以及亮度调整。示例性的,PWM调光器806可以和处理器802之间电性连接或者是作为控制器803中的一部分,以根据输入灰阶值等数据调整屏幕804的显示亮度。In addition, the display processing device also includes a pulse width modulation (Pulse Width Modulation, PWM) dimmer 806, and the PWM dimmer 806 can modulate the on-off of internal transistor gates or MOS transistor bases and other switching devices , thereby generating a series of pulses with the same pulse width, and by changing the pulse width or duty cycle to achieve different equivalent analog outputs, thereby adjusting the output brightness of the screen 804 . Exemplarily, the PWM dimmer 806 is electrically connected to the screen 804. The PWM dimmer 806 can receive digital signals from the control chip and convert the digital signals into pulses with different pulse widths or duty cycles. The equivalent output voltage signals with different amplitudes, with the different magnitudes of the voltage signals, each pixel on the screen 804 will also display different brightness, thereby realizing the normal display and brightness adjustment of the image. Exemplarily, the PWM dimmer 806 may be electrically connected to the processor 802 or be a part of the controller 803 to adjust the display brightness of the screen 804 according to input data such as grayscale values.
在上述实施例中,可以全部或部分地通过软件、硬件、固件或者其任意组合来实现。当使用软件程序实现时,可以全部或部分地以计算机程序产品的形式来实现。该计算机程序产品包括一个或多个计算机指令。在计算机上加载和执行计算机程序指令时,全部或部分地产生按照本申请实施例所述的流程或功能。所述计算机可以是通用计算机、专用计算机、计算机网络、或者其他可编程装置。所述计算机指令可以存储在计算机可读存储介质中,或者从一个计算机可读存储介质向另一个计算机可读存储介质传输,例如,所述计算机指令可以从一个网站站点、计算机、服务器或者数据中心通过有线(例如同轴电缆、光纤、数字用户线(digital subscriber line,DSL))或无线(例如红外、无线、微波等)方式向另一个网站站点、计算机、服务器或数据中心进行传输。所述计算机可读存储介质可以是计算机能够存取的任何可用介质或者是包含一个或多个可以用介质集成的服务器、数据中心等数据存储设备。所述可用介质可以是磁性介质(例如,软盘、硬盘、磁带),光介质(例如,DVD)、或者半导体介质(例如固态硬盘(solid state disk,SSD))等。In the above-mentioned embodiments, it may be implemented in whole or in part by software, hardware, firmware or any combination thereof. When implemented using a software program, it can be implemented in whole or in part in the form of a computer program product. The computer program product includes one or more computer instructions. When the computer program instructions are loaded and executed on the computer, all or part of the processes or functions described in the embodiments of the present application are generated. The computer may be a general purpose computer, special purpose computer, computer network, or other programmable device. The computer instructions may be stored in or transmitted from one computer-readable storage medium to another computer-readable storage medium, for example, the computer instructions may be downloaded from a website site, computer, server, or data center Transmission to another website site, computer, server, or data center by wire (eg, coaxial cable, optical fiber, digital subscriber line, DSL) or wireless (eg, infrared, wireless, microwave, etc.). The computer-readable storage medium can be any available medium that can be accessed by a computer or data storage devices including one or more servers, data centers, etc. that can be integrated with the medium. The usable media may be magnetic media (eg, floppy disks, hard disks, magnetic tapes), optical media (eg, DVDs), or semiconductor media (eg, solid state disks (SSDs)), and the like.

Claims (24)

  1. 一种显示处理的方法,其特征在于,所述方法包括:A method for display processing, characterized in that the method comprises:
    获取待显示的第一像素的第一RGB;obtaining the first RGB of the first pixel to be displayed;
    获取第一应用模式对应的第三显示查找表LUT,所述第一应用模式对应的第三LUT根据第一LUT和所述第一应用模式对应的第二LUT融合生成,所述第三LUT包括多个第一初始RGB与第一显示RGB的一一对应关系,所述第一初始RGB对应初始色度与亮度参数,所述第一显示RGB对应所述第一应用模式的色度与亮度参数;所述第一LUT包括多个第一初始RGB与目标RGB的一一映射关系,所述目标RGB对应指定色度与亮度参数;所述第二LUT包括多个第二初始RGB与显示RGB的一一映射关系,所述第二初始RGB对应所述指定亮度与色度参数,所述显示RGB与应用模式相关,同一个所述第二初始RGB在不同的应用模式下对应的显示RGB不同,一个应用模式对应一个所述第二LUT;Obtain the third display lookup table LUT corresponding to the first application mode, the third LUT corresponding to the first application mode is generated according to the fusion of the first LUT and the second LUT corresponding to the first application mode, and the third LUT includes One-to-one correspondence between a plurality of first initial RGBs and first display RGBs, the first initial RGBs correspond to initial chrominance and luminance parameters, and the first display RGBs correspond to chrominance and luminance parameters of the first application mode The first LUT includes a one-to-one mapping relationship between a plurality of first initial RGB and target RGB, and the target RGB corresponds to specified chromaticity and luminance parameters; The second LUT includes a plurality of second initial RGB and display RGB One-to-one mapping relationship, the second initial RGB corresponds to the specified luminance and chrominance parameters, the display RGB is related to the application mode, and the same second initial RGB corresponds to different display RGB in different application modes, One application mode corresponds to one of the second LUTs;
    根据所述第三LUT确定所述第一RGB在所述第一应用模式对应的第二RGB,并将所述第二RGB发送给第一显示器进行显示。The second RGB corresponding to the first RGB in the first application mode is determined according to the third LUT, and the second RGB is sent to the first display for display.
  2. 根据权利要求1所述的方法,其特征在于,所述方法还包括:The method according to claim 1, wherein the method further comprises:
    获取第二应用模式对应的第三LUT,所述第二应用模式对应的第三LUT根据所述第一LUT和所述第二应用模式对应的第二LUT融合生成。A third LUT corresponding to the second application mode is acquired, where the third LUT corresponding to the second application mode is generated by fusion of the first LUT and the second LUT corresponding to the second application mode.
  3. 根据权利要求1或2所述的方法,其特征在于,所述方法还包括:The method according to claim 1 or 2, wherein the method further comprises:
    从存储器获取所述第一LUT;或obtain the first LUT from memory; or
    从服务器接收所述第一LUT;或receive the first LUT from a server; or
    根据预先设定的第一初始RGB从服务器接收或从存储器获取对应的目标RGB,进而确定所述第一LUT。According to the preset first initial RGB, the corresponding target RGB is received from the server or obtained from the memory, and then the first LUT is determined.
  4. 根据权利要求1-3任一项所述的方法,其特征在于,所述方法还包括:The method according to any one of claims 1-3, wherein the method further comprises:
    从所述存储器存储的多个第二LUT中获取与所述第一应用模式对应的第二LUT;或从所述服务器接收与所述第一应用模式对应的第二LUT。Acquire a second LUT corresponding to the first application mode from a plurality of second LUTs stored in the memory; or receive a second LUT corresponding to the first application mode from the server.
  5. 根据权利要求1-4任一项所述的方法,其特征在于,所述方法还包括:从所述服务器接收更新的第二LUT。The method according to any one of claims 1-4, wherein the method further comprises: receiving an updated second LUT from the server.
  6. 根据权利要求5所述的方法,其特征在于,所述从所述服务器接收更新的第二LUT包括:在预设时间或者接收到预设指令的情况下,从所述服务器接收所述更新的第二LUT。The method according to claim 5, wherein the receiving the updated second LUT from the server comprises: receiving the updated second LUT from the server at a preset time or when a preset instruction is received Second LUT.
  7. 根据权利要求1-6任一项所述的方法,其特征在于,所述获取第三LUT包括:The method according to any one of claims 1-6, wherein the obtaining the third LUT comprises:
    获取所述第一LUT中的第一初始RGB及其对应的所述目标RGB;Obtain the first initial RGB in the first LUT and the corresponding target RGB;
    确定所述目标RGB根据所述第二LUT映射获得的实时第一显示RGB;Determine the real-time first display RGB obtained by the target RGB according to the second LUT mapping;
    生成包括所述第一初始RGB和所述第一显示RGB的映射关系的所述第三LUT。The third LUT including the mapping relationship between the first initial RGB and the first display RGB is generated.
  8. 根据权利要求1-7任一项所述的方法,其特征在于,所述获取第一LUT包括:The method according to any one of claims 1-7, wherein the acquiring the first LUT comprises:
    对所述第一初始RGB进行转换,获得中间RGB;Converting the first initial RGB to obtain intermediate RGB;
    按照预设步长对所述中间RGB进行迭代变换,获得所述目标RGB;Perform iterative transformation on the intermediate RGB according to a preset step size to obtain the target RGB;
    根据所述第一初始RGB和所述目标RGB的一一映射关系确定所述第一LUT。The first LUT is determined according to a one-to-one mapping relationship between the first initial RGB and the target RGB.
  9. 根据权利要求8所述的方法,其特征在于,所述按照预设步长对所述中间RGB进行迭代变换,获得所述目标RGB,包括:The method according to claim 8, wherein the iteratively transforming the intermediate RGB according to a preset step size to obtain the target RGB comprises:
    S1:按照所述预设步长对RGB i进行变换,并获得对应色度与亮度参数变化值; S1: transform RGB i according to the preset step size, and obtain the corresponding chromaticity and luminance parameter change values;
    S2:根据所述预设步长获得RGB i+1,根据所述RGB i对应的中间色度与亮度参数和所述色度与亮度参数变化值获取所述RGB i+1对应的中间色度与亮度参数; S2: Obtain RGB i+1 according to the preset step size, and obtain the intermediate chromaticity corresponding to the RGB i + 1 according to the intermediate chromaticity and luminance parameters corresponding to the RGB i and the change values of the chrominance and luminance parameters and the brightness parameter;
    S3:判断所述RGB i+1对应的中间色度与亮度参数与所述指定色度与亮度参数的差值是否小于预设阈值;若所述RGB i+1对应的所述中间色度与亮度参数与所述指定色度与亮度参数亮度差值不小于预设阈值,则令i=i+1,并重复执行S1-S3,直至所述RGB i+1对应的中间色度与亮度参数与所述指定色度与亮度参数差值小于预设阈值,当i=1时,所述RGB i为所述中间RGB。 S3: Determine whether the difference between the intermediate chromaticity and luminance parameters corresponding to the RGB i +1 and the specified chromaticity and luminance parameters is less than a preset threshold; If the luminance difference between the luminance parameter and the specified chromaticity and luminance parameters is not less than the preset threshold, then set i=i+1, and repeat S1-S3 until the intermediate chromaticity and luminance parameters corresponding to the RGB i+1 The difference from the specified chrominance and luminance parameters is less than a preset threshold, and when i=1, the RGB i is the intermediate RGB.
  10. 根据权利要求9所述的方法,其特征在于,根据所述RGB i对应的中间色度与亮度参数和所述色度与亮度参数变化值获取所述RGB i+1对应的中间色度与亮度参数,包括按照如下公式计算获得所述RGB i+1对应的中间色度与亮度参数: The method according to claim 9, wherein the intermediate chromaticity and luminance corresponding to the RGB i+1 are obtained according to the intermediate chromaticity and luminance parameters corresponding to the RGB i and the change values of the chrominance and luminance parameters parameters, including obtaining the intermediate chromaticity and brightness parameters corresponding to the RGB i+1 according to the following formula:
    Figure PCTCN2020110917-appb-100001
    Figure PCTCN2020110917-appb-100001
    其中所述xyY i+1为所述RGB i+1对应的中间色度与亮度参数,所述xyY i为所述RGB i对应的中间色度与亮度参数,所述RGB中包括R参数,G参数和B参数,△R,△G,△B分别为所述R参数,所述G参数和所述B参数的预设步长,Δx RΔy R为所述R参数按照所述预设步长迭代造成的色度参数变化值,ΔY R为为所述R参数按照所述预设步长迭代造成的亮度参数变化值,所述Δx G,Δy G为所述G参数按照所述预设步长迭代造成的色度参数变化值,ΔY G为所述G参数按照所述预设步长迭代造成的亮度参数变化值,所述Δx B,Δy B为所述B参数按照所述预设步长迭代造成的色度参数变化值,ΔY B为所述B参数按照所述预设步长迭代造成的亮度参数变化值。 The xyY i+1 is the intermediate chromaticity and luminance parameter corresponding to the RGB i+1 , the xyY i is the intermediate chromaticity and luminance parameter corresponding to the RGB i , the RGB includes the R parameter, the G parameter and B parameter, ΔR, ΔG, ΔB are the R parameter respectively, the preset step size of the G parameter and the B parameter, Δx R Δy R is the R parameter according to the preset step The change value of the chrominance parameter caused by the long iteration, ΔY R is the change value of the luminance parameter caused by the iteration of the R parameter according to the preset step size, and the Δx G , Δy G are the G parameter according to the preset The change value of the chrominance parameter caused by the step size iteration, ΔY G is the change value of the luminance parameter caused by the G parameter iteration according to the preset step size, and the Δx B , Δy B are the B parameter according to the preset value. The change value of the chrominance parameter caused by the step size iteration, ΔY B is the change value of the luminance parameter caused by the B parameter iteration according to the preset step size.
  11. 根据权利要求8-10任一项所述的方法,其特征在于,所述对所述初始RGB进行转换,获得中间RGB,包括:The method according to any one of claims 8-10, wherein the converting the initial RGB to obtain the intermediate RGB comprises:
    基于第一Gamma值对所述第一初始RGB进行伽马变换,得到第一线性rgb;Perform gamma transformation on the first initial RGB based on the first Gamma value to obtain a first linear rgb;
    根据第一变换矩阵对所述第一线性rgb进行转换,获得所述指定色度与亮度参数;Convert the first linear rgb according to the first transformation matrix to obtain the specified chrominance and luminance parameters;
    根据第二变换矩阵对所述指定亮度与色度参数进行转换,获得第二线性rgb,所述第二变换矩阵根据所述第一显示器的测量亮度参数生成;Convert the specified luminance and chrominance parameters according to a second transformation matrix to obtain a second linear rgb, and the second transformation matrix is generated according to the measured luminance parameters of the first display;
    基于第二Gamma值对所述第二线性rgb进行反伽马变换,获得所述中间RGB,所述第二Gamma值根据所述第一显示器的测量亮度参数确定。The intermediate RGB is obtained by performing inverse gamma transformation on the second linear rgb based on a second Gamma value determined according to a measured luminance parameter of the first display.
  12. 一种显示处理的装置,其特征在于,所述装置包括:A device for display processing, characterized in that the device comprises:
    获取模块,用于获取待显示的第一像素的第一RGB;an acquisition module for acquiring the first RGB of the first pixel to be displayed;
    处理模块,用于获取第一应用模式对应的第三显示查找表LUT,所述第一应用模式对应的第三LUT根据第一LUT和所述第一应用模式对应的第二LUT融合生成,所述第三LUT包括多个第一初始RGB与第一显示RGB的一一对应关系,所述第一初始 RGB对应初始色度与亮度参数,所述第一显示RGB对应所述第一应用模式的色度与亮度参数;所述第一LUT包括第一多个初始RGB与目标RGB的一一映射关系,所述目标RGB对应指定色度与亮度参数;所述第二LUT包括多第二个初始RGB与显示RGB的一一映射关系,所述第二初始RGB对应所述指定亮度与色度参数,所述显示RGB与应用模式相关,同一个所述第二初始RGB在不同的应用模式下对应的显示RGB不同,一个应用模式对应一个所述第二LUT;The processing module is used to obtain the third display lookup table LUT corresponding to the first application mode, and the third LUT corresponding to the first application mode is generated according to the fusion of the first LUT and the second LUT corresponding to the first application mode. The third LUT includes a one-to-one correspondence between a plurality of first initial RGB and the first display RGB, the first initial RGB corresponds to the initial chromaticity and luminance parameters, and the first display RGB corresponds to the first application mode. Chroma and luminance parameters; the first LUT includes a one-to-one mapping relationship between a first plurality of initial RGB and target RGB, and the target RGB corresponds to a specified chromaticity and luminance parameter; the second LUT includes a second initial RGB One-to-one mapping relationship between RGB and display RGB, the second initial RGB corresponds to the specified luminance and chrominance parameters, the display RGB is related to the application mode, and the same second initial RGB corresponds to different application modes The display RGB is different, and one application mode corresponds to one of the second LUTs;
    所述处理模块,还用于根据所述第三LUT确定所述第一RGB在所述第一应用模式对应的第二RGB,并将所述第二RGB发送给第一显示器进行显示。The processing module is further configured to determine the second RGB corresponding to the first RGB in the first application mode according to the third LUT, and send the second RGB to the first display for display.
  13. 根据权利要求12所述的装置,其特征在于,所述处理模块还用于:获取第二应用模式对应的第三LUT,所述第二应用模式对应的第三LUT根据所述第一LUT和所述第二应用模式对应的第二LUT融合生成。The apparatus according to claim 12, wherein the processing module is further configured to: obtain a third LUT corresponding to the second application mode, wherein the third LUT corresponding to the second application mode is based on the first LUT and the The second LUT corresponding to the second application mode is generated by fusion.
  14. 根据权利要求12或13所述的装置,其特征在于,所述获取模块还用于:The device according to claim 12 or 13, wherein the acquiring module is further configured to:
    从存储器获取所述第一LUT;或obtain the first LUT from memory; or
    从服务器接收所述第一LUT;或receive the first LUT from a server; or
    根据预先设定的第一初始RGB从服务器接收或从存储器获取对应的目标RGB,进而确定所述第一LUT。According to the preset first initial RGB, the corresponding target RGB is received from the server or obtained from the memory, and then the first LUT is determined.
  15. 根据权利要求12-14任一项所述的装置,其特征在于,所述获取模块还用于:The device according to any one of claims 12-14, wherein the acquiring module is further configured to:
    从所述存储器存储的多个第二LUT中获取与所述第一应用模式对应的第二LUT;或从所述服务器接收与所述第一应用模式对应的第二LUT。Acquire a second LUT corresponding to the first application mode from a plurality of second LUTs stored in the memory; or receive a second LUT corresponding to the first application mode from the server.
  16. 根据权利要求12-15任一项所述的装置,其特征在于,所述获取模块还用于:从所述服务器接收更新的第二LUT。The apparatus according to any one of claims 12-15, wherein the obtaining module is further configured to: receive an updated second LUT from the server.
  17. 根据权利要求16所述的装置,其特征在于,所述获取模块具体用于:在预设时间或者接收到预设指令的情况下,从所述服务器接收所述更新的第二LUT。The apparatus according to claim 16, wherein the obtaining module is specifically configured to: receive the updated second LUT from the server at a preset time or when a preset instruction is received.
  18. 根据权利要求12-17任一项所述的装置,其特征在于,所述处理模块具体用于:The device according to any one of claims 12-17, wherein the processing module is specifically configured to:
    获取所述第一LUT中的第一初始RGB及其对应的所述目标RGB;Obtain the first initial RGB in the first LUT and the corresponding target RGB;
    确定所述目标RGB根据所述第二LUT映射获得的实时第一显示RGB;Determine the real-time first display RGB obtained by the target RGB according to the second LUT mapping;
    生成包括所述第一初始RGB和所述第一显示RGB的映射关系的所述第三LUT。The third LUT including the mapping relationship between the first initial RGB and the first display RGB is generated.
  19. 根据权利要求12-18任一项所述的装置,其特征在于,所述处理模块具体用于:The device according to any one of claims 12-18, wherein the processing module is specifically configured to:
    对所述第一初始RGB进行转换,获得中间RGB;Converting the first initial RGB to obtain intermediate RGB;
    按照预设步长对所述中间RGB进行迭代变换,获得所述目标RGB;Perform iterative transformation on the intermediate RGB according to a preset step size to obtain the target RGB;
    根据所述第一初始RGB和所述目标RGB的一一映射关系确定所述第一LUT。The first LUT is determined according to a one-to-one mapping relationship between the first initial RGB and the target RGB.
  20. 根据权利要求19所述的装置,其特征在于,所述处理模块具体用于:The device according to claim 19, wherein the processing module is specifically configured to:
    S1:按照所述预设步长对RGBi进行变换,并获得对应色度与亮度参数变化值;S1: transform RGBi according to the preset step size, and obtain corresponding chromaticity and luminance parameter change values;
    S2:根据所述预设步长获得RGBi+1,根据所述RGBi对应的中间色度与亮度参数和所述色度与亮度参数变化值获取所述RGBi+1对应的中间色度与亮度参数;S2: Obtain RGBi+1 according to the preset step size, and obtain the intermediate chrominance and luminance parameters corresponding to the RGBi+1 according to the intermediate chrominance and luminance parameters corresponding to the RGBi and the change values of the chrominance and luminance parameters ;
    S3:判断所述RGBi+1对应的中间色度与亮度参数与所述指定色度与亮度参数的差值是否小于预设阈值;若所述RGBi+1对应的所述中间色度与亮度参数与所述指定 色度与亮度参数亮度差值不小于预设阈值,则令i=i+1,并重复执行S1-S3,直至所述RGBi+1对应的中间色度与亮度参数与所述指定色度与亮度参数差值小于预设阈值,当i=1时,所述RGBi为所述中间RGB。S3: Determine whether the difference between the intermediate chromaticity and brightness parameters corresponding to the RGBi+1 and the specified chromaticity and brightness parameters is less than a preset threshold; if the intermediate chromaticity and brightness parameters corresponding to the RGBi+1 and the specified chromaticity and luminance parameter luminance difference is not less than the preset threshold, then set i=i+1, and repeat S1-S3 until the intermediate chromaticity and luminance parameters corresponding to the RGBi+1 are the same as the described The difference between the specified chrominance and luminance parameters is less than a preset threshold, and when i=1, the RGBi is the intermediate RGB.
  21. 根据权利要求20所述的装置,其特征在于,所述处理模块具体用于:按照如下公式计算获得所述RGB i+1对应的中间色度与亮度参数: The device according to claim 20, wherein the processing module is specifically configured to: calculate and obtain the intermediate chromaticity and luminance parameters corresponding to the RGB i+1 according to the following formula:
    Figure PCTCN2020110917-appb-100002
    Figure PCTCN2020110917-appb-100002
    其中所述xyY i+1为所述RGB i+1对应的中间色度与亮度参数,所述xyY i为所述RGB i对应的中间色度与亮度参数,所述RGB中包括R参数,G参数和B参数,所述△R,△G,△B分别为所述R参数,所述G参数和所述B参数的预设步长,所述Δx R,Δy R为所述R参数按照所述预设步长迭代造成的色度参数变化值,ΔY R为为所述R参数按照所述预设步长迭代造成的亮度参数变化值,所述Δx G,Δy G为所述G参数按照所述预设步长迭代造成的色度参数变化值,ΔY G为所述G参数按照所述预设步长迭代造成的亮度参数变化值,所述Δx B,Δy B为所述B参数按照所述预设步长迭代造成的色度参数变化值,ΔY B为所述B参数按照所述预设步长迭代造成的亮度参数变化值。 The xyY i+1 is the intermediate chromaticity and luminance parameter corresponding to the RGB i+1 , the xyY i is the intermediate chromaticity and luminance parameter corresponding to the RGB i , the RGB includes the R parameter, the G parameter and B parameter, the ΔR, ΔG, ΔB are the R parameter, the preset step size of the G parameter and the B parameter, the Δx R , Δy R are the R parameter according to The chrominance parameter change value caused by the preset step size iteration, ΔY R is the luminance parameter change value caused by the R parameter iteration according to the preset step size, and the Δx G , Δy G are the G parameters The change value of the chrominance parameter caused by the iteration according to the preset step size, ΔY G is the change value of the luminance parameter caused by the iteration of the G parameter according to the preset step size, and the Δx B , Δy B are the B parameters The change value of the chrominance parameter caused by the iteration according to the preset step size, ΔY B is the change value of the luminance parameter caused by the iteration of the B parameter according to the preset step size.
  22. 根据权利要求19-21任一项所述的装置,其特征在于,所述处理模块具体用于:The device according to any one of claims 19-21, wherein the processing module is specifically configured to:
    基于第一Gamma值对所述第一初始RGB进行伽马变换,得到第一线性rgb;Perform gamma transformation on the first initial RGB based on the first Gamma value to obtain a first linear rgb;
    根据第一变换矩阵对所述第一线性rgb进行转换,获得所述指定色度与亮度参数;Convert the first linear rgb according to the first transformation matrix to obtain the specified chrominance and luminance parameters;
    根据第二变换矩阵对所述指定亮度与色度参数进行转换,获得第二线性rgb,所述第二变换矩阵根据所述第一显示器的测量亮度参数生成;Convert the specified luminance and chrominance parameters according to a second transformation matrix to obtain a second linear rgb, and the second transformation matrix is generated according to the measured luminance parameters of the first display;
    基于第二Gamma值对所述第二线性rgb进行反伽马变换,获得所述中间RGB,所述第二Gamma值根据所述第一显示器的测量亮度参数确定。The intermediate RGB is obtained by performing inverse gamma transformation on the second linear rgb based on a second Gamma value determined according to a measured luminance parameter of the first display.
  23. 一种显示处理的装置,其特征在于,所述显示图像处理的装置包括处理器和接口电路,所述接口电路耦合至所述处理器,所述处理器用于运行存储在存储器中的代码指令以执行如权利要求1至11任一项所述的方法。A display processing device, characterized in that the display image processing device includes a processor and an interface circuit, the interface circuit is coupled to the processor, and the processor is configured to execute code instructions stored in a memory to A method as claimed in any one of claims 1 to 11 is performed.
  24. 一种计算机可读存储介质,其特征在于,所述计算机可读存储介质中存储有程序指令,当所述程序指令在计算机或处理器上运行时,使得所述计算机或所述处理器执行如权利要求1-11任意一项所述的方法。A computer-readable storage medium, characterized in that, program instructions are stored in the computer-readable storage medium, and when the program instructions are executed on a computer or a processor, the computer or the processor is made to execute the The method of any one of claims 1-11.
PCT/CN2020/110917 2020-08-24 2020-08-24 Display method and apparatus, and electronic device WO2022040889A1 (en)

Priority Applications (2)

Application Number Priority Date Filing Date Title
PCT/CN2020/110917 WO2022040889A1 (en) 2020-08-24 2020-08-24 Display method and apparatus, and electronic device
CN202080103365.0A CN115918066A (en) 2020-08-24 2020-08-24 Display method and device and electronic equipment

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
PCT/CN2020/110917 WO2022040889A1 (en) 2020-08-24 2020-08-24 Display method and apparatus, and electronic device

Publications (1)

Publication Number Publication Date
WO2022040889A1 true WO2022040889A1 (en) 2022-03-03

Family

ID=80354389

Family Applications (1)

Application Number Title Priority Date Filing Date
PCT/CN2020/110917 WO2022040889A1 (en) 2020-08-24 2020-08-24 Display method and apparatus, and electronic device

Country Status (2)

Country Link
CN (1) CN115918066A (en)
WO (1) WO2022040889A1 (en)

Cited By (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN115499633A (en) * 2022-09-23 2022-12-20 昇显微电子(苏州)有限公司 Color correction method and system based on Mini3DLUT

Citations (8)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
JP2002116750A (en) * 2000-10-05 2002-04-19 Sharp Corp Color conversion circuit and color conversion method as well as color image display device
CN101159878A (en) * 2006-10-06 2008-04-09 台湾新力国际股份有限公司 Color matching method and image seizure device and electronic equipment using the same
CN103339944A (en) * 2011-01-31 2013-10-02 马维尔国际贸易有限公司 Systems and methods for performing color adjustments of pixels on a color display
CN105261326A (en) * 2015-10-09 2016-01-20 惠州Tcl移动通信有限公司 Display device for adjusting display color gamut and method for adjusting display color gamut
TW201612890A (en) * 2014-09-23 2016-04-01 Delta Electronics Inc Real-time color mapping system and real-time color mapping method
CN106782428A (en) * 2016-12-27 2017-05-31 上海天马有机发光显示技术有限公司 A kind of colour gamut method of adjustment and colour gamut adjustment system of display device
CN108024105A (en) * 2017-12-14 2018-05-11 珠海市君天电子科技有限公司 Image color adjusting method, device, electronic equipment and storage medium
CN109741279A (en) * 2019-01-04 2019-05-10 Oppo广东移动通信有限公司 Image saturation method of adjustment, device, storage medium and terminal

Patent Citations (8)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
JP2002116750A (en) * 2000-10-05 2002-04-19 Sharp Corp Color conversion circuit and color conversion method as well as color image display device
CN101159878A (en) * 2006-10-06 2008-04-09 台湾新力国际股份有限公司 Color matching method and image seizure device and electronic equipment using the same
CN103339944A (en) * 2011-01-31 2013-10-02 马维尔国际贸易有限公司 Systems and methods for performing color adjustments of pixels on a color display
TW201612890A (en) * 2014-09-23 2016-04-01 Delta Electronics Inc Real-time color mapping system and real-time color mapping method
CN105261326A (en) * 2015-10-09 2016-01-20 惠州Tcl移动通信有限公司 Display device for adjusting display color gamut and method for adjusting display color gamut
CN106782428A (en) * 2016-12-27 2017-05-31 上海天马有机发光显示技术有限公司 A kind of colour gamut method of adjustment and colour gamut adjustment system of display device
CN108024105A (en) * 2017-12-14 2018-05-11 珠海市君天电子科技有限公司 Image color adjusting method, device, electronic equipment and storage medium
CN109741279A (en) * 2019-01-04 2019-05-10 Oppo广东移动通信有限公司 Image saturation method of adjustment, device, storage medium and terminal

Cited By (2)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN115499633A (en) * 2022-09-23 2022-12-20 昇显微电子(苏州)有限公司 Color correction method and system based on Mini3DLUT
CN115499633B (en) * 2022-09-23 2024-05-28 昇显微电子(苏州)股份有限公司 Color correction method and system based on Mini 3DLUT

Also Published As

Publication number Publication date
CN115918066A (en) 2023-04-04

Similar Documents

Publication Publication Date Title
KR102446033B1 (en) Method of converting color gamut and display device employing the same
US9934595B2 (en) White point calibration and gamut mapping for a display
JP4829110B2 (en) Conversion of 3-color input signal to more colors
KR102040746B1 (en) Display Mura calibration method, apparatus, and system
CN111429827B (en) Display screen color calibration method and device, electronic equipment and readable storage medium
CN103634580B (en) A kind of colour gamut method of adjustment and device of coloured image
KR101990956B1 (en) Device for converting color gamut and method thereof
JP2013536956A (en) Adaptive color correction for displays with backlight modulation
US9691318B2 (en) Image display method and device and electronic apparatus
US10733957B2 (en) Method and system for display color calibration
KR20140052743A (en) Device for converting color gamut and method thereof
KR20150077750A (en) Display apparatus and driving method thereof
WO2020000477A1 (en) Color gamut correction method and apparatus
US20200320927A1 (en) Display apparatus and control method thereof
US9626775B1 (en) White point calibration and gamut mapping for a display
WO2022040889A1 (en) Display method and apparatus, and electronic device
JP2008503114A (en) Color processing method and apparatus
US11024255B2 (en) Method and apparatus for color calibration for reduced motion-induced color breakup
JP6976150B2 (en) Correction data generation device, display device, correction data generation method and program
KR20170088461A (en) Display apparatus and method of driving the same
KR20050068595A (en) Device and method for matching color of display unit between devices used liquid crystal display and cathod tube ray display
KR20180092330A (en) Display apparatus and method of driving the same
US20240005850A1 (en) Two-Dimensional Temperature Sensing and Compensation
WO2021197213A1 (en) Color modulation method and apparatus for display, electronic device, and storage medium
US20240203332A1 (en) Global nonlinear scaler for multiple pixel gamma response compensation

Legal Events

Date Code Title Description
121 Ep: the epo has been informed by wipo that ep was designated in this application

Ref document number: 20950564

Country of ref document: EP

Kind code of ref document: A1

NENP Non-entry into the national phase

Ref country code: DE

122 Ep: pct application non-entry in european phase

Ref document number: 20950564

Country of ref document: EP

Kind code of ref document: A1