Method, apparatus and system for color error determination and color correction
A new metric Ψ, incorporating ΔE, ΔH, and ΔC, addresses the limitations of ΔE by providing a more accurate color correction method that aligns with human perception, ensuring visually identical results through a tuned CCM.
Patent Information
- Application Number
- PCT/CN2024/087624
- Authority / Receiving Office
- WO · WO
- Patent Type
- Applications
- Current Assignee / Owner
- Filing Date
- 2024-04-12
- Publication Date
- 2025-11-13
AI Technical Summary
The existing metric ΔE for describing color difference, as proposed by CIE, is insufficient to accurately reflect human visual preference, leading to inconsistencies in color correction based on human perception.
A new metric Ψ is introduced, calculated based on ΔE, ΔH, and ΔC, to determine color differences that better align with human perception, and a color correction matrix (CCM) is tuned using an iterative optimization process to achieve accurate color correction.
The new metric Ψ enables more accurate color correction by aligning with human visual preferences, resulting in images that are visually identical to the original when processed through the CCM.
Smart Images

Figure CN2024087624_13112025_PF_FP_ABST
Abstract
Description
METHOD, APPARATUS AND SYSTEM FOR COLOR ERROR DETERMINATION AND COLOR CORRECTIONTECHNICAL FIELD
[0001] The present disclosure generally relates to the field of image processing, and in particular, to a method, apparatus and system for color error determination and color correction, and a computer readable storage medium.BACKGROUND
[0002] Metric ΔE is proposed by CIE (international commission on illumination) in 1976 for describing color difference. ΔE is defined on the LAB color space which accounts for the non-uniformities in human perception. However, ΔE is not sufficient to describe human visual preference. Thus, an improved metric for defining color difference regarding human visual preference is expected.
[0003] This background information is provided to reveal information believed by the applicant to be of possible relevance to the present disclosure. No admission is necessarily intended, nor should be construed, that any of the preceding information constitutes prior art against the present disclosure.SUMMARY
[0004] The present disclosure provides a method for color error determination and color correction.
[0005] According to a first aspect, a method for color error determination is provided. The method includes: obtaining a first color difference chromatism ΔE, a color tone difference ΔH, and chromaticity difference ΔC between a first color of a first pixel in a first image and a second color of the second pixel in a second image; the second color is a color to be corrected corresponding to the first color; and determining a value of a first function Ψ based on ΔE, ΔC, and ΔH, wherein the first function is for determining the difference between the first color and the second color.
[0006] In this way, an accurate color difference regarding human perception may be obtained.
[0007] In some embodiments, the first color is a ground truth color.
[0008] In such case, the first function is for determining the difference between the ground truth color and the color to be corrected corresponding to the ground truth. In other words, the first function is for determining the error between the color to be corrected and its ground truth.
[0009] In some embodiments, after determining the value of Ψ, further comprising: determining a color correction matrix (CCM) based on the value of Ψ.
[0010] In some embodiments, determining the CCM comprising: tuning the CCM in a case where the value of Ψ is not greater than a threshold.
[0011] In some embodiments, tuning the CCM includes: tuning the CCM using an iterative optimization, and the iterative optimization utilizes the Ψ as an objective loss.
[0012] In this way, the CCM may be fine-tuned, such that an ideal CCM may be obtained.
[0013] In some embodiments, determining the CCM comprising: outputting the CCM in a case where the value of Ψ is greater than the threshold.
[0014] In this way, the obtained CCM may provide an ideal outcome during color correction.
[0015] In some embodiments, the method further comprising: capturing a third image by a camera; and obtaining a fourth image by processing the third image through the CCM.
[0016] In this way, the fourth image, which is identical to the third image in human eyes, may be obtained.
[0017] In some embodiments, the first function is a piecewise function having a plurality of piecewise portions that are differently dependent on at least one of ΔE, ΔH, or ΔC; the first function is represented as: wherein U represents an upper bound value, L represents a lower bound value, β represents a parameter; and determining a value of a first function Ψ based on the ΔE, ΔC, and ΔH includes:
[0018] in a case where at least one of ΔE, ΔH, or ΔC is in a first range, the first function satisfies
[0019] in a case where at least one of ΔE, ΔH, or ΔC is in a second range, the first function satisfies
[0020] in a case where at least one of ΔE, ΔH, or ΔC is in a third range, the first function satisfies
[0021] in a case where at least one of ΔE, ΔH, or ΔC is in a fourth range, the first function satisfies
[0022] in a case where at least one of ΔE, ΔH, or ΔC is in a fifth range, the first function satisfies and
[0023] in a case where at least one of ΔE, ΔH, or ΔC is in a sixth range, the first function satisfies
[0024] In this way, the first function may be obtained based on at least one of ΔE, ΔH, or ΔC.
[0025] In some embodiments, the first range, the second range, the third range, the fourth range, the fifth range, and the sixth range correspond to a first region, a second region, a third region, a fourth region, a fifth region, and a sixth region respectively in a color space.
[0026] In this way, different regions in the color space may be obtained based on at least one of ΔE, ΔH, or ΔC. Moreover, an ideal color corrected patch may be obtained based on the region it belongs to.
[0027] In some embodiments, in the color space, the first region is a represented by a first approximate ellipse, and the first approximate ellipse is inside a second approximate ellipse; the second region, the third region, the fourth region, and the fifth region are outside the first approximate ellipse and inside the second approximate ellipse; and the sixth region is represented by the region in the color space except the region inside the second approximate ellipse.
[0028] In some embodiments, in a case where ΔE≤ΔEmin, Ψ is represented as
[0029] in a case where ΔEmin< ΔE≤ΔEmax, ΔH≤ΔHmax, and ΔC≥1, Ψ is represented as
[0030] in a case whereΔEmin<ΔE≤ΔEmax, ΔH≤ΔHmax, and ΔC<1, Ψ is represented as
[0031] in a case where ΔEmin<ΔE≤ΔEmax, ΔH>ΔHmax, and ΔC≥1, Ψ is represented as
[0032] in a case where Emin<ΔE≤ΔEmax, H>ΔHmax, and ΔC<1, Ψ is represented as; and
[0033] in a case where ΔE>ΔEmax, Ψ is represented as
[0034] wherein ΔEmin represents a first threshold for ΔE, ΔEmax represents a second threshold for ΔE, and ΔHmax represents a threshold for ΔH.
[0035] In this way, the first function may be obtained based on at least one of ΔE, ΔH, or ΔC.
[0036] In some embodiments, z=0 or z=1.
[0037] In some embodiments, the method further comprising: obtaining a plurality of zones by dividing the color space according to a plurality of color tones.
[0038] In this way, different zones in the color space may be obtained, and an ideal color corrected patch may be obtained based on the zone it belongs to.
[0039] In some embodiments, z=1 in a case where the first color and the second color are in the same zone; and z=0 in a case where the first color and the second color are not in the same zone.
[0040] In this way, whether the first color and the second color are in the same zone may be indicated by the value of z. Moreover, an ideal color corrected patch which is in the same zone with the ground truth may be obtained.
[0041] In some embodiments, is represented as:
[0042] where or
[0043] where or
[0044] where or
[0045] where
[0046] In this way, Ψ may be represented by functions whose graph is continuous or smooth, decay rate is adjustable, and is able to connect two given points.
[0047] In some embodiments, 0.00004≤g (α1, z) ≤0.00006;
[0048] 0.24≤g (α2, z) ≤0.36 in a case where the first color and the second color are not in the same zone; 3.2≤g (α2, z) ≤4.8 in a case where the first color and the second color are in the same zone;
[0049] 1.2≤g (α3, z) ≤1.8 in a case where the first color and the second color are not in the same zone; 1.6≤g (α2, z) ≤2.4 in a case where the first color and the second color are in the same zone;
[0050] 0.8≤g (α4, z) ≤1.2;
[0051] 0.08≤g (α5, z) ≤0.12; and
[0052] 0.0008≤g (α6, z) ≤0.0012.
[0053] In this way, the decay rate of Ψ may be limited in an appropriate way.
[0054] In some embodiments, g (α1, z) =0.00005;
[0055] g (α2, z) =3 in a case where the first color and the second color are not in the same zone; g (α2, z) =3 in a case where the first color and the second color are in the same zone;
[0056] g (α3, z) =1.5 in a case where the first color and the second color are not in the same zone; g (α2, z) =2 in a case where the first color and the second color are in the same zone;
[0057] g (α4, z) =1; and
[0058] g (α5, z) =0.1; and
[0059] g (α6, z) =0.001.
[0060] In this way, rule of thumb values of g (α, z) are provided.
[0061] In some embodiments, L1=U2=U3=U4=U5, and U6=L2=L3=L4= L5.
[0062] In an implementation, L1=U2=U3=U4=U5=0.9; U6=L2=L3=L4= L5=0.4; U1=1; and L6=0.
[0063] In some embodiments, the color space is LAB color space.
[0064] In some embodiments, a summation of each row of the CCM equals to a value.
[0065] In this way, hard constraints may be satisfied.
[0066] In an implementation, the value is 1024 to preserve white color.
[0067] According to a second aspect, a method for color correction is provided. The method includes: capturing an image of a first image by a camera; and obtaining a second image by processing the first image though a color correction matrix (CCM) ; wherein the CCM is obtained based on a first function Ψ, wherein the first functionΨis for determining a difference between a first color and a second color; the first color is a color of a first pixel in the first image, and the second color is a color of a second pixel in the second image; and the first function Ψ is obtained based on a first color difference chromatism ΔE, a color tone difference ΔH, and chromaticity difference ΔC between the first color and the second color in the second image.
[0068] In this way, an accurate color difference regarding human perception may be obtained. In addition, the obtained CCM may provide an ideal outcome during color correction.
[0069] In some embodiments, the first color is a ground truth color.
[0070] In such case, the first function is for determining the difference between the ground truth color and the color to be corrected corresponding to the ground truth. In other words, the first function is for determining the error between the color to be corrected and its ground truth.
[0071] In some embodiments, the CCM is tuned in a case where the value of Ψ is not greater than a threshold.
[0072] In this way, the obtained CCM may provide an ideal outcome during color correction.
[0073] In an implementation, the CCM is tuned using an iterative optimization, and the iterative optimization utilizes the Ψ as an objective loss.
[0074] In this way, the CCM may be fine-tuned, such that an ideal CCM may be obtained.
[0075] In some embodiments, the CCM is output in a case where the value of Ψ is greater than the threshold.
[0076] In some embodiments, the method further comprising: capturing a third image by a camera; and obtaining a fourth image by processing the third image through the CCM.
[0077] In this way, the fourth image, which is identical to the third image in human eyes, may be obtained.
[0078] In some embodiments, the first function is a piecewise function having a plurality of piecewise portions that are differently dependent on at least one of ΔE, ΔH, or ΔC;
[0079] the first function is represented as: wherein U represents an upper bound value, L represents a lower bound value, βrepresents a parameter;
[0080] determining a value of a first function Ψ based on the ΔE, ΔC, and ΔH, including:
[0081] in a case where at least one of ΔE, ΔH, or ΔC is in a first range, the first function satisfies
[0082] in a case where at least one of ΔE, ΔH, or ΔC is in a second range, the first function satisfies
[0083] in a case where at least one of ΔE, ΔH, or ΔC is in a third range, the first function satisfies
[0084] in a case where at least one of ΔE, ΔH, or ΔC is in a fourth range, the first function satisfies
[0085] in a case where at least one of ΔE, ΔH, or ΔC is in a fifth range, the first function satisfies and
[0086] in a case where at least one of ΔE, ΔH, or ΔC is in a sixth range, the first function satisfies
[0087] In this way, the first function may be obtained based on at least one of ΔE, ΔH, or ΔC.
[0088] In some embodiments, the first range, the second range, the third range, the fourth range, the fifth range, and the sixth range correspond to a first region, a second region, a third region, a fourth region, a fifth region, and a sixth region respectively in a color space.
[0089] In this way, different regions in the color space may be obtained based on at least one of ΔE, ΔH, or ΔC. Moreover, an ideal color corrected patch may be obtained based on the region it belongs to.
[0090] In some embodiments, in the color space, the first region is a represented by a first approximate ellipse, and the first approximate ellipse is inside a second approximate ellipse; the second region, the third region, the fourth region, and the fifth region are outside the first approximate ellipse and inside the second approximate ellipse; and the sixth region is represented by the region in the color space except the region inside the second approximate ellipse.
[0091] In this way, an ideal color corrected patch may be obtained based on the region it belongs to.
[0092] In some embodiments, in a case where ΔE≤ΔEmin, Ψ is represented as
[0093] in a case where ΔEmin< ΔE≤ΔEmax, ΔH≤ΔHmax, and ΔC≥1, Ψ is represented as
[0094] in a case whereΔEmin<ΔE≤ΔEmax, ΔH≤ΔHmax, and ΔC<1, Ψ is represented as
[0095] in a case where ΔEmin<ΔE≤ΔEmax, ΔH>ΔHmax, and ΔC≥1, Ψ is represented as
[0096] in a case where Emin<ΔE≤ΔEmax, H>ΔHmax, and ΔC<1, Ψ is represented as; and
[0097] in a case where ΔE>ΔEmax, Ψ is represented as
[0098] wherein ΔEmin represents a first threshold for ΔE, ΔEmax represents a second threshold for ΔE, and ΔHmax represents a threshold for ΔH.
[0099] In this way, the first function may be obtained based on at least one of ΔE, ΔH, or ΔC.
[0100] In some embodiments, z=0 or z=1.
[0101] In some embodiments, the method further comprising: obtaining a plurality of zones by dividing the color space according to a plurality of color tones.
[0102] In this way, different zones in the color space may be obtained, and an ideal color corrected patch may be obtained based on the zone it belongs to.
[0103] In some embodiments, z=1 in a case where the first color and the second color are in the same zone; and z=0 in a case where the first color and the second color are not in the same zone.
[0104] In this way, whether the first color and the second color are in the same zone may be indicated by the value of z. Moreover, an ideal color corrected patch which is in the same zone with the ground truth may be obtained.
[0105] In some embodiments, is represented as:
[0106] where or
[0107] where or
[0108] where or
[0109] where
[0110] In this way, Ψ may be represented by functions whose graph is continuous or smooth, decay rate is adjustable, and is able to connect two given points.
[0111] In some embodiments, 0.00004≤g (α1, z) ≤0.00006;
[0112] 0.24≤g (α2, z) ≤0.36 in a case where the first color and the second color are not in the same zone; 3.2≤g (α2, z) ≤4.8 in a case where the first color and the second color are in the same zone;
[0113] 1.2≤g (α3, z) ≤1.8 in a case where the first color and the second color are not in the same zone; 1.6≤g (α2, z) ≤2.4 in a case where the first color and the second color are in the same zone;
[0114] 0.8≤g (α4, z) ≤1.2;
[0115] 0.08≤g (α5, z) ≤0.12; and
[0116] 0.0008≤g (α6, z) ≤0.0012.
[0117] In this way, the decay rate of Ψ may be limited in an appropriate way.
[0118] In some embodiments, g (α1, z) =0.00005;
[0119] g (α2, z) =3 in a case where the first color and the second color are not in the same zone; g (α2, z) =3 in a case where the first color and the second color are in the same zone;
[0120] g (α3, z) =1.5 in a case where the first color and the second color are not in the same zone; g (α2, z) =2 in a case where the first color and the second color are in the same zone;
[0121] g (α4, z) =1; and
[0122] g (α5, z) =0.1; and
[0123] g (α6, z) =0.001.
[0124] In this way, rule of thumb values of g (α, z) are provided.
[0125] In some embodiments, L1=U2=U3=U4=U5, and U6=L2=L3=L4= L5.
[0126] In an implementation, L1=U2=U3=U4=U5=0.9; U6=L2=L3=L4= L5=0.4; U1=1; and L6=0.
[0127] In some embodiments, the color space is LAB color space.
[0128] In some embodiments, a summation of each row of the CCM equals to a value.
[0129] In this way, hard constraints may be satisfied.
[0130] In an implementation, the value is 1024 to preserve white color.
[0131] According to a third aspect, a chip is provided. The chip includes a logic circuit and a power supply circuit. The power supply circuit is used to supply power to the logic circuit. The logical circuit is used to execute the steps of the method in the first aspect or the second aspect.
[0132] According to a fourth aspect, an apparatus is provided. The apparatus includes at least one processor; and at least one memory coupled to the at least one processor. The at least one memory is configured to store at least part of instructions, and when executed by the at least one processor, cause the at least one processor executes the steps of the method in the first aspect or the second aspect.
[0133] According to a fifth aspect, a non-transitory computer-readable storage medium is provided. The non-transitory computer-readable storage medium includes computer software instructions; when computer software instructions are run in a computer device, causing the computer device to execute the steps of the method in the first aspect or the second aspect.
[0134] According to a sixth aspect, a computer program product stored on a non-transitory computer-readable storage medium is provided. The computer program product, when run on the computer, causes the computer to execute the steps of the method in the first aspect or the second aspect.
[0135] According to a seventh aspect, a chip system is provided. The chip system comprising: a processing circuit and a storage medium, wherein the storage medium has stored thereon computer program instructions that, when executed by the processing circuit cause the chip system to implement the method in the first aspect or the second aspect.
[0136] The advantages brought by any design from the third to seventh aspects can be referred to the first aspect or the second aspect, which will not be detailed here.
[0137] On the basis of the implementations provided in the above aspects, the present disclosure is able to provide more implementations by further combination.BRIEF DESCRIPTION OF THE DRAWINGS
[0138] FIG. 1 shows an example of ground truth and color patches in accordance with some embodiments of the present disclosure; .
[0139] FIG. 2 shows an environment in which embodiments of the present disclosure may be implemented;
[0140] FIG. 3 is a block diagram of an example electronic device;
[0141] FIG. 4 is a flow chart illustrating a method by a ED in accordance with some embodiments of the present disclosure;
[0142] FIG. 5 shows another environment in which embodiments of the present disclosure may be implemented;
[0143] FIG. 6 is a flow chart illustrating another method by a ED in accordance with some embodiments of the present disclosure;
[0144] FIGS. 7-9 each show a color space which is regioned in accordance with some embodiments of the present disclosure;
[0145] FIG. 10 shows a color space which is regioned and zoned in accordance with some embodiments of the present disclosure;
[0146] FIGS. 11-14 each show the decay rates for different values of g (α, z) in accordance with some embodiments of the present disclosure;
[0147] FIG. 15 is a flow chart for generating a color correction matrix in accordance with some embodiments of the present disclosure;
[0148] FIG. 16 is a schematic diagram for generating a color correction matrix in accordance with some embodiments of the present disclosure; and
[0149] FIG. 17 is a flow chart illustrating a method by a terminal device in accordance with some embodiments of the present disclosure.DETAILED DESCRIPTION
[0150] Principle of the present disclosure will now be described with reference to the embodiments of the present disclosure. These embodiments are described only for the purpose of illustration and to help those skilled in the art understand and implement the present disclosure, without suggesting any limitation as to the scope of the disclosure. Embodiments described herein can be implemented in various manners other than those described below.
[0151] References in the present disclosure to "one embodiment" , "an embodiment" , "an example embodiment" , "some embodiments" and the like indicate that the embodiment described may include a particular feature, structure, or characteristic, but it is not necessary that every embodiment includes the particular feature, structure, or characteristic. Moreover, such phrases are not necessarily referring to the same embodiment. Further, when a particular feature, structure, or characteristic is described in connection with an embodiment, it is submitted that it is within the knowledge of one skilled in the art to affect such feature, structure, or characteristic in connection with other embodiments whether or not explicitly described.
[0152] Although the terms "first" , "second" , etc. in front of noun (s) and the like may be used herein to describe various elements; and these elements should not be limited by these terms. These terms are only used to distinguish one element from another and they do not limit the order of the noun (s) . For example, a first element could be termed a second element, and similarly, a second element could be termed a first element, without departing from the scope of the embodiments. As used herein, the term "and / or" includes any and all combinations of one or more of the listed terms.
[0153] As used herein, "at least one of: <a list of two or more elements>" and "at least one of <a list of two or more elements>" and similar wording, where the list of two or more elements is joined by "and" or "or" , indicate at least any one of the elements, or at least any two or more of the elements, or at least all the elements.
[0154] The terminology used herein is for the purpose of describing particular embodiments only and is not intended to be limiting of example embodiments. As used herein, the singular forms "a" , "an" and "the" are intended to include the plural forms as well, unless the context clearly indicates otherwise. It will be further understood that the terms "comprises" , "comprising" , "has" , "having" , "includes" and / or "including" , when used herein, specify the presence of stated features, elements, and / or components etc., but do not preclude the presence or addition of one or more other features, elements, components and / or combinations thereof.
[0155] Since human eye is more sensitive to certain colors than others, ΔE is proposed for describing color difference which is generally consistent with human perception.
[0156] However, ΔE is not sufficient to describe human visual preference. Specifically, for a given ground truth color, although two colors are of the same ΔE value or similar ΔE value compared to the ground truth color, human eye still prefers one over another. For example, for a given ground truth color G, although color G1 and color G2 are of the same ΔE value as compared with color G, human eye still prefers color G1 over color G2 (that is, human eye perceives that between color G1 and G2, color G1 is a color more similar to color G) . Therefore, ΔE is not sufficient to describe color difference that reflects human visual perception and human visual preference.
[0157] FIG. 1 shows an example of this observation. In these three color patches with the same value or similar values for ΔE, human perception may pick the left patch over the right one in a glimpse.
[0158] In an example, for a given ground truth color A0, color A1 is a color for which ΔE=4.1, ΔH=24.7°, and ΔC=1.18 as compared with color A0, and color A2 is a color for which ΔE=4.1, ΔH=48.5 °, and ΔC=0.96 as compared with color A0. In such case, human eye may prefer color A1 over color A2.
[0159] In another example, for a given ground truth color B0, color B1 is a color for which ΔE=4.1, ΔH=29.7°, and ΔC=1.22 as compared with color B0, and color B2 is a color for which ΔE=4.1, ΔH=60.3 °, and ΔC=0.96 as compared with color B0. In such case, human eye may prefer color B1 over color B2.
[0160] In yet another example, for a given ground truth color C0, color C1 is a color for which ΔE=4.1, ΔH=8.1°, and ΔC=1.18 as compared with color C0, and color C2 is a color for which ΔE=4.0, ΔH=45.0 °, and ΔC=0.93 as compared with color C0. In such case, human eye may prefer color C1 over color C2.
[0161] Color correction (CC) task is a transformation from camera raw sensor readings to display pixel RGB values. CC is an essential component in digital cameras. As shown in FIG. 2, after a camera (e.g., a new generation phone) capturing an image, raw image from sensors is obtained. Then, color correction is performed by an ISP (image signal processing) pipeline. The ISP pipeline involves sharpen, raw noise filter, color correction, YUV noise filter, contrast gain, temporal noise reduction etc. Color correction is performed with its corresponding color correction matrix (CCM) . CCM is for transformation the raw sensors values to display values. The matrix consists of raw sensor values is multiplied by the CCM to generate the matrix consists of display values) .
[0162] The work in CC optimization can be categorized into four categories:
[0163] CC Objective Loss: The objective that shows the numerical discrepancy between ground truth and color corrected prediction. Early methods minimize either squared error or angular discrepancies in RGB color space. Recent studies, however, suggest that the ΔE error, particularly ΔE00 defined in the LAB color space, yields superior outcomes. This is presumably attributed to ΔE00’s superb accuracy in characterizing color differences.
[0164] Raw Sensor Input Features: Many feature representations have been developed for color correction optimization e.g. linear approaches, look-up tables, and neural networks. In our work we used the linear method but it can be used with any other features. The linear color correction (LCC) optimizes a 3 × 3 linear matrix for transformations between the camera and standard color spaces. Its performance can be improved using Polynomial and Root-Polynomial features (PCC, RPCC) which includes high-order terms alongside LCC’s first-order linear ones.
[0165] Optimization Methods: Depends on which objective loss to optimize, one can utilize different optimization methods. For instance, when using squared error in the RGB space, it can simply be done using a closed-form solution. In more complicated cases such as ΔE error, there are different optimization methods e.g. Nedler-Mead and Pattern Search that has been used in prior arts.
[0166] Illumination Independence: There are many prior arts working on estimating the illumination level in a scene. In this work we assume the illumination level is given.
[0167] In order to mimic human perceptual preference more accurately, in the present disclosure, a new metric Ψ is proposed for describing color difference. Ψ is calculated based on ΔE, ΔH and ΔC. In some embodiments, Ψ may be used for optimizing the CCM.
[0168] FIG. 3 illustrates an example device that may implement the methods and teachings according to this disclosure.
[0169] As shown in FIG. 3, the electronic device (ED) 110 includes at least one processing unit 200. The processing unit 200 implements various processing operations of the ED 110. For example, the processing unit 200 could perform data processing, signal coding, power control, input / output processing, or any other functionality. The processing unit 200 may also be configured to implement some or all of the functionality and / or embodiments described in more detail herein. Each processing unit 200 includes any suitable processing or computing device configured to perform one or more operations. Each processing unit 200 could, for example, include a microprocessor, microcontroller, digital signal processor, field programmable gate array, or application specific integrated circuit.
[0170] The ED 110 may further include at least one transceiver 202, which is optional. The transceiver 202 is configured to modulate data or other content for transmission by at least one antenna or Network Interface Controller (NIC) 204. The transceiver 202 is also configured to demodulate data or other content received by the at least one antenna 204. Each transceiver 202 includes any suitable structure for generating signals for wireless or wired transmission and / or processing signals received wirelessly or by wire. Each antenna 204 includes any suitable structure for transmitting and / or receiving wireless or wired signals. One or multiple transceivers 202 could be used in the ED 110. One or multiple antennas 204 could be used in the ED 110. Although shown as a single functional unit, a transceiver 202 could also be implemented using at least one transmitter and at least one separate receiver.
[0171] The ED 110 may further include one or more input / output devices 206 or interfaces (such as a wired interface to the internet) , which is optional. The input / output devices 206 permit interaction with a user or other devices. Each input / output device 206 includes any suitable structure for providing information to or receiving information from a user, such as a speaker, microphone, keypad, keyboard, display, or touch screen, including network interface communications.
[0172] In addition, the ED 110 may include at least one memory 208, which is optional. The memory 208 stores instructions and data used, generated, or collected by the ED 110. For example, the memory 208 could store software instructions or modules configured to implement some or all of the functionality and / or embodiments described above and that are executed by the processing unit (s) 200. Each memory 208 includes any suitable volatile and / or non-volatile storage and retrieval device (s) . Any suitable type of memory may be used, such as random access memory (RAM) , read only memory (ROM) , hard disk, optical disc, subscriber identity module (SIM) card, memory stick, secure digital (SD) memory card, and the like.
[0173] The ED 110 may be capable of image processing. For example, the ED 110 may be capable color correction and / or calculating color error. The ED 110 may include, but not limited to, a mobile phone, a cellular phone, a smart phone, voice over IP (VoIP) phones, wireless local loop phones, a tablet, a wearable terminal device, a personal digital assistant (PDA) , a portable computer, a desktop computer, an image capture terminal device such as a digital camera, a gaming terminal device, a music storage and playback appliance, a vehicle-mounted wireless terminal device, a wireless endpoint, a smart device, wireless customer-premises equipment (CPE) , an Internet of Things (IoT) device, a watch or other wearables, a head-mounted display (HMD) , a vehicle, a drone, a medical device and application (e.g., remote surgery) , an industrial device and application (e.g., a robot and / or other wireless devices operating in an industrial and / or an automated processing chain context) , a consumer electronics device, a device operating on commercial and / or industrial wireless networks, and the like.
[0174] The embodiments set forth herein represent information sufficient to practice the claimed subject matter and illustrate ways of practicing such subject matter. Upon reading the following description in light of the accompanying figures, those of skill in the art will understand the concepts of the claimed subject matter and will recognize applications of these concepts not particularly addressed herein. These concepts and applications fall within the scope of the disclosure and the accompanying claims.
[0175] As briefly mentioned above, it is crucial to obtain an accurate color difference regarding human perception.
[0176] Various embodiments of the present disclosure will be described below by way of example.
[0177] FIG. 4 shows a flow chart illustrating a method by an electronic device (ED) in accordance with some embodiments of the present disclosure.
[0178] In step 410, the ED obtains a first color difference chromatism ΔE, a color tone difference ΔH, and chromaticity difference ΔC between a first color of a first pixel in a first image and a second color of the second pixel in a second image. The second color is a color to be corrected corresponding to the first color.
[0179] In some embodiments, the first color is a ground truth color. In such case, the difference between the ground truth color and the color to be corrected corresponding to the ground truth may be determined accordingly. In other words, the error between the color to be corrected and its ground truth may be determined accordingly.
[0180] In an implementation, the first color of the first pixel in the first image is the color of the color checker card, which is the ground truth. The second color of the second pixel in the second image may be obtained through a camera by capturing an image of the color checker card. Once the camera captures the image of the color checker card, raw image is obtained from sensors. Then, the raw image may be processed (e.g., using ISP pipeline) and a processed image may be obtained. In such case, the second color of the second pixel in the second image is the second color of the second pixel in the processed image. The second pixel in the processed image corresponds to the first pixel in the color checker card.
[0181] For example, as shown in FIG. 5, the ED 110 captures an image of a color checker card. The ED obtains the first image which is a raw image from the sensors. Then, the ED 110 performs color correction to obtain the second image. The second image is a processed image which can be display on the screen of the ED 110.
[0182] In step 415, the ED 110 determines a value of a first function Ψ based on ΔE, ΔC, and ΔH. The first function is for determining the difference between the first color and the second color.
[0183] As described above, a new metric Ψ is proposed by incorporating color tone and chromacity preservation with ΔE to mimic human perceptual preference more accurately. In this way, a multi-scale objective function is proposed, and an accurate color difference regarding human perception may be obtained.
[0184] In some embodiments, in order to calculate Ψ, the space around the ground truth (L, a, b) may be regioned according to at least one of ΔE, ΔH, or ΔC. In such case, step 415 may further include step 4151 and step 4152. FIG. 6 is a flow chart illustrating a method by the ED 110.
[0185] In step 4151, the ED regions the color space according to at least one of ΔE, ΔH, or ΔC.
[0186] For a given ground truth (L, a, b) in LAB space, the present disclosure provide a method for regioning the space around the ground truth.
[0187] In some embodiments, the space around the ground truth is regioned according to ΔE. Specifically, the space around the ground truth is regioned according to threshold values of ΔE.
[0188] For example, ΔEmax represents the upper threshold value of ΔE and ΔEmin represents the lower threshold value of ΔE. The space around the ground truth is regioned according to ΔEmax and ΔEmin. As shown in FIG. 7, The space around the ground truth is regioned into three parts: region R01 corresponds to the points with ΔE>ΔEmax; region R02 corresponds to the points with ΔEmin<ΔE<ΔEmax; and region R03 corresponds to the points with ΔE<ΔEmin.
[0189] For example, ΔEmin=2, ΔEmax=6.
[0190] In some cases, human perception prefers points in R03 over R02 and R02 over R01.
[0191] In some embodiments, the space around the ground truth (L, a, b) is regioned according to ΔH. Specifically, the space around the ground truth (L, a, b) is regioned according to threshold values of ΔH. The color tone can be describe as the angle between the line from the point to origin and the positive side of the x-axis. In other words, every point on the same angle has the same color tone. In order to preserve the color tone ΔH is introduced as follows.
[0192] As shown in FIG. 8A, a color corrected patch is and its corresponding ground truth is P (L, a, b) . Then the color hue (tone) of the color corrected patch is defined as and the ground truth as h=tan-1 b / a. δh refers to the angle between vectors and Then ΔH is define as
[0193] In order to preserve the color hue (i.e., color tone) , a threshold of color hue may be set for regioning the space around the ground truth. For example, the space around the ground truth is regioned according to the threshold ΔHmax. As shown in FIG. 8B, The space around the ground truth (L, a, b) is regioned into four parts: the color corrected patch whose ΔH is less than ΔHmax corresponds to region R04 and R05; and the color corrected patch whose ΔH is greater than ΔHmax corresponds to region R06 and R07.
[0194] In some embodiments, the space around the ground truth (L, a, b) is regioned according to ΔC. Specifically, the space around the ground truth (L, a, b) is regioned according to threshold values of ΔC.
[0195] Color chromaticity (chroma) can be described as the distance to the origin in the LAB space. For example, a color corrected patch is and its corresponding ground truth is P (L, a, b) . Chroma of will be defined as and chroma of P (L, a, b) will be defined as ThenΔC may be defined as
[0196] The points with ΔC≥1 are more saturated and looks warmer from human perception. In some cases, human perception prefers higher saturated points over lower saturated, that is, the human preference is to keep ΔC≥1.
[0197] In order to preserve the color chromaticity (i.e., saturation) , a threshold of color hue may be set for regioning the space around the ground truth. For example, the space around the ground truth is regioned according to the threshold ΔCmax. As shown in FIG. 9, The space around the ground truth (L, a, b) is regioned into two parts: region R08 corresponds to the points with ΔC>ΔCmax; region R09 corresponds to the points with ΔC<ΔCmax. In an implementation, ΔCmax=1.
[0198] In an embodiment, the color space is regioned according to ΔE, ΔH, and ΔC. In such case, the first range, the second range, the third range, the fourth range, the fifth range, and the sixth range correspond to a first region, a second region, a third region, a fourth region, a fifth region, and a sixth region respectively in a color space.
[0199] In an implementation, in the color space, the first region is a represented by a first approximate ellipse, and the first ellipse is inside a second approximate ellipse; the second region, the third region, the fourth region, and the fifth region are outside the first approximate ellipse and inside the second approximate ellipse; and the sixth region is represented by the region in the color space except the region inside the second approximate ellipse.
[0200] As shown in FIG. 10, the square represents a given ground truth. The space around the ground truth (L, a, b) is regioned according ΔE, ΔH, and ΔC.
[0201] Region R3 corresponds to the points with ΔE≤ΔEmin; region R2 corresponds to the points with ΔEmin<ΔE<ΔEmax; and region R1 corresponds to the points with ΔE>ΔEmax.
[0202] R2 may be further regioned into sub-regions R2.1, R2.2, R2.3, and R2.4 according to ΔH, and ΔC. As shown in FIG. 10, regions R2.1 and R2.2 correspond to the points with ΔEmin< ΔE≤ΔEmax and ΔH≤ΔHmax. Regions R2.3 and R2.4 correspond to the points with ΔEmin< ΔE≤ΔEmax while ΔH>ΔHmax. From the perspective of preserving the color hue, human eye prefers the points in R2.1 and R2.2 over the points in R2.3 and R2.4.
[0203] In addition, regions R2.1, R2.3 correspond to the points with ΔC≥1, and R2.2, R2.4 correspond to the points with ΔC<1. From the perspective of preserving a high chromaticity, human eye prefers the points in R2.1 and R2.3 over the points in R2.2 and R2.4.
[0204] In other words, region R3 (an example of the first region) corresponds to the points with ΔE≤ΔEmin; region R2.1 (an example of the second region) corresponds to the points with ΔEmin< ΔE≤ΔEmax, ΔH≤ΔHmax, and ΔC≥1 ; region R2.2 (an example of the third region) corresponds to the points with ΔEmin<ΔE≤ΔEmax, ΔH≤ΔHmax, and ΔC<1; region R2.3 (an example of the fourth region) corresponds to the points with ΔEmin<ΔE≤ΔEmax, ΔH>ΔHmax, and ΔC≥1; region R2.4 (an example of the fifth region) corresponds to the points with ΔEmin<ΔE≤ΔEmax, H>ΔHmax, and ΔC<1; and region R1 (an example of the sixth region) corresponds to the points with ΔE>ΔEmax.
[0205] Overall, it appears that for the sub-regions R2.1, R2.2, R2.3, and R2.4, perceptually, R2.1 is the most and R2.4 is the least preferred and R2.2 is preferred over R2.3. In general, for a given ground truth, human perception prefers: R3 > R2.1 > R2.2> R2.3 > R2.4.
[0206] In this way, the regions account for human perceptual preference which provides a better metric than ΔE solely.
[0207] In some cases, two points with the same ΔE, ΔH, and ΔC may still have different perceptually preference. For example, for a given ground truth color K, although color K1 (in the upper R2.3) and color K2 (in the lower R2.3) are of the same ΔE, ΔH, and ΔC as compared with color K, human eye still prefers color K1 over color K2 (that is, human eye perceives that between color K1 and K2, color K1 is a color more similar to color K) . In some embodiments, zoning technique is introduced to address this problem.
[0208] In step 4152, the ED obtains a plurality of zones by dividing the color space according to a plurality of color tones. In such case, a plurality of zones are obtained by dividing the color space according to a plurality of color tones. Step 4152 is optional.
[0209] As described above, the color tone can be describe as the angle of the point from the positive side of the x-axis. In other words, every point on the same angle has the same color tone.
[0210] As shown in right-hand side of FIG. 10, the LAB space is zoned by the lines (e.g., diagonal lines) started from the origin. For each diagonal lines, human can perceive drastic changes of the color in the two different zones. For example, as shown in FIG. 10, human can perceive drastic difference between the colors in Zone1 and colors in Zone2.
[0211] In a case where two points with the same values of ΔE, ΔH, and ΔC fall into different zones, the point which is in the same zone as the ground truth is preferred visually. For example, for the above mentioned ground truth color K, color K1 (in the upper R2.3) and color K2 (in the lower R2.3) are of the same ΔE, ΔH, and ΔC as compared with color K, human eye prefers color K1 over color K2. This is because that color K1 and color K are in the same zone while K2 and K are in different zones.
[0212] The plurality of zones may be obtained by dividing the color space according to a color checker card, which is not limited in the present disclosure. In an example, the color space may be divided into 19 zones according to a Macbeth color checker card. In another example, the color space may be divided into 24 zones according to a SG24 color checker card. In yet another example, the color space may be divided into 140 zones according to a SG140 color checker card.
[0213] In some embodiments, the first function is a piecewise function having a plurality of piecewise portions that are differently dependent on at least one of ΔE, ΔH, or ΔC.
[0214] In an implementation, the first function is represented as: wherein U represents an upper bound value, L represents a lower bound value, β represents a parameter.
[0215] In some embodiments, the first range corresponds to the first region. In a case where at least one of ΔE, ΔH, or ΔC is in a first range, the first function satisfies the first range is ΔE≤ΔEmin.
[0216] In a case where at least one of ΔE, ΔH, or ΔC is in a first range (e.g., ΔE≤ΔEmin) which corresponds to the first region in the color space, Ψ is represented as
[0217] in a case where at least one of ΔE, ΔH, or ΔC is in a second range (e.g., ΔEmin< ΔE≤ΔEmax, ΔH≤ΔHmax, and ΔC≥1) which corresponds to the second region in the color space, Ψ is represented as
[0218] in a case where at least one of ΔE, ΔH, or ΔC is in a third range (e.g., ΔEmin<ΔE≤ΔEmax, ΔH≤ΔHmax, and ΔC<1) which corresponds to the third region in the color space, Ψ is represented as
[0219] in a case where at least one of ΔE, ΔH, or ΔC is in a fourth range (e.g., ΔEmin<ΔE≤ΔEmax, ΔH>ΔHmax, and ΔC≥1) which corresponds to the fourth region in the color space, Ψ is represented as
[0220] in a case where at least one of ΔE, ΔH, or ΔC is in a fifth range (e.g., Emin<ΔE≤ΔEmax, H>ΔHmax, and ΔC<1 which corresponds to the fifth region in the color space, Ψ is represented as; and
[0221] in a case where at least one of ΔE, ΔH, or ΔC is in a sixth range (e.g., ΔE>ΔEmax) which corresponds to the sixth region in the color space, Ψ is represented as
[0222] ΔEmin represents a first threshold for ΔE, ΔEmax represents a second threshold for ΔE, and ΔHmax represents a threshold for ΔH.
[0223] In this way, the proposed function Ψ combines mentioned metrics ΔH, or ΔC along with ΔE in a multi-scale manner. Therefore, human perceptual preference will be mimicked more accurately.
[0224] The proposed function Ψ may be designed with a decay rate that can be adjusted according to the behavior or dynamic of the camera image signal processing. For each specific brand and hardware, this decay rate may be adjusted for the best performance of color correction.
[0225] Alternatives for the function Ψ may be derived as follows:
[0226] 1. Continuous: the function should be continuous, meaning it has no breaks or jumps in its graph.
[0227] 2. Adjustable Decay Rate: the decay rate of the function is adjustable, which determines how quickly it decreases.
[0228] 3. Connects Two Points: The function should pass through two given points, for example, A (ΔEmin, ΨMax) and B (ΔEmax, ΨMin0) . In some cases, ΨMaxmay equal to 1 or 0.9, ΨMin may equal to 0, which is not limited in the present disclosure.
[0229] In a first implementation, points in different regions or inside the same region may be differentiated by using exponential decay function. For example, is represented as:
[0230] where and g (α, z) ∈ (-∞, +∞) .
[0231] The parameter g (α, z) defines the rate of decay in the score function (i.e., first function Ψ) .
[0232] FIG. 11 shows the decay rates for different values of g (α, z) . As shown in FIG. 11, x-axis represents the value of ΔE, and y-axis represents the value of Ψ. Different lines represent different value of g (α, z) for the following bounds YMax=0.9, YMin=0, XMax= 8, and XMin=3. In order to keep the lines smooth, some values of g (α, z) may be adopted. As shown in FIG. 11, point A represents g (α, z) =5, ΔE=7, the value of Ψ calculated is 0.6.
[0233] In a second implementation, points in different regions or inside the same region may be differentiated by using polynomial decay function. For example, is represented as:
[0234] FIG. 12 shows the decay rates for different values of g (α, z) . As shown in FIG. 12, x-axis represents the value of ΔE, and y-axis represents the value of Ψ. Different lines represent different value of g (α, z) for the following bounds YMax=0.9, YMin=0, XMax=8, and XMin=3.
[0235] In a third implementation, points in different regions or inside the same region may be differentiated by using Logarithmic decay function. In one example, is represented as:
[0236] where g (α, z) ∈ (-∞, +∞) .
[0237] FIG. 13 shows the decay rates for different values of g (α, z) . As shown in FIG. 13, x-axis represents the value of ΔE, and y-axis represents the value of Ψ. Different lines represent different value of g (α, z) for the following bounds YMax=0.9, YMin=0, XMax=8, and XMin=3.
[0238] In another example, is represented as:
[0239] where g (α, z) ∈ (0, +∞) .
[0240] FIG. 14 shows the decay rates for different values of g (α, z) . As shown in FIG. 14, x-axis represents the value of ΔE, and y-axis represents the value of Ψ. Different lines represent different value of g (α, z) for the following bounds YMax=0.9, YMin=0, XMax=8, and XMin=3.
[0241] It will be appreciated that the design of the function Ψ is not limited the above examples.
[0242] In some embodiments, in the upper-and lower-bound controlled function the upper bound for R1 may be the lower bound for R2. In an implementation, L1, U2, U3, U4, and U5 may be of the same value. In an example, L1=U2=U3=U4=U5=0.9. In an implementation, U6, L2, L3, L4, and L5 may be of the same value. In an example, U6=L2=L3=L4= L5=0.4. In an implementation, U1=1, and L6=0.
[0243] In such case, in the example shown in FIG. 10, the value of Ψ in regions R1, R2, and R3 follows 0≤Ψ1≤Ψ2≤Ψ3≤1, where Ψ1, Ψ2, and Ψ3 represents the value of Ψ in R1, R2, and R3 respectively. In addition, Ψ for points in R1, R2, R3 respectively fall into [0, 0.4] , [0.4, 0.9] and [0.9, 1.0] .
[0244] The full definition of Ψ is shown below:
[0245] Ψ∈ [0, 1] , where 0 and 1 mean worst and perfect scores or values respectively.
[0246] For example, in the case where ΔE≤ΔEmin,
[0247] As an example, the value of g (α1, z) may be calculated according to Table 1. The value of ΔEmin and ΔEmax may be set as ΔEmin=2, ΔEmax=6.
[0248] Note that the values of L1, L2, L3, L4, L5, and L6; and the values of U1, U2, U3, U4, U5, and U6 are not limited in the present disclosure.
[0249] In an implementation, a Boolean parameter z is used for indicating whether two points are in the same zone. For example, z=1 indicates the ground truth points and the color corrected patch are in the same zone, and z=0 indicates otherwise. For example, z=1 in a case where the first color and the second color are in the same zone; and z=0 in a case where the first color and the second color are not in the same zone.
[0250] In an implementation, as shown below, Table 1 illustrates example of value of g (α, z) .
[0251] Table 1
[0252] In the example in Table 1:
[0253] g (α1, z) =0.00005;
[0254] g (α2, z) =3 in a case where the first color and the second color are not in the same zone; g (α2, z) =3 in a case where the first color and the second color are in the same zone;
[0255] g (α3, z) =1.5 in a case where the first color and the second color are not in the same zone; g (α2, z) =2 in a case where the first color and the second color are in the same zone;
[0256] g (α4, z) =1;
[0257] g (α5, z) =0.1; and
[0258] g (α6, z) =0.001.
[0259] Alternatively, ranges for g (α, z) may be provided instead of the exact values. For example, for each value in the table, 0.8× [exact value] ≤ g (α, z) ≤ 1.2× [exact value] .
[0260] That is, 0.00004≤g (α1, z) ≤0.00006;
[0261] 0.24≤g (α2, z) ≤0.36 in a case where the first color and the second color are not in the same zone; 3.2≤g (α2, z) ≤4.8 in a case where the first color and the second color are in the same zone;
[0262] 1.2≤g (α3, z) ≤1.8 in a case where the first color and the second color are not in the same zone; 1.6≤g (α2, z) ≤2.4 in a case where the first color and the second color are in the same zone;
[0263] 0.8≤g (α4, z) ≤1.2;
[0264] 0.08≤g (α5, z) ≤0.12; and
[0265] 0.0008≤g (α6, z) ≤0.0012.
[0266] As described above, a unique way of regioning the LAB space introduced using different metrics (ΔE, ΔC, and ΔH) in the multi-scale manner. Moreover, a novel way to split the LAB space into different zones is defined based on the major color tones. Regioning and zoning mat be used to calculate the proposed metric Ψ. Note that the metric Ψ may be implemented on portion of a hardware to provide a real-time score reflecting the accurate color difference.
[0267] In some embodiments, the proposed metric Ψ may be used to compare quality of different devices. For example, Ψ1 is the color difference between a color corrected image (which is processed by device1) and its corresponding ground truth; Ψ2 is the color difference between another color corrected image (which is processed by device2) and its corresponding ground truth. If Ψ1 is greater than Ψ2, device1 is considered to be better than device 2. In this way, quality of different devices may be ranked regarding human perception.
[0268] In some embodiments, the proposed metric Ψ may be used to evaluate a CCM or compare different CCMs. For example, Ψ01 is the color difference between a color corrected image (which is processed by CCM1) and its corresponding ground truth; Ψ01 is the color difference between another color corrected image (which is processed by CCM2) and its corresponding ground truth. If Ψ01 is greater than Ψ02, CCM1 is considered to be better than CCm2. In this way, different CCMs may be ranked regarding human perception.
[0269] The present disclosure provide a method for color correction. In such case, the multi-scale objective function will be used for camera color correction.
[0270] In step 1110, after determining the value of Ψ, the electronic device determines a color correction matrix (CCM) based on the value of Ψ.
[0271] The color correction matrix is first initialized. The matrix may be initialized with any color coefficient values.
[0272] The evolutionary method NSGA may be used which starts with a set of initial random candidates and proceed the search to find a better solution. Our proposed method supports warm-start, i.e. it is possible to initiate the process with a set of CCM candidates to boost the search in the beginning.
[0273] In step 1115, in each step of the iterative process, the color coefficients in the matrix are adjusted to generate display values. That is, the pixel data set (e.g., the matrix consists of raw sensor values) is multiplied by the CCM to generate the color corrected pixel data set (e.g., the matrix consists of display values) . In one embodiment, the color correction matrix may be a 3×6 matrix for converting the pixel data into the color corrected pixel data.
[0274] For example, at each step of the search, a set of CCM candidates are generated and passed through a synthetic pipeline or a real phone to generate the color corrected pixel data using those candidates.
[0275] In step 1120, metric Ψ is calculated using based on ΔE, ΔC, and ΔH. In an implementation, Ψ is calculated by taking the steps 410 and 415 described above.
[0276] In step 1125, an evaluation is made to determine whether Ψ is greater than a certain threshold. If not, the iterative process returns to step 1110 where the CCM is adjusted to proceed with additional iterations until the calculated color difference has reached the threshold. In other words, the CCM is tuned in a case where the value of Ψ is not greater than a threshold.
[0277] In an implementation, the CCM is tuned using an iterative optimization, and the iterative optimization utilizes the Ψ as an objective loss. Black-box optimization or evolutionary optimization may be used for optimizing the CCM. The metric Ψ may be used as the objective loss function for optimization. For example, the metric Ψ may be used as the objective loss function for black-box optimization such as Bayesian optimization, NeverGrad, which is not limited in the present disclosure.
[0278] In an implementation, the evolutionary method NSGA is used. NSGA starts with a set of initial random CCM candidates and proceed the search to find a better solution. The proposed method supports warm-start, i.e. it is possible to initiate the process with a set of CCM candidates to boost the search in the beginning.
[0279] In an implementation, a summation of each row of the CCM equals to a value. For example, the value is 1024.
[0280] In an example of the CCM which is a 3×N matrix, the first (N-1) elements of each rows may be searched. Then, the last element of each rows will be calculated as
[0281] In this way, hard constraints such as white color preservation on the CCM elements will be satisfied.
[0282] In another implementation, the elements in the CCM are within a lower and upper bound. In this way, soft constrain will be satisfied.
[0283] In step 1130, in a case where the value of Ψ is greater than the threshold, the final CCM for the candidate illuminant is outputted.
[0284] The iterative process will continue until it reaches a satisfactory CCM or the search budget is fully exploited.
[0285] After determining the CCM, the ED captures a third image by a camera; and obtains a fourth image by processing the third image through the CCM. The third image is a raw image captured by sensors, and the fourth image is a processed image using CCM transformation.
[0286] Referring now to FIG. 16, schematic diagram illustrating the steps of FIG. 15 for generating a CCM according to an embodiment of the invention is described. Training Set 1305 includes a checkerboard of colors. Image sensor 1310 acquires raw pixel data set by capturing an image of the checkerboard. The pixel data set (e.g., the matrix consists of raw sensor values) is multiplied by the CCM candidate 1315 to generate the color corrected pixel data set (e.g., the matrix consists of display values) . CCM candidate 1315 is from CCM sample 1335. CCM sample 1335 is generated iteratively by the black-box optimization module 1340 until the color differences between the color corrected pixel data set and the ground truth data set are minimized (i.e., value of Ψ is maximized) .
[0287] The color differences (e.g., value of Ψ) between the color corrected pixel data set (e.g., colors to be displayed after correcting by the CCM candidate 1315) and the ground truth data set (e.g., checkerboard of colors) are calculated by CC objective loss calculation module 1320. In a case where value of Ψ is not less than a certain threshold, the determination module will determine to output the target CCM 1330.
[0288] One of ordinary skill in the art appreciates that any optimization algorithm may be used to find the minimum color differences, such as, for example, the Newton's method, the Simplex method, the Gradient Descent method, and so on. One of ordinary skill in the art appreciates that the convergence of the optimization algorithm may depend on how the color correction matrix is initialized.
[0289] The present disclosure provides another method for color correction implemented by a terminal device. The terminal device performs color correction by using a CCM. The CCM may be determined or obtained by employing the embodiments described above. For example, a smart phone may perform color correction by using the CCM determined by a computing device.
[0290] Referring to FIG. 17, a flow chart illustrating a method by a terminal device in accordance with some embodiments of the present disclosure is described.
[0291] In step 1410, the terminal device captures an image of a first image by a camera.
[0292] In step 1415, the terminal device obtains a second image by processing the first image though a CCM.
[0293] In some embodiments, the CCM is obtained based on a first function Ψ, where the first function Ψ is for determining a difference between a first color and a second color. The first color is a color in the first image, and the second color is a color in the second image. The first function Ψ is obtained based on a first color difference chromatism ΔE, a color tone differenceΔH, and chromaticity difference ΔC between the first color and the second color in the second image.
[0294] As the methods for calculating Ψ and determining the CCM are described above, details will not be repeated here.
[0295] In an example, if an image taking device is not capable of tuning the CCM (i.e., the CCM is fixed in the image taking device) , it may use the CCM which has been tuned. The CCM may be an ideal CCM obtained from a computing device. The computing device may tune the CCM through the method described above in the previous embodiments.
[0296] In another example, if an image taking device (e.g., a professional camera) have CC flexibility and is capable of tuning the CCM, it may obtain the ideal CCM by real-time adjustment through the method described above in the previous embodiments.
[0297] The term "terminal device" refers to any end device that may be capable of wireless communication. By way of example rather than limitation, a terminal device may also be referred to as a communication device, user equipment (UE) , a Subscriber Station (SS) , a Portable Subscriber Station, a Mobile Station (MS) , or an Access Terminal (AT) . The terminal device may include, but not limited to, a mobile phone, a cellular phone, a smart phone, voice over IP (VoIP) phones, wireless local loop phones, a tablet, a wearable terminal device, a personal digital assistant (PDA) , a portable computer, a desktop computer, an image capture terminal device such as a digital camera, a gaming terminal device, a music storage and playback appliance, a vehicle-mounted wireless terminal device, a wireless endpoint, a mobile station, laptop-embedded equipment (LEE) , laptop-mounted equipment (LME) , a USB dongle, a smart device, wireless customer-premises equipment (CPE) , an Internet of Things (IoT) device, a watch or other wearables, a head-mounted display (HMD) , a vehicle, a drone, a medical device and application (e.g., remote surgery) , an industrial device and application (e.g., a robot and / or other wireless devices operating in an industrial and / or an automated processing chain context) , a consumer electronics device, a device operating on commercial and / or industrial wireless networks, and the like. The terminal device may also correspond to a Mobile Termination (MT) part of an IAB node (e.g., a relay node) . In the following description, the terms "terminal device" , "communication device" , "terminal" , "user equipment" and "UE" may be used interchangeably.
[0298] Table 2 shows experiment results where ΔE and Ψ are used respectively for optimizing the CCM.
[0299] Table 2
[0300] In the experiment set up, camera sensitivity functions from SFU dataset are used; X-rite SG 140 color checker card as training set for tuning CC matrix; five different parameter optimization approaches are benchmarked following the proposed CC task formulation. 1997 different reflectance objects are used in SFU dataset as validation set for performance comparisons.
[0301] As seen from Table 2, usage of Ψ instead of ΔE not only resulted in equal / better ΔE average / max values among different tuning approaches, but it also leads to significant lower color tone drifts (ΔH) . In addition, Ψ leads to a robust color correction in general with respect to validation result in second row.
[0302] Some embodiments of the present disclosure provide a computer-readable storage medium (e.g., a non-transitory computer-readable storage medium) . The computer-readable storage medium has stored thereon program instructions that, when run on a ED, cause the ED to execute one or more steps of the method for color error determination and / or color correction as described in any one of the above embodiments.
[0303] For example, the computer-readable storage medium includes, but is not limited to, a magnetic storage device (e.g., a hard disk, a floppy disk or a magnetic tape) , an optical disk (e.g., a compact disk (CD) , or a DVD) , a smart card, and a flash memory device (e.g., an erasable programmable read-only memory (EPROM) , a card, a stick or a key driver) . Various computer-readable storage media described in the embodiments of the present disclosure may represent one or more devices and / or other machine-readable storage media, which are used for storing information. The term "computer-readable storage medium" may include, but is not limited to, wireless channels and various other media capable of storing, containing and / or carrying instructions and / or data.
[0304] Some embodiments of the present disclosure further provide a computer program product. The computer program product includes program instructions carried on a non-transitory computer-readable storage medium. When executed on a network device / terminal device, the computer program instructions cause the network device / terminal device to perform one or more steps of the method for color error determination and / or color correction as described in the above embodiments.
[0305] Beneficial effects of the computer-readable storage medium and the computer program product are the same as the beneficial effects of the method for color error determination and / or color correction as described in some of the above embodiments, and details will not be repeated here.
[0306] The foregoing descriptions are merely specific implementations of the present disclosure, but the protection scope of the present disclosure is not limited thereto. Any changes or replacements within the technical scope of the present disclosure shall be included in the protection scope of the present disclosure. Therefore, the protection scope of the present disclosure shall be subject to the protection scope of the claims.
[0307] In some aspects of the present disclosure, there is provided a computer program comprising instructions. The instructions, when executed by a processor, may cause the processor to implement a method of the present disclosure.
[0308] In some aspects of the present disclosure, there is provided a chip. The chip includes a logic circuit and a power supply circuit. The power supply circuit is used to supply power to the logic circuit. The logical circuit is used to execute the steps of the method for color error determination and / or color correction of the present disclosure.
[0309] In some aspects of the present disclosure, there is provided an apparatus / chipset system comprising means (e.g., at least one processor) to implement a method of the present disclosure. The apparatus / chipset system may be device (that is, a terminal device or a network device) or a module or component in the device. The at least one processor may execute instructions stored in a computer-readable medium to implement the method.
[0310] The apparatus may be an electronic device or an apparatus implemented in an electronic device. For example, the apparatus implemented in an electronic device may be an integrated circuit, which in some contexts may be known by other colloquial names, such as chip, modem, modem chip, baseband chip, or baseband processor. In some implementations, one or more integrated circuits can be packaged into a system-on-chip, a system-in-package, or a multi-chip module. The apparatus may comprise one or more integrated circuits or comprise one or more integrated circuits and other discrete components.
[0311] The solutions described in the disclosure is applicable to a next generation (e.g. sixth generation (6G) or later) network, or a legacy (e.g. 5G, 4G, 3G or 2G) network.
[0312] It will be appreciated that any module, component, or device disclosed herein that executes instructions may include, or otherwise have access to, a non-transitory computer / processor readable storage medium or media for storage of information, such as computer / processor readable instructions, data structures, program modules and / or other data. A non-exhaustive list of examples of non-transitory computer / processor readable storage media includes magnetic cassettes, magnetic tape, magnetic disk storage or other magnetic storage devices, optical disks such as compact disc read-only memory (CD-ROM) , digital video discs or digital versatile discs (i.e., DVDs) , Blu-ray DiscTM, or other optical storage, volatile and non-volatile, removable and non-removable media implemented in any method or technology, random-access memory (RAM) , read-only memory (ROM) , electrically erasable programmable read-only memory (EEPROM) , flash memory or other memory technology. Any such non-transitory computer / processor storage media may be part of a device / apparatus or accessible or connectable thereto. Computer / processor readable / executable instructions to implement a method, an application or a module described herein may be stored or otherwise held by such non-transitory computer / processor readable storage media.
[0313] It could be noted that the message in the disclosure could be replaced with information, which may be carried in one single message, or be carried in more than one separate message.
[0314] The terms “apparatus” and “device” are used exchangeable.
[0315] In the disclosure, the word “a” or “an” when used in conjunction with the term “comprising” or “including” in the claims and / or the specification may mean “one” , but it is also consistent with the meaning of “one or more” , “at least one” , and “one or more than one” unless the content clearly dictates otherwise. Similarly, the word “another” may mean at least a second or more unless the content clearly dictates otherwise.
[0316] In the disclosure, the words “first” , “second” , etc., when used before a same term (e.g., UE, or an operating step) does not mean an order or a sequence of the term. For example, the “first UE” and the “second UE” , means two different UEs without specially indicated, and similarly, the “first step” and the “second step” means two different operating steps without specially indicated, but does not mean the first step have to happen before the second step. The real order depends on the logic of the two steps.
[0317] The terms “coupled” , “coupling” or “connected” as used herein can have several different meanings depending on the context in which these terms are used. For example, as used herein, the terms coupled, coupling, or connected can indicate that two elements or devices are directly connected to one another or connected to one another through one or more intermediate elements or devices via a mechanical element depending on the particular context.
[0318] Note that the expression “at least one of A or B” , as used herein, is interchangeable with the expression “A and / or B” . It refers to a list in which you may select A or B or both A and B. Similarly, “at least one of A, B, or C” , as used herein, is interchangeable with “A and / or B and / or C” or “A, B, and / or C” . It refers to a list in which you may select: A or B or C, or both A and B, or both A and C, or both B and C, or all of A, B and C. The same principle applies for longer lists having a same format.
[0319] The present disclosure encompasses various embodiments, including not only method embodiments, but also other embodiments such as apparatus embodiments and embodiments related to non-transitory computer readable storage media. Embodiments may incorporate, individually or in combinations, the features disclosed herein.
[0320] The term “receive” , “detect” and “decode” as used herein can have several different meanings depending on the context in which these terms are used. For example, without special note, the term “receive” may indicate that information (e.g., DCI, or MAC-CE, RRC signaling or TB) is received successfully by the receiving node, which means the receiving side correctly detect and decode it. In this scenario, “receive” may cover “detect” and “decode” or may indicates same thing, e.g., “receive paging” means decoding paging correctly and obtaining the paging successfully, accordingly, “the receiving side does not receive paging” means the receiving side does not detect and / or decoding the paging. “paging is not received” means the receiving side tries to detect and / or decoding the paging, but not obtain the paging successfully. The term “receive” may sometimes indicate that a signal arrives at the receiving side, but does not mean the information in the signal is detected and decoded correctly, then the receiving side need perform detecting and decoding on the signal to obtain the information carried in the signal. In this scenario, “receive” , “detect” and “decode” may indicate different procedure at receiving side to obtain the information. Although this disclosure refers to illustrative embodiments, this is not intended to be construed in a limiting sense. Various modifications and combinations of the illustrative embodiments, as well as other embodiments of the disclosure, will be apparent to persons skilled in the art upon reference to the description. When combining two or more embodiments, not all the features in the embodiments to be combined are necessary for the combination.
[0321] Features disclosed herein in the context of any particular embodiments may also or instead be implemented in other embodiments. Method embodiments, for example, may also or instead be implemented in apparatus, system, and / or computer program product embodiments. In addition, although embodiments are described primarily in the context of methods and apparatus, other implementations are also contemplated, as instructions stored on one or more non-transitory computer-readable media, for example. Such media could store programming or instructions to perform any of various methods consistent with the present disclosure.
Claims
1.A method for color error determination, comprising:obtaining a first color difference chromatism ΔE, a color tone differenceΔH, and chromaticity difference ΔC between a first color of a first pixel in a first image and a second color of the second pixel in a second image; the second color is a color to be corrected corresponding to the first color; anddetermining a value of a first function Ψ based on ΔE, ΔC, and ΔH, wherein the first function is for determining the difference between the first color and the second color.2.The method of claim 1, wherein the first color is a ground truth color.3.The method of claim 1 or 2, after determining the value of Ψ, further comprising:determining a color correction matrix (CCM) based on the value of Ψ.4.The method of claim 3, wherein determining the CCM comprising:tuning the CCM in a case where the value of Ψ is not greater than a threshold.5.The method of claim 3 or 4, wherein tuning the CCM includes:tuning the CCM using an iterative optimization, and the iterative optimization utilizes the Ψ as an objective loss.6.The method of any of claims 3-5, wherein determining the CCM comprising:outputting the CCM in a case where the value of Ψ is greater than the threshold.7.The method of claim 6, further comprising:capturing a third image by a camera; andobtaining a fourth image by processing the third image through the CCM.8.The method of any one of the preceding claims, wherein the first function is a piecewise function having a plurality of piecewise portions that are differently dependent on at least one of ΔE, ΔH, or ΔC;the first function is represented as: wherein U represents an upper bound value, L represents a lower bound value, βrepresents a parameter; anddetermining a value of a first function Ψ based on the ΔE, ΔC, and ΔH includes:in a case where at least one of ΔE, ΔH, or ΔC is in a first range, the first function satisfiesin a case where at least one of ΔE, ΔH, or ΔC is in a second range, the first function satisfiesin a case where at least one of ΔE, ΔH, or ΔC is in a third range, the first function satisfiesin a case where at least one of ΔE, ΔH, or ΔC is in a fourth range, the first function satisfiesin a case where at least one of ΔE, ΔH, or ΔC is in a fifth range, the first function satisfiesandin a case where at least one of ΔE, ΔH, or ΔC is in a sixth range, the first function satisfies9.The method of claim 8, wherein the first range, the second range, the third range, the fourth range, the fifth range, and the sixth range correspond to a first region, a second region, a third region, a fourth region, a fifth region, and a sixth region respectively in a color space.10.The method of claim 8 or 9, wherein in the color space,the first region is a represented by a first approximate ellipse, and the first approximate ellipse is inside a second approximate ellipse;the second region, the third region, the fourth region, and the fifth region are outside the first approximate ellipse and inside the second approximate ellipse; andthe sixth region is represented by the region in the color space except the region inside the second approximate ellipse.11.The method of any one of the preceding claims, wherein:in a case where ΔE≤ΔEmin, Ψ is represented asin a case where ΔEmin< ΔE≤ΔEmax, ΔH≤ΔHmax, and ΔC≥1, Ψ is represented asin a case whereΔEmin<ΔE≤ΔEmax, ΔH≤ΔHmax, and ΔC<1, Ψ is represented asin a case where ΔEmin<ΔE≤ΔEmax, ΔH>ΔHmax, and ΔC≥1, Ψ is represented asin a case where Emin<ΔE≤ΔEmax, H>ΔHmax, and ΔC<1, Ψ is represented as; andin a case where ΔE>ΔEmax, Ψ is represented aswherein ΔEmin represents a first threshold for ΔE, ΔEmax represents a second threshold for ΔE, and ΔHmax represents a threshold for ΔH.12.The method any of claims 8-11, wherein z=0 or z=1.13.The method of any one of the preceding claims, further comprising:obtaining a plurality of zones by dividing the color space according to a plurality of color tones.14.The method of any of claims 8-13, whereinz=1 in a case where the first color and the second color are in the same zone; andz=0 in a case where the first color and the second color are not in the same zone.15.The method of any of claims 8-14, wherein is represented as:whereorwhereorwhereorwhere16.The method of any of claims 8-15, wherein0.00004≤g (α1, z) ≤0.00006;0.24≤g (α2, z) ≤0.36 in a case where the first color and the second color are not in the same zone; 3.2≤g (α2, z) ≤4.8 in a case where the first color and the second color are in the same zone;1.2≤g (α3, z) ≤1.8 in a case where the first color and the second color are not in the same zone; 1.6≤g (α2, z) ≤2.4 in a case where the first color and the second color are in the same zone;0.8≤g (α4, z) ≤1.2;0.08≤g (α5, z) ≤0.12; and0.0008≤g (α6, z) ≤0.0012.17.The method of claim 16, whereing (α1, z) =0.00005;g (α2, z) =3 in a case where the first color and the second color are not in the same zone; g (α2, z) =4 in a case where the first color and the second color are in the same zone;g (α3, z) =1.5 in a case where the first color and the second color are not in the same zone; g (α2, z) =2 in a case where the first color and the second color are in the same zone;g (α4, z) =1;g (α5, z) =0.1; andg (α6, z) =0.001.18.The method of any of claims 8-17, whereinL1=U2=U3=U4=U5=0.9;U6=L2=L3=L4= L5=0.4;U1=1; andL6=0.19.The method of any of claims 9-18, wherein the color space is LAB color space.20.The method of any of claims 3-19, wherein a summation of each row of the CCM equals to a value.21.The method of claim 20, wherein the value is 1024.22.A method for color correction, comprising:capturing an image of a first image by a camera; andobtaining a second image by processing the first image though a color correction matrix (CCM) ;wherein the CCM is obtained based on a first function Ψ, wherein the first function Ψ is for determining a difference between a first color and a second color;the first color is a color of a first pixel in the first image, and the second color is a color of a second pixel in the second image; andthe first function Ψ is obtained based on a first color difference chromatism ΔE, a color tone difference ΔH, and chromaticity difference ΔC between the first color and the second color in the second image.23.The method of claim 22, wherein the first color is a ground truth color.24.The method of claim 22 or 23, wherein the CCM is tuned in a case where the value of Ψ is not greater than a threshold.25.The method of any of claims 22-24, wherein the CCM is tuned using an iterative optimization, and the iterative optimization utilizes the Ψ as an objective loss.26.The method of any of claims 22-25, wherein the CCM is output in a case where the value of Ψ is greater than the threshold.27.The method of claim 26, further comprising:capturing a third image by a camera; andobtaining a fourth image by processing the third image through the CCM.28.The method of any of claims 22-27, wherein the first function is a piecewise function having a plurality of piecewise portions that are differently dependent on at least one of ΔE, ΔH, or ΔC;the first function is represented as: wherein U represents an upper bound value, L represents a lower bound value, βrepresents a parameter; anddetermining a value of a first function Ψ based on the ΔE, ΔC, and ΔH includes:in a case where at least one of ΔE, ΔH, or ΔC is in a first range, the first function satisfiesin a case where at least one of ΔE, ΔH, or ΔC is in a second range, the first function satisfiesin a case where at least one of ΔE, ΔH, or ΔC is in a third range, the first function satisfiesin a case where at least one of ΔE, ΔH, or ΔC is in a fourth range, the first function satisfiesin a case where at least one of ΔE, ΔH, or ΔC is in a fifth range, the first function satisfiesandin a case where at least one of ΔE, ΔH, or ΔC is in a sixth range, the first function satisfies29.The method of claim 28, wherein the first range, the second range, the third range, the fourth range, the fifth range, and the sixth range correspond to a first region, a second region, a third region, a fourth region, a fifth region, and a sixth region respectively in a color space.30.The method of claim 28 or 29, wherein in the color space,the first region is a represented by a first approximate ellipse, and the first approximate ellipse is inside a second approximate ellipse;the second region, the third region, the fourth region, and the fifth region are outside the first approximate ellipse and inside the second approximate ellipse; andthe sixth region is represented by the region in the color space except the region inside the second approximate ellipse.31.The method of any of claims 22-30, wherein:in a case where ΔE≤ΔEmin, Ψ is represented asin a case where ΔEmin< ΔE≤ΔEmax, ΔH≤ΔHmax, and ΔC≥1, Ψ is represented asin a case whereΔEmin<ΔE≤ΔEmax, ΔH≤ΔHmax, and ΔC<1, Ψ is represented asin a case where ΔEmin<ΔE≤ΔEmax, ΔH>ΔHmax, and ΔC≥1, Ψ is represented asin a case where Emin<ΔE≤ΔEmax, H>ΔHmax, and ΔC<1, Ψ is represented as; andin a case where ΔE>ΔEmax, Ψ is represented aswherein ΔEmin represents a first threshold for ΔE, ΔEmax represents a second threshold for ΔE, and ΔHmax represents a threshold for ΔH.32.The method of any of claims 28-31, wherein z=0 or z=1.33.The method of any of claims 22-32, further comprising:obtaining a plurality of zones by dividing the color space according to a plurality of color tones.34.The method of any of claims 28-33, whereinz=1 in a case where the first color and the second color are in the same zone; andz=0 in a case where the first color and the second color are not in the same zone.35.The method of any of claims 28-34, wherein is represented as:whereorwhereorwhereorwhere36.The method of any of claims 28-35, wherein0.00004≤g (α1, z) ≤0.00006;0.24≤g (α2, z) ≤0.36 in a case where the first color and the second color are not in the same zone; 3.2≤g (α2, z) ≤4.8 in a case where the first color and the second color are in the same zone;1.2≤g (α3, z) ≤1.8 in a case where the first color and the second color are not in the same zone; 1.6≤g (α2, z) ≤2.4 in a case where the first color and the second color are in the same zone;0.8≤g (α4, z) ≤1.2;0.08≤g (α5, z) ≤0.12; and0.0008≤g (α6, z) ≤0.0012.37.The method of claim 36, whereing (α1, z) =0.00005;g (α2, z) =3 in a case where the first color and the second color are not in the same zone; g (α2, z) =3 in a case where the first color and the second color are in the same zone;g (α3, z) =1.5 in a case where the first color and the second color are not in the same zone; g (α2, z) =2 in a case where the first color and the second color are in the same zone;g (α4, z) =1; andg (α5, z) =0.1; andg (α6, z) =0.001.38.The method of any of claims 28-37, whereinL1=U2=U3=U4=U5=0.9;U6=L2=L3=L4= L5=0.4;U1=1; andL6=0.39.The method of any of claims 29-38, wherein the color space is LAB color space.40.The method of any of claims 22-39, wherein a summation of each row of the CCM equals to a value.41.The method of claim 40, wherein the value is 1024.42.An apparatus, comprising:at least one processor; andat least one memory coupled to the at least one processor, the at least one memory storing at least part of instructions that, when executed by the at least one processor, cause the at least one processor to implement the method of any one of claims 1 to 21, or claims 22 to 41.43.A computer-readable storage medium having stored thereon computer program instructions that, when executed by a processing circuit of a computer, cause the computer to implement the method of any one of claims 1 to 21, or claims 22 to 41.44.A computer program product having instructions that, when executed by a computer, cause the computer to implement the method of any one of claims 1 to 21, or claims 22 to 41.45.A chip system comprising: a processing circuit and a storage medium, wherein the storage medium has stored thereon computer program instructions that, when executed by the processing circuit cause the chip system to implement the method of any one of claims 1 to 21, or claims 22 to 41.