CN114067739B - Color gamut mapping method and device, electronic equipment and storage medium - Google Patents
Color gamut mapping method and device, electronic equipment and storage medium Download PDFInfo
- Publication number
- CN114067739B CN114067739B CN202010763004.0A CN202010763004A CN114067739B CN 114067739 B CN114067739 B CN 114067739B CN 202010763004 A CN202010763004 A CN 202010763004A CN 114067739 B CN114067739 B CN 114067739B
- Authority
- CN
- China
- Prior art keywords
- pixel value
- color space
- color gamut
- corresponding relation
- preset
- Prior art date
- Legal status (The legal status is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the status listed.)
- Active
Links
Classifications
-
- G—PHYSICS
- G09—EDUCATION; CRYPTOGRAPHY; DISPLAY; ADVERTISING; SEALS
- G09G—ARRANGEMENTS OR CIRCUITS FOR CONTROL OF INDICATING DEVICES USING STATIC MEANS TO PRESENT VARIABLE INFORMATION
- G09G3/00—Control arrangements or circuits, of interest only in connection with visual indicators other than cathode-ray tubes
- G09G3/20—Control arrangements or circuits, of interest only in connection with visual indicators other than cathode-ray tubes for presentation of an assembly of a number of characters, e.g. a page, by composing the assembly by combination of individual elements arranged in a matrix no fixed position being assigned to or needed to be assigned to the individual characters or partial characters
- G09G3/22—Control arrangements or circuits, of interest only in connection with visual indicators other than cathode-ray tubes for presentation of an assembly of a number of characters, e.g. a page, by composing the assembly by combination of individual elements arranged in a matrix no fixed position being assigned to or needed to be assigned to the individual characters or partial characters using controlled light sources
- G09G3/30—Control arrangements or circuits, of interest only in connection with visual indicators other than cathode-ray tubes for presentation of an assembly of a number of characters, e.g. a page, by composing the assembly by combination of individual elements arranged in a matrix no fixed position being assigned to or needed to be assigned to the individual characters or partial characters using controlled light sources using electroluminescent panels
- G09G3/32—Control arrangements or circuits, of interest only in connection with visual indicators other than cathode-ray tubes for presentation of an assembly of a number of characters, e.g. a page, by composing the assembly by combination of individual elements arranged in a matrix no fixed position being assigned to or needed to be assigned to the individual characters or partial characters using controlled light sources using electroluminescent panels semiconductive, e.g. using light-emitting diodes [LED]
- G09G3/3208—Control arrangements or circuits, of interest only in connection with visual indicators other than cathode-ray tubes for presentation of an assembly of a number of characters, e.g. a page, by composing the assembly by combination of individual elements arranged in a matrix no fixed position being assigned to or needed to be assigned to the individual characters or partial characters using controlled light sources using electroluminescent panels semiconductive, e.g. using light-emitting diodes [LED] organic, e.g. using organic light-emitting diodes [OLED]
- G09G3/3225—Control arrangements or circuits, of interest only in connection with visual indicators other than cathode-ray tubes for presentation of an assembly of a number of characters, e.g. a page, by composing the assembly by combination of individual elements arranged in a matrix no fixed position being assigned to or needed to be assigned to the individual characters or partial characters using controlled light sources using electroluminescent panels semiconductive, e.g. using light-emitting diodes [LED] organic, e.g. using organic light-emitting diodes [OLED] using an active matrix
-
- G—PHYSICS
- G06—COMPUTING; CALCULATING OR COUNTING
- G06F—ELECTRIC DIGITAL DATA PROCESSING
- G06F17/00—Digital computing or data processing equipment or methods, specially adapted for specific functions
- G06F17/10—Complex mathematical operations
- G06F17/16—Matrix or vector computation, e.g. matrix-matrix or matrix-vector multiplication, matrix factorization
-
- G—PHYSICS
- G06—COMPUTING; CALCULATING OR COUNTING
- G06T—IMAGE DATA PROCESSING OR GENERATION, IN GENERAL
- G06T7/00—Image analysis
- G06T7/90—Determination of colour characteristics
-
- G—PHYSICS
- G09—EDUCATION; CRYPTOGRAPHY; DISPLAY; ADVERTISING; SEALS
- G09G—ARRANGEMENTS OR CIRCUITS FOR CONTROL OF INDICATING DEVICES USING STATIC MEANS TO PRESENT VARIABLE INFORMATION
- G09G3/00—Control arrangements or circuits, of interest only in connection with visual indicators other than cathode-ray tubes
- G09G3/20—Control arrangements or circuits, of interest only in connection with visual indicators other than cathode-ray tubes for presentation of an assembly of a number of characters, e.g. a page, by composing the assembly by combination of individual elements arranged in a matrix no fixed position being assigned to or needed to be assigned to the individual characters or partial characters
- G09G3/2003—Display of colours
Landscapes
- Engineering & Computer Science (AREA)
- Physics & Mathematics (AREA)
- General Physics & Mathematics (AREA)
- Theoretical Computer Science (AREA)
- Mathematical Physics (AREA)
- Pure & Applied Mathematics (AREA)
- Mathematical Optimization (AREA)
- Mathematical Analysis (AREA)
- Data Mining & Analysis (AREA)
- Computational Mathematics (AREA)
- Computer Hardware Design (AREA)
- Computing Systems (AREA)
- Algebra (AREA)
- Databases & Information Systems (AREA)
- Software Systems (AREA)
- General Engineering & Computer Science (AREA)
- Computer Vision & Pattern Recognition (AREA)
- Image Processing (AREA)
Abstract
The disclosure relates to a color gamut mapping method and device, an electronic device and a storage medium. The method comprises the following steps: acquiring a first coordinate value of a first pixel value of each pixel in the original color domain in a preset color space based on a first corresponding relation; wherein, the first correspondence is: the corresponding relation between the first pixel values of all nodes in the original color gamut where the target image is located and the coordinate values of the preset color space; determining a second corresponding relation; wherein, the second correspondence is: the corresponding relation between the standard pixel value in the target color gamut and the second coordinate value of the standard pixel value in the preset color space; converting the first coordinate value based on the second corresponding relation to obtain a second pixel value; wherein the second pixel value is a pixel value after the target image is converted from the native color gamut to the target color gamut. By the method, the accuracy of color display during color gamut conversion can be improved.
Description
Technical Field
The disclosure relates to the field of display technologies, and in particular, to a color gamut mapping method and device, an electronic device, and a storage medium.
Background
At present, high-end smartphones all adopt screens made of Organic Light-Emitting Diode (OLED) materials, and the OLED screens have the advantages of high color gamut, high contrast ratio and the like. However, the standard color gamuts of the current cell phone industry are sRGB and Display-P3 gamuts, which are smaller than the OLED screen itself.
In order to display more real and natural colors on the mobile phone, the calibration and optimization of the color Gamut are required by the color Gamut Mapping (Gamut Mapping) technology, so that the screen colors are not too bright. However, the accuracy of current color gamut calibration and optimization algorithms is not high enough.
Disclosure of Invention
The disclosure provides a color gamut mapping method and device, an electronic device and a storage medium.
According to a first aspect of an embodiment of the present disclosure, there is provided a color gamut mapping method, including:
acquiring a first coordinate value of a first pixel value of each pixel in the original color domain in a preset color space based on a first corresponding relation; wherein, the first correspondence is: the corresponding relation between the first pixel values of all nodes in the original color gamut where the target image is located and the coordinate values of the preset color space;
determining a second corresponding relation; wherein, the second correspondence is: the corresponding relation between the standard pixel value in the target color gamut and the second coordinate value of the standard pixel value in the preset color space;
converting the first coordinate value based on the second corresponding relation to obtain a second pixel value; wherein the second pixel value is a pixel value after the target image is converted from the native color gamut to the target color gamut.
Optionally, the first correspondence is obtained by:
acquiring coordinate values of third pixel values of all pixels in the test image in the preset color space; wherein, the third pixel value of each pixel in the test image is the same as the first pixel value of each node in the original color domain where the target image is located;
and establishing the first corresponding relation based on the third pixel value and the coordinate value of the third pixel value in the preset color space.
Optionally, the converting the first coordinate value based on the second correspondence to obtain a second pixel value includes:
determining a second ratio according to the second corresponding relation, wherein the second ratio is a ratio between the standard pixel value and the second coordinate value;
and determining the product between the second ratio and the first coordinate value as the second pixel value.
Optionally, the determining the second correspondence includes:
multiplying a preset conversion matrix with the standard pixel value in the target color gamut to obtain the second coordinate value of the standard pixel value in the target color gamut in the preset color space; the preset transformation matrix is a transformation matrix from a color space where the standard pixel value is located to the preset color space;
and establishing the second corresponding relation between the standard pixel value in the target color gamut and the second coordinate value.
Optionally, the preset color space is an XYZ color space.
According to a second aspect of the embodiments of the present disclosure, there is provided a color gamut conversion device including:
the first acquisition module is configured to acquire a first coordinate value of a first pixel value of each pixel in the original color domain in a preset color space based on a first corresponding relation; wherein, the first correspondence is: the corresponding relation between the first pixel values of all nodes in the original color gamut where the target image is located and the coordinate values of the preset color space;
a determining module configured to determine a second correspondence; wherein, the second correspondence is: the corresponding relation between the standard pixel value in the target color gamut and the second coordinate value of the standard pixel value in the preset color space;
the conversion module is configured to convert the first coordinate value based on the second corresponding relation to obtain a second pixel value; wherein the second pixel value is a pixel value after the target image is converted from the native color gamut to the target color gamut.
Optionally, the first correspondence is acquired through a second acquisition module:
the second acquisition module is configured to acquire coordinate values of third pixel values of all pixels in the test image in the preset color space; wherein, the third pixel value of each pixel in the test image is the same as the first pixel value of each node in the original color domain where the target image is located; and establishing the first corresponding relation based on the third pixel value and the coordinate value of the third pixel value in the preset color space.
Optionally, the conversion module is configured to determine a second ratio according to the second correspondence, where the second ratio is a ratio between the standard pixel value and the second coordinate value; and determining the product between the second ratio and the first coordinate value as the second pixel value.
Optionally, the determining module is configured to multiply a preset transformation matrix with a standard pixel value in the target color gamut to obtain the second coordinate value of the standard pixel value in the target color gamut in the preset color space; the preset transformation matrix is a transformation matrix from a color space where the standard pixel value is located to the preset color space; and establishing the second corresponding relation between the standard pixel value in the target color gamut and the second coordinate value.
Optionally, the preset color space is an XYZ color space.
According to a third aspect of embodiments of the present disclosure, there is provided an electronic device, comprising:
a processor;
a memory for storing processor-executable instructions;
wherein the processor is configured to perform the gamut mapping method as described in the first aspect above.
According to a fourth aspect of embodiments of the present disclosure, there is provided a storage medium comprising:
the instructions in the storage medium, when executed by a processor of an electronic device, enable the electronic device to perform the gamut mapping method as described in the first aspect above.
The technical scheme provided by the embodiment of the disclosure can comprise the following beneficial effects:
in the embodiment of the disclosure, the first correspondence includes a correspondence between the first pixel values of all nodes in the native color gamut and coordinate values of a preset color space, so that all pixel points belonging to the first pixel value in the first correspondence in the target image can acquire the first coordinate values, and further, the first coordinate values can be converted based on the second correspondence to acquire the second pixel values, thereby completing the conversion of the first pixel value in the native color gamut of the target image in the target color gamut.
It can be understood that, compared with a mode of calibrating a part of nodes and interpolating other nodes to obtain calibrated data and using the calibrated data for color gamut conversion, the method and the device enable the target image to perform color space conversion on more pixel points based on the first corresponding relation to obtain a first coordinate value when the target image is displayed by switching the color gamuts through the first corresponding relation of different color spaces containing all the nodes, and further obtain a second pixel value after the pixel point is converted to the target color gamuts, so that the color display accuracy during the color gamuts conversion can be improved.
It is to be understood that both the foregoing general description and the following detailed description are exemplary and explanatory only and are not restrictive of the disclosure.
Drawings
The accompanying drawings, which are incorporated in and constitute a part of this specification, illustrate embodiments consistent with the disclosure and together with the description, serve to explain the principles of the disclosure.
Fig. 1 is a flowchart of a gamut mapping method according to an embodiment of the present disclosure.
Fig. 2 is a flowchart second of a gamut mapping method according to an embodiment of the present disclosure.
Fig. 3 is a flowchart three of a gamut mapping method shown in an embodiment of the present disclosure.
Fig. 4 is a diagram of a color gamut conversion device, according to an example embodiment.
Fig. 5 is a block diagram of an electronic device shown in an embodiment of the disclosure.
Detailed Description
Reference will now be made in detail to exemplary embodiments, examples of which are illustrated in the accompanying drawings. When the following description refers to the accompanying drawings, the same numbers in different drawings refer to the same or similar elements, unless otherwise indicated. The implementations described in the following exemplary examples are not representative of all implementations consistent with the present disclosure. Rather, they are merely examples of apparatus and methods consistent with some aspects of the present disclosure as detailed in the accompanying claims.
Fig. 1 is a flowchart of a color gamut mapping method according to an embodiment of the present disclosure, and as shown in fig. 1, the color gamut mapping method includes the following steps:
s11, acquiring a first coordinate value of a first pixel value of each pixel in the original color domain in a preset color space based on a first corresponding relation; wherein, the first correspondence is: the corresponding relation between the first pixel values of all nodes in the original color gamut where the target image is located and the coordinate values of the preset color space;
s12, determining a second corresponding relation; wherein, the second correspondence is: the corresponding relation between the standard pixel value in the target color gamut and the second coordinate value of the standard pixel value in the preset color space;
s13, converting the first coordinate value based on the second corresponding relation to obtain a second pixel value; wherein the second pixel value is a pixel value after the target image is converted from the native color gamut to the target color gamut.
The color gamut conversion method is applied to electronic equipment, and the electronic equipment comprises the following steps: mobile devices and stationary devices. The mobile device includes: a cell phone, tablet computer, or wearable device, etc.; the stationary device includes, but is not limited to, a personal computer (Personal Computer, PC).
The electronic device includes a display screen for displaying an image. However, when an electronic device displays an image, a color gamut conversion may be required due to different display requirements, and the color gamut refers to a presentable color range. Wherein the different display requirements include: for example, the image is an sRGB color gamut image, and the color gamut of the OLED screen is large relative to the sRGB color gamut, so that when the sRGB image is displayed with the OLED screen, color gamut conversion is required. As another example, in image processing software, it may be necessary to perform a corresponding image processing function in a specific color gamut, and thus it is also necessary to convert an image that does not belong to the specific color gamut into a display in the specific color gamut.
In the embodiments of the present disclosure, the color gamut before conversion is referred to as a native color gamut, and the color gamut after conversion is referred to as a target color gamut. For example, the native color gamut may be any one of the sRGB color gamut, display-P3 color gamut, NTSC color gamut, or AdobeRGB color gamut, while the target color gamut and the native color gamut belong to different color gamuts.
When performing color gamut conversion, a look-up table is typically performed based on pixel values of each node of the native color gamut before conversion stored in the 3D LUT, so as to obtain pixel values in the target color gamut after conversion corresponding to the node, where the node refers to a search object in the 3D LUT, and the object represents the pixel value corresponding to the pixel point. The 3D LUT may include for example 9 x 9, or 17 x 17 nodes. Specifically, the 3D LUT stores red (R), green (G), and blue (B) pixel values (e.g., denoted as Rin/Gin/Bin) of the input node before conversion, and also stores red, green, and blue pixel values (e.g., denoted as Rout/Gout/Bout) under the target color gamut corresponding to the node, thereby facilitating the electronic device to convert based on the pixel values corresponding to before conversion and after conversion stored in the 3D LUT.
However, in one embodiment, when obtaining the 3D LUT for color gamut conversion, RGB data of the image is converted to XYZ color space, then to Lab color space, calibration of specific 30 to 40 nodes is performed under this space, other points are completed in an interpolation manner, and then mapped back to RGB color space, thereby obtaining RGB data under the target color gamut. The specific conversion process is shown in the following formula (1):
as shown in the formula (1),is corresponding to 30 to 40 nodes +.>And after calibration, interpolating to obtain processing results of other nodes. Based on->I.e. map back->Thus, the corresponding relation between RGB and R1G1B1 is obtained, namely, the 3D LUT for color gamut conversion is obtained.
As can be seen from the above-described scheme, when the 3D LUT is obtained, only some nodes are calibrated, and the values of the target color gamut corresponding to other nodes are obtained by interpolation, so that there may be a problem that the accuracy is not high enough when performing color gamut conversion based on the generated 3D LUT. Based on the above, the disclosure proposes a method for implementing color gamut conversion on a target image based on the correspondence of all nodes.
In step S11, the electronic device obtains a first coordinate value of a first pixel value of each pixel in the original color domain in a preset color space based on the first correspondence. The target image is an image to be displayed by the electronic device, and the first corresponding relation characterizes a corresponding relation between first pixel values of all nodes in the original color domain where the target image is located and coordinate values of a preset color space. Therefore, for the target image to be converted and displayed in the color gamut, the first coordinate value corresponding to the first pixel value can be found through the first corresponding relation for the pixel belonging to the first pixel value in the first corresponding relation in the target image based on the first corresponding relation.
It should be noted that, in the embodiment of the present disclosure, the preset color space is a color space different from a color space in which the first pixel value of the node in the native color gamut is located. The color space in which the first pixel value of the node in the native color gamut is located is an RGB color space, and in one embodiment, the preset color space is an XYZ color space; in another embodiment, the preset color space may also be a Lab color space.
In step S12, the electronic device determines a second correspondence relationship, where the second correspondence relationship refers to a correspondence relationship between the standard pixel value and the standard pixel value in the target color gamut in the second coordinate value of the preset color space.
It should be noted that, the standard pixel values in the target color gamut may refer to red, green, and blue pixel values (i.e., rout/Gout/Bout portions) in the standard 3D LUT corresponding to the nodes under the target color gamut. However, different electronic devices may have color differences of the screen due to process differences or differences in production environments, and thus cannot perform color gamut conversion using a unified 3D LUT. In the present disclosure, standard pixel values in a standard 3D LUT are utilized to generate calibrated pixel values in a target color gamut corresponding to each node in the 3D LUT for an electronic device, that is, obtain a second pixel value in the target image corresponding to a first pixel value in the target color gamut.
In an embodiment of the disclosure, the electronic device may convert the standard pixel value in the target color gamut into the second coordinate value in the preset color space according to the preset conversion matrix.
For example, if the target color gamut is an sRGB color gamut and the preset color space is an XYZ space, the standard pixel values in the target color gamut may be converted into the second coordinate values of the XYZ color space based on the conversion matrix from the RGB color space to the XYZ color space under the sRGB color gamut.
For another example, if the target color gamut is an sRGB color gamut and the preset color space is a Lab space, the standard pixel values in the target color gamut may be converted into coordinate values in the XYZ color space based on a conversion matrix from the RGB color space to the XYZ color space in the sRGB color gamut, and then the coordinate values in the XYZ color space may be converted into second coordinate values in the Lab space based on a conversion matrix from the XYZ color space to the Lab space.
In step S13, the electronic device converts the first coordinate value based on the second correspondence relationship, to obtain a second pixel value after the target image is converted from the native color gamut to the target color gamut.
It should be noted that, in this embodiment, the first correspondence includes a correspondence between the first pixel values of all the nodes in the native color gamut and the coordinate values of the preset color space, so that all the pixel points in the target image, which belong to the first pixel values in the first correspondence, can acquire the first coordinate values, and further, the first coordinate values can be converted based on the second correspondence to acquire the second pixel values, thereby completing the conversion of the first pixel values in the native color gamut of the target image in the target color gamut.
It can be understood that, compared with a mode of calibrating a part of nodes and interpolating other nodes to obtain calibrated data and using the calibrated data for color gamut conversion, the method and the device enable the target image to perform color space conversion on more pixel points based on the first corresponding relation to obtain a first coordinate value when the target image is displayed by switching the color gamuts through the first corresponding relation of different color spaces containing all the nodes, and further obtain a second pixel value after the pixel point is converted to the target color gamuts, so that the color display accuracy during the color gamuts conversion can be improved.
Fig. 2 is a flowchart of a color gamut conversion method according to an embodiment of the present disclosure, as shown in fig. 2, before the step of fig. 1, the first correspondence relationship may be further obtained by:
S10A, acquiring coordinate values of third pixel values of all pixels in the test image in the preset color space; wherein, the third pixel value of each pixel in the test image is the same as the first pixel value of each node in the original color domain where the target image is located;
S10B, establishing the first corresponding relation based on the third pixel value and the coordinate value of the third pixel value in the preset color space.
In this embodiment, the electronic device establishes the first correspondence using the test image. Wherein the third pixel value of each pixel in the test image is the same as the first pixel value of each node in the original color gamut. For example, the total number of nodes in the original color gamut is 4913 (17 x 17), the third pixel value of the test image is the same as the first pixel value of all nodes therein.
In one mode, the pixel value of one test image and the pixel value of one node of 4913 nodes, so the electronic device needs to acquire 4913 different test images to obtain the coordinate value corresponding to the first pixel value of each node in the preset color space.
When the electronic equipment displays the test image in the original color gamut, the electronic equipment acquires the coordinate value of the third pixel value of each pixel in the test image in the preset color space. For example, the electronic device obtains, through the test instrument, a coordinate value of a third pixel value of the test image in a preset color space. After the coordinate value of the third pixel value in the preset color space is obtained, a first corresponding relation can be established based on the coordinate values of the third pixel value and the third pixel value in the preset color space. The first correspondence is also characterized by a correspondence between first pixel values of all nodes in the native color gamut and coordinate values in a preset color space.
For example, if the preset color space is an XYZ color space, the first correspondence relationship may be expressed as:
fig. 3 is a flowchart III of a color gamut conversion method according to an embodiment of the present disclosure, and as shown in fig. 3, step S12 in fig. 1 may include the following steps:
S12A, multiplying a preset transformation matrix with a standard pixel value in the target color gamut to obtain the second coordinate value of the standard pixel value in the target color gamut in the preset color space; the preset transformation matrix is a transformation matrix from a color space where the standard pixel value is located to the preset color space;
and S12B, establishing the second corresponding relation between the standard pixel value in the target color gamut and the second coordinate value.
In this embodiment, the electronic device converts the standard pixel value of the target color gamut into the corresponding second coordinate value in the preset color space by using the preset conversion matrix. The preset conversion matrix is a conversion matrix from a color space where the standard pixel value is located to a preset color space.
For example, if the preset color space is XYZ space, the preset conversion matrix D is a conversion matrix from RGB color space to XYZ color space, see the following formula:
D=|RGBtoXYZ| (2)
wherein D may be a matrix of 3*3.
After obtaining the second coordinate value based on the preset transformation matrix D, a second correspondence between the standard pixel value and the second coordinate value in the target color gamut can be established.
For example, if the preset color space is an XYZ color space, the second correspondence relationship may be expressed as:
in one embodiment, the converting the first coordinate value based on the second correspondence relationship to obtain a second pixel value includes:
determining a second ratio according to the second corresponding relation, wherein the second ratio is a ratio between the standard pixel value and the second coordinate value;
and determining the product between the second ratio and the first coordinate value as the second pixel value.
Since the conversion of the preset color space into the RGB color space is linear in an ideal case, in this embodiment, the ratio of the pixel value of the screen after the calibration of the target color gamut to the first coordinate value should be equal to a second ratio, which is the ratio between the standard pixel value of the target color gamut and the second coordinate value, theoretically. Based on the ideal case of a linear transformation of the preset color space into the RGB color space, the following equation can be established:
in the above-mentioned formula(s),namely the second ratio, ++>Is the first coordinate value, so that the calibrated pixel value in the target color gamut corresponding to the screen under ideal conditions can be obtained by multiplying the second ratio by the first coordinate value>The pixel value, i.e. the pixel value after the conversion of the first pixel value of the target image from the native color gamut to the target color gamut, is given by the formula:
it can be understood that the present disclosure establishes the equation shown in the formula (3) based on the linear relationship existing in the ideal situation, so as to obtain the second pixel value after the first pixel value of the target image is converted from the native color gamut to the target color gamut, and interpolation processing is not needed, so that the calculation amount is small, and the processing speed can be improved while the color gamut conversion accuracy of the electronic device is improved.
Fig. 4 is a diagram of a color gamut conversion device, according to an example embodiment. Referring to fig. 4, in an alternative embodiment, the apparatus further comprises:
a first obtaining module 101, configured to obtain, based on a first correspondence, a first coordinate value of a first pixel value of each pixel in the original color domain in a preset color space in the target image; wherein, the first correspondence is: the corresponding relation between the first pixel values of all nodes in the original color gamut where the target image is located and the coordinate values of the preset color space;
a determining module 102 configured to determine a second correspondence; wherein, the second correspondence is: the corresponding relation between the standard pixel value in the target color gamut and the second coordinate value of the standard pixel value in the preset color space;
a conversion module 103 configured to convert the first coordinate value based on the second correspondence relationship to obtain a second pixel value; wherein the second pixel value is a pixel value after the target image is converted from the native color gamut to the target color gamut.
Optionally, the second obtaining module 104 obtains the first correspondence relationship:
the second obtaining module 104 is configured to obtain coordinate values of third pixel values of pixels in the test image in the preset color space; wherein, the third pixel value of each pixel in the test image is the same as the first pixel value of each node in the original color domain where the target image is located; and establishing the first corresponding relation based on the third pixel value and the coordinate value of the third pixel value in the preset color space.
Optionally, the conversion module 103 is configured to determine a second ratio according to the second correspondence, where the second ratio is a ratio between the standard pixel value and the second coordinate value; and determining the product between the second ratio and the first coordinate value as the second pixel value.
Optionally, the determining module 102 is configured to multiply a preset transformation matrix with a standard pixel value in the target color gamut to obtain the second coordinate value of the standard pixel value in the target color gamut in the preset color space; the preset transformation matrix is a transformation matrix from a color space where the standard pixel value is located to the preset color space; and establishing the second corresponding relation between the standard pixel value in the target color gamut and the second coordinate value.
Optionally, the preset color space is an XYZ color space.
The specific manner in which the various modules perform the operations in the apparatus of the above embodiments have been described in detail in connection with the embodiments of the method, and will not be described in detail herein.
Fig. 5 is a block diagram of a mobile electronic device apparatus 800, according to an example embodiment. For example, the device 800 may be a mobile phone, mobile computer, or the like.
Referring to fig. 5, apparatus 800 may include one or more of the following components: a processing component 802, a memory 804, a power component 806, a multimedia component 808, an audio component 810, an input/output (I/O) interface 812, a sensor component 814, and a communication component 816.
The processing component 802 generally controls overall operation of the apparatus 800, such as operations associated with display, telephone calls, data communications, camera operations, and recording operations. The processing component 802 may include one or more processors 820 to execute instructions to perform all or part of the steps of the methods described above. Further, the processing component 802 can include one or more modules that facilitate interactions between the processing component 802 and other components. For example, the processing component 802 can include a multimedia module to facilitate interaction between the multimedia component 808 and the processing component 802.
The memory 804 is configured to store various types of data to support operations at the device 800. Examples of such data include instructions for any application or method operating on the device 800, contact data, phonebook data, messages, pictures, videos, and the like. The memory 804 may be implemented by any type or combination of volatile or nonvolatile memory devices such as Static Random Access Memory (SRAM), electrically erasable programmable read-only memory (EEPROM), erasable programmable read-only memory (EPROM), programmable read-only memory (PROM), read-only memory (ROM), magnetic memory, flash memory, magnetic or optical disk.
The power supply component 806 provides power to the various components of the device 800. The power components 806 may include a power management system, one or more power sources, and other components associated with generating, managing, and distributing power for the device 800.
The multimedia component 808 includes a screen between the device 800 and the user that provides an output interface. In some embodiments, the screen may include a Liquid Crystal Display (LCD) and a Touch Panel (TP). If the screen includes a touch panel, the screen may be implemented as a touch screen to receive input signals from a user. The touch panel includes one or more touch sensors to sense touches, swipes, and gestures on the touch panel. The touch sensor may sense not only the boundary of a touch or slide action, but also the duration and pressure associated with the touch or slide operation. In some embodiments, the multimedia component 808 includes a front camera and/or a rear camera. The front camera and/or the rear camera may receive external multimedia data when the device 800 is in an operational mode, such as a shooting mode or a video mode. Each front camera and rear camera may be a fixed optical lens system or have focal length and optical zoom capabilities.
The audio component 810 is configured to output and/or input audio signals. For example, the audio component 810 includes a Microphone (MIC) configured to receive external audio signals when the device 800 is in an operational mode, such as a call mode, a recording mode, and a voice recognition mode. The received audio signals may be further stored in the memory 804 or transmitted via the communication component 816. In some embodiments, audio component 810 further includes a speaker for outputting audio signals.
The I/O interface 812 provides an interface between the processing component 802 and peripheral interface modules, which may be a keyboard, click wheel, buttons, etc. These buttons may include, but are not limited to: homepage button, volume button, start button, and lock button.
The sensor assembly 814 includes one or more sensors for providing status assessment of various aspects of the apparatus 800. For example, the sensor assembly 814 may detect an on/off state of the device 800, a relative positioning of the components, such as a display and keypad of the apparatus 800, the sensor assembly 814 may also detect a change in position of the apparatus 800 or one component of the apparatus 800, the presence or absence of user contact with the apparatus 800, an orientation or acceleration/deceleration of the apparatus 800, and a change in temperature of the apparatus 800. The sensor assembly 814 may include a proximity sensor configured to detect the presence of nearby objects without any physical contact. The sensor assembly 814 may also include a light sensor, such as a CMOS or CCD image sensor, for use in imaging applications. In some embodiments, the sensor assembly 814 may also include an acceleration sensor, a gyroscopic sensor, a magnetic sensor, a pressure sensor, or a temperature sensor.
The communication component 816 is configured to facilitate communication between the apparatus 800 and other devices, either in a wired or wireless manner. The device 800 may access a wireless network based on a communication standard, such as Wi-Fi,2G, or 3G, or a combination thereof. In one exemplary embodiment, the communication component 816 receives broadcast signals or broadcast related information from an external broadcast management system via a broadcast channel. In one exemplary embodiment, the communication component 816 further includes a Near Field Communication (NFC) module to facilitate short range communications. For example, the NFC module may be implemented based on Radio Frequency Identification (RFID) technology, infrared data association (IrDA) technology, ultra Wideband (UWB) technology, bluetooth (BT) technology, and other technologies.
In an exemplary embodiment, the apparatus 800 may be implemented by one or more Application Specific Integrated Circuits (ASICs), digital Signal Processors (DSPs), digital Signal Processing Devices (DSPDs), programmable Logic Devices (PLDs), field Programmable Gate Arrays (FPGAs), controllers, microcontrollers, microprocessors, or other electronic elements for executing the methods described above.
In an exemplary embodiment, a non-transitory computer readable storage medium is also provided, such as memory 804 including instructions executable by processor 820 of apparatus 800 to perform the above-described method. For example, the non-transitory computer readable storage medium may be ROM, random Access Memory (RAM), CD-ROM, magnetic tape, floppy disk, optical data storage device, etc.
A non-transitory computer readable storage medium, which when executed by a processor of an electronic device, causes the electronic device to perform a gamut conversion method, the method comprising:
acquiring a first coordinate value of a first pixel value of each pixel in the original color domain in a preset color space based on a first corresponding relation; wherein, the first correspondence is: the corresponding relation between the first pixel values of all nodes in the original color gamut where the target image is located and the coordinate values of the preset color space;
determining a second corresponding relation; wherein, the second correspondence is: the corresponding relation between the standard pixel value in the target color gamut and the second coordinate value of the standard pixel value in the preset color space;
converting the first coordinate value based on the second corresponding relation to obtain a second pixel value; wherein the second pixel value is a pixel value after the target image is converted from the native color gamut to the target color gamut.
Other embodiments of the disclosure will be apparent to those skilled in the art from consideration of the specification and practice of the disclosure disclosed herein. This disclosure is intended to cover any adaptations, uses, or adaptations of the disclosure following the general principles of the disclosure and including such departures from the present disclosure as come within known or customary practice within the art to which the disclosure pertains. It is intended that the specification and examples be considered as exemplary only, with a true scope and spirit of the disclosure being indicated by the following claims.
It is to be understood that the present disclosure is not limited to the precise arrangements and instrumentalities shown in the drawings, and that various modifications and changes may be effected without departing from the scope thereof. The scope of the present disclosure is limited only by the appended claims.
Claims (10)
1. A method of gamut mapping, the method comprising:
acquiring a first coordinate value of a first pixel value of each pixel in the original color domain in a preset color space based on a first corresponding relation; wherein, the first correspondence is: the corresponding relation between the first pixel values of all nodes in the original color gamut where the target image is located and the coordinate values of the preset color space;
determining a second corresponding relation; wherein, the second correspondence is: the corresponding relation between the standard pixel value in the target color gamut and the second coordinate value of the standard pixel value in the preset color space;
converting the first coordinate value based on the second corresponding relation to obtain a second pixel value; wherein the second pixel value is a pixel value after the target image is converted from a native color gamut to the target color gamut;
wherein the determining the second correspondence includes:
multiplying a preset conversion matrix with the standard pixel value in the target color gamut to obtain the second coordinate value of the standard pixel value in the target color gamut in the preset color space; the preset transformation matrix is a transformation matrix from a color space where the standard pixel value is located to the preset color space; and establishing the second corresponding relation between the standard pixel value in the target color gamut and the second coordinate value.
2. The method according to claim 1, wherein the first correspondence is obtained by:
acquiring coordinate values of third pixel values of all pixels in the test image in the preset color space; wherein, the third pixel value of each pixel in the test image is the same as the first pixel value of each node in the original color domain where the target image is located;
and establishing the first corresponding relation based on the third pixel value and the coordinate value of the third pixel value in the preset color space.
3. The method of claim 1, wherein converting the first coordinate value based on the second correspondence relationship to obtain a second pixel value comprises:
determining a second ratio according to the second corresponding relation, wherein the second ratio is a ratio between the standard pixel value and the second coordinate value;
and determining the product between the second ratio and the first coordinate value as the second pixel value.
4. A method according to any one of claims 1 to 3, wherein the preset color space is an XYZ color space.
5. A gamut mapping device, the device comprising:
the first acquisition module is configured to acquire a first coordinate value of a first pixel value of each pixel in the original color domain in a preset color space based on a first corresponding relation; wherein, the first correspondence is: the corresponding relation between the first pixel values of all nodes in the original color gamut where the target image is located and the coordinate values of the preset color space;
a determining module configured to determine a second correspondence; wherein, the second correspondence is: the corresponding relation between the standard pixel value in the target color gamut and the second coordinate value of the standard pixel value in the preset color space;
the conversion module is configured to convert the first coordinate value based on the second corresponding relation to obtain a second pixel value; wherein the second pixel value is a pixel value after the target image is converted from a native color gamut to the target color gamut;
the determining module is further configured to multiply a preset transformation matrix with a standard pixel value in the target color gamut to obtain the second coordinate value of the standard pixel value in the target color gamut in the preset color space; the preset transformation matrix is a transformation matrix from a color space where the standard pixel value is located to the preset color space; and establishing the second corresponding relation between the standard pixel value in the target color gamut and the second coordinate value.
6. The apparatus of claim 5, wherein the first correspondence is acquired by a second acquisition module:
the second acquisition module is configured to acquire coordinate values of third pixel values of all pixels in the test image in the preset color space; wherein, the third pixel value of each pixel in the test image is the same as the first pixel value of each node in the original color domain where the target image is located; and establishing the first corresponding relation based on the third pixel value and the coordinate value of the third pixel value in the preset color space.
7. The apparatus of claim 5, wherein the device comprises a plurality of sensors,
the conversion module is configured to determine a second ratio according to the second corresponding relation, wherein the second ratio is a ratio between the standard pixel value and the second coordinate value; and determining the product between the second ratio and the first coordinate value as the second pixel value.
8. The apparatus according to any one of claims 5 to 7, wherein the preset color space is an XYZ color space.
9. An electronic device, comprising:
a processor;
a memory for storing processor-executable instructions;
wherein the processor is configured to perform the gamut mapping method of any of claims 1 to 4.
10. A non-transitory computer readable storage medium, which when executed by a processor of an electronic device, causes the electronic device to perform the gamut mapping method of any of claims 1 to 4.
Priority Applications (1)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
CN202010763004.0A CN114067739B (en) | 2020-07-31 | 2020-07-31 | Color gamut mapping method and device, electronic equipment and storage medium |
Applications Claiming Priority (1)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
CN202010763004.0A CN114067739B (en) | 2020-07-31 | 2020-07-31 | Color gamut mapping method and device, electronic equipment and storage medium |
Publications (2)
Publication Number | Publication Date |
---|---|
CN114067739A CN114067739A (en) | 2022-02-18 |
CN114067739B true CN114067739B (en) | 2024-02-06 |
Family
ID=80227986
Family Applications (1)
Application Number | Title | Priority Date | Filing Date |
---|---|---|---|
CN202010763004.0A Active CN114067739B (en) | 2020-07-31 | 2020-07-31 | Color gamut mapping method and device, electronic equipment and storage medium |
Country Status (1)
Country | Link |
---|---|
CN (1) | CN114067739B (en) |
Families Citing this family (2)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
CN115294945A (en) * | 2022-06-29 | 2022-11-04 | 北京优酷科技有限公司 | Object display method and device, and color lookup table generation method and device |
CN116700646B (en) * | 2022-12-19 | 2024-05-28 | 荣耀终端有限公司 | Image color difference processing method and device |
Citations (8)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
CN107343187A (en) * | 2017-07-24 | 2017-11-10 | 深圳Tcl新技术有限公司 | Method of color gamut mapping of color, display terminal and computer-readable recording medium |
CN107705264A (en) * | 2017-10-10 | 2018-02-16 | 深圳市华星光电半导体显示技术有限公司 | A kind of image processing method, electronic equipment and the device with store function |
CN107767838A (en) * | 2016-08-16 | 2018-03-06 | 北京小米移动软件有限公司 | Method of color gamut mapping of color and device |
CN107784993A (en) * | 2017-09-30 | 2018-03-09 | 上海顺久电子科技有限公司 | A kind of gamut compression method, apparatus and display device |
CN108184037A (en) * | 2017-12-12 | 2018-06-19 | 维沃移动通信有限公司 | A kind of method for displaying image and mobile terminal |
CN108810508A (en) * | 2018-06-19 | 2018-11-13 | 深圳市华星光电技术有限公司 | Method of color gamut mapping of color, device, storage medium in compression domain exterior domain to domain and electronic equipment |
CN110459176A (en) * | 2019-08-16 | 2019-11-15 | 合肥工业大学 | A color gamut conversion method for an AMOLED display |
CN111107336A (en) * | 2019-12-06 | 2020-05-05 | Oppo广东移动通信有限公司 | Image processing method, image processing device, electronic equipment and storage medium |
Family Cites Families (2)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
US8363267B2 (en) * | 2007-06-01 | 2013-01-29 | Samsung Electronics Co., Ltd. | Image forming apparatus and color converting method thereof |
CN108810507B (en) * | 2018-06-15 | 2019-10-29 | 京东方科技集团股份有限公司 | A kind of gamut conversion method and gamut converter, display device |
-
2020
- 2020-07-31 CN CN202010763004.0A patent/CN114067739B/en active Active
Patent Citations (8)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
CN107767838A (en) * | 2016-08-16 | 2018-03-06 | 北京小米移动软件有限公司 | Method of color gamut mapping of color and device |
CN107343187A (en) * | 2017-07-24 | 2017-11-10 | 深圳Tcl新技术有限公司 | Method of color gamut mapping of color, display terminal and computer-readable recording medium |
CN107784993A (en) * | 2017-09-30 | 2018-03-09 | 上海顺久电子科技有限公司 | A kind of gamut compression method, apparatus and display device |
CN107705264A (en) * | 2017-10-10 | 2018-02-16 | 深圳市华星光电半导体显示技术有限公司 | A kind of image processing method, electronic equipment and the device with store function |
CN108184037A (en) * | 2017-12-12 | 2018-06-19 | 维沃移动通信有限公司 | A kind of method for displaying image and mobile terminal |
CN108810508A (en) * | 2018-06-19 | 2018-11-13 | 深圳市华星光电技术有限公司 | Method of color gamut mapping of color, device, storage medium in compression domain exterior domain to domain and electronic equipment |
CN110459176A (en) * | 2019-08-16 | 2019-11-15 | 合肥工业大学 | A color gamut conversion method for an AMOLED display |
CN111107336A (en) * | 2019-12-06 | 2020-05-05 | Oppo广东移动通信有限公司 | Image processing method, image processing device, electronic equipment and storage medium |
Also Published As
Publication number | Publication date |
---|---|
CN114067739A (en) | 2022-02-18 |
Similar Documents
Publication | Publication Date | Title |
---|---|---|
US10269129B2 (en) | Color adjustment method and device | |
KR101831077B1 (en) | Method and device for switching color gamut mode | |
KR101839748B1 (en) | Method and device for reducing display brightness | |
CN112905141B (en) | Screen display method and device and computer storage medium | |
CN114067741B (en) | Screen calibration method and device, electronic equipment and storage medium | |
CN113450713A (en) | Screen display method and device and gray scale mapping information generation method and device | |
US10109248B2 (en) | Method and device for adjusting liquid crystal display | |
CN114067739B (en) | Color gamut mapping method and device, electronic equipment and storage medium | |
CN108184103B (en) | Method and apparatus for displaying image | |
CN114067740B (en) | Screen calibration method and device, electronic equipment and storage medium | |
CN114067003A (en) | Color gamut conversion method and device, electronic equipment and storage medium | |
CN111696479B (en) | Color gamut adjusting method and device | |
CN105677352B (en) | Method and device for setting application icon color | |
CN116453459A (en) | Screen display method and device, readable storage medium and electronic equipment | |
CN108877701B (en) | Method and device for displaying image | |
CN111724324A (en) | A color gamut conversion method, device, electronic device and storage medium | |
EP3975548A1 (en) | Photographing method and apparatus, terminal, and storage medium | |
WO2021169810A1 (en) | Video processing method, and server | |
CN106601165B (en) | Screen display method and device | |
CN115810331B (en) | Method, device and storage medium for calibrating OLED display screen | |
CN116801112A (en) | Color calibration method, device, storage medium and display equipment | |
CN113870368B (en) | Image processing method, device, electronic device and storage medium for terminal device | |
CN119964499A (en) | Display processing method, display data processing method, device, equipment and medium | |
CN118096508A (en) | Color mapping method, device, equipment and storage medium | |
CN116795317A (en) | Image display method, device and readable storage medium |
Legal Events
Date | Code | Title | Description |
---|---|---|---|
PB01 | Publication | ||
PB01 | Publication | ||
SE01 | Entry into force of request for substantive examination | ||
SE01 | Entry into force of request for substantive examination | ||
GR01 | Patent grant | ||
GR01 | Patent grant |